﻿/* 
 * OmniSentient Lockdown Design System v1.5.0
 * Strict Institutional Standards - Blueprint Approved
 */

:root {
    /* --- Core Tokens --- */
    --font-sans: Inter, ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, Arial, 'Noto Sans', 'Helvetica Neue', sans-serif;
    --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;

    /* --- Spacing Scale --- */
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 24px;
    --space-6: 32px;
    --space-7: 48px;
    --space-8: 64px;

    /* --- Container & Layout --- */
    --container-max: 1280px;
    --bg-nav: rgba(2, 6, 23, 0.82);

    /* --- Radius --- */
    --r-sm: 4px;
    --r-md: 6px;
    --r-lg: 12px;

    /* --- Institutional Typography Scale --- */
    --fs-h1: 28px;
    /* Page title */
    --fs-h2: 20px;
    /* Card title */
    --fs-h3: 16px;
    /* Subsection */
    --fs-body: 14px;
    /* Default */
    --fs-small: 13px;
    /* Labels / Meta */
    --fs-chip: 12px;
    /* Badges only */
    --fs-hud: 34px;
    /* Metric HUD numbers */
    --mono-size: 13px;
    /* Mono standard */

    /* Line heights */
    --lh-tight: 1.2;
    --lh-snug: 1.35;
    --lh-base: 1.55;
    --lh-body: 1.55;
    --lh-label: 1.35;

    /* Weights */
    --fw-regular: 400;
    --fw-medium: 500;
    --fw-semibold: 600;
    --fw-bold: 700;
    --mono-weight: 500;

    --kpi-label-size: 11px;
    --kpi-label-weight: 600;
    --kpi-value-size: 24px;
    --kpi-value-weight: 700;

    /* Letter spacing */
    --ls-tight: -0.01em;
    --ls-caps: 0.08em;
    /* Sidebar headers only */

    /* --- Institutional Color Palette --- */
    --text-strong: rgba(255, 255, 255, 0.92);
    --text-primary: rgba(255, 255, 255, 0.78);
    --text-muted: rgba(255, 255, 255, 0.62);
    --text-ghost: rgba(255, 255, 255, 0.48);

    --bg-main: #020617;
    --bg-card: #0d1117;
    --bg-surface: rgba(255, 255, 255, 0.03);

    --border-subtle: rgba(255, 255, 255, 0.08);
    --border-strong: rgba(255, 255, 255, 0.12);

    /* Accents & Semantics */
    --accent: #6366f1;
    --accent-ink: rgba(255, 255, 255, 0.95);

    --ok: #2da44e;
    --warn: #d29922;
    --danger: #f85149;

    /* --- Status Tag System Tokens --- */
    --tag-r: 6px;
    --tag-fs: 12px;
    --tag-lh: 1.25;
    --tag-fw: 600;
    --tag-py: 2px;
    --tag-px: 8px;

    --tag-bg: rgba(255, 255, 255, 0.03);
    --tag-bd: rgba(255, 255, 255, 0.12);
    --tag-fg: rgba(255, 255, 255, 0.82);

    --tag-ok-fg: #22c55e;
    --tag-warn-fg: #f59e0b;
    --tag-danger-fg: #ef4444;
    --tag-muted-fg: rgba(255, 255, 255, 0.55);

    /* --- Institutional Table Tokens --- */
    --tbl-px: 24px;
    --tbl-py: 12px;
    --tbl-head-py: 14px;
    --tbl-border: rgba(255, 255, 255, 0.08);
    --tbl-head-bg: var(--alpha-2);
    --tbl-hover: rgba(255, 255, 255, 0.03);
    --tbl-head-fg: var(--alpha-60);
    --tbl-text-fg: rgba(255, 255, 255, 0.88);
}

/* --- Institutional Typography Utilities --- */
.text-brand {
    color: var(--accent);
}

.text-strong {
    color: var(--text-strong);
}

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

.text-muted {
    color: var(--text-muted);
}

.text-ghost {
    color: var(--text-ghost);
}

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

.text-sm {
    font-size: var(--fs-small);
}

.font-bold {
    font-weight: var(--fw-bold);
}

/* --- Institutional Layout Utilities --- */
.container {
    max-width: var(--container-max);
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--space-6);
    padding-right: var(--space-6);
}

.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

.w-full {
    width: 100%;
}

.grid {
    display: grid;
    gap: var(--space-6);
}

.gap-12 {
    gap: 48px;
}

@media (min-width: 1025px) {
    .grid-desktop-4 {
        grid-template-columns: repeat(4, 1fr);
    }

    .col-span-3 {
        grid-column: span 3 / span 3;
    }

    .col-span-4 {
        grid-column: span 4 / span 4;
    }

    .hidden-mobile {
        display: block !important;
    }
}

@media (max-width: 1024px) {
    .hidden-mobile {
        display: none !important;
    }

    .col-span-3,
    .col-span-4 {
        grid-column: span 1 / span 1;
    }
}

/* --- Spacing System --- */
.mt-2 {
    margin-top: var(--space-2);
}

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

.mt-12 {
    margin-top: 48px;
}

.mb-12 {
    margin-bottom: 48px;
}

.py-20 {
    padding-top: 80px;
    padding-bottom: 80px;
}

.border-subtle {
    border-color: var(--border-subtle);
}

.border-b {
    border-bottom-width: 1px;
    border-bottom-style: solid;
}

/* =========================================================
   BASE STYLES
   ========================================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ===== Zero-Trap Scroll: Browser Window owns the scroll ===== */
html,
body {
    height: auto !important;
    min-height: 100% !important;
    overflow: visible !important;
    /* No traps anywhere */
    background-color: var(--bg-main);
}

body {
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: var(--fs-body);
    line-height: var(--lh-base);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    overflow-x: hidden !important;
    /* Prevent horizontal jitter only */
}

/* =========================================================
   GLOBAL TABLE TYPOGRAPHY LOCK
   ========================================================= */

.data-table {
    border-collapse: collapse;
}

.data-table th {
    font-size: var(--fs-small);
    font-weight: var(--fw-semibold);
    line-height: var(--lh-snug);
}

.data-table td {
    font-size: var(--fs-body);
    font-weight: var(--fw-regular);
    line-height: var(--lh-base);
}

/*
 * GUARDRAILS â€” Do not break these rules:
 * - No font-size below 13px except .t-chip (12px)
 * - No ALL CAPS except .t-nav-section and short chip text
 * - No ad-hoc text-[Xpx] classes in templates
 */

/* --- Institutional Typography Utilities --- */
.t-h1 {
    font-size: var(--fs-h1);
    line-height: 1.25;
    font-weight: var(--fw-semibold);
    letter-spacing: var(--ls-tight);
    color: var(--text-strong);
}

.t-h2 {
    font-size: var(--fs-h2);
    line-height: 1.3;
    font-weight: var(--fw-semibold);
    color: var(--text-strong);
}

.t-h3 {
    font-size: var(--fs-h3);
    line-height: 1.3;
    font-weight: var(--fw-semibold);
    color: var(--text-strong);
}

.t-body {
    font-size: var(--fs-body);
    line-height: var(--lh-body);
    font-weight: var(--fw-regular);
    color: var(--text-primary);
}

.t-description {
    font-size: var(--fs-body);
    line-height: var(--lh-body);
    font-weight: var(--fw-regular);
    color: var(--text-muted);
}

.t-small {
    font-size: var(--fs-small);
    line-height: var(--lh-body);
    font-weight: var(--fw-regular);
    color: var(--text-muted);
}

.t-label {
    font-size: var(--fs-small);
    line-height: var(--lh-label);
    font-weight: var(--fw-medium);
    color: var(--text-muted);
}

.t-hud {
    font-size: var(--fs-hud);
    line-height: var(--lh-tight);
    font-weight: var(--fw-semibold);
    letter-spacing: var(--ls-tight);
    color: var(--text-strong);
}

.kpi-label {
    font-size: var(--kpi-label-size);
    font-weight: var(--kpi-label-weight);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: var(--muted-65);
}

.kpi-value {
    font-size: var(--kpi-value-size);
    font-weight: var(--kpi-value-weight);
    line-height: var(--lh-snug);
}

.t-chip {
    font-size: var(--fs-chip);
    line-height: 1.2;
    font-weight: var(--fw-semibold);
}

.t-nav-section {
    font-size: 12px;
    font-weight: var(--fw-semibold);
    letter-spacing: var(--ls-caps);
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.55);
}

.t-mono {
    font-family: var(--font-mono);
    font-size: var(--mono-size);
    font-weight: var(--mono-weight);
}

.t-faint {
    color: var(--text-ghost);
}

/* --- Institutional Typography Utilities (Mapped) --- */
.page-title {
    font-size: var(--fs-h1);
    line-height: 1.25;
    font-weight: var(--fw-semibold);
    letter-spacing: var(--ls-tight);
    color: var(--text-strong);
    margin: 0;
}

.section-title {
    font-size: var(--fs-h2);
    line-height: 1.3;
    font-weight: var(--fw-semibold);
    color: var(--text-strong);
}

.t-subtitle {
    font-size: var(--fs-body);
    line-height: var(--lh-body);
    font-weight: var(--fw-regular);
    color: var(--text-muted);
}

/* =========================================================
   SURFACE SCOPES - Institutional Layering
   Each page is wrapped in a surface class to prevent bleed.
   ========================================================= */

/* Surface scopes are defined below or at the end of the file as merged modules. */


/* --- Institutional Shell (Q4 Locked) --- */
.dashboard-shell {
    display: flex;
    min-height: 100vh;
    background: var(--bg-main);
    overflow: visible !important;
}

.sidebar {
    width: 260px;
    height: 100vh;
    background: var(--bg-card);
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    flex-shrink: 0;
    border-right: 1px solid var(--border-subtle);
    display: flex;
    flex-direction: column;
    z-index: 100;
    overflow-y: auto;
    /* Sidebar itself can scroll if menu is long */
}

/* ===== Kill any inner scroll traps ===== */
.app-shell,
.shell-body,
.main,
.page,
.page-content {
    height: auto !important;
    min-height: 0 !important;
    overflow: visible !important;
}

.app-shell {
    flex: 1;
    min-width: 0;
    margin-left: 260px;
    /* offset for fixed sidebar */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.shell-header {
    height: 64px;
    background: var(--bg-main);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--space-6);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--border-subtle);
}

.shell-body {
    flex: 1;
    padding: var(--space-6);
}

/* --- Spacing & Rhythm --- */
.card-stack {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.card-content-padding {
    padding: 24px;
}

.section-margin-bottom {
    margin-bottom: 24px;
}

.item-margin-bottom {
    margin-bottom: 12px;
}

/* Sidebar Specific (Blueprint) */
.sidebar-label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: var(--caps-track);
    color: var(--text-ghost);
    opacity: 0.6;
    padding: 24px 16px 8px;
    /* Primer vertical spacing */
}

.nav-item {
    font-size: 14px;
    font-weight: 500;
    height: 40px;
    padding: 0 14px;
    margin: 2px 14px;
    border-radius: var(--r-md);
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.2s;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-strong);
}

.nav-item.active {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-strong);
}

.nav-icon {
    width: 16px;
    text-align: center;
    opacity: 0.7;
    font-size: 14px;
}

/* --- Grid System (7:5 Split) --- */
.grid {
    display: grid;
    gap: var(--space-6);
}

@media (min-width: 768px) {
    .md\:grid-cols-12 {
        grid-template-columns: repeat(12, 1fr);
    }

    .md\:col-span-1 {
        grid-column: span 1 / span 1;
    }

    .md\:col-span-2 {
        grid-column: span 2 / span 2;
    }

    .md\:col-span-3 {
        grid-column: span 3 / span 3;
    }

    .md\:col-span-4 {
        grid-column: span 4 / span 4;
    }

    .md\:col-span-5 {
        grid-column: span 5 / span 5;
    }

    .md\:col-span-6 {
        grid-column: span 6 / span 6;
    }

    .md\:col-span-7 {
        grid-column: span 7 / span 7;
    }

    .md\:col-span-8 {
        grid-column: span 8 / span 8;
    }

    .md\:col-span-9 {
        grid-column: span 9 / span 9;
    }

    .md\:col-span-10 {
        grid-column: span 10 / span 10;
    }

    .md\:col-span-11 {
        grid-column: span 11 / span 11;
    }

    .md\:col-span-12 {
        grid-column: span 12 / span 12;
    }
}

/* Sticky Rail (Blueprint) */
.sticky-rail {
    position: sticky;
    top: 88px;
    /* Offset under header */
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* --- UI Components --- */
.ui-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--r-md);
    padding: var(--space-6);
}

.ui-card.bg-surface {
    background: var(--bg-surface);
}

/* --- Button System (D5 Action Hierarchy) --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 36px;
    padding: 0 14px;
    border-radius: var(--r-md);
    font-size: 13px;
    font-weight: 600;
    transition: all 0.15s;
    cursor: pointer;
    text-decoration: none;
    border: 1px solid transparent;
    white-space: nowrap;
    gap: 6px;
}

/* PRIMARY: Only for irreversible / core workflow actions (Run Scan, Remediate) */
.btn-primary {
    background: var(--accent);
    color: var(--accent-ink);
    border-color: transparent;
    box-shadow: none;
}

.btn-primary:hover {
    filter: brightness(1.1);
}

.btn-primary:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* SECONDARY: For navigation / setup / export actions */
.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: rgba(255, 255, 255, 0.80);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.09);
    border-color: rgba(255, 255, 255, 0.22);
}

.btn-secondary:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.3);
    outline-offset: 2px;
}

/* GHOST: Table row actions, re-check, secondary ledger actions */
.btn-ghost,
.btn--ghost {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.55);
}

.btn-ghost:hover,
.btn--ghost:hover {
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.80);
}

/* DANGER: Destructive primary actions */
.btn-danger {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.35);
    color: #f87171;
}

.btn-danger:hover {
    background: rgba(239, 68, 68, 0.25);
    border-color: rgba(239, 68, 68, 0.5);
}


/* Core Stacking Primitives */
.stack {
    display: flex;
    flex-direction: column;
}

/* --- Mission Control Specific Refinements --- */
.mc-threat-metrics-gap {
    gap: 24px !important;
}

/* --- Data Table Consistency (Institutional Alignment) --- */
/* --- Institutional Table System (.data-table) --- */
.table-wrap {
    overflow-x: auto;
    width: 100%;
}

.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    text-align: left;
}

.data-table th {
    background: var(--tbl-head-bg);
    padding: var(--tbl-head-py) var(--tbl-px);
    font-size: var(--fs-small);
    font-weight: var(--fw-bold);
    color: var(--tbl-head-fg);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--tbl-border);
}

.data-table td {
    padding: var(--tbl-py) var(--tbl-px);
    font-size: var(--fs-body);
    color: var(--tbl-text-fg);
    border-bottom: 1px solid var(--tbl-border);
    vertical-align: middle;
}

.data-table tbody tr:hover {
    background: var(--tbl-hover);
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

/* Column Utilities */
.col-num {
    text-align: right !important;
    font-family: var(--font-mono);
    font-variant-numeric: tabular-nums;
}

.col-center {
    text-align: center !important;
}

.text-left {
    text-align: left !important;
}

.text-right {
    text-align: right !important;
}

.text-center {
    text-align: center !important;
}

/* Legacy / Fallback Alignment */
.inventory-table {
    width: 100%;
    border-collapse: collapse;
}

.inventory-table th,
.inventory-table td {
    padding: var(--tbl-py) var(--tbl-px);
    border-bottom: 1px solid var(--tbl-border);
}

.inventory-table th {
    text-align: left;
    font-size: var(--fs-small);
    font-weight: var(--fw-bold);
    color: var(--tbl-head-fg);
    background: var(--tbl-head-bg);
    text-transform: uppercase;
}

.stack-sm {
    gap: var(--space-2);
}

.stack-md {
    gap: var(--space-4);
}

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

.stack-xl {
    gap: var(--space-6);
}

.divide-y>*+* {
    border-top: 1px solid var(--border-subtle);
}

/* Utilities (Blueprint Limited) */
.text-brand {
    color: var(--brand-indigo);
}

.text-danger {
    color: var(--danger);
}

.text-success {
    color: var(--success);
}

.text-strong {
    color: var(--text-strong);
}

.text-muted {
    color: var(--text-muted);
}

.tracking-widest {
    letter-spacing: 0.1em;
}

.uppercase {
    text-transform: uppercase;
}

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

.bg-subtle {
    background-color: var(--border-subtle);
}

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

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.max-w-1400 {
    max-width: 1400px;
    margin: 0 auto;
}

.mt-2 {
    margin-top: 8px;
}

.mt-4 {
    margin-top: 16px;
}

.mt-6 {
    margin-top: 24px;
}

.py-3 {
    padding-top: 12px;
    padding-bottom: 12px;
}

.flex {
    display: flex;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.gap-2 {
    gap: 8px;
}

.gap-3 {
    gap: 12px;
}

.gap-4 {
    gap: 16px;
}

/* --- Maintenance Page Specific --- */
.maintenance-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    padding: 2.5rem;
    border-radius: var(--r-sm);
    max-width: 600px;
    width: 90%;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.maintenance-card .brand {
    font-family: var(--font-sans);
    font-size: 0.8rem;
    letter-spacing: 0.2rem;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border-subtle);
    padding-bottom: 0.5rem;
}

.maintenance-card h1 {
    color: var(--warn);
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.maintenance-card p {
    line-height: 1.6;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

.maintenance-card .error-box {
    background: rgba(0, 0, 0, 0.3);
    border-left: 3px solid var(--danger);
    padding: 1rem;
    margin: 1.5rem 0;
    font-family: var(--font-mono);
    font-size: 0.9rem;
}

.maintenance-card .footer {
    margin-top: 2rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-align: right;
}

/* --- Banner Generator Specific --- */
.banner-container {
    width: 1280px;
    height: 640px;
}

.banner-glass {
    background: rgba(13, 17, 23, 0.9);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(16px);
}

.banner-logo {
    width: 96px;
    height: 96px;
    border-radius: 24px;
    background: linear-gradient(135deg, #4f46e5 0%, #312e81 100%);
    box-shadow: 0 0 40px rgba(79, 70, 229, 0.4);
}

.banner-title {
    font-size: 5rem;
    line-height: 1;
    font-weight: 800;
    letter-spacing: -0.05em;
    color: #ffffff;
}

.banner-stat-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
}


/* --- Utilities Added During Cleanup --- */
.max-w-440 {
    max-width: 440px;
    margin: 0 auto;
}

.max-w-480 {
    max-width: 480px;
    margin: 0 auto;
}

.max-w-600 {
    max-width: 600px;
    margin: 0 auto;
}

.max-w-640 {
    max-width: 640px;
    margin: 0 auto;
}

.max-w-800 {
    max-width: 800px;
    margin: 0 auto;
}

.max-w-900 {
    max-width: 900px;
    margin: 0 auto;
}

.h-320 {
    height: 320px;
}

.min-h-screen-auth {
    min-height: calc(100vh - 200px);
}

.w-full {
    width: 100%;
}

.width-0 {
    width: 0%;
}

.icon-lg-48 {
    width: 48px;
    height: 48px;
}

.bg-indigo-fade {
    background: rgba(99, 102, 241, 0.02);
}

.bg-brand-indigo {
    background: var(--brand-indigo);
}

.opacity-60 {
    opacity: 0.6;
}

.list-disc {
    list-style: disc;
}

.t-hero-title {
    font-size: 4.5rem;
    line-height: 1.1;
}

/* --- Dashboard & Generic Utilities --- */
.btn-upgrade {
    background: linear-gradient(135deg, #6366f1, #a855f7);
    color: white;
    border: none;
    font-weight: bold;
}

.w-33-pct {
    width: 33%;
}

.w-42-pct {
    width: 42%;
}

.bg-card {
    background: var(--bg-card);
}

.text-ghost {
    color: var(--text-ghost);
}

.status-label-sovereign {
    background: rgba(110, 86, 255, 0.1);
    border-color: rgba(110, 86, 255, 0.3);
    color: #6e56ff;
    font-weight: 600;
}

.text-3xl {
    font-size: 1.875rem;
    line-height: 2.25rem;
}

.text-5xl {
    font-size: 3rem;
    line-height: 1;
}

.progress-transition {
    transition: width 1s ease;
}

/* --- Sentinel Component Styles --- */
.status-dot-sm {
    width: 6px;
    height: 6px;
}

.status-dot-md {
    width: 12px;
    height: 12px;
}

.table-fixed {
    table-layout: fixed;
}

.w-20-pct {
    width: 20%;
}

.w-18-pct {
    width: 18%;
}

.w-22-pct {
    width: 22%;
}

.w-16-pct {
    width: 16%;
}

.w-14-pct {
    width: 14%;
}

.sentinel-ledger .data-table th,
.sentinel-ledger .data-table td {
    padding: var(--table-cell-py) var(--table-cell-px);
    font-size: 13px;
    border-bottom: 1px solid rgba(48, 54, 61, 0.35);
}

.sentinel-ledger tbody tr:hover {
    background: var(--hover-alpha);
}

.sentinel-ledger .data-table thead th {
    color: rgba(255, 255, 255, 0.75);
}

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}

.kpi-card {
    padding: var(--card-py) var(--card-px);
    border: 1px solid var(--card-border-alpha);
    background: var(--card-bg-alpha);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.empty-row {
    text-align: center;
    padding: 24px 0 !important;
    color: rgba(255, 255, 255, 0.6) !important;
    font-size: 13px !important;
}

/* --- Config Builder Components --- */
.radio-card {
    display: block;
    position: relative;
    cursor: pointer;
}

.radio-card input {
    position: absolute;
    opacity: 0;
}

.radio-content {
    padding: var(--space-3);
    border: 1px solid var(--border-subtle);
    border-radius: var(--r-md);
    transition: all 0.2s;
}

.radio-card input:checked+.radio-content {
    border-color: var(--brand-indigo);
    background: rgba(99, 102, 241, 0.05);
}

.radio-card:hover .radio-content {
    border-color: var(--text-ghost);
}

.btn-vault {
    background: var(--bg-main);
    border: 1px solid var(--border-strong);
    color: var(--text-strong);
    font-weight: 700;
}

.btn-vault:not(:disabled):hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--text-ghost);
}

.banner-info {
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.3);
}

.max-w-600 {
    max-width: 600px;
    margin: 0 auto;
}

.max-w-800 {
    max-width: 800px;
    margin: 0 auto;
}

.max-w-900 {
    max-width: 900px;
    margin: 0 auto;
}

.bg-indigo-fade {
    background: rgba(99, 102, 241, 0.02);
}

.terminal-card {
    background: #020617;
    border-color: var(--border-strong);
    padding: 0;
}

.terminal-window {
    height: 320px;
    overflow-y: auto;
    color: #94a3b8;
}

.vuln-section-clean {
    background: transparent;
    border: none;
    padding: 0;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.status-dot.success {
    background: var(--success, #22c55e);
}

.status-dot.warning {
    background: var(--warning, #f59e0b);
}

.status-dot.danger {
    background: var(--danger, #ef4444);
}

/* Status Badges */
.badge {
    padding: 2px 8px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 4px;
}

.badge-success {
    background: rgba(34, 197, 94, 0.1);
    color: var(--success);
}

.badge-danger {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

/* --- Brand & Identity --- */
.icon-shield {
    width: 32px;
    height: 32px;
    color: var(--brand-indigo);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.icon-shield svg {
    width: 100%;
    height: 100%;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text-strong);
    font-weight: 700;
    font-size: 18px;
    letter-spacing: -0.02em;
}

/* --- Shell Utilities --- */
.avatar-placeholder {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    flex-shrink: 0;
}

.user-pill {
    padding: 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-subtle);
    border-radius: var(--r-md);
    margin-top: auto;
}

.mobile-only {
    display: none;
}

@media (max-width: 768px) {
    .mobile-only {
        display: flex;
    }
}

.desktop-flex {
    display: flex;
}

@media (max-width: 1024px) {
    .desktop-flex {
        display: none;
    }
}

.progress-bar-sync {
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Review Side Panel --- */
.side-panel {
    position: fixed;
    right: -480px;
    top: 0;
    bottom: 0;
    width: 480px;
    background: var(--bg-card);
    border-left: 1px solid var(--border-subtle);
    z-index: 1000;
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
}

.side-panel.open {
    right: 0;
}

.side-panel-header {
    padding: 24px;
    border-bottom: 1px solid var(--border-subtle);
}

.side-panel-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

.side-panel-footer {
    padding: 24px;
    border-top: 1px solid var(--border-subtle);
    background: rgba(255, 255, 255, 0.01);
}

/* --- Layout Utilities (Tailwind Compatible) --- */
.p-4 {
    padding: var(--space-4);
}

.p-5 {
    padding: 20px;
}

.p-6 {
    padding: var(--space-5);
}

.p-8 {
    padding: var(--space-6);
}

.px-4 {
    padding-left: var(--space-4);
    padding-right: var(--space-4);
}

.px-6 {
    padding-left: var(--space-5);
    padding-right: var(--space-5);
}

.px-8 {
    padding-left: var(--space-6);
    padding-right: var(--space-6);
}

.py-2 {
    padding-top: var(--space-2);
    padding-bottom: var(--space-2);
}

.py-2\.5 {
    padding-top: 10px;
    padding-bottom: 10px;
}

.py-3 {
    padding-top: 12px;
    padding-bottom: 12px;
}

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

.mt-6 {
    margin-top: var(--space-5);
}

.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

.flex-grow {
    flex-grow: 1;
}

.shrink-0 {
    flex-shrink: 0;
}

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

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

.gap-6 {
    gap: var(--space-5);
}

.gap-12 {
    gap: 48px;
}

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

.w-full {
    width: 100%;
}

.h-full {
    height: 100%;
}

.max-w-1400 {
    max-width: 1400px;
}

.overflow-hidden {
    overflow: hidden;
}

/* Spacing Additions */
.mb-1 {
    margin-bottom: var(--space-1);
}

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

.mb-3 {
    margin-bottom: var(--space-3);
}

.mb-4 {
    margin-bottom: var(--space-4);
}

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

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

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

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

.opacity-20 {
    opacity: 0.2;
}

.opacity-40 {
    opacity: 0.4;
}

.opacity-60 {
    opacity: 0.6;
}

@media print {
    .no-print {
        display: none !important;
    }
}

/* --- Institutional Surface Utilities --- */
.bg-success\/5 {
    background: rgba(34, 197, 94, 0.05);
}

.bg-success\/10 {
    background: rgba(34, 197, 94, 0.1);
}

.border-success\/10 {
    border-color: rgba(34, 197, 94, 0.1);
}

.border-success\/20 {
    border-color: rgba(34, 197, 94, 0.2);
}

.bg-danger\/10 {
    background: rgba(239, 68, 68, 0.1);
}

.border-danger\/20 {
    border-color: rgba(239, 68, 68, 0.2);
}

.bg-brand-fade {
    background: rgba(99, 102, 241, 0.1);
}

.bg-brand-soft {
    background: rgba(99, 102, 241, 0.2);
}

.bg-white-fade {
    background: rgba(255, 255, 255, 0.05);
}

.bg-white-soft {
    background: rgba(255, 255, 255, 0.1);
}

.border-brand-subtle {
    border-color: rgba(99, 102, 241, 0.2);
}

.bg-white\/5 {
    background: var(--alpha-5);
}

.bg-white\/10 {
    background: var(--alpha-10);
}

.border-white\/5 {
    border-color: rgba(255, 255, 255, 0.05);
}

.border-white\/20 {
    border-color: rgba(255, 255, 255, 0.2);
}

.rounded-full {
    border-radius: 9999px;
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: .5;
    }
}

/* --- HUD & Custom Components (Q5 Refinement) --- */
/* --- Status Tag Component (.tag / .status-label) --- */
.tag,
.status-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: var(--tag-r);
    border: 1px solid var(--tag-bd);
    background: var(--tag-bg);
    color: var(--tag-fg);
    font-size: var(--tag-fs);
    line-height: var(--tag-lh);
    font-weight: var(--tag-fw);
    padding: var(--tag-py) var(--tag-px);
    white-space: nowrap;
    transition: all 0.2s ease;
}

/* Minimal Table Variant */
.status-label {
    background: transparent;
    border-color: transparent;
    padding-left: 0;
    padding-right: 0;
}

.tag__dot,
.status-label__dot {
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: currentColor;
    flex-shrink: 0;
}

/* Semantic Variants */
.tag--ok,
.status-label--ok {
    color: var(--tag-ok-fg);
    border-color: rgba(34, 197, 94, 0.2);
}

.tag--warn,
.status-label--warn {
    color: var(--tag-warn-fg);
    border-color: rgba(245, 158, 11, 0.2);
}

.tag--danger,
.status-label--danger {
    color: var(--tag-danger-fg);
    border-color: rgba(239, 68, 68, 0.2);
}

.tag--muted,
.status-label--muted {
    color: var(--tag-muted-fg);
    border-color: rgba(255, 255, 255, 0.1);
}


/* --- Segmented Control (.seg) --- */
.seg {
    display: inline-flex;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.04);
    border-radius: 10px;
    padding: 2px;
    gap: 2px;
}

.seg__btn {
    border: 0;
    background: transparent;
    color: rgba(255, 255, 255, 0.70);
    font-size: 13px;
    line-height: 18px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.seg__btn:hover {
    color: rgba(255, 255, 255, 0.92);
}

.seg__btn[aria-selected="true"],
.seg__btn.active {
    background: rgba(255, 255, 255, 0.10);
    color: rgba(255, 255, 255, 0.92);
}

/* â­ Active/Selected State (High Contrast Pill) */
.tab-item.is-active,
.tab.is-active {
    background: #ffffff !important;
    color: #0b1220 !important;
    /* Fixed: deep ink for readability */
    font-weight: 600 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.tab-item.is-active:hover {
    background: #f8fafc !important;
    color: #0b1220 !important;
}

.tab-content {
    display: block;
}

.tab-content.hidden {
    display: none;
}

.shadow-brand\/20 {
    box-shadow: 0 10px 15px -3px rgba(99, 102, 241, 0.2), 0 4px 6px -4px rgba(99, 102, 241, 0.2);
}

.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.scrollbar-hide::-webkit-scrollbar {
    display: none;
}

/* Re-mapping Tailwind Small Text to Institutional Minimum (13px) */
.text-xs {
    font-size: var(--fs-small) !important;
}

.text-2xl {
    font-size: 24px;
    font-weight: 700;
}

.text-3xl {
    font-size: 28px;
    font-weight: 800;
}

/* Mapping 3xl to Title Standard */

.font-black {
    font-weight: 900;
}

.tracking-tight {
    letter-spacing: -0.025em;
}

.rounded-md {
    border-radius: 8px;
}

/* --- Review Remediation Components --- */
.review-surface {
    padding-top: var(--space-8);
    padding-bottom: var(--space-8);
}

.code-diff-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-5);
    margin-top: var(--space-5);
}

.code-panel {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--r-lg);
    height: 600px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.code-panel-header {
    padding: var(--space-2) var(--space-4);
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.code-panel-body {
    flex: 1;
    overflow: auto;
    background: #0d1117;
}

.code-panel-body pre {
    margin: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
}

.analysis-card {
    background: rgba(99, 102, 241, 0.05);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: var(--r-lg);
    padding: var(--space-5);
    margin-bottom: var(--space-6);
}

.rounded-lg {
    border-radius: 8px;
}

.rounded-xl {
    border-radius: 12px;
}

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

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

.pb-2 {
    padding-bottom: var(--space-2);
}

.inline-flex {
    display: inline-flex;
}

.flex-row {
    flex-direction: row;
}

.flex-col {
    flex-direction: column;
}

.items-end {
    align-items: flex-end;
}

.justify-center {
    justify-content: center;
}

@media (min-width: 768px) {
    .md\:flex-row {
        flex-direction: row;
    }

    .md\:grid-cols-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .md\:grid-cols-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* --- Institutional Marketing Layout (Restoration) --- */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--space-6);
}

.site-nav {
    height: 72px;
    background: var(--bg-nav);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-subtle);
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
}

.nav-inner {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
}

@media (min-width: 1024px) {
    .nav-links {
        gap: var(--space-8);
    }
}

.nav-links a {
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
    transition: color 0.15s;
    white-space: nowrap;
}

.nav-links a:hover {
    color: var(--text-strong);
}

.mobile-cta {
    display: none;
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .mobile-cta {
        display: flex;
    }
}

/* Marketing Hero */
.section-hero {
    padding: 80px 0;
}

.lead {
    font-size: 18px;
    font-weight: 500;
    line-height: 1.6;
}

.text-6xl {
    font-size: 48px;
    font-weight: 900;
    line-height: 1.1;
}

@media (min-width: 1024px) {
    .text-6xl {
        font-size: 64px;
    }
}

/* Marketing Grid */
.grid-desktop-2 {
    grid-template-columns: repeat(1, 1fr);
}

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

@media (min-width: 768px) {
    .grid-desktop-2 {
        grid-template-columns: repeat(2, 1fr);
    }

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

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

    /* Standardized Grids */
    .grid-2 {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-6);
    }

    .grid-3 {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: var(--space-6);
    }

    .grid-4 {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: var(--space-6);
    }

    .pricing-view {
        background: radial-gradient(circle at 10% 20%, rgba(99, 102, 241, 0.05) 0%, transparent 50%),
            radial-gradient(circle at 90% 80%, rgba(99, 102, 241, 0.05) 0%, transparent 50%);
    }

    /* --- Premium Polish Overrides --- */
    .text-gradient {
        background: linear-gradient(135deg, #fff 0%, rgba(255, 255, 255, 0.7) 100%);
        -webkit-background-clip: text;
        background-clip: text;
        -webkit-text-fill-color: transparent;
    }

    .shadow-glow {
        box-shadow: 0 0 20px rgba(99, 102, 241, 0.15);
    }

    .shadow-glow:hover {
        box-shadow: 0 0 30px rgba(99, 102, 241, 0.3);
    }

    /* Custom Scrollbar for Browser Engines */
    ::-webkit-scrollbar {
        width: 10px;
        height: 10px;
    }

    ::-webkit-scrollbar-track {
        background: var(--bg-primary);
    }

    ::-webkit-scrollbar-thumb {
        background: var(--border-color);
        border: 2px solid var(--bg-primary);
        border-radius: 10px;
    }

    ::-webkit-scrollbar-thumb:hover {
        background: var(--text-tertiary);
    }

    /* Selection Highlight */
    ::selection {
        background: rgba(99, 102, 241, 0.3);
        color: white;
    }

    /* Entry Animations */
    .reveal {
        opacity: 0;
        transform: translateY(20px);
        animation: reveal-in var(--anim-slow) forwards;
    }

    @keyframes reveal-in {
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .delay-1 {
        animation-delay: 0.1s;
    }

    .delay-2 {
        animation-delay: 0.2s;
    }

    .delay-3 {
        animation-delay: 0.3s;
    }

    .delay-4 {
        animation-delay: 0.4s;
    }

    .pricing-view {
        background: radial-gradient(circle at 10% 20%, rgba(99, 102, 241, 0.05) 0%, transparent 50%),
            radial-gradient(circle at 90% 80%, rgba(99, 102, 241, 0.05) 0%, transparent 50%);
    }


    .grid-desktop-12 {
        display: grid;
        grid-template-columns: repeat(12, 1fr);
    }

    .col-8 {
        grid-column: span 8;
    }

    .col-4 {
        grid-column: span 4;
    }
}

.hover-lift {
    transition: transform 0.2s, box-shadow 0.2s;
}

.hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

/* Footer Architecture */
.site-footer {
    padding: 80px 0 40px;
    background: var(--bg-card);
    border-top: 1px solid var(--border-subtle);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 48px;
}

@media (min-width: 768px) {
    .footer-grid {
        grid-template-columns: 2fr repeat(3, 1fr);
    }
}

.footer-nav h4 {
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-strong);
    margin-bottom: 16px;
}

.footer-nav a {
    text-decoration: none;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 400;
    line-height: 1.8;
    transition: all 0.2s ease;
}

.footer-nav a:hover {
    color: var(--text-strong);
    transform: translateX(2px);
}

.border-t {
    border-top: 1px solid var(--border-subtle);
}

.mt-16 {
    margin-top: 64px;
}

.pt-8 {
    padding-top: 32px;
}

/* Pricing Specials */
.border-brand {
    border-color: var(--brand-indigo) !important;
}

.border-strong {
    border-color: var(--border-strong) !important;
}

/* --- Institutional Component System (D5 Canonical Tokens) --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border-radius: var(--r-md);
    padding: 7px 14px;
    font-size: var(--fs-body);
    font-weight: var(--fw-medium);
    border: 1px solid transparent;
    background: transparent;
    color: var(--text-strong);
    cursor: pointer;
    transition: all 0.12s;
    text-decoration: none;
    white-space: nowrap;
}

/* PRIMARY: Core workflow only â€” Run Scan, Remediate */
.btn-primary {
    background: var(--accent);
    border-color: transparent;
    color: var(--accent-ink);
    box-shadow: none;
}

.btn-primary:hover {
    filter: brightness(1.1);
}

.btn-primary:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* SECONDARY: Navigate / setup / export â€” calm, not dominant */
.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--border-strong);
    color: var(--text-strong);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.09);
    border-color: rgba(255, 255, 255, 0.25);
}

.btn-secondary:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.25);
    outline-offset: 2px;
}

/* GHOST: Table row actions, re-check, low-priority */
.btn-ghost {
    background: transparent;
    border-color: transparent;
    color: var(--text-muted);
}

.btn-ghost:hover {
    color: var(--text-strong);
    background: var(--surface-1);
    border-color: var(--border-subtle);
}

/* LINK: Inline, no-chrome â€” docs, learn more */
.btn-link {
    background: transparent;
    border-color: transparent;
    color: var(--accent);
    padding: 0;
    height: auto;
    font-weight: var(--fw-medium);
    text-decoration: none;
}

.btn-link:hover {
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* DANGER: Destructive primary actions */
.btn-danger {
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.30);
    color: #f87171;
}

.btn-danger:hover {
    background: rgba(239, 68, 68, 0.22);
    border-color: rgba(239, 68, 68, 0.48);
}

/* SIZES */
.btn-xs {
    padding: 3px 8px;
    font-size: var(--fs-small);
    height: auto;
}

.btn-sm {
    padding: 5px 12px;
    font-size: var(--fs-small);
    height: auto;
}

.btn-md {
    padding: 8px 20px;
    font-size: var(--fs-body);
}

.btn-lg {
    padding: 10px 24px;
    font-size: 15px;
    font-weight: var(--fw-bold);
}

/* BLOCK: Forms only â€” not dashboards */
.btn-block {
    width: 100%;
    justify-content: center;
}

/* Legacy Chip styles removed - Use .tag system instead */

.chip-neutral {
    color: var(--text-muted);
}

/* Table Enforcements */
.data-table th {
    font-size: var(--fs-small) !important;
    font-weight: var(--fw-medium) !important;
    color: rgba(255, 255, 255, 0.72) !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    padding: 12px 24px !important;
}

/* Custom Signature Badge (Mono Style) */
.signature-badge {
    font-family: var(--font-mono);
    font-size: var(--fs-chip);
    padding: 2px 8px;
    background: var(--surface-1);
    border: 1px solid var(--border-subtle);
    border-radius: 4px;
    color: var(--text-ghost);
}

/* =========================================================
   SURFACE SCOPES - Institutional Layering
   Each page is wrapped in a surface class to prevent bleed.
   ========================================================= */


/* --- INCIDENTS SURFACE - Merged from incidents.css --- */

/* Incident Ledger Ã¢â‚¬â€ Scoped Institutional Density */

/* KPI strip: compress Ã¢â‚¬Å“cardsÃ¢â‚¬Â into HUD density */
.incidents-surface .kpi-grid,
.incidents-surface .incident-kpis,
.incidents-surface .metrics-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 14px;
}

/* If your KPI cards share a class like .card/.panel, tighten them */
.incidents-surface .kpi-card,
.incidents-surface .metric-card,
.incidents-surface .card {
    padding: var(--card-py) var(--card-px);
    border: 1px solid var(--border-subtle-alpha);
    background: var(--card-bg-alpha);
    border-radius: 12px;
}

/* Reduce big numbers slightly so cards donÃ¢â‚¬â„¢t feel Ã¢â‚¬Å“marketingÃ¢â‚¬Â */
.incidents-surface .kpi-value,
.incidents-surface .metric-value {
    font-size: 26px;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

/* Telemetry indicator: ensure it reads Ã¢â‚¬Å“healthyÃ¢â‚¬Â, not danger */
.incidents-surface .telemetry-indicator,
.incidents-surface .telemetry-status {
    color: rgba(147, 197, 253, 0.95);
    /* steady blue */
}

/* === Table Density === */
.incidents-surface table.data-table {
    table-layout: fixed;
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.incidents-surface table.data-table thead th {
    padding: var(--table-cell-py) var(--table-cell-px) !important;
    letter-spacing: 0.02em;
    border-bottom: 1px solid var(--border-subtle-alpha);
    white-space: nowrap;
}

.incidents-surface table.data-table tbody td {
    padding: var(--table-cell-py) var(--table-cell-px);
    border-bottom: 1px solid rgba(48, 54, 61, 0.35);
    vertical-align: middle;
}

.incidents-surface table.data-table tbody tr:hover td {
    background: var(--hover-alpha);
}

/* Column widths (apply these classes on th/td) */
.incidents-surface .col-incident {
    width: 14%;
}

.incidents-surface .col-severity {
    width: 14%;
}

.incidents-surface .col-event {
    width: 26%;
}

.incidents-surface .col-tenant {
    width: 18%;
}

.incidents-surface .col-sla {
    width: 14%;
}

.incidents-surface .col-status {
    width: 14%;
}

/* Ellipsis for long fields */
.incidents-surface td.col-event,
.incidents-surface td.col-tenant {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* === Tag Base (normalized) === */
.incidents-surface .tag {
    display: inline-flex;
    align-items: center;
    height: 18px;
    padding: 0 10px;
    font-size: 11px;
    line-height: 1;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.03);
    color: rgba(255, 255, 255, 0.85);
    font-weight: 700;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

/* === Severity (filled authority) === */
.incidents-surface .tag-critical {
    background: var(--color-critical) !important;
    border-color: var(--color-critical) !important;
    color: #ffffff !important;
}

.incidents-surface .tag-high {
    background: var(--color-high) !important;
    border-color: var(--color-high) !important;
    color: #0d1117 !important;
    font-weight: 800;
}

.incidents-surface .tag-warn {
    background: var(--tag-bg-warn);
    border: 1px solid rgba(210, 153, 34, 0.65);
    /* Increased border contrast */
    color: var(--color-warn);
}

/* === Status taxonomy (NOT all red) === */
.incidents-surface .tag-investigating {
    background: var(--tag-bg-investigating);
    border: 1px solid rgba(99, 102, 241, 0.45);
    color: rgba(199, 210, 254, 0.95);
}

.incidents-surface .tag-triage {
    background: rgba(210, 153, 34, 0.18);
    border: 1px solid rgba(210, 153, 34, 0.55);
    color: #ffd37a;
}

.incidents-surface .tag-monitoring {
    background: var(--tag-bg-monitoring);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: rgba(255, 255, 255, 0.82);
}

.incidents-surface .tag-resolved {
    background: rgba(34, 197, 94, 0.18);
    border: 1px solid rgba(34, 197, 94, 0.45);
    color: var(--color-success);
}

/* === SLA Clock (separate from Status) === */
.incidents-surface .tag-sla-expired {
    background: #f85149 !important;
    border-color: #f85149 !important;
    color: #ffffff !important;
}

.incidents-surface .tag-sla-risk {
    background: rgba(210, 153, 34, 0.18);
    border: 1px solid rgba(210, 153, 34, 0.60);
    color: #ffd37a;
}

.incidents-surface .tag-sla-ok {
    background: rgba(148, 163, 184, 0.12);
    border: 1px solid rgba(148, 163, 184, 0.35);
    color: rgba(226, 232, 240, 0.9);
}

/* --- REPO SURFACE - Merged from repo_inventory.css --- */

/* Scoped: do not leak outside this page */
.repo-surface {
    max-width: 1200px;
    margin: 0 auto;
}

.repo-surface .page-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

.repo-surface h1 {
    margin: 0;
    font-size: 22px;
    letter-spacing: -0.02em;
}

.repo-surface .page-sub {
    margin: 6px 0 0;
    opacity: 0.7;
    font-size: 13px;
}

.repo-surface .page-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.repo-surface .repo-kpis {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin: 12px 0 14px;
}

.repo-surface .kpi {
    border: 1px solid var(--border-subtle-alpha);
    background: var(--card-bg-alpha);
    border-radius: 12px;
    padding: var(--card-py) var(--card-px);
}

.repo-surface .kpi-label {
    font-size: 11px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    opacity: 0.65;
}

.repo-surface .kpi-value {
    margin-top: 6px;
    font-size: 22px;
    font-weight: 700;
}

.repo-surface .table-card {
    border: 1px solid var(--border-subtle-alpha);
    background: var(--card-bg-alpha);
    border-radius: 14px;
}

.repo-surface .table-head {
    padding: 12px 14px 6px;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.repo-surface .table-title {
    font-weight: 700;
}

.repo-surface .table-sub {
    margin-top: 4px;
    font-size: 12px;
    opacity: 0.7;
}

.repo-surface .table-wrap {
    padding: 8px 10px 12px;
}

.repo-surface .repo-table {
    table-layout: fixed;
}

/* Density override (matches deps/incidents style) */
.repo-surface table.data-table thead th {
    padding: var(--table-cell-py) var(--table-cell-px) !important;
    letter-spacing: 0.02em;
    border-bottom: 1px solid var(--border-subtle-alpha);
    white-space: nowrap;
}

.repo-surface table.data-table tbody td {
    padding: var(--table-cell-py) var(--table-cell-px) !important;
    border-bottom: 1px solid rgba(48, 54, 61, 0.28);
}

.repo-surface table.data-table tbody tr:hover td {
    background: var(--hover-alpha);
}

/* Column map */
.repo-surface .col-repo {
    width: 34%;
}

.repo-surface .col-provider {
    width: 11%;
}

.repo-surface .col-branch {
    width: 12%;
}

.repo-surface .col-scan {
    width: 18%;
}

.repo-surface .col-scope {
    width: 17%;
}

.repo-surface .col-status {
    width: 8%;
}

.repo-surface .repo-name {
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Small utility text */
.repo-surface .t-mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 12px;
}

.repo-surface .t-muted {
    opacity: 0.6;
}

/* Pill authority toggles */
.repo-surface .scope-pillset {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.repo-surface .scope-pill {
    transition: background 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease, color 0.12s ease;
    height: 22px;
    padding: 0 10px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: var(--hover-alpha);
    color: rgba(255, 255, 255, 0.78);
    font-size: 11px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    cursor: pointer;
    user-select: none;
}

.repo-surface .scope-pill:hover {
    background: rgba(255, 255, 255, 0.07);
}

.repo-surface .scope-pill.is-monitored,
.repo-surface .scope-pill.is-unmonitored {
    color: #fff;
    font-weight: 800;
}

/* Active colors */
.repo-surface .scope-pill.is-monitored {
    background: rgba(35, 134, 54, 0.22);
    border-color: rgba(35, 134, 54, 0.5);
    box-shadow: inset 0 0 0 1px rgba(35, 134, 54, 0.3);
}

.repo-surface .scope-pill.is-unmonitored {
    background: rgba(248, 81, 73, 0.10);
    border-color: rgba(248, 81, 73, 0.35);
    color: rgba(255, 255, 255, 0.78);
}

.repo-surface .scope-dropdown-container.is-loading {
    opacity: 0.6;
    pointer-events: none;
}

.repo-surface .scope-pill--menu-item {
    width: 100%;
    margin-bottom: 2px;
}

/* Status taxonomy overrides (to prevent collision with green scope) */
.repo-surface .status-healthy {
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.12);
    font-weight: 700;
}

.repo-surface .status-inactive {
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.08);
    font-weight: 700;
}

.repo-surface .status-risk {
    background: var(--tag-bg-warn);
    border: 1px solid rgba(210, 153, 34, 0.55);
    color: var(--color-warn);
    font-weight: 700;
}

/* Empty row */
.repo-surface .table-empty {
    padding: 16px 14px !important;
}

.repo-surface .empty-title {
    font-weight: 700;
    margin-bottom: 6px;
}

.repo-surface .empty-sub {
    opacity: 0.75;
    font-size: 13px;
    margin-bottom: 12px;
}

.repo-surface .empty-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* --- DASHBOARD SURFACE - Merged from dashboard.css --- */
.dashboard-surface {

    /* 
    Phase 33: Platform Architecture & UX Refinement
    Dashboard Specific Styles
  */

    @import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;700&display=swap');

    :root {
        --sidebar-width: 260px;
        --header-height: 64px;

        --primary: #6366f1;
        --bg-dark: #0d1117;
        --bg-card: #161b22;
        --bg-hover: #1f2937;

        --text-primary: #e6edf3;
        --text-secondary: #8b949e;

        --border-color: #30363d;

        --success: #238636;
        --warning: #d29922;
        --danger: #f85149;
    }

    body {
        font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
        background-color: var(--bg-dark);
        color: var(--text-primary);
        margin: 0;
        padding: 0;
        display: flex;
        min-height: 100vh;
    }

    /* --- SIDEBAR NAVIGATION --- */
    .sidebar {
        width: var(--sidebar-width);
        background-color: var(--bg-card);
        border-right: 1px solid var(--border-color);
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        display: flex;
        flex-direction: column;
        z-index: 50;
        transition: transform 0.3s ease;
    }

    .sidebar-header {
        height: var(--header-height);
        display: flex;
        align-items: center;
        padding: 0 24px;
        border-bottom: 1px solid var(--border-color);
        font-weight: 700;
        font-size: 1.1rem;
        color: var(--text-primary);
        gap: 10px;
    }

    .brand-icon {
        width: 28px;
        height: 28px;
        background: var(--primary);
        border-radius: 6px;
        display: flex;
        align-items: center;
        justify-content: center;
        color: white;
        font-size: 0.9rem;
    }

    .sidebar-nav {
        padding: 24px 16px;
        flex: 1;
        overflow-y: auto;
    }

    .nav-section-label {
        font-size: 0.75rem;
        font-weight: 700;
        color: var(--text-secondary);
        text-transform: uppercase;
        margin-bottom: 8px;
        margin-top: 24px;
        padding-left: 12px;
        letter-spacing: 0.5px;
    }

    .nav-section-label:first-child {
        margin-top: 0;
    }

    .nav-item {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 10px 12px;
        border-radius: 6px;
        color: var(--text-secondary);
        text-decoration: none;
        font-size: 0.9rem;
        font-weight: 500;
        transition: all 0.2s ease;
        margin-bottom: 2px;
    }

    .nav-item:hover {
        background-color: var(--bg-hover);
        color: var(--text-primary);
    }

    .nav-item.active {
        background-color: rgba(99, 102, 241, 0.15);
        color: var(--primary);
    }

    .nav-item i {
        width: 20px;
        text-align: center;
    }

    .sidebar-footer {
        padding: 16px;
        border-top: 1px solid var(--border-color);
    }

    .user-profile {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 8px;
        border-radius: 6px;
        cursor: pointer;
    }

    .user-profile:hover {
        background-color: var(--bg-hover);
    }

    .user-avatar {
        width: 32px;
        height: 32px;
        border-radius: 50%;
        background: #334155;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 0.8rem;
        border: 2px solid var(--bg-card);
    }

    .user-info {
        display: flex;
        flex-direction: column;
    }

    .user-name {
        font-size: 0.85rem;
        font-weight: 600;
    }

    .user-role {
        font-size: 0.75rem;
        color: var(--text-secondary);
    }

    /* --- MAIN CONTENT AREA --- */
    .main-content {
        margin-left: var(--sidebar-width);
        flex: 1;
        min-width: 0;
        /* Prevent overflow */
        background: #0d1117;
        /* GitHub Dark */
    }

    /* Header */
    .top-header {
        height: var(--header-height);
        border-bottom: 1px solid var(--border-color);
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0 32px;
        background: rgba(13, 17, 23, 0.8);
        backdrop-filter: blur(8px);
        position: sticky;
        top: 0;
        z-index: 40;
    }

    .breadcrumbs {
        display: flex;
        align-items: center;
        gap: 8px;
        color: var(--text-secondary);
        font-size: 0.9rem;
    }

    .breadcrumb-active {
        color: var(--text-primary);
        font-weight: 500;
    }

    .header-actions {
        display: flex;
        align-items: center;
        gap: 16px;
    }

    /* Dashboard Legacy components (Grid obsolete, removed) */
    /* Cards & Widgets */
    .card {
        background: var(--bg-card);
        border: 1px solid var(--border-color);
        border-radius: 8px;
        padding: 24px;
        position: relative;
        overflow: hidden;
    }

    .card-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 20px;
    }

    .card-title {
        font-size: 1rem;
        font-weight: 600;
        color: var(--text-primary);
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .col-span-12 {
        grid-column: span 12;
    }

    .col-span-8 {
        grid-column: span 8;
    }

    .col-span-6 {
        grid-column: span 6;
    }

    .col-span-4 {
        grid-column: span 4;
    }

    @media (max-width: 1024px) {

        .col-span-8,
        .col-span-6,
        .col-span-4 {
            grid-column: span 12;
        }
    }

    /* --- Utilities from original file (Refactored) --- */

    /* Badge */
    .badge {
        display: inline-flex;
        align-items: center;
        padding: 2px 8px;
        border-radius: 12px;
        font-size: 0.7rem;
        font-weight: 600;
        border: 1px solid transparent;
    }

    .badge-success {
        background: rgba(35, 134, 54, 0.15);
        color: #3fb950;
        border-color: rgba(35, 134, 54, 0.4);
    }

    .badge-warning {
        background: rgba(210, 153, 34, 0.15);
        color: #d29922;
        border-color: rgba(210, 153, 34, 0.4);
    }

    .badge-danger {
        background: rgba(248, 81, 73, 0.15);
        color: #f85149;
        border-color: rgba(248, 81, 73, 0.4);
    }

    /* Buttons */
    .btn {
        padding: 8px 16px;
        border-radius: 6px;
        font-size: 0.85rem;
        font-weight: 500;
        cursor: pointer;
        border: 1px solid var(--border-color);
        background: #21262d;
        color: var(--text-primary);
        transition: all 0.2s;
    }

    .btn:hover {
        background: #30363d;
    }

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

    .btn-primary:hover {
        opacity: 0.9;
        background: var(--primary);
    }

    /* Terminal/Console Output */
    .console-output {
        background: #0d1117;
        border: 1px solid var(--border-color);
        border-radius: 6px;
        padding: 16px;
        font-family: 'JetBrains Mono', monospace;
        font-size: 0.8rem;
        color: var(--text-secondary);
        max-height: 300px;
        overflow-y: auto;
    }

    /* --- COPILOT PLAYGROUND --- */
    .copilot-container {
        height: calc(100vh - var(--header-height));
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }

    .copilot-toolbar {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 12px 24px;
        background: var(--bg-card);
        border-bottom: 1px solid var(--border-color);
    }

    .copilot-workspace {
        flex: 1;
        display: grid;
        grid-template-columns: 1fr 1fr;
        overflow: hidden;
    }

    .editor-pane,
    .preview-pane {
        display: flex;
        flex-direction: column;
        padding: 0;
        overflow: hidden;
        position: relative;
    }

    .editor-pane {
        border-right: 1px solid var(--border-color);
        background: #0d1117;
    }

    .preview-pane {
        background: #161b22;
    }

    .copilot-textarea {
        flex: 1;
        width: 100%;
        background: transparent;
        color: #e6edf3;
        border: none;
        padding: 24px;
        font-family: 'JetBrains Mono', monospace;
        font-size: 0.95rem;
        resize: none;
        outline: none;
        line-height: 1.6;
        z-index: 10;
        position: relative;
    }

    .ghost-overlay {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        padding: 24px;
        font-family: 'JetBrains Mono', monospace;
        font-size: 0.95rem;
        line-height: 1.6;
        color: #484f58;
        /* GitHub dimmed text */
        pointer-events: none;
        white-space: pre-wrap;
        overflow: hidden;
        background: transparent;
        z-index: 5;
    }

    .copilot-output-area {
        padding: 24px;
        overflow-y: auto;
        font-family: 'JetBrains Mono', monospace;
        font-size: 0.9rem;
        color: var(--text-secondary);
        height: 100%;
    }

    /* --- RESTORED WIDGET STYLES --- */

    /* ROI Ticker */
    .roi-ticker {
        background: #fbbf24;
        color: #000;
        font-weight: 800;
        font-size: 0.75rem;
        padding: 6px;
        text-align: center;
        position: sticky;
        top: var(--header-height);
        z-index: 30;
        display: flex;
        justify-content: center;
        gap: 20px;
        letter-spacing: 0.5px;
    }

    /* Persona Badges */
    .persona-badge {
        font-size: 0.7rem;
        font-weight: 700;
        padding: 4px 10px;
        border-radius: 20px;
        cursor: pointer;
        border: 1px solid rgba(255, 255, 255, 0.1);
        background: rgba(255, 255, 255, 0.05);
        color: #94a3b8;
        text-transform: uppercase;
        transition: all 0.2s;
    }

    .persona-badge.active[data-persona="strict"] {
        background: #6366f1;
        color: white;
        border-color: #818cf8;
    }

    .persona-badge.active[data-persona="mentor"] {
        background: #10b981;
        color: white;
        border-color: #34d399;
    }

    .persona-badge.active[data-persona="roast"] {
        background: #f43f5e;
        color: white;
        border-color: #fb7185;
    }

    /* Provenance Badges */
    .provenance-badge {
        font-size: 0.6rem;
        padding: 2px 6px;
        border-radius: 4px;
        margin-left: 8px;
        text-transform: uppercase;
        font-weight: 800;
        display: inline-block;
    }

    .prov-live {
        background: rgba(34, 197, 94, 0.15);
        color: #4ade80;
        border: 1px solid rgba(34, 197, 94, 0.3);
    }

    .prov-beta {
        background: rgba(59, 130, 246, 0.15);
        color: #60a5fa;
        border: 1px solid rgba(59, 130, 246, 0.3);
    }

    .prov-sim {
        background: rgba(244, 63, 94, 0.15);
        color: #fb7185;
        border: 1px solid rgba(244, 63, 94, 0.3);
    }

    /* Modernizer */
    .modernizer-io {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 15px;
        height: 150px;
    }

    .modernizer-pane {
        background: #0d1117;
        border: 1px solid #30363d;
        border-radius: 8px;
        padding: 10px;
        font-family: 'JetBrains Mono', monospace;
        font-size: 0.7rem;
        overflow-y: auto;
    }

    /* Traffic Light & Pulse */
    .traffic-light {
        width: 30px;
        height: 30px;
        border-radius: 50%;
        margin: 10px auto;
        border: 3px solid rgba(255, 255, 255, 0.1);
    }

    .traffic-light.green {
        background: #22c55e;
        box-shadow: 0 0 15px #22c55e;
    }

    .traffic-light.yellow {
        background: #eab308;
        box-shadow: 0 0 15px #eab308;
    }

    .traffic-light.red {
        background: #ef4444;
        box-shadow: 0 0 15px #ef4444;
    }

    /* Quantum Pulse */
    .pulse-ring {
        position: absolute;
        width: 100%;
        height: 100%;
        border: 2px solid #22d3ee;
        border-radius: 50%;
        animation: quantumPulseEffect 2s infinite;
    }

    @keyframes quantumPulseEffect {
        0% {
            transform: scale(1);
            opacity: 0.8;
        }

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

    /* Toggle Switch */
    .toggle-switch {
        width: 36px;
        height: 20px;
        background: #334155;
        border-radius: 20px;
        position: relative;
        cursor: pointer;
        transition: background 0.3s;
    }

    .toggle-switch.on {
        background: #22c55e;
    }

    .toggle-knob {
        width: 16px;
        height: 16px;
        background: white;
        border-radius: 50%;
        position: absolute;
        top: 2px;
        left: 2px;
        transition: transform 0.3s;
    }

    .toggle-switch.on .toggle-knob {
        transform: translateX(16px);
    }

    /* Onboarding Guide */
    .onboarding-guide {
        position: fixed;
        bottom: 30px;
        right: 30px;
        width: 60px;
        height: 60px;
        background: white;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
        z-index: 9999;
        border: 2px solid #fbbf24;
        animation: bounce 3s infinite;
    }

    @keyframes bounce {

        0%,
        100% {
            transform: translateY(0);
        }

        50% {
            transform: translateY(-10px);
        }
    }

    /* ============================================================
     Shell: true 2-column command layout for onboarding
     ============================================================ */
    .dashboard-grid {
        display: grid;
        grid-template-columns: 8fr 4fr;
        gap: 24px;
    }

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

    .dashboard-grid__left {
        display: flex;
        flex-direction: column;
        gap: var(--space-5);
    }

    .dashboard-grid__right {
        display: flex;
        flex-direction: column;
    }

    .dashboard-onboarding-container {
        width: 100%;
    }

    /* Ã¢â€â‚¬Ã¢â€â‚¬ Setup Command Card Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬ */
    .setup-command-card {
        background: var(--bg-card);
        border: 1px solid var(--border-strong);
        border-radius: 10px;
        overflow: hidden;
        position: relative;
    }

    /* Top accent stripe */
    .setup-command-card::before {
        content: '';
        display: block;
        height: 3px;
        background: linear-gradient(90deg, var(--accent), transparent 70%);
    }

    .setup-command-card__inner {
        padding: var(--space-6);
        display: flex;
        flex-direction: column;
        gap: var(--space-5);
    }




    .setup-command-card__actions {
        display: flex;
        gap: var(--space-3);
        flex-wrap: wrap;
    }

    /* Progress bar inside setup card */
    .setup-progress {
        display: flex;
        flex-direction: column;
        gap: var(--space-2);
    }

    .setup-progress__header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        flex-wrap: wrap;
        gap: var(--space-2);
    }

    .setup-progress__steps {
        display: flex;
        gap: var(--space-4);
        flex-wrap: wrap;
    }

    .setup-step {
        font-size: 0.7rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.04em;
        color: var(--text-ghost);
    }

    .setup-step--active {
        color: var(--accent);
    }

    .setup-step--pending {
        opacity: 0.35;
    }

    .setup-progress__bar {
        height: 4px;
        background: var(--bg-surface);
        border-radius: 99px;
        overflow: hidden;
        border: 1px solid rgba(255, 255, 255, 0.04);
    }

    .setup-progress__fill {
        height: 100%;
        background: var(--accent);
        border-radius: 99px;
        transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
    }

    /* Ã¢â€â‚¬Ã¢â€â‚¬ Compact Status Grid Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬ */
    .status-grid-compact {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: var(--space-3);
    }

    .right-column-grid {
        grid-template-columns: 1fr;
        display: flex;
        flex-direction: column;
        gap: var(--space-3);
    }

    @media (max-width: 600px) {
        .status-grid-compact {
            grid-template-columns: 1fr;
        }
    }

    .status-grid-compact__card {
        background: var(--bg-card);
        border: 1px solid var(--border-subtle);
        border-radius: 8px;
        padding: 10px 12px;
        display: flex;
        gap: var(--space-3);
        align-items: flex-start;
        transition: all 0.2s;
    }

    .status-grid-compact__card:hover {
        border-color: var(--border-strong);
    }

    .status-grid-compact__icon {
        width: 28px;
        height: 28px;
        border-radius: 6px;
        background: rgba(255, 255, 255, 0.04);
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 0.85rem;
        flex-shrink: 0;
    }

    .status-grid-compact__body {
        display: flex;
        flex-direction: column;
        gap: 2px;
        min-width: 0;
    }

    /* Ã¢â€â‚¬Ã¢â€â‚¬ Security Model (Collapsible) Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬ */
    .security-model-block {
        background: var(--bg-card);
        border: 1px solid var(--border-subtle);
        border-radius: 8px;
        overflow: hidden;
    }

    .security-model-block__toggle {
        width: 100%;
        padding: var(--space-4) var(--space-5);
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: var(--space-3);
        background: transparent;
        border: none;
        cursor: pointer;
        text-align: left;
        color: inherit;
        transition: background 0.15s;
    }

    .security-model-block__toggle:hover {
        background: rgba(255, 255, 255, 0.04);
        color: var(--text-primary);
    }

    .security-model-block__toggle:hover .security-model-block__chevron {
        color: var(--accent);
    }

    /* Elite Refinement: Specific Status Overrides */
    .status-grid-compact .status-label {
        padding: 1px 8px;
        font-size: 12px;
        border-radius: 4px;
        height: 20px;
        /* Balanced density */
    }

    .status-grid-compact__icon i.text-danger {
        color: rgba(248, 81, 73, 0.8) !important;
        /* Toned down from pure alert red */
    }

    .status-grid-compact__icon {
        border: 1px solid rgba(255, 255, 255, 0.06);
        background: rgba(255, 255, 255, 0.02);
    }

    .security-model-block__chevron {
        font-size: 0.7rem;
        color: var(--text-ghost);
        transition: transform 0.25s ease;
        flex-shrink: 0;
    }

    .security-model-block__toggle[aria-expanded="true"] .security-model-block__chevron {
        transform: rotate(180deg);
    }

    .security-model-block__body {
        padding: var(--space-5);
        border-top: 1px solid var(--border-subtle);
        animation: slideDown 0.2s ease;
    }

    .security-model-block__body[hidden] {
        display: none;
    }

    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-6px);
        }

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

    .security-model-block__grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-5);
    }

    @media (max-width: 600px) {
        .security-model-block__grid {
            grid-template-columns: 1fr;
        }
    }

    .security-model-block__item {
        display: flex;
        gap: var(--space-3);
        align-items: flex-start;
    }

    .security-model-block__item-icon {
        width: 28px;
        height: 28px;
        border-radius: 6px;
        background: rgba(99, 102, 241, 0.08);
        border: 1px solid rgba(99, 102, 241, 0.15);
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 0.75rem;
        flex-shrink: 0;
        margin-top: 2px;
    }
}

/* --- LANDING SURFACE - Merged from style.css --- */
.landing-surface {

    /* 
    Phase 32: The "Un-AI" Premium Brand Identity 
    Inspired by Snyk, Linear, and Vercel.
  */

    @import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;700&display=swap');

    :root {
        /* Brand Palette - Deep Cyber-Physical Dark */
        --bg-primary: #020617;
        /* Slate 950 - Deeper, richer */
        --bg-secondary: #0f172a;
        /* Slate 900 */
        --bg-tertiary: #1e293b;
        /* Slate 800 */

        --accent-primary: #6366f1;
        /* Indigo 500 */
        --accent-glow: rgba(99, 102, 241, 0.5);
        --accent-secondary: #a855f7;
        /* Purple 500 */

        --text-primary: #f8fafc;
        /* Slate 50 */
        --text-secondary: #94a3b8;
        /* Slate 400 */
        --text-tertiary: #64748b;
        /* Slate 500 */

        --border-color: #1e293b;
        /* Slate 800 */

        /* Spacing System */
        --nav-height: 80px;
    }

    body {
        background-color: var(--bg-primary);
        color: var(--text-primary);
        font-family: 'Inter', system-ui, -apple-system, sans-serif;
        overflow-x: hidden;
        line-height: 1.6;
        -webkit-font-smoothing: antialiased;
        font-size: 16px;
        /* Explicit base size */
    }

    /* --- UTILITIES --- */
    .container-xl {
        max-width: 1152px;
        margin: 0 auto;
        padding: 0 24px;
    }

    .text-gradient {
        background: linear-gradient(135deg, #fff 0%, #a5b4fc 100%);
        -webkit-background-clip: text;
        background-clip: text;
        -webkit-text-fill-color: transparent;
    }

    .glass-panel {
        background: rgba(15, 23, 42, 0.6);
        backdrop-filter: blur(12px);
        border: 1px solid rgba(255, 255, 255, 0.05);
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    }

    /* --- MEGA MENU NAVIGATION --- */
    .navbar {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: var(--nav-height);
        background: rgba(5, 5, 5, 0.8);
        backdrop-filter: blur(12px);
        border-bottom: 1px solid var(--border-color);
        z-index: 1000;
        transition: all 0.3s ease;
    }

    .nav-container {
        max-width: 1152px;
        /* Wider for enterprise feel */
        margin: 0 auto;
        height: 100%;
        padding: 0 24px;
        /* More breathing room */
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .nav-brand {
        display: flex;
        align-items: center;
        gap: 12px;
        font-weight: 700;
        font-size: 1.25rem;
        color: white;
        text-decoration: none;
        letter-spacing: -0.5px;
    }

    .brand-logo-box {
        width: 36px;
        height: 36px;
        background: linear-gradient(135deg, var(--accent-primary), #a855f7);
        border-radius: 8px;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 0 20px var(--accent-glow);
    }

    /* Nav Links */
    .nav-links {
        display: flex;
        gap: 32px;
        height: 100%;
        align-items: center;
    }

    .nav-item {
        position: relative;
        height: 100%;
        display: flex;
        align-items: center;
        cursor: pointer;
    }

    .nav-link {
        color: var(--text-secondary);
        font-weight: 500;
        font-size: 0.95rem;
        text-decoration: none;
        transition: color 0.2s ease;
        display: flex;
        align-items: center;
        gap: 6px;
    }

    .nav-link:hover,
    .nav-item:hover .nav-link {
        color: white;
    }

    .nav-link i {
        font-size: 0.75rem;
        opacity: 0.5;
        transition: transform 0.2s ease;
    }

    .nav-item:hover .nav-link i {
        transform: rotate(180deg);
    }

    /* Mega Menu Dropdown */
    .mega-menu {
        position: absolute;
        top: var(--nav-height);
        left: 50%;
        transform: translateX(-50%) translateY(10px);
        width: 900px;
        background: var(--bg-secondary);
        border: 1px solid var(--border-color);
        border-radius: 16px;
        padding: 32px;
        opacity: 0;
        visibility: hidden;
        transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
        display: grid;
        grid-template-columns: 2fr 1.5fr;
        /* Products vs Featured */
        gap: 40px;
        box-shadow: 0 40px 80px -20px rgba(0, 0, 0, 0.8);
    }

    .nav-item:hover .mega-menu {
        opacity: 1;
        visibility: visible;
        transform: translateX(-50%) translateY(0);
    }

    /* Menu Columns */
    .menu-column h3 {
        font-size: 0.75rem;
        text-transform: uppercase;
        letter-spacing: 1px;
        color: var(--text-tertiary);
        margin-bottom: 16px;
        font-weight: 700;
    }

    .menu-list {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }

    .menu-item {
        display: flex;
        gap: 12px;
        padding: 12px;
        border-radius: 8px;
        transition: background 0.2s ease;
        text-decoration: none;
    }

    .menu-item:hover {
        background: var(--bg-tertiary);
    }

    .menu-icon {
        width: 40px;
        height: 40px;
        background: var(--bg-tertiary);
        border-radius: 8px;
        display: flex;
        align-items: center;
        justify-content: center;
        color: var(--text-primary);
        font-size: 1.1rem;
        transition: all 0.2s ease;
        border: 1px solid var(--border-color);
    }

    .menu-item:hover .menu-icon {
        background: var(--accent-primary);
        border-color: var(--accent-primary);
        color: white;
    }

    .menu-text h4 {
        color: var(--text-primary);
        font-weight: 600;
        font-size: 0.95rem;
        margin-bottom: 4px;
    }

    .menu-text p {
        color: var(--text-tertiary);
        font-size: 0.8rem;
        line-height: 1.4;
    }

    /* Featured Card in Menu */
    .featured-card {
        background: linear-gradient(135deg, #1e1b4b, #312e81);
        border-radius: 12px;
        padding: 24px;
        position: relative;
        overflow: hidden;
        border: 1px solid rgba(255, 255, 255, 0.1);
        height: 100%;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
    }

    .featured-content h4 {
        font-size: 1.1rem;
        font-weight: 700;
        margin-bottom: 8px;
        background: linear-gradient(to right, #fff, #a5b4fc);
        -webkit-background-clip: text;
        background-clip: text;
        -webkit-text-fill-color: transparent;
    }

    .featured-content p {
        font-size: 0.85rem;
        color: #c7d2fe;
        margin-bottom: 16px;
    }

    .btn-sm-primary {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        font-size: 0.8rem;
        font-weight: 600;
        color: white;
        text-decoration: none;
    }

    .btn-sm-primary:hover {
        text-decoration: underline;
    }

    /* Nav Actions */
    .nav-actions {
        display: flex;
        gap: 16px;
        align-items: center;
    }

    .btn-login {
        color: var(--text-primary);
        font-weight: 500;
        font-size: 0.9rem;
        text-decoration: none;
        transition: color 0.2s;
    }

    .btn-login:hover {
        color: var(--accent-primary);
    }

    .btn-primary {
        background: var(--text-primary);
        color: black;
        padding: 10px 20px;
        border-radius: 8px;
        font-weight: 600;
        font-size: 0.9rem;
        text-decoration: none;
        transition: transform 0.2s ease, box-shadow 0.2s ease;
    }

    .btn-primary:hover {
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(255, 255, 255, 0.2);
    }


    /* Base Utility for Hidden Mega Menus */
    .hidden {
        display: none;
    }

    /* --- HERO SECTION --- */
    .hero-section {
        padding-top: 200px;
        padding-bottom: 120px;
        text-align: center;
        position: relative;
        overflow: hidden;
        max-width: 1152px;
        margin: 0 auto;
    }

    .gradient-text {
        background: linear-gradient(135deg, #e2e8f0 0%, #818cf8 50%, #c084fc 100%);
        -webkit-background-clip: text;
        background-clip: text;
        -webkit-text-fill-color: transparent;
        display: inline-block;
        filter: drop-shadow(0 0 20px rgba(99, 102, 241, 0.3));
    }

    .hero-title {
        font-size: 6rem;
        /* Bigger impact */
        font-weight: 800;
        line-height: 0.95;
        letter-spacing: -0.04em;
        /* Tighter tracking */
        margin-bottom: 32px;
        color: var(--text-primary);
    }

    .hero-subtitle {
        font-size: 1.5rem;
        /* Larger readable text */
        color: var(--text-secondary);
        max-width: 700px;
        margin: 0 auto 56px;
        font-weight: 400;
        line-height: 1.5;
    }

    /* --- BENTO GRID CARD SYSTEM --- */
    .bento-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
        gap: 32px;
        padding: 100px 24px;
        max-width: 1152px;
        margin: 0 auto;
    }

    .bento-card {
        background: rgba(30, 41, 59, 0.4);
        /* Glassmorphism base */
        backdrop-filter: blur(12px);
        border: 1px solid rgba(255, 255, 255, 0.05);
        border-radius: 24px;
        padding: 48px;
        position: relative;
        overflow: hidden;
        transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
        display: flex;
        flex-direction: column;
        height: 100%;
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    }

    .bento-card:hover {
        transform: translateY(-8px);
        box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.3);
        border-color: rgba(99, 102, 241, 0.3);
        background: rgba(30, 41, 59, 0.6);
    }

    /* Gradient Beam Hover Effect */
    .bento-card::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.1), transparent);
        transition: left 0.6s ease;
        pointer-events: none;
    }

    .bento-card:hover::before {
        left: 100%;
    }

    .bento-icon {
        width: 64px;
        height: 64px;
        background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(168, 85, 247, 0.1));
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 16px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.75rem;
        margin-bottom: 32px;
        color: var(--accent-primary);
        box-shadow: 0 0 20px rgba(99, 102, 241, 0.1);
    }

    .bento-title {
        font-size: 1.75rem;
        font-weight: 700;
        color: var(--text-primary);
        margin-bottom: 16px;
        letter-spacing: -0.02em;
    }

    .bento-desc {
        color: var(--text-secondary);
        font-size: 1.1rem;
        line-height: 1.7;
        margin-bottom: 24px;
    }

    /* --- TERMINAL WINDOW (PREMIUM) --- */
    .terminal-window {
        background: #0d1117;
        /* GitHub Dark */
        border: 1px solid #30363d;
        border-radius: 12px;
        box-shadow: 0 50px 100px -20px rgba(0, 0, 0, 0.7);
        overflow: hidden;
        font-family: 'JetBrains Mono', monospace;
        font-size: 0.9rem;
        max-width: 900px;
        margin: 0 auto;
    }

    .terminal-header {
        background: #161b22;
        padding: 12px 16px;
        display: flex;
        align-items: center;
        gap: 8px;
        border-bottom: 1px solid #30363d;
    }

    .terminal-dot {
        width: 12px;
        height: 12px;
        border-radius: 50%;
    }

    .dot-close {
        background: #ff5f56;
    }

    .dot-min {
        background: #ffbd2e;
    }

    .dot-max {
        background: #27c93f;
    }

    .terminal-title {
        margin-left: auto;
        margin-right: auto;
        color: #8b949e;
        font-size: 0.8rem;
        font-weight: 600;
        opacity: 0.7;
    }

    /* --- FAQ ACCORDION --- */
    .faq-section {
        padding: 100px 24px;
        background: var(--bg-primary);
        position: relative;
        border-top: 1px solid var(--border-color);
    }

    .faq-container {
        max-width: 800px;
        margin: 0 auto;
    }

    .faq-header {
        text-align: center;
        margin-bottom: 60px;
    }

    .faq-title {
        font-size: 2.5rem;
        font-weight: 800;
        margin-bottom: 16px;
        letter-spacing: -1px;
        color: var(--text-primary);
    }

    .faq-subtitle {
        font-size: 1.1rem;
        color: var(--text-secondary);
    }

    .faq-item {
        border-bottom: 1px solid var(--border-color);
        margin-bottom: 16px;
        border-radius: 8px;
        transition: background-color 0.2s;
    }

    .faq-item:hover {
        background-color: rgba(255, 255, 255, 0.02);
    }

    .faq-question {
        width: 100%;
        text-align: left;
        padding: 24px 8px;
        background: none;
        border: none;
        font-size: 1.1rem;
        font-weight: 600;
        color: var(--text-primary);
        display: flex;
        justify-content: space-between;
        align-items: center;
        cursor: pointer;
        transition: color 0.2s;
    }

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

    .faq-icon {
        width: 24px;
        height: 24px;
        border-radius: 50%;
        background: var(--bg-tertiary);
        display: flex;
        align-items: center;
        justify-content: center;
        color: var(--text-primary);
        font-size: 0.8rem;
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.2s;
    }

    .faq-question[aria-expanded="true"] .faq-icon {
        transform: rotate(180deg);
        background: var(--accent-primary);
        color: white;
    }

    .faq-answer {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1), padding 0.3s ease;
        padding: 0 8px;
        opacity: 0.8;
        line-height: 1.6;
        color: var(--text-secondary);
    }

    .faq-question[aria-expanded="true"]+.faq-answer {
        max-height: 300px;
        padding-bottom: 24px;
    }
}

/* --- AUDIT SURFACE - Merged from audit.css --- */

/* api/static/css/audit.css */
/* Scope everything to the audit surface to avoid bleed */
.audit-surface .audit-ledger {
    margin-top: 12px;
}

.audit-surface .audit-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 6px 0 10px 0;
    opacity: 0.85;
    font-size: 12px;
}

.audit-surface .audit-meta .meta-right {
    display: flex;
    gap: 14px;
    align-items: center;
    white-space: nowrap;
    font-size: 11px;
    font-family: ui-monospace, SFMono-Regular, monospace;
    opacity: 0.65;
}

.audit-surface .data-table {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
}

.audit-surface .data-table thead th {
    text-align: left;
    opacity: 0.85;
    padding: var(--table-cell-py) var(--table-cell-px);
    border-bottom: 1px solid var(--card-border-alpha);
}

.audit-surface .data-table tbody td {
    padding: var(--table-cell-py) var(--table-cell-px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    vertical-align: middle;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.audit-surface .data-table tbody tr:hover td {
    background: var(--hover-alpha);
}

.audit-surface .t-mono {
    font-family: var(--font-mono);
}

.audit-surface .muted {
    opacity: 0.75;
}

.audit-surface .col-ts {
    width: 18%;
    opacity: 0.78;
}

.audit-surface .col-actor {
    width: 14%;
    font-weight: 500;
}

.audit-surface .col-act {
    width: 18%;
}

.audit-surface .col-target {
    width: 26%;
}

.audit-surface .col-result {
    width: 12%;
}

.audit-surface .col-correlation {
    width: 12%;
    opacity: 0.78;
}

.audit-surface .empty-row td {
    padding: 24px 0 !important;
    text-align: center;
    border-bottom: none !important;
    background: transparent !important;
    white-space: normal;
}

.audit-surface .data-table tbody tr.empty-row:hover td {
    background: transparent !important;
}

.audit-surface .empty-row .empty-title {
    font-weight: 700;
    margin-bottom: 6px;
    opacity: 0.9;
}

.audit-surface .empty-row .empty-sub {
    opacity: 0.55;
    font-size: 12px;
}

/* =========================
   Phase 3: Result taxonomy tags + correlation truncation
   ========================= */

.audit-surface .tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;

    padding: 2px 8px;
    border-radius: 999px;

    font-size: 11px;
    line-height: 16px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;

    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.86);

    white-space: nowrap;
}

/* Result taxonomy */
.audit-surface .tag-success {
    border-color: rgba(46, 160, 67, 0.35);
    background: rgba(46, 160, 67, 0.12);
    color: rgba(130, 255, 170, 0.95);
}

.audit-surface .tag-denied {
    border-color: rgba(248, 81, 73, 0.40);
    background: rgba(248, 81, 73, 0.12);
    color: rgba(255, 160, 155, 0.95);
}

.audit-surface .tag-mutated {
    border-color: rgba(210, 153, 34, 0.45);
    background: rgba(210, 153, 34, 0.16);
    color: rgba(255, 210, 140, 0.96);
}

.audit-surface .tag-verified {
    border-color: rgba(59, 130, 246, 0.40);
    background: rgba(59, 130, 246, 0.14);
    color: rgba(170, 205, 255, 0.96);
}

/* Correlation truncation */
.audit-surface .col-correlation .mono-trunc {
    display: inline-block;
    max-width: 170px;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: middle;
    white-space: nowrap;

    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 12px;
    letter-spacing: 0.01em;
    color: rgba(255, 255, 255, 0.78);
}

.audit-surface .col-correlation .mono-trunc:hover {
    color: rgba(255, 255, 255, 0.92);
}

/* --- SETTINGS SURFACE - Merged from settings.css --- */

/* =========================================================
   SETTINGS SURFACE Ã¢â‚¬â€ TYPOGRAPHY LOCK
   (Additive, JS-safe)
   ========================================================= */

.settings-surface .page-title {
    font-size: var(--h1-size);
    font-weight: var(--h1-weight);
    line-height: var(--h1-lh);
}

.settings-surface .section-title {
    font-size: var(--section-title-size);
    font-weight: var(--section-title-weight);
    line-height: var(--section-title-lh);
}

/* Descriptive lines under titles */
.settings-surface .t-subtitle,
.settings-surface .subtitle,
.settings-surface .help,
.settings-surface .hint {
    font-size: var(--subtitle-size);
    font-weight: var(--subtitle-weight);
    line-height: var(--subtitle-lh);
    opacity: var(--subtitle-opacity);
}

/* Micro labels / kickers (01/02/03) */
.settings-surface .kicker {
    font-size: var(--kpi-label-size);
    font-weight: var(--kpi-label-weight);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    opacity: var(--muted-65);
}

/* Settings tables (policy history etc.) */
.settings-surface .data-table th {
    opacity: var(--muted-78);
}

/* Phase 3 Ã¢â‚¬â€ KV alignment */
.settings-surface .kv-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    padding: 6px 0;
}

.settings-surface .kv-label {
    font-size: var(--table-cell-size);
    font-weight: var(--table-cell-weight);
    opacity: var(--muted-78);
}

.settings-surface .kv-value {
    font-size: var(--table-cell-size);
    font-weight: var(--w-medium);
    text-align: right;
    white-space: nowrap;
}

/* If some values are monospace, keep it clean */
.settings-surface .kv-value.t-mono {
    font-weight: var(--mono-weight);
}

/* Phase 2 Ã¢â‚¬â€ table density */
.settings-surface .data-table th,
.settings-surface .data-table td {
    padding: 10px 14px;
}

/* --- DEPENDENCIES SURFACE - Merged from dependencies.css --- */

/* Dependencies Ledger: HUD + Zero-State (page scoped) */

.ledger-hud {
    max-width: 1200px;
    margin: 0 auto;
    padding: 12px 16px;
    border: 1px solid rgba(48, 54, 61, 0.7);
    /* #30363d-ish */
    background: rgba(0, 0, 0, 0.15);
    border-radius: 12px;
}

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

.ledger-metric {
    padding: var(--table-cell-py) var(--table-cell-px);
    min-height: 56px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.ledger-metric+.ledger-metric {
    border-left: 1px solid rgba(48, 54, 61, 0.45);
}

.ledger-metric .label {
    font-size: 12px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-ghost, rgba(255, 255, 255, 0.6));
    margin-bottom: 4px;
}

.ledger-metric .value {
    font-size: 22px;
    line-height: 1.15;
    font-weight: 600;
    color: var(--text, rgba(255, 255, 255, 0.92));
}

/* Severity should carry priority without neon */
.ledger-metric.severity .value {
    color: var(--accent, #6366f1);
}

/* Responsive */
@media (max-width: 1100px) {
    .ledger-hud-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ledger-metric+.ledger-metric {
        border-left: none;
    }

    .ledger-metric:nth-child(n+3) {
        border-top: 1px solid rgba(48, 54, 61, 0.45);
    }

    .ledger-metric:nth-child(2n) {
        border-left: 1px solid rgba(48, 54, 61, 0.45);
    }
}

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

    .ledger-metric:nth-child(2n) {
        border-left: none;
    }

    .ledger-metric:nth-child(n+2) {
        border-top: 1px solid rgba(48, 54, 61, 0.45);
    }
}

/* Zero-State: Operational */
.ledger-empty {
    max-width: 1200px;
    margin: 16px auto 0;
    padding: 14px 16px;
    border: 1px solid rgba(48, 54, 61, 0.7);
    background: rgba(0, 0, 0, 0.12);
    border-radius: 12px;
}

.ledger-empty h2 {
    font-size: 16px;
    margin: 0 0 6px;
    font-weight: 600;
}

.ledger-empty .subtext {
    margin: 0 0 10px;
    color: var(--text-ghost, rgba(255, 255, 255, 0.65));
    font-size: 13px;
}

.activation-protocol {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 14px;
    margin: 0 0 12px;
    padding: 0;
    list-style: none;
}

.activation-protocol li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text, rgba(255, 255, 255, 0.9));
}

.activation-protocol .step {
    width: 20px;
    height: 20px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    border: 1px solid rgba(48, 54, 61, 0.9);
    color: var(--text-ghost, rgba(255, 255, 255, 0.7));
}

.ledger-empty .actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.ledger-empty .help-link {
    color: var(--accent, #6366f1);
    text-decoration: none;
}

.ledger-empty .help-link:hover {
    text-decoration: underline;
}

/* === Ledger Table Density (scoped) === */
.dependencies-surface table.data-table {
    width: 100%;
    table-layout: fixed;
    border-collapse: separate;
    border-spacing: 0;
}

/* Header Presence Refinement (must beat app.css !important) */
.dependencies-surface table.data-table thead th {
    padding: var(--table-cell-py) var(--table-cell-px) !important;
    letter-spacing: 0.02em;
    color: rgba(255, 255, 255, 0.75) !important;
    border-bottom: 1px solid var(--border-subtle-alpha);
    white-space: nowrap;
}

/* Body cells */
.dependencies-surface table.data-table tbody td {
    padding: var(--table-cell-py) var(--table-cell-px);
    border-bottom: 1px solid rgba(48, 54, 61, 0.35);
    vertical-align: middle;
}

/* Row hover lift */
.dependencies-surface table.data-table tbody tr:hover td {
    background: var(--hover-alpha);
}

/* Ellipsis for long package names (and any long text) */
.dependencies-surface table.data-table td,
.dependencies-surface table.data-table th {
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Column width map via classes (preferred) */
.dependencies-surface .col-package {
    width: 32%;
}

.dependencies-surface .col-type {
    width: 10%;
}

.dependencies-surface .col-version {
    width: 12%;
}

.dependencies-surface .col-source {
    width: 12%;
}

.dependencies-surface .col-severity {
    width: 12%;
}

.dependencies-surface .col-license {
    width: 10%;
}

.dependencies-surface .col-status {
    width: 12%;
}

/* Typography Balance */
.dependencies-surface td.col-package {
    white-space: nowrap;
    font-weight: 500;
}

/* Normalized base for table tags */
.dependencies-surface table.data-table .tag {
    font-size: 11px;
    height: 18px;
    padding: 0 8px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.03);
    color: rgba(255, 255, 255, 0.85);
    font-weight: 600;
}

/* Elite Severity System (Scoped Filled Variants) */
.dependencies-surface .tag-critical {
    background: var(--color-critical) !important;
    border-color: var(--color-critical) !important;
    color: #ffffff !important;
}

.dependencies-surface .tag-high {
    background: var(--color-high) !important;
    border-color: var(--color-high) !important;
    color: #ffffff !important;
}

.dependencies-surface .tag-medium {
    background: var(--tag-bg-warn) !important;
    border: 1px solid rgba(210, 153, 34, 0.4) !important;
    color: var(--color-warn) !important;
}

.dependencies-surface .tag-low {
    background: var(--tag-bg-monitoring) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: var(--color-muted) !important;
}

/* End of Institutional Merged Assets */
/* --- AUTH & ONBOARDING SURFACE --- */
.landing-surface .btn-vault {
    background: var(--bg-main);
    border: 1px solid var(--border-strong);
    color: var(--text-strong);
    font-weight: 700;
    text-transform: none;
    letter-spacing: normal;
    height: 52px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.landing-surface .btn-vault:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--text-ghost);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.landing-surface .auth-input {
    height: 48px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-subtle);
    border-radius: var(--r-md);
    padding: 0 var(--space-4);
    color: white;
    transition: all 0.2s;
}

.landing-surface .auth-input:focus {
    outline: none;
    border-color: var(--brand-indigo);
    background: rgba(99, 102, 241, 0.05);
}

.landing-surface .auth-input::placeholder {
    color: var(--text-ghost);
}


/* --- STATUS & DOCUMENTATION SURFACE --- */
.landing-surface .status-indicator-pulse {
    width: 16px;
    height: 16px;
    background: var(--success);
    border-radius: 50%;
    box-shadow: 0 0 0 rgba(34, 197, 94, 0.4);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
    }

    70% {
        transform: scale(1);
        box-shadow: 0 0 0 10px rgba(34, 197, 94, 0);
    }

    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
    }
}

.landing-surface article h2,
.landing-surface article h3 {
    color: var(--text-strong);
    margin-top: var(--space-8);
    font-weight: 700;
}

/* =========================================================
   PRICING & CHANGELOG COMPONENTS (Institutional Style)
   ========================================================= */

/* Pricing Grid Engine */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    margin: 48px 0 64px;
}

@media (max-width: 1024px) {
    .pricing-grid {
        grid-template-columns: 1fr;
        max-width: 500px;
        margin-left: auto;
        margin-right: auto;
    }
}

.pricing-card {
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 40px;
    display: flex;
    flex-direction: column;
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.pricing-card:hover {
    transform: translateY(-8px);
    border-color: rgba(99, 102, 241, 0.25);
    background: rgba(15, 23, 42, 0.6);
}

.pricing-card.featured {
    border-color: var(--brand-indigo);
    background: radial-gradient(circle at top right, rgba(99, 102, 241, 0.1), transparent);
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.4);
}

.pricing-card.featured::after {
    content: 'POPULAR';
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--brand-indigo);
    color: white;
    font-size: 10px;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 99px;
    letter-spacing: 0.1em;
}

.pricing-header h3 {
    margin: 0 0 12px !important;
    font-size: 1.5rem !important;
    color: var(--text-strong);
}

.pricing-price {
    font-size: 3rem;
    font-weight: 800;
    color: var(--text-strong);
    margin-bottom: 24px;
    font-family: var(--font-sans);
    letter-spacing: -0.02em;
}

.pricing-price span {
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 500;
}

.pricing-bullets {
    flex-grow: 1;
    margin-bottom: 32px;
}

.pricing-bullets ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.pricing-bullets li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
    color: var(--text-muted);
}

.pricing-bullets li::before {
    content: '✓';
    color: var(--brand-indigo);
    font-weight: 900;
}

/* Changelog Engine */
.changelog-entry {
    margin-bottom: 80px;
    padding-bottom: 80px;
    border-bottom: 1px solid var(--border-subtle);
}

.changelog-entry:last-of-type {
    border-bottom: none;
}

.changelog-entry h2 {
    font-size: 2.5rem !important;
    margin-bottom: 16px !important;
    letter-spacing: -0.02em !important;
}

.changelog-tags {
    display: flex;
    gap: 8px;
    margin-bottom: 32px;
}

.changelog-tag {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Documentation Prose Polish */
.doc-prose h1 {
    margin-bottom: 32px;
}

.doc-prose h2 {
    margin-bottom: 24px;
    border-bottom: 1px solid var(--border-subtle);
    padding-bottom: 12px;
}

.doc-prose h3 {
    margin-bottom: 16px;
}

.doc-prose p {
    margin-bottom: 20px;
    color: var(--text-secondary);
    line-height: 1.7;
}

.doc-prose ul,
.doc-prose ol {
    margin-bottom: 24px;
    padding-left: 20px;
    color: var(--text-secondary);
}

.doc-prose li {
    margin-bottom: 10px;
}

.doc-prose code {
    background: rgba(255, 255, 255, 0.05);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 0.9em;
}

.doc-prose pre {
    background: #0d1117;
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 32px;
    overflow-x: auto;
}

.doc-prose pre code {
    background: transparent;
    padding: 0;
}

/* Table Polish */
.doc-prose table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 32px;
}

.doc-prose th {
    background: rgba(255, 255, 255, 0.02);
    text-align: left;
    padding: 12px 16px;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-strong);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--border-subtle);
}

.doc-prose td {
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    font-size: 0.95rem;
}

.doc-prose tr:last-child td {
    border-bottom: none;
}

/* Modal & Command Palette Icons */
[class^="fa-"],
[class*=" fa-"] {
    display: inline-block;
    width: 1.25em;
    text-align: center;
}

/* Documentation TOC Styling (Premium Sidebar) */
.doc-toc {
    position: sticky;
    top: calc(var(--nav-height) + 32px);
    height: fit-content;
    padding-right: 24px;
    border-right: 1px solid var(--border-subtle);
}

.doc-toc h4 {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-tertiary);
    margin-bottom: 16px;
}

.doc-toc ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.doc-toc li {
    margin-bottom: 8px;
}

.doc-toc a {
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all 0.2s;
    display: block;
    line-height: 1.4;
}

.doc-toc a:hover {
    color: var(--text-strong);
    transform: translateX(4px);
}

/* Institutional Status Indicator Wrap */
.status-indicator-wrap {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-subtle);
    padding: 4px 12px;
    border-radius: 99px;
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: var(--text-strong);
}

.status-dot {
    width: 6px;
    height: 6px;
    background: #22c55e;
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(34, 197, 94, 0.6);
    position: relative;
}

.status-dot::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border: 1px solid #22c55e;
    border-radius: 50%;
    animation: statusPulse 2s infinite;
}

@keyframes statusPulse {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }

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

/* --- Phase 30: JS Engine Refinements --- */
.gov-card-lockdown {
    border-color: var(--danger) !important;
    background: rgba(239, 68, 68, 0.05) !important;
}

.toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
}

.toast {
    padding: 12px 16px;
    border-radius: var(--r-md);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
    color: var(--text-strong);
    font-size: var(--fs-small);
    font-weight: var(--fw-bold);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transform: translateX(40px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: auto;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.toast-visible {
    transform: translateX(0);
    opacity: 1;
}

.toast-icon {
    opacity: 0.5;
    font-size: 14px;
}

.toast-info {
    background-color: #4f46e5;
}

.toast-success {
    background-color: #059669;
    border-color: rgba(16, 185, 129, 0.3);
}

.toast-warning {
    background-color: #d97706;
    border-color: rgba(245, 158, 11, 0.3);
}

.toast-error {
    background-color: #dc2626;
    border-color: rgba(239, 68, 68, 0.3);
}

/* =========================================================
   PHASE 4: PRODUCT EXPERIENCE — MARKETING UTILITIES
   ========================================================= */

/* --- Scroll Reveal Animations --- */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.active {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

/* Staggered delay tokens */
.delay-1 {
    transition-delay: 0.05s;
}

.delay-2 {
    transition-delay: 0.12s;
}

.delay-3 {
    transition-delay: 0.20s;
}

.delay-4 {
    transition-delay: 0.28s;
}

/* SSR / no-JS fallback */
[data-aos-fallback] .reveal {
    opacity: 1 !important;
    transform: none !important;
}

/* --- Hover Lift (Marketing Cards) --- */
.hover-lift {
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1),
        box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px -8px rgba(0, 0, 0, 0.5);
}

/* --- Responsive Grid Utilities (Marketing) --- */
.grid-desktop-2 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

.grid-desktop-3 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

@media (min-width: 900px) {
    .grid-desktop-2 {
        grid-template-columns: repeat(2, 1fr);
        gap: 32px;
    }

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

/* --- Flex Utilities (Marketing) --- */
.flex {
    display: flex;
}

.flex-grow {
    flex-grow: 1;
}

.items-start {
    align-items: flex-start;
}

.items-center {
    align-items: center;
}

.justify-center {
    justify-content: center;
}

.justify-between {
    justify-content: space-between;
}

.gap-4 {
    gap: 16px;
}

.gap-6 {
    gap: 24px;
}

.gap-8 {
    gap: 32px;
}

.gap-12 {
    gap: 48px;
}

.gap-16 {
    gap: 64px;
}

.mt-2 {
    margin-top: 8px;
}

.mt-4 {
    margin-top: 16px;
}

.mt-6 {
    margin-top: 24px;
}

.mt-8 {
    margin-top: 32px;
}

.mt-10 {
    margin-top: 40px;
}

.mt-16 {
    margin-top: 64px;
}

.mt-20 {
    margin-top: 80px;
}

.mb-0 {
    margin-bottom: 0;
}

.mb-1 {
    margin-bottom: 4px;
}

.mb-2 {
    margin-bottom: 8px;
}

.mb-4 {
    margin-bottom: 16px;
}

.mb-6 {
    margin-bottom: 24px;
}

.mb-8 {
    margin-bottom: 32px;
}

.pt-8 {
    padding-top: 32px;
}

.px-10 {
    padding-left: 40px;
    padding-right: 40px;
}

.px-8 {
    padding-left: 32px;
    padding-right: 32px;
}

.py-6 {
    padding-top: 24px;
    padding-bottom: 24px;
}

.p-6 {
    padding: 24px;
}

.p-8 {
    padding: 32px;
}

.mr-2 {
    margin-right: 8px;
}

.ml-4 {
    margin-left: 16px;
}

.ml-auto {
    margin-left: auto;
}

.mx-2 {
    margin-left: 8px;
    margin-right: 8px;
}

/* Text utilities */
.text-sm {
    font-size: 13px;
}

.text-lg {
    font-size: 17px;
}

.font-bold {
    font-weight: 700;
}

.font-semibold {
    font-weight: 600;
}

.tracking-widest {
    letter-spacing: 0.15em;
}

.uppercase {
    text-transform: uppercase;
}

.leading-tight {
    line-height: 1.15;
}

.opacity-30 {
    opacity: 0.3;
}

.opacity-40 {
    opacity: 0.4;
}

.opacity-50 {
    opacity: 0.5;
}

.opacity-60 {
    opacity: 0.6;
}

.grayscale {
    filter: grayscale(1);
}

.relative {
    position: relative;
}

.absolute {
    position: absolute;
}

.inset-0 {
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
}

.overflow-hidden {
    overflow: hidden;
}

.pointer-events-none {
    pointer-events: none;
}

.z-10 {
    z-index: 10;
}

.w-3 {
    width: 12px;
}

.h-3 {
    height: 12px;
}

.w-10 {
    width: 40px;
}

.rounded-full {
    border-radius: 9999px;
}

/* Shadow glow — hero CTA */
.shadow-glow-brand {
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.35);
}

.shadow-glow-brand:hover {
    box-shadow: 0 0 28px rgba(99, 102, 241, 0.5);
}

/* --- Site Navigation (Marketing) --- */
.site-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 200;
    background: rgba(2, 6, 23, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.nav-inner {
    display: flex;
    align-items: center;
    gap: 24px;
    height: 64px;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text-strong);
    font-weight: 700;
    font-size: 15px;
    flex-shrink: 0;
}

.icon-shield {
    width: 28px;
    height: 28px;
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-shield svg {
    width: 100%;
    height: 100%;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-left: auto;
    flex-wrap: wrap;
}

.nav-links a {
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.15s;
}

.nav-links a:hover {
    color: var(--text-strong);
}

/* Mobile nav CTA */
.mobile-cta {
    display: none;
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .status-indicator-wrap {
        display: none;
    }

    .mobile-cta {
        display: inline-flex;
        margin-left: auto;
    }
}

/* --- Site Footer (5-Column Layout) --- */
.site-footer {
    background: var(--bg-card);
    border-top: 1px solid var(--border-subtle);
    padding: 64px 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
    gap: 48px;
}

@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr 1fr;
        gap: 32px;
    }

    .footer-brand {
        grid-column: span 3;
    }
}

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

    .footer-brand {
        grid-column: span 2;
    }
}

.footer-nav {
    display: flex;
    flex-direction: column;
}

.footer-nav h4 {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-strong);
    margin-bottom: 16px;
}

.footer-nav a {
    text-decoration: none;
    font-size: 13px;
    color: var(--text-muted);
    transition: color 0.15s;
    line-height: 1.6;
    padding: 2px 0;
}

.footer-nav a:hover {
    color: var(--text-strong);
}

.border-t {
    border-top: 1px solid var(--border-subtle);
}

/* --- Container & Layout (Marketing) --- */
.container {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 24px;
    padding-right: 24px;
}

/* --- CTA Link --- */
.cta-link {
    text-decoration: none;
    transition: opacity 0.15s;
}

.cta-link:hover {
    opacity: 0.75;
}

/* --- Animate Pulse (Hero badge) --- */
.animate-pulse {
    animation: heroBadgePulse 2.5s ease-in-out infinite;
}

@keyframes heroBadgePulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

/* --- Text color utilities --- */
.text-brand {
    color: var(--accent);
}

.text-muted {
    color: var(--text-muted);
}

.text-success {
    color: #22c55e;
}

.text-danger {
    color: var(--danger);
}

.text-ghost {
    color: var(--text-ghost);
}

.text-warn {
    color: #f59e0b;
}

.text-strong {
    color: var(--text-strong);
}

/* --- Button size modifiers (Marketing) --- */
.btn-sm {
    height: 30px;
    padding: 0 12px;
    font-size: 12px;
}

.btn-md {
    height: 40px;
    padding: 0 18px;
    font-size: 14px;
}

.btn-lg {
    height: 48px;
    padding: 0 24px;
    font-size: 15px;
    font-weight: 700;
}

.btn-block {
    width: 100%;
}

/* =========================================================
   RESPONSIVE OVERRIDES - Institutional Phase 2
   ========================================================= */

/* Mobile Breakpoint (<= 768px) */
@media (max-width: 768px) {
    :root {
        --fs-h1: 24px;
        --fs-h2: 18px;
        --space-6: 20px;
        --space-5: 16px;
    }

    .container {
        padding-left: var(--space-4);
        padding-right: var(--space-4);
    }

    /* Marketing Header Fixes */
    .site-nav .nav-links {
        display: none !important;
        /* Hide desktop links */
    }

    .site-nav .mobile-menu-toggle {
        display: flex !important;
        align-items: center;
        justify-content: center;
    }

    .site-nav .mobile-cta {
        display: none !important;
        /* Hide to prevent overflow as per subagent findings */
    }

    /* Mobile Drawer Styles */
    .mobile-drawer {
        position: fixed;
        top: 0;
        right: 0;
        width: 100%;
        height: 100vh;
        background: var(--bg-main);
        z-index: 2000;
        border-left: 1px solid var(--border-subtle);
        animation: slideInRight 0.3s ease;
    }

    @keyframes slideInRight {
        from {
            transform: translateX(100%);
        }

        to {
            transform: translateX(0);
        }
    }

    /* Grid Stacking */
    .grid-desktop-2,
    .grid-desktop-3,
    .marker-grid-12 {
        grid-template-columns: 1fr !important;
    }

    /* Dashboard Sidebar Logic */
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        width: 280px;
        box-shadow: 20px 0 50px rgba(0, 0, 0, 0.5);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .app-shell {
        margin-left: 0 !important;
    }

    .shell-header {
        padding: 0 var(--space-4);
    }

    /* Page-specific Hero Fix */
    .section-hero {
        padding-top: 100px !important;
    }

    .page-title {
        font-size: 32px !important;
    }

    /* Table Responsiveness */
    .table-wrap,
    .data-table-container {
        margin: 0 -16px;
        width: calc(100% + 32px);
        border-radius: 0;
        border-left: none;
        border-right: none;
    }

    .pricing-grid {
        grid-template-columns: 1fr !important;
    }

    /* Utility Hiding */
    .hidden-mobile {
        display: none !important;
    }
}

/* =========================================================
   PREMIUM DOC-SYSTEM (INSTITUTIONAL SERIES)
   ========================================================= */

.doc-prose-container {
    padding-top: var(--space-8);
    padding-bottom: var(--space-8);
}

.doc-prose {
    font-size: 15px;
    /* Slightly larger for documentation readability */
    line-height: 1.75;
    color: var(--text-primary);
}

.doc-prose h1,
.doc-prose h2,
.doc-prose h3,
.doc-prose h4 {
    color: var(--text-strong);
    margin-top: 2.5em;
    margin-bottom: 0.8em;
    letter-spacing: var(--ls-tight);
}

.doc-prose h1:first-child {
    margin-top: 0;
}

.doc-prose h2 {
    font-size: 22px;
    border-bottom: 1px solid var(--border-subtle);
    padding-bottom: 0.5em;
}

.doc-prose h3 {
    font-size: 18px;
}

.doc-prose p,
.doc-prose ul,
.doc-prose ol {
    margin-bottom: 1.5em;
}

.doc-prose ul,
.doc-prose ol {
    padding-left: 1.5em;
}

.doc-prose li {
    margin-bottom: 0.5em;
}

.doc-prose blockquote {
    border-left: 3px solid var(--accent);
    padding: 1em 1.5em;
    background: var(--bg-surface);
    border-radius: 0 var(--r-md) var(--r-md) 0;
    font-style: italic;
    margin-bottom: 2em;
}

.doc-prose code {
    font-family: var(--font-mono);
    font-size: 0.9em;
    background: rgba(99, 102, 241, 0.1);
    color: #a5b4fc;
    /* Soft indigo-300 */
    padding: 0.2em 0.4em;
    border-radius: var(--r-sm);
}

.doc-prose pre {
    background: #0b0e14;
    border: 1px solid var(--border-subtle);
    padding: 1.5em;
    border-radius: var(--r-lg);
    overflow-x: auto;
    margin-bottom: 2em;
}

.doc-prose pre code {
    background: transparent;
    padding: 0;
    color: var(--text-primary);
    font-size: 13px;
    line-height: 1.6;
}

.doc-prose hr {
    border: none;
    border-top: 1px solid var(--border-subtle);
    margin: 3em 0;
}

.doc-prose a {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 4px;
    transition: color 0.2s ease;
}

.doc-prose a:hover {
    color: var(--text-strong);
}

/* Table of Contents */
.doc-toc {
    position: sticky;
    top: 100px;
    height: fit-content;
    padding-right: 2em;
}

.doc-toc h4 {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-ghost);
    margin-bottom: 1.5em;
}

.doc-toc ul {
    list-style: none;
    padding: 0;
    font-size: 13px;
    display: flex;
    flex-direction: column;
    gap: 0.8em;
}

.doc-toc a {
    color: var(--text-muted);
    text-decoration: none;
    transition: all 0.2s ease;
    display: block;
    border-left: 2px solid transparent;
    padding-left: 12px;
}

.doc-toc a:hover {
    color: var(--accent);
    border-left-color: var(--border-subtle);
}

.doc-toc .active-toc {
    color: var(--accent);
    font-weight: 600;
    border-left-color: var(--accent);
}

/* Custom Table in Docs */
.doc-prose table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 2em;
    font-size: 13px;
}

.doc-prose th {
    text-align: left;
    padding: 12px;
    border-bottom: 2px solid var(--border-strong);
    color: var(--text-strong);
}

.doc-prose td {
    padding: 12px;
    border-bottom: 1px solid var(--border-subtle);
}

.doc-prose tr:hover {
    background: var(--bg-surface);
}

/* ========================================================= */

/* Tablet Breakpoint (769px to 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    .grid-desktop-3 {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .sidebar {
        width: 200px;
    }

    .app-shell {
        margin-left: 200px;
    }
}

/* Grid Utilities */
.grid-cols-2 {
    grid-template-columns: repeat(2, 1fr);
}

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

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

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

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

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

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

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

/* Spacing Utilities */
.p-4 {
    padding: var(--space-4);
}

.px-4 {
    padding-left: var(--space-4);
    padding-right: var(--space-4);
}

.py-4 {
    padding-top: var(--space-4);
    padding-bottom: var(--space-4);
}

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

.mb-4 {
    margin-bottom: var(--space-4);
}

.ml-4 {
    margin-left: var(--space-4);
}

.mr-4 {
    margin-right: var(--space-4);
}

.m-auto {
    margin-left: auto;
    margin-right: auto;
}

/* Typography Utilities */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.text-sm {
    font-size: 13px;
}

.text-lg {
    font-size: 18px;
}

.font-bold {
    font-weight: 700;
}

.font-semibold {
    font-weight: 600;
}

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

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

.text-accent {
    color: var(--accent);
}

.text-muted {
    color: var(--text-muted);
}

.text-strong {
    color: var(--text-strong);
}

.leading-tight {
    line-height: 1.25;
}

.leading-normal {
    line-height: 1.5;
}

.leading-relaxed {
    line-height: 1.75;
}

/* Reveal observer init (called from base_marketing) */