/* Payments Reconciliation — Minimal dark theme */
:root {
    --bg: #0f1117;
    --bg-raised: #131620;
    --surface: #181b23;
    --surface-hover: #1e2230;
    --border: #2a2e3a;
    --border-strong: #363b4d;
    --text: #e4e6eb;
    --text-secondary: #a8adc0;
    --text-muted: #8b8fa3;
    --accent: #6366f1;
    --accent-hover: #818cf8;
    --red: #ef4444;
    --orange: #f59e0b;
    --green: #22c55e;
    --blue: #3b82f6;
    --warning: #f59e0b;
    --radius: 5px;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

html {
    scrollbar-color: var(--border-strong) var(--surface);
}

* {
    scrollbar-width: thin;
    scrollbar-color: var(--border-strong) var(--surface);
}

*::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

*::-webkit-scrollbar-track {
    background: var(--surface);
}

*::-webkit-scrollbar-thumb {
    background: var(--border-strong);
    border-radius: 999px;
    border: 2px solid var(--surface);
}

*::-webkit-scrollbar-thumb:hover {
    background: #4a5065;
}

*::-webkit-scrollbar-corner {
    background: var(--surface);
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); text-decoration: underline; }

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Header */
header {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 0 2rem;
    height: 3.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
}
header h1 { font-size: 1.05rem; font-weight: 600; letter-spacing: -0.01em; }
header .header-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}
header .header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.8rem;
}
header .header-user {
    color: var(--text-muted);
}
header .header-signout {
    color: var(--text-muted);
    text-decoration: none;
    opacity: 0.7;
    transition: opacity 0.15s;
}
header .header-signout:hover {
    opacity: 1;
    color: var(--text);
    text-decoration: none;
}
header .ws-context {
    font-size: 0.82rem;
    color: var(--text-muted);
    padding-left: 0.75rem;
    border-left: 1px solid var(--border);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 220px;
}
header nav {
    display: flex;
    align-items: center;
    gap: 0;
}
header nav a {
    margin-left: 1.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    text-decoration: none;
    padding: 0.2rem 0.5rem;
    border-radius: var(--radius);
    border-bottom: 2px solid transparent;
    transition: color 0.15s, background 0.15s, border-color 0.15s;
}
header nav a:hover {
    color: var(--text);
    background: rgba(255,255,255,0.04);
    text-decoration: none;
}
header nav a.nav-active {
    color: #fff;
    font-weight: 600;
    background: rgba(99,102,241,0.1);
    border-bottom-color: var(--accent);
}
header nav .nav-divider {
    width: 1px;
    height: 1rem;
    background: var(--border);
    margin-left: 1.25rem;
    flex-shrink: 0;
}
header nav .nav-user {
    margin-left: 1rem;
    font-size: 0.78rem;
    color: var(--text-muted);
    white-space: nowrap;
}
header nav .nav-signout {
    margin-left: 0.75rem;
    font-size: 0.78rem;
    color: var(--text-muted);
    text-decoration: none;
    opacity: 0.7;
    transition: opacity 0.15s;
}
header nav .nav-signout:hover {
    opacity: 1;
    color: var(--text);
    text-decoration: none;
}
.account-menu {
    position: relative;
    margin-left: 1rem;
}
.account-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.3rem 0.55rem;
    border: 1px solid transparent;
    border-radius: var(--radius);
    background: transparent;
    color: var(--text-muted);
    font-size: 0.78rem;
    cursor: pointer;
    transition: color 0.15s, background 0.15s, border-color 0.15s;
}
.account-toggle:hover,
.account-menu:focus-within .account-toggle {
    color: var(--text);
    background: rgba(255,255,255,0.04);
    border-color: rgba(255,255,255,0.06);
}
.account-email {
    white-space: nowrap;
}
.account-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 0.45rem);
    right: 0;
    min-width: 13rem;
    padding: 0.4rem;
    border: 1px solid var(--border);
    border-radius: calc(var(--radius) + 2px);
    background: var(--card-bg);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.28);
    z-index: 30;
}
.account-menu:hover .account-dropdown,
.account-menu:focus-within .account-dropdown {
    display: block;
}
.account-dropdown a {
    display: block;
    margin: 0;
    padding: 0.5rem 0.65rem;
    border-radius: 6px;
    border-bottom: none;
    color: var(--text-muted);
    font-size: 0.82rem;
    text-decoration: none;
}
.account-dropdown a:hover,
.account-dropdown a.nav-active {
    color: var(--text);
    background: rgba(255,255,255,0.04);
}
.account-divider {
    height: 1px;
    margin: 0.35rem 0;
    background: var(--border);
}

/* Mobile menu toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text);
    font-size: 1.3rem;
    cursor: pointer;
    padding: 0.25rem;
    line-height: 1;
}

/* Page title row */
.page-title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 1.75rem;
    gap: 1rem;
}
.page-title {
    font-size: 1.15rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
    letter-spacing: -0.01em;
}
.page-subtitle {
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Subtle button variant (New workspace — secondary to card actions) */
.btn-subtle {
    display: inline-block;
    padding: 0.4rem 0.8rem;
    border: 1px solid rgba(42,46,58,0.6);
    border-radius: 6px;
    background: transparent;
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 400;
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s;
}
.btn-subtle:hover {
    color: var(--text);
    border-color: rgba(139,143,163,0.35);
    text-decoration: none;
}

/* Workspace card grid */
.ws-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 0.85rem;
    max-width: 860px;
}
.ws-card {
    display: block;
    background: rgba(22,25,33,1);
    border: 1px solid rgba(42,46,58,0.55);
    border-radius: 10px;
    padding: 1.6rem 1.7rem 1.4rem;
    text-decoration: none;
    color: var(--text);
    transition: border-color 0.15s, background 0.15s;
}
.ws-card:hover {
    border-color: rgba(139,143,163,0.25);
    background: rgba(30,34,48,0.5);
    text-decoration: none;
    color: var(--text);
}
.ws-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.85rem;
    gap: 0.75rem;
}
.ws-card-name {
    font-size: 1.05rem;
    font-weight: 500;
    letter-spacing: -0.005em;
}

/* Workspace status badges — calm, small, normal case, muted tones */
.ws-badge {
    display: inline-block;
    padding: 0.2rem 0.55rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    white-space: nowrap;
    flex-shrink: 0;
}
.ws-badge-active {
    background: rgba(34,197,94,0.07);
    color: rgba(34,197,94,0.65);
}
.ws-badge-incomplete {
    background: rgba(180,140,60,0.06);
    color: rgba(180,155,90,0.6);
}
.ws-badge-setup {
    background: rgba(139,143,163,0.06);
    color: rgba(139,143,163,0.65);
}
/* Workspace filter row */
.ws-filter-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(42,46,58,0.3);
}
.ws-filter-link {
    font-size: 0.78rem;
    color: var(--text-muted);
    text-decoration: none;
    letter-spacing: 0.01em;
}
.ws-filter-link:hover {
    color: var(--text);
}
.ws-filter-active {
    color: var(--text);
    font-weight: 600;
    border-bottom: 1px solid var(--text);
    padding-bottom: 1px;
}
.ws-filter-sep {
    font-size: 0.7rem;
    color: rgba(139,143,163,0.3);
}

.ws-badge-archived {
    background: rgba(139,143,163,0.06);
    color: rgba(139,143,163,0.5);
}
.ws-card-archived {
    opacity: 0.6;
}
.btn-archive-ws {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.7rem;
    padding: 0;
    cursor: pointer;
    opacity: 0.55;
    transition: opacity 0.15s, text-decoration 0.15s;
}
.btn-archive-ws:hover {
    opacity: 1;
    text-decoration: underline;
}

/* Card metadata */
.ws-card-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.76rem;
    color: var(--text-muted);
    margin-bottom: 0;
}
.ws-meta-stripe.connected {
    color: var(--text-muted);
}
.ws-meta-stripe.connected::before {
    content: '';
    display: inline-block;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: rgba(34,197,94,0.45);
    margin-right: 0.35rem;
    vertical-align: middle;
    position: relative;
    top: -0.5px;
}
.ws-meta-sep {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: rgba(42,46,58,0.8);
    flex-shrink: 0;
}

/* Card footer — subtle outline button action */
.ws-card-foot {
    margin-top: 1.1rem;
    padding-top: 0.9rem;
    border-top: 1px solid rgba(42,46,58,0.4);
}
.ws-action {
    display: inline-block;
    padding: 0.35rem 0.85rem;
    border: 1px solid rgba(139,143,163,0.2);
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-muted);
    transition: color 0.15s, border-color 0.15s;
}
.ws-card:hover .ws-action {
    color: var(--text);
    border-color: rgba(139,143,163,0.35);
}

/* Create inline */
.create-inline {
    background: var(--surface);
    border: 1px solid rgba(42,46,58,0.55);
    border-radius: 10px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.25rem;
    max-width: 860px;
}

/* Empty hero state */
.empty-hero {
    text-align: center;
    padding: 5rem 2rem 3rem;
    max-width: 440px;
    margin: 0 auto;
}
.empty-hero h2 {
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    letter-spacing: -0.01em;
}
.empty-hero p {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 2rem;
}
.empty-hero .empty-create {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    align-items: center;
}

/* Cards */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}
.card h2 { font-size: 1.1rem; margin-bottom: 1rem; }

/* Stats grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    text-align: center;
}
.stat-card .value {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
}
.stat-card .label {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
}
.stat-card.high .value { color: var(--red); }
.stat-card.medium .value { color: var(--orange); }
.stat-card.low .value { color: var(--green); }

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    border: 1px solid #3a3f50;
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--text);
    font-size: 0.875rem;
    cursor: pointer;
    transition: background 0.15s;
}
.btn:hover { background: var(--surface-hover); color: var(--text); text-decoration: none; }
.btn-primary {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}
.btn-primary:hover { background: var(--accent-hover); color: #fff; }

/* Tables */
table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.85rem;
}
thead th {
    text-align: left;
    padding: 0.75rem;
    background: var(--bg);
    border-bottom: 2px solid var(--border);
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    position: sticky;
    top: 0;
    z-index: 10;
}
tbody td {
    padding: 0.65rem 0.75rem;
    border-bottom: 1px solid var(--border);
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
tbody tr:hover { background: var(--surface-hover); }

/* Severity badges */
.badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}
.badge-high { background: rgba(239,68,68,0.15); color: var(--red); }
.badge-medium { background: rgba(245,158,11,0.15); color: var(--orange); }
.badge-low { background: rgba(34,197,94,0.15); color: var(--green); }
.badge-neutral { background: rgba(139,143,163,0.1); color: var(--text-muted); }
.badge-accent { background: rgba(99,102,241,0.15); color: var(--accent); }
.badge-connected { background: rgba(34,197,94,0.12); color: var(--green); font-weight: 500; text-transform: none; }

/* Filters bar */
.filters {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    align-items: center;
}
.filters select, .filters input {
    padding: 0.4rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg);
    color: var(--text);
    font-size: 0.85rem;
}

/* Forms (wizard) */
.form-group {
    margin-bottom: 1rem;
}
.form-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 0.35rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.form-group select, .form-group input {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg);
    color: var(--text);
    font-size: 0.9rem;
}

/* Loading spinner */
.spinner {
    display: inline-block;
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Toast */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    padding: 0.75rem 1.25rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.85rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    z-index: 1000;
    transition: opacity 0.3s;
}

/* Stepper sections */
.stepper-section {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    margin-bottom: 1rem;
    overflow: hidden;
}
.stepper-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    cursor: pointer;
    user-select: none;
}
.stepper-header:hover { background: var(--surface-hover); }
.step-num {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    flex-shrink: 0;
    background: var(--border);
    color: var(--text-muted);
    transition: background 0.2s, color 0.2s;
}
.step-num.done { background: var(--green); color: #fff; }
.step-num.active { background: var(--accent); color: #fff; }
.stepper-title { font-size: 1rem; font-weight: 600; }
.stepper-status {
    margin-left: auto;
    font-size: 0.8rem;
    color: var(--text-muted);
}
.stepper-body {
    padding: 0 1.5rem 1.25rem 4.5rem;
}
.stepper-body p {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 0.75rem;
}

/* Callout */
.callout {
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
    font-size: 0.875rem;
    line-height: 1.7;
    color: var(--text);
    margin: 1rem 0;
}
.callout-warn {
    background: rgba(245, 158, 11, 0.08);
    border-color: rgba(245, 158, 11, 0.2);
}
.callout-info {
    background: rgba(59, 130, 246, 0.08);
    border-color: rgba(59, 130, 246, 0.2);
}

/* Trust bullets */
.trust-list {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0;
}
.trust-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    font-size: 0.9rem;
    color: var(--text);
    margin-bottom: 0.75rem;
    line-height: 1.6;
}
.trust-icon {
    flex-shrink: 0;
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 50%;
    background: rgba(34, 197, 94, 0.15);
    color: var(--green);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    margin-top: 0.15rem;
}

/* Tabs */
.tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid var(--border);
    margin-bottom: 1rem;
}
.tab-btn {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s;
}
.tab-btn:hover { color: var(--text); border-bottom-color: rgba(139,143,163,0.35); }
.tab-btn.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* Code block (reusable) */
/* Shell format tabs (bash / PowerShell) */
.shell-tab {
    font-size: 0.74rem;
    color: var(--text-muted);
    text-decoration: none;
    padding-bottom: 2px;
}
.shell-tab:hover { color: var(--text); }
.shell-tab-active {
    color: var(--text);
    font-weight: 600;
    border-bottom: 1px solid var(--text);
}

.code-block {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', Consolas, monospace;
    font-size: 0.8rem;
    overflow-x: auto;
    white-space: pre;
    color: var(--text);
    position: relative;
    margin: 0.75rem 0;
}
.code-block .copy-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    padding: 0.2rem 0.5rem;
    font-size: 0.7rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text-muted);
    cursor: pointer;
}
.code-block .copy-btn:hover { color: var(--text); background: var(--surface-hover); }

/* Modal overlay */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 900;
    align-items: center;
    justify-content: center;
}
.modal-overlay.open { display: flex; }
.modal {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    max-width: 560px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    padding: 2rem;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.4);
}
.modal h2 { font-size: 1.1rem; margin-bottom: 1rem; }
.modal p {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 0.75rem;
}
.modal ul {
    list-style: none;
    padding: 0;
    margin: 1rem 0;
}
.modal ul li {
    padding: 0.35rem 0;
    font-size: 0.875rem;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.modal ul li::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    flex-shrink: 0;
}
.modal-footer {
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.6;
}
.modal-close {
    float: right;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}
.modal-close:hover { color: var(--text); }

/* Success state inline */
.success-state {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius);
    background: rgba(34, 197, 94, 0.08);
    border: 1px solid rgba(34, 197, 94, 0.2);
    font-size: 0.85rem;
    color: var(--green);
    margin: 0.5rem 0;
}
.success-state .meta {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-left: auto;
}

/* Error state inline (toast-like) */
.error-state {
    padding: 1rem 1.25rem;
    border-radius: var(--radius);
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.2);
    margin: 0.75rem 0;
}
.error-state h4 {
    font-size: 0.9rem;
    color: var(--red);
    margin-bottom: 0.35rem;
}
.error-state p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 3rem 2rem;
}
.empty-state h3 {
    font-size: 1.05rem;
    margin-bottom: 0.5rem;
    color: var(--text);
}
.empty-state p {
    font-size: 0.9rem;
    color: var(--text-muted);
    max-width: 400px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Helper links */
.helper-links {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
    flex-wrap: wrap;
}
.helper-links a {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-decoration: underline;
    text-decoration-style: dotted;
    text-underline-offset: 2px;
}
.helper-links a:hover { color: var(--accent); }

/* Small text */
.small-text {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* Hero section */
.hero {
    text-align: center;
    padding: 1.5rem 1rem 0.75rem;
    max-width: 680px;
    margin: 0 auto;
}
.hero h1 {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 1rem;
}
.hero p {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.7;
}
.hero-meta-link {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-left: 0.25rem;
    text-decoration: underline;
    text-decoration-style: dotted;
    text-underline-offset: 3px;
    transition: color 0.15s;
}
.hero-meta-link:hover {
    color: var(--text-secondary);
    text-decoration-style: solid;
}
.hero-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    margin-top: 1.5rem;
}

/* Progress pills */
.progress-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    max-width: 620px;
    margin: 0 auto 1.5rem;
    padding: 1rem 0;
}
.progress-step {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    white-space: nowrap;
}
.progress-step .pill-icon {
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    font-weight: 700;
    flex-shrink: 0;
    background: var(--border);
    color: var(--text-muted);
    transition: background 0.2s, color 0.2s;
}
.progress-step.done .pill-icon { background: var(--green); color: #fff; }
.progress-step.current .pill-icon { background: var(--accent); color: #fff; }
.progress-step.done .pill-label { color: var(--green); }
.progress-step.current .pill-label { color: var(--text); font-weight: 600; }
.progress-connector {
    width: 2rem;
    height: 1px;
    background: var(--border);
    flex-shrink: 0;
    margin: 0 0.25rem;
}
.progress-connector.done { background: var(--green); }

/* Info state (neutral, not red) */
.info-state {
    padding: 1rem 1.25rem;
    border-radius: var(--radius);
    background: rgba(59, 130, 246, 0.08);
    border: 1px solid rgba(59, 130, 246, 0.2);
    margin: 0.75rem 0;
}
.info-state h4 {
    font-size: 0.9rem;
    color: var(--blue);
    margin-bottom: 0.35rem;
}
.info-state p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

/* Collapsible install block */
.collapsible-trigger {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    color: var(--accent);
    cursor: pointer;
    background: none;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.4rem 0.75rem;
    transition: background 0.15s;
}
.collapsible-trigger:hover { background: var(--surface-hover); }
.collapsible-trigger .arrow {
    display: inline-block;
    transition: transform 0.2s;
    font-size: 0.7rem;
}
.collapsible-trigger.open .arrow { transform: rotate(90deg); }
.collapsible-content {
    display: none;
    margin-top: 0.75rem;
}
.collapsible-content.open { display: block; }

/* What happens next section */
.next-steps {
    max-width: 620px;
    margin: 2rem auto 1rem;
    padding: 1.5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
}
.next-steps h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}
.next-steps ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.next-steps li {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    line-height: 1.6;
}
.next-steps li::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    flex-shrink: 0;
    margin-top: 0.55rem;
}

/* Stat card neutral state (count is 0) */
.stat-card.neutral .value { color: var(--text-muted); }
.stat-card.neutral { opacity: 0.7; }

/* Match rate accent color */
.stat-card.match-rate .value { color: var(--accent); }

/* Revenue impact card */
.stat-card.impact .sub-values {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-top: 0.5rem;
    font-size: 0.8rem;
}
.stat-card.impact .sub-value {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
}
.stat-card.impact .sub-label { color: var(--text-muted); }
.stat-card.impact .sub-amount { font-weight: 600; }
.stat-card.impact .sub-amount.at-risk { color: var(--red); }
.stat-card.impact .sub-amount.free-access { color: var(--orange); }

/* Expandable table rows */
tbody tr.row-main { cursor: pointer; }
tbody tr.row-main:hover { background: var(--surface-hover); }
tbody tr.row-detail { display: none; }
tbody tr.row-detail.open { display: table-row; }
tbody tr.row-detail td {
    padding: 0;
    border-bottom: 1px solid var(--border);
    max-width: none;
    white-space: normal;
    overflow: visible;
}
.detail-panel {
    padding: 1rem 1.25rem;
    background: var(--bg);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem 2rem;
    font-size: 0.82rem;
    line-height: 1.7;
}
.detail-panel .detail-group {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}
.detail-panel .detail-group h5 {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    margin: 0;
}
.detail-panel .detail-item {
    display: flex;
    gap: 0.5rem;
}
.detail-panel .detail-label {
    color: var(--text-muted);
    min-width: 10rem;
    flex-shrink: 0;
}
.detail-panel .detail-value {
    color: var(--text);
    word-break: break-all;
}
.detail-panel .action-block {
    grid-column: 1 / -1;
    margin-top: 0.25rem;
    padding: 0.65rem 0.85rem;
    background: rgba(99, 102, 241, 0.06);
    border: 1px solid rgba(99, 102, 241, 0.15);
    border-radius: var(--radius);
    color: var(--text);
    font-size: 0.82rem;
    line-height: 1.6;
}
.detail-panel .action-label {
    font-weight: 600;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--accent);
    margin-bottom: 0.15rem;
}

/* Expand indicator on main row */
.expand-arrow {
    display: inline-block;
    font-size: 0.6rem;
    color: var(--text-muted);
    margin-right: 0.35rem;
    transition: transform 0.15s;
    vertical-align: middle;
}
tr.row-main.expanded .expand-arrow { transform: rotate(90deg); }

/* Reconciliation progress steps */
.prog-step {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.15rem 0;
}
.prog-icon {
    display: inline-block;
    width: 1.1em;
    text-align: center;
    flex-shrink: 0;
}

/* ============================================================ */
/* Dashboard: Control Panel                                      */
/* ============================================================ */

.dash-header {
    margin-bottom: 1.5rem;
}
.dash-header h2 {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}
.dash-header p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Financial impact row (top-level, revenue-first) */
.financial-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}
.financial-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem 1.25rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}
/* .financial-card.primary removed: all cards use uniform background */
.financial-card .fin-value {
    font-size: 2.4rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 0.25rem;
}
.financial-card .fin-value.accent { color: var(--accent); }
.financial-card .fin-label {
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}
.financial-card .fin-sub {
    font-size: 0.72rem;
    color: var(--text-muted);
    line-height: 1.4;
    max-width: 220px;
}
.financial-card .fin-count {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 0.3rem;
    font-weight: 500;
}
.financial-card .fin-delta {
    font-size: 0.65rem;
    font-weight: 400;
    color: var(--text-muted);
    opacity: 0.6;
    margin-top: 0.5rem;
    line-height: 1.3;
}
.financial-card .fin-delta:empty { display: none; }
.financial-card.clickable { cursor: pointer; }
.financial-card.clickable:hover { border-color: var(--border-strong); }
.financial-card.card-active { border-color: var(--accent); }
.financial-card.risk { border-color: rgba(239,68,68,0.3); }
.financial-card.risk .fin-value { color: var(--red); }
.financial-card.warn { border-color: rgba(245,158,11,0.3); }
.financial-card.warn .fin-value { color: var(--orange); }
.financial-card.high-sev .fin-value { color: var(--red); }
.financial-card.high-sev { border-color: rgba(239,68,68,0.3); }
.financial-card.neutral-sev .fin-value { color: var(--text-muted); }
.financial-card.neutral-sev { opacity: 0.7; }

/* Secondary row (smaller cards) */
.secondary-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.secondary-row-5 {
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
}
.sec-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    text-align: center;
}
.sec-card .sec-value {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 0.15rem;
}
.sec-card .sec-label {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    margin-bottom: 0.1rem;
}
.sec-card .sec-sub {
    font-size: 0.72rem;
    color: var(--text-muted);
}

/* Trend deltas */
.delta {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.1rem 0.4rem;
    border-radius: 3px;
    margin-top: 0.25rem;
}
.delta.positive { color: var(--green); background: rgba(34,197,94,0.1); }
.delta.negative { color: var(--red); background: rgba(239,68,68,0.1); }
.delta.neutral { color: var(--text-muted); background: rgba(139,143,163,0.1); }

/* Executive summary */
.exec-summary {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
}
.exec-summary h3 {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}
.exec-summary p {
    font-size: 0.9rem;
    color: var(--text);
    line-height: 1.7;
    margin-bottom: 0.35rem;
}
.exec-summary p.secondary {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Filter chips */
.filter-chips {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}
.chip {
    display: inline-block;
    padding: 0.3rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: 1rem;
    font-size: 0.78rem;
    color: var(--text-muted);
    cursor: pointer;
    background: var(--surface);
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    user-select: none;
}
.chip:hover { background: var(--surface-hover); color: var(--text); }
.chip.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

/* Settings panel */
.settings-panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
}
.settings-panel h3 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 1rem;
}
.settings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}
.settings-field label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.35rem;
}
.settings-field select,
.settings-field input {
    width: 100%;
    padding: 0.45rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg);
    color: var(--text);
    font-size: 0.85rem;
}
.settings-field .toggle-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.25rem;
}
.toggle-switch {
    position: relative;
    width: 2.5rem;
    height: 1.35rem;
    border-radius: 1rem;
    background: var(--border);
    cursor: pointer;
    transition: background 0.2s;
    flex-shrink: 0;
}
.toggle-switch.on { background: var(--accent); }
.toggle-switch::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    background: #fff;
    transition: transform 0.2s;
}
.toggle-switch.on::after { transform: translateX(1.15rem); }

/* History table */
.history-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
}
.history-table th {
    text-align: left;
    padding: 0.6rem 0.75rem;
    background: var(--bg);
    border-bottom: 2px solid var(--border);
    font-weight: 600;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}
.history-table td {
    padding: 0.55rem 0.75rem;
    border-bottom: 1px solid var(--border);
}
.history-table tr:hover { background: var(--surface-hover); }

/* Two-column layout for settings + history */
.side-panels {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

/* ── Notification Banners ─────────────────────────────── */
.notif-banner {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    border-left: 3px solid transparent;
    font-size: 0.85rem;
    line-height: 1.5;
    margin-bottom: 0.75rem;
    opacity: 0;
    animation: notifFadeIn 0.3s ease forwards;
}
@keyframes notifFadeIn {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}
.notif-banner .notif-icon {
    flex-shrink: 0;
    font-size: 1rem;
    line-height: 1.4;
}
.notif-banner .notif-body { flex: 1; }
.notif-banner .notif-title {
    font-weight: 600;
    margin-bottom: 0.15rem;
}
.notif-banner .notif-detail {
    font-size: 0.8rem;
    color: var(--text-muted);
}
.notif-banner .notif-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1rem;
    padding: 0;
    line-height: 1;
    flex-shrink: 0;
}
.notif-banner .notif-close:hover { color: var(--text); }

.notif-banner.success {
    background: rgba(34,197,94,0.06);
    border-left-color: var(--green);
}
.notif-banner.success .notif-icon { color: var(--green); }

.notif-banner.error {
    background: rgba(239,68,68,0.06);
    border-left-color: var(--red);
}
.notif-banner.error .notif-icon { color: var(--red); }

.notif-banner.warning {
    background: rgba(245,158,11,0.06);
    border-left-color: var(--orange);
}
.notif-banner.warning .notif-icon { color: var(--orange); }

.notif-banner.info {
    background: rgba(99,102,241,0.06);
    border-left-color: var(--accent);
}
.notif-banner.info .notif-icon { color: var(--accent); }

/* Inline info panel (replaces alert() for help text) */
.info-panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.85rem 1rem;
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-top: 0.5rem;
}
.info-panel code {
    background: var(--bg);
    padding: 0.15rem 0.35rem;
    border-radius: 3px;
    font-size: 0.78rem;
}

/* Agent install: collapsible details */
.agent-details {
    margin-bottom: 0.75rem;
}
.agent-details summary {
    cursor: pointer;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary);
    padding: 0.5rem 0;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.agent-details summary::-webkit-details-marker { display: none; }
.agent-details summary::before {
    content: '\25B6';
    font-size: 0.6rem;
    transition: transform 0.15s ease;
    color: var(--text-muted);
}
.agent-details[open] summary::before {
    transform: rotate(90deg);
}
.agent-prereq-list {
    list-style: none;
    padding: 0;
    margin: 0.25rem 0 0.5rem 0;
}
.agent-prereq-list li {
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.7;
    padding-left: 1rem;
    position: relative;
}
.agent-prereq-list li::before {
    content: '\2022';
    position: absolute;
    left: 0;
    color: var(--border-strong);
}

/* Agent status row */
.agent-status-row {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
    padding: 0.65rem 0.85rem;
    background: var(--bg-page);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 1rem;
    flex-wrap: wrap;
}
.agent-status-field {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}
.agent-status-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    font-weight: 600;
}
.agent-status-value {
    font-size: 0.82rem;
    color: var(--text-secondary);
    font-family: var(--font-mono, 'SFMono-Regular', 'Consolas', monospace);
}
.agent-status-badge {
    font-size: 0.78rem;
    font-weight: 600;
    padding: 0.1rem 0.5rem;
    border-radius: 3px;
    display: inline-block;
}
.agent-status-badge[data-status="waiting"] {
    color: var(--text-muted);
    background: rgba(148, 163, 184, 0.1);
    border: 1px solid rgba(148, 163, 184, 0.15);
}
.agent-status-badge[data-status="connected"] {
    color: var(--green);
    background: rgba(34, 197, 94, 0.08);
    border: 1px solid rgba(34, 197, 94, 0.2);
}
.agent-status-badge[data-status="stale"] {
    color: var(--red);
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* Agent security summary */
.mgmt-group-label {
    display: block;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    margin-bottom: 0.3rem;
}

.agent-security-summary {
    margin-top: 1.25rem;
    padding: 0.75rem 1rem;
    background: var(--bg-page);
    border: 1px solid var(--border);
    border-left: 2px solid rgba(99, 102, 241, 0.35);
    border-radius: var(--radius);
}
.agent-security-title {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    display: block;
    margin-bottom: 0.35rem;
}
.agent-security-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.agent-security-list li {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.85;
    padding-left: 0.9rem;
    position: relative;
}
.agent-security-list li::before {
    content: '\2022';
    position: absolute;
    left: 0;
    color: var(--border-strong);
}

/* Responsive */
@media (max-width: 768px) {
    .container { padding: 1rem; }
    header { padding: 0 1rem; flex-wrap: wrap; height: auto; min-height: 3.25rem; }
    header .header-left { flex: 1; min-width: 0; }
    header .ws-context { max-width: 120px; }
    header .header-right { gap: 0.5rem; font-size: 0.75rem; }

    .menu-toggle { display: block; }
    .agent-status-row { gap: 0.75rem; }
    .agent-status-row .btn { margin-left: 0; width: 100%; }

    header nav {
        display: none;
        flex-direction: column;
        width: 100%;
        padding: 0.5rem 0;
        gap: 0;
        order: 10;
    }
    header nav.open { display: flex; }
    header nav a {
        margin-left: 0;
        padding: 0.6rem 0.5rem;
        border-bottom: none;
        border-radius: 0;
        font-size: 0.9rem;
    }
    header nav a:hover { background: var(--surface-hover); }
    header nav a.nav-active {
        background: rgba(99,102,241,0.1);
        border-bottom: none;
    }
    header nav .nav-divider {
        width: 100%;
        height: 1px;
        margin: 0.35rem 0;
        margin-left: 0;
    }
    header nav .nav-user {
        margin-left: 0;
        padding: 0.5rem 0.5rem 0.25rem;
    }
    header nav .nav-signout {
        margin-left: 0;
        padding: 0.25rem 0.5rem 0.5rem;
    }
    .account-menu {
        width: 100%;
        margin-left: 0;
    }
    .account-toggle {
        width: 100%;
        justify-content: space-between;
        padding: 0.5rem;
        border-color: rgba(255,255,255,0.06);
    }
    .account-dropdown {
        position: static;
        display: block;
        min-width: 0;
        margin-top: 0.35rem;
        padding: 0;
        border: 0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
    }
    .account-dropdown a {
        padding: 0.45rem 0.5rem;
    }

    .stepper-body { padding-left: 1.5rem; }
    .hero h1 { font-size: 1.25rem; }
    .progress-bar { flex-wrap: wrap; gap: 0.25rem; }
    .progress-connector { width: 1rem; }
    .financial-card { padding: 1rem 0.75rem; }
    .financial-card .fin-value { font-size: 1.6rem; }
    .financial-card .fin-sub { font-size: 0.68rem; }
    .side-panels { grid-template-columns: 1fr; }
    .settings-grid { grid-template-columns: 1fr; }
    .ws-grid { grid-template-columns: 1fr; }
    .page-title-row { flex-direction: column; gap: 0.75rem; }
    .empty-hero { padding: 3rem 1.5rem 2rem; }
    .empty-hero .empty-create { flex-direction: column; }
    .empty-hero .empty-create input { width: 100% !important; }
    .detail-panel { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .sec-card .sec-value { font-size: 1.2rem; }
    .filter-chips { gap: 0.35rem; }
    .chip { font-size: 0.72rem; padding: 0.25rem 0.6rem; }
}

/* ============================================================ */
/* Public Marketing Pages                                        */
/* ============================================================ */

/* Navigation */
.brand {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    line-height: 0;
    overflow: hidden;
}
.site-logo {
    display: block;
    width: auto;
    height: 1.5rem;
    max-width: 100%;
}
.pub-menu-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 4px;
    width: 2.25rem;
    height: 2.25rem;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: transparent;
    cursor: pointer;
}
.pub-menu-toggle span {
    display: block;
    width: 14px;
    height: 1.5px;
    border-radius: 999px;
    background: var(--text);
    transition: transform 0.15s ease, opacity 0.15s ease;
}
.pub-menu-toggle.open span:nth-child(1) {
    transform: translateY(5.5px) rotate(45deg);
}
.pub-menu-toggle.open span:nth-child(2) {
    opacity: 0;
}
.pub-menu-toggle.open span:nth-child(3) {
    transform: translateY(-5.5px) rotate(-45deg);
}
.pub-nav {
    display: flex;
    align-items: center;
    gap: 2rem;
}
.pub-nav a {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.15s;
}
.pub-nav a:hover { color: var(--text); text-decoration: none; }
.pub-nav a.active { color: var(--text); font-weight: 600; }

/* ── Section rhythm ─────────────────────────────────── */

.pub-band {
    background: var(--bg-raised);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.pub-section {
    max-width: 960px;
    margin: 0 auto;
    padding: 4.5rem 2rem;
}
.pub-section.narrow { max-width: 780px; }

.pub-section-divider {
    max-width: 960px;
    margin: 0 auto;
    border: none;
    border-top: 1px solid var(--border-strong);
}

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

.pub-hero {
    text-align: center;
    padding: 3.5rem 2rem 3.25rem;
    max-width: 600px;
    margin: 0 auto;
}
.pub-hero h1 {
    font-size: 2.3rem;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.03em;
    margin-bottom: 1.15rem;
}
.pub-hero .pub-hero-sub {
    font-size: 1.05rem;
    color: var(--text-secondary);
    line-height: 1.6;
    max-width: 520px;
    margin: 0 auto 1.5rem;
}
.pub-hero .pub-hero-constraint {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 1.75rem;
    letter-spacing: 0.01em;
}
.pub-hero-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
}
.pub-hero-actions .btn {
    padding: 0.6rem 1.25rem;
    font-size: 0.9rem;
}
.pub-hero-actions .btn:not(.btn-primary) {
    color: var(--text-muted);
    border-color: var(--border);
}
.pub-hero-post-cta {
    margin-top: 0.75rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    opacity: 0.6;
    text-align: center;
}

/* ── Typography ──────────────────────────────────────── */

.pub-h2 {
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: -0.015em;
    margin-bottom: 1.5rem;
}
.pub-h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.pub-text {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.75;
    margin-bottom: 1rem;
}
.pub-text:last-child { margin-bottom: 0; }

.pub-bullets {
    list-style: none;
    padding: 0;
    margin: 1.25rem 0;
}
.pub-bullets li {
    position: relative;
    padding-left: 1.25rem;
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.75;
    margin-bottom: 0.65rem;
}
.pub-bullets li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.7rem;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--accent);
}

/* ── Thesis statement ────────────────────────────────── */

.pub-thesis {
    max-width: 500px;
    margin: 2.25rem auto 0;
    padding: 2.25rem 2rem;
    text-align: center;
    border-top: 1px solid var(--border-strong);
    border-bottom: 1px solid var(--border-strong);
    background: #121520;
}
.pub-thesis p {
    font-size: 1.05rem;
    font-weight: 400;
    line-height: 2;
    color: var(--text-muted);
    margin: 0;
}
.pub-thesis .pub-thesis-emphasis {
    color: var(--text);
    font-weight: 500;
}

@media (max-width: 768px) {
    .pub-thesis {
        max-width: 100%;
        padding: 1.5rem 1.25rem;
    }
    .pub-thesis p {
        font-size: 1rem;
    }
}

/* ── What It Detects cards ───────────────────────────── */

.pub-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    margin: 1.75rem 0;
}
.pub-card {
    background: #151821;
    border: 1px solid var(--border-strong);
    border-top: 2px solid rgba(99,102,241,0.3);
    border-radius: var(--radius);
    padding: 2rem 1.75rem;
}
.pub-card:hover {
    background: #1a1d28;
}
.pub-card h3 {
    font-size: 1rem;
    font-weight: 800;
    margin-bottom: 0.6rem;
    letter-spacing: -0.005em;
}
.pub-card p {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.6;
}
.pub-card code {
    font-family: 'SF Mono', 'Consolas', 'Monaco', monospace;
    font-size: 0.82em;
    background: rgba(255,255,255,0.04);
    padding: 0.1em 0.35em;
    border-radius: 3px;
    border: 1px solid var(--border);
}
.pub-card-keyfact {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.55rem;
    padding-bottom: 0.55rem;
    border-bottom: 1px solid var(--border);
}
.pub-card-bullets {
    list-style: none;
    padding: 0;
    margin: 0;
}
.pub-card-bullets li {
    font-size: 0.86rem;
    color: var(--text-secondary);
    line-height: 1.65;
    padding-left: 0.85rem;
    position: relative;
}
.pub-card-bullets li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.55em;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--border-strong);
}

.pub-section-compact-bottom { padding-bottom: 2rem; }
.pub-section-compact-top { padding-top: 2rem; }

/* ── How It Works steps ──────────────────────────────── */

.pub-steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin: 2rem 0;
}
.pub-steps.pub-steps-4 {
    grid-template-columns: repeat(4, 1fr);
}
.pub-step {
    text-align: center;
    padding: 1.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
}
.pub-step-num {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background: rgba(99,102,241,0.12);
    border: 1px solid rgba(99,102,241,0.25);
    color: var(--accent);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 1rem;
}
.pub-step h4 {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}
.pub-step p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.pub-aside {
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-top: 1rem;
}

/* ── Common Questions ────────────────────────────────── */

.pub-faq-list {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    margin: 1.5rem 0;
}
.pub-faq-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-left: 2px solid var(--border-strong);
    border-radius: var(--radius);
}
.pub-faq-item summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    padding: 1.1rem 1.4rem;
    list-style: none;
    -webkit-user-select: none;
    user-select: none;
}
.pub-faq-item summary::-webkit-details-marker { display: none; }
.pub-faq-item summary::after {
    content: "+";
    flex-shrink: 0;
    margin-left: 1rem;
    font-size: 0.95rem;
    font-weight: 400;
    color: var(--text-muted);
    opacity: 0.55;
    transition: transform 0.15s ease;
}
.pub-faq-item[open] summary::after {
    content: "\2212";
}
.pub-faq-q {
    font-size: 0.92rem;
    font-weight: 800;
    color: var(--text);
}
.pub-faq-q::before,
.pub-faq-q::after {
    opacity: 0.35;
    font-weight: 400;
}
.pub-faq-q::before { content: "\201C"; margin-right: 0.05em; }
.pub-faq-q::after  { content: "\201D"; margin-left: 0.05em; }
.pub-faq-item p {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin: 0;
    padding: 0 1.4rem 1.15rem;
}

/* ── Read-only constraint block ──────────────────────── */

.pub-constraint-block {
    background: var(--surface);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    padding: 2rem 2.25rem;
}
.pub-constraint-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.pub-constraint-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    font-size: 0.95rem;
    color: var(--text);
    line-height: 1.65;
    margin-bottom: 0.75rem;
}
.pub-constraint-list li:last-child { margin-bottom: 0; }
.pub-constraint-list li::before {
    content: '';
    flex-shrink: 0;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--green);
    margin-top: 0.5rem;
}
.pub-constraint-list code {
    font-family: 'SF Mono', 'Consolas', 'Monaco', monospace;
    font-size: 0.82em;
    background: rgba(255,255,255,0.04);
    padding: 0.1em 0.35em;
    border-radius: 3px;
    border: 1px solid var(--border);
}

/* ── Pricing ─────────────────────────────────────────── */

.pub-pricing {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin: 2rem 0;
}
.pub-price-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2.5rem 2rem;
    display: flex;
    flex-direction: column;
    opacity: 0.9;
}
.pub-price-card.featured {
    border-color: rgba(88,91,214,0.3);
    border-left: 3px solid rgba(88,91,214,0.6);
    background: #151820;
    padding-left: calc(2rem - 2px);
    opacity: 1;
}
.pub-price-card h3 {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}
.pub-price-card.featured h3 {
    font-weight: 800;
}
.pub-price-label {
    font-size: 0.78rem;
    color: var(--text-muted);
    letter-spacing: 0.02em;
    margin-bottom: 0.15rem;
}
.pub-price-card .pub-price {
    font-size: 1.65rem;
    font-weight: 800;
    color: #7b7fbf;
    margin-bottom: 1.5rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--border);
}
.pub-price-card .pub-price span {
    font-size: 0.78rem;
    font-weight: 400;
    color: var(--text-muted);
}
.pub-price-features {
    list-style: none;
    padding: 0;
    margin: 0;
}
.pub-price-features li {
    position: relative;
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.6;
    padding: 0.3rem 0 0.3rem 1rem;
}
.pub-price-features li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.7rem;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--border-strong);
}

.pub-price-note {
    font-size: 0.78rem;
    color: var(--text-muted);
    opacity: 0.75;
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    line-height: 1.5;
}

.pub-pricing-note {
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 1.5rem;
    line-height: 1.6;
}

/* ── Positioning ─────────────────────────────────────── */

.pub-positioning {
    background: var(--surface);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    padding: 2.75rem 3rem;
    margin: 1.5rem 0;
}
.pub-positioning p {
    font-size: 0.95rem;
    line-height: 1.85;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}
.pub-positioning p:last-child { margin-bottom: 0; }
.pub-positioning p.pub-positioning-emphasis {
    color: var(--text);
    opacity: 1;
    font-weight: 500;
    font-size: 1rem;
    margin-top: 1.75rem;
    border-top: 1px solid var(--border-strong);
    padding-top: 1.75rem;
}

/* ── Screenshot proof ───────────────────────────────── */

.pub-proof-showcase {
    width: min(calc(100vw - 4rem), 1280px);
    max-width: 1280px;
    margin: 1.5rem auto 0;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
}
.pub-proof-stack {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.85rem;
}
.pub-proof-primary {
    width: 100%;
}
.pub-proof-secondary {
    width: min(100%, 820px);
    align-self: center;
}
.pub-proof-image {
    display: block;
    width: 100%;
    height: auto;
    border-radius: calc(var(--radius) - 2px);
    border: 1px solid rgba(255,255,255,0.05);
}
.pub-proof-image-secondary {
    opacity: 0.98;
}

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

.pub-footer {
    border-top: 1px solid var(--border-strong);
    padding: 2.5rem 2rem;
}
.pub-footer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 2rem;
    max-width: 780px;
    margin: 0 auto;
}
.pub-footer-col h4 {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    opacity: 0.6;
    margin: 0 0 0.75rem;
}
.pub-footer-col a,
.pub-footer-col p {
    display: block;
    font-size: 0.82rem;
    color: var(--text-muted);
    text-decoration: none;
    line-height: 1.9;
    margin: 0;
}
.pub-footer-col a:hover { color: var(--text); }
.pub-footer-col p {
    font-size: 0.78rem;
    line-height: 1.7;
    opacity: 0.7;
}
.pub-footer-links {
    display: flex;
    gap: 2rem;
    justify-content: center;
    flex-wrap: wrap;
}
.pub-footer-links a {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.15s;
}
.pub-footer-links a:hover { color: var(--text); }
.pub-footer-entity {
    margin-top: 1.25rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    opacity: 0.5;
    text-align: center;
}

/* ── Contact form ────────────────────────────────────── */

.pub-form {
    max-width: 520px;
}
.pub-form .form-group { margin-bottom: 1.25rem; }
.pub-form label {
    display: block;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 0.35rem;
}
.pub-form-required {
    font-size: 0.72rem;
    font-weight: 400;
    color: var(--text-muted);
    opacity: 0.65;
    margin-left: 0.35rem;
}
.pub-form input,
.pub-form textarea,
.pub-form select {
    width: 100%;
    padding: 0.6rem 0.85rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg);
    color: var(--text);
    font-size: 0.9rem;
    font-family: inherit;
}
.pub-form textarea { min-height: 100px; resize: vertical; }

/* ── How It Works page ───────────────────────────────── */

.pub-prereq-box {
    margin-top: 1.5rem;
    padding: 1.25rem 1.5rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-left: 2px solid var(--border-strong);
    border-radius: var(--radius);
}
.pub-prereq-box h3 {
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 0.65rem;
}
.pub-prereq-box ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.pub-prereq-box li {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.7;
    padding-left: 1rem;
    position: relative;
}
.pub-prereq-box li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.55em;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--border-strong);
}
.pub-prereq-box code {
    font-family: 'SF Mono', 'Consolas', 'Monaco', monospace;
    font-size: 0.82em;
    background: rgba(255,255,255,0.04);
    padding: 0.1em 0.35em;
    border-radius: 3px;
    border: 1px solid var(--border);
}

.pub-hiw-step {
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
}

.pub-hiw-detail-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-top: 1rem;
}
.pub-hiw-detail {
    padding: 1rem 1.15rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}
.pub-hiw-detail h4 {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 0.45rem;
}
.pub-hiw-detail p {
    font-size: 0.84rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}
.pub-hiw-detail code {
    font-family: 'SF Mono', 'Consolas', 'Monaco', monospace;
    font-size: 0.82em;
    background: rgba(255,255,255,0.04);
    padding: 0.1em 0.35em;
    border-radius: 3px;
    border: 1px solid var(--border);
}

.pub-hiw-output-list {
    list-style: none;
    padding: 0;
    margin: 0.45rem 0 0;
}
.pub-hiw-output-list li {
    font-size: 0.84rem;
    color: var(--text-secondary);
    line-height: 1.65;
    padding-left: 0.85rem;
    position: relative;
}
.pub-hiw-output-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.55em;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--border-strong);
}
.pub-hiw-output-list strong {
    font-weight: 600;
    color: var(--text);
}

.pub-code-snippet {
    margin-top: 0.65rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.75rem 1rem;
    overflow-x: auto;
}
.pub-code-snippet pre {
    margin: 0;
}
.pub-code-snippet code {
    font-family: 'SF Mono', 'Consolas', 'Monaco', monospace;
    font-size: 0.78rem;
    color: var(--text-secondary);
    line-height: 1.6;
    background: none;
    border: none;
    padding: 0;
}

/* ── Architecture diagram ────────────────────────────── */

.pub-arch {
    background: var(--bg);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    padding: 1.75rem;
    font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', Consolas, monospace;
    font-size: 0.85rem;
    text-align: center;
    color: var(--text-secondary);
    line-height: 2;
    margin: 1.5rem 0;
    white-space: pre;
}

.pub-arch-diagram {
    margin: 1.5rem 0;
    text-align: center;
}
.pub-arch-diagram svg {
    max-width: 100%;
    height: auto;
}

/* ── Security sections ───────────────────────────────── */

.pub-sec-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    margin: 1.75rem 0;
}

/* ── Public page responsive ──────────────────────────── */

@media (max-width: 768px) {
    .pub-menu-toggle { display: inline-flex; }
    .pub-nav {
        display: none;
        flex-direction: column;
        width: 100%;
        padding: 0.5rem 0;
        gap: 0;
        order: 10;
    }
    .pub-nav.open { display: flex; }
    .pub-nav a {
        margin-left: 0;
        padding: 0.6rem 0.5rem;
        border-bottom: none;
        border-radius: 0;
        font-size: 0.9rem;
    }
    .pub-hero { padding: 2.5rem 1.5rem 2rem; }
    .pub-hero h1 { font-size: 1.55rem; }
    .pub-section { padding: 2.75rem 1.5rem; }
    .pub-grid-3 { grid-template-columns: 1fr; }
    .pub-steps { grid-template-columns: 1fr; }
    .pub-pricing { grid-template-columns: 1fr; }
    .pub-proof-showcase {
        width: 100%;
        margin-top: 1.35rem;
        position: static;
        left: auto;
        transform: none;
    }
    .pub-proof-stack { gap: 0.75rem; }
    .pub-proof-secondary { width: 100%; }
    .pub-sec-grid { grid-template-columns: 1fr; }
    .pub-footer-grid { grid-template-columns: 1fr; gap: 1.5rem; }
    .pub-constraint-block { padding: 1.5rem; }
    .pub-positioning { padding: 1.75rem; }
    .pub-price-card { padding: 1.75rem 1.5rem; }
    .pub-hiw-detail-grid { grid-template-columns: 1fr; }
    .pub-hiw-step { flex-direction: column; gap: 0.75rem; }
}

/* ── Cookie consent banner ──────────────────────────── */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--card-bg, #1a1a2e);
    border-top: 1px solid var(--border, #2a2a3e);
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    font-size: 0.82rem;
    color: var(--text-muted, #8a8aa0);
    z-index: 9999;
    opacity: 0;
    transform: translateY(100%);
    transition: opacity 0.3s ease, transform 0.3s ease;
}
.cookie-banner-visible {
    opacity: 1;
    transform: translateY(0);
}
.cookie-banner p { margin: 0; line-height: 1.5; }
.cookie-banner a { color: var(--text, #e0e0e8); }
.cookie-banner-btn {
    white-space: nowrap;
    padding: 0.4rem 1rem;
    font-size: 0.8rem;
    border: 1px solid var(--border, #2a2a3e);
    border-radius: 4px;
    background: transparent;
    color: var(--text, #e0e0e8);
    cursor: pointer;
    transition: background 0.15s;
}
.cookie-banner-btn:hover {
    background: var(--border, #2a2a3e);
}
@media (max-width: 640px) {
    .cookie-banner { flex-direction: column; gap: 0.75rem; text-align: center; padding: 1rem; }
}
