/* Self-hosted Inter font — no Google CDN dependency */
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 300; font-display: swap; src: url('/static/fonts/inter-latin-300.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400; font-display: swap; src: url('/static/fonts/inter-latin-400.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 500; font-display: swap; src: url('/static/fonts/inter-latin-500.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 600; font-display: swap; src: url('/static/fonts/inter-latin-600.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 700; font-display: swap; src: url('/static/fonts/inter-latin-700.woff2') format('woff2'); }

:root {
    --bg-deep: #0d0e10;
    --bg: #141518;
    --surface: #1c1d21;
    --surface-hover: #242529;
    --border: #2e2f35;
    --border-subtle: #222327;
    --text: #e8e8ea;
    --text-secondary: #a0a0a6;
    --text-muted: #6b6b73;
    --accent: #b0b8c4;
    --accent-light: #cdd4dc;
    --accent-dim: rgba(176, 184, 196, 0.10);
    --accent-gradient: linear-gradient(135deg, #8e96a3, #b0b8c4, #cdd4dc);
    --safe: #22c55e;
    --low: #84cc16;
    --medium: #eab308;
    --high: #f97316;
    --critical: #ef4444;
}

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

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: var(--bg-deep);
    color: var(--text);
    min-height: 100vh;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-tap-highlight-color: transparent;
    overscroll-behavior-y: contain;
}

/* ── Top bar ─────────────────────────────── */

.topbar {
    background: var(--bg);
    border-bottom: 1px solid var(--border-subtle);
    padding: 0.6rem 2rem;
    min-height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.topbar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.topbar-logo {
    width: 20px;
    height: 32px;
}

.page-logo {
    width: 120px;
    height: auto;
    margin: 0 auto 16px;
    display: block;
    opacity: 0.7;
}

.topbar-name {
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text);
}

.topbar-name span {
    color: var(--accent-light);
}

.topbar-meta {
    font-size: 0.65rem;
    font-weight: 400;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: var(--text-muted);
}

.topbar-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.7rem;
    color: var(--text-muted);
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

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

@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* ── Layout ──────────────────────────────── */

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

.content-layout {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 1.5rem;
    align-items: start;
}

.content-primary {
    min-width: 0;
}

.content-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    position: sticky;
    top: 72px;
    max-height: calc(100vh - 90px);
    overflow-y: auto;
}

.content-sidebar::-webkit-scrollbar { width: 4px; }
.content-sidebar::-webkit-scrollbar-track { background: var(--bg-deep); }
.content-sidebar::-webkit-scrollbar-thumb { background: var(--border); }

@media (max-width: 768px) {
    .content-layout {
        grid-template-columns: 1fr;
    }
    .content-sidebar {
        position: static;
        max-height: none;
    }
}

.page-header {
    margin-bottom: 3rem;
}

.page-header h1 {
    font-size: 2.2rem;
    font-weight: 400;
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
}

.page-header p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 300;
}

/* ── Divider (Palantir-style partial) ───── */

.divider {
    width: 80px;
    height: 1px;
    background: var(--border);
    margin: 2rem 0;
}

/* ── Search box ──────────────────────────── */

.search-box {
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 1.75rem;
    min-width: 0;
    margin-bottom: 2.5rem;
}

.input-row {
    display: flex;
    gap: 0.5rem;
}

.input-row select {
    background: var(--bg-deep);
    border: 1px solid var(--border);
    padding: 0.7rem 0.75rem;
    color: var(--text);
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 0.8rem;
    font-weight: 400;
    outline: none;
    cursor: pointer;
    transition: border-color 0.2s;
    min-width: 130px;
    appearance: auto;
}

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

.input-row input {
    flex: 1;
    min-width: 0;
    background: var(--bg-deep);
    border: 1px solid var(--border);
    padding: 0.7rem 1rem;
    color: var(--text);
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 0.9rem;
    font-weight: 400;
    outline: none;
    transition: border-color 0.2s;
}

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

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

.btn-primary {
    background: var(--accent);
    color: white;
    border: 1px solid var(--accent);
    padding: 0.7rem 1.75rem;
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
    white-space: nowrap;
}

.btn-primary:hover { background: #8e96a3; border-color: #8e96a3; }
.btn-primary:disabled { opacity: 0.4; cursor: not-allowed; }

.hint {
    margin-top: 0.85rem;
    font-size: 0.72rem;
    color: var(--text-muted);
    letter-spacing: 0.02em;
}

.hint code {
    background: var(--bg-deep);
    border: 1px solid var(--border-subtle);
    padding: 0.15rem 0.4rem;
    font-size: 0.7rem;
    font-family: 'SF Mono', 'Fira Code', monospace;
}

/* ── Tab bar ─────────────────────────────── */

.tab-bar {
    display: flex;
    gap: 0;
    margin-bottom: 2.5rem;
    border-bottom: 1px solid var(--border);
}

.tab-btn {
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-muted);
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 0.85rem 1.5rem;
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s;
}

.tab-btn:hover { color: var(--text-secondary); }

.tab-btn.active {
    color: var(--accent-light);
    border-bottom-color: var(--accent-light);
}

.tab-content { display: none; }
.tab-content.active { display: block; }

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

.loader {
    display: none;
    text-align: center;
    padding: 4rem 0;
}

.loader.active { display: block; }

.spinner {
    width: 32px;
    height: 32px;
    border: 2px solid var(--border);
    border-top-color: var(--accent-light);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 1.25rem;
}

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

.loader p {
    color: var(--text-muted);
    font-size: 0.8rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

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

.error-box {
    display: none;
    background: rgba(239,68,68,0.06);
    border: 1px solid rgba(239,68,68,0.25);
    padding: 1rem 1.25rem;
    color: var(--critical);
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
}

.error-box.active { display: block; }

/* ── Result card ─────────────────────────── */

.result {
    display: none;
    background: var(--surface);
    border: 1px solid var(--border);
    overflow: hidden;
}

.result.active { display: block; }

.cache-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0.85rem;
    margin-bottom: 0.75rem;
    background: var(--accent-dim);
    border: 1px solid var(--accent);
    font-size: 0.7rem;
    color: var(--accent-light);
}

.cache-refresh-btn {
    background: none;
    border: 1px solid var(--accent);
    color: var(--accent-light);
    padding: 0.25rem 0.6rem;
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 0.65rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    cursor: pointer;
    transition: background 0.2s;
}

.cache-refresh-btn:hover {
    background: var(--accent);
    color: white;
}

.result-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border);
}

.result-entity {
    font-weight: 500;
    font-size: 1rem;
    word-break: break-all;
}

.result-entity .entity-platform {
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 400;
}

.risk-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.85rem;
    font-size: 0.65rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border: 1px solid;
}

.risk-safe { border-color: rgba(34,197,94,0.4); color: var(--safe); background: rgba(34,197,94,0.06); }
.risk-low { border-color: rgba(132,204,22,0.4); color: var(--low); background: rgba(132,204,22,0.06); }
.risk-medium { border-color: rgba(234,179,8,0.4); color: var(--medium); background: rgba(234,179,8,0.06); }
.risk-high { border-color: rgba(249,115,22,0.4); color: var(--high); background: rgba(249,115,22,0.06); }
.risk-critical { border-color: rgba(239,68,68,0.4); color: var(--critical); background: rgba(239,68,68,0.06); }

.score-ring {
    text-align: center;
    padding: 2rem 1.5rem;
}

.score-circle {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 300;
    border: 3px solid;
    margin-bottom: 0.5rem;
    transition: box-shadow 0.3s;
}

.score-verdict {
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 0.4rem;
}

.score-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.result-body { padding: 1.5rem; }

.section-label {
    font-size: 0.65rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-muted);
    margin-bottom: 0.85rem;
}

.recommended-action {
    padding: 0.75rem 1rem;
    margin: 1rem 0 1.5rem;
    border: 1px solid var(--border);
    font-size: 0.85rem;
    font-weight: 400;
}
.recommended-action .action-label {
    font-size: 0.65rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-right: 0.3rem;
}
.recommended-action.risk-safe, .recommended-action.risk-low { border-color: rgba(34,197,94,0.3); color: var(--safe); }
.recommended-action.risk-medium { border-color: rgba(234,179,8,0.3); color: var(--medium); }
.recommended-action.risk-high { border-color: rgba(249,115,22,0.3); color: var(--high); }
.recommended-action.risk-critical { border-color: rgba(239,68,68,0.3); color: var(--critical); }

.summary {
    font-size: 0.9rem;
    font-weight: 300;
    line-height: 1.7;
    margin-bottom: 2rem;
    color: var(--text-secondary);
}

/* ── Result disclaimer ─────────────────────── */
/* Shown under every verdict. AVA produces a risk assessment, not a legal
   determination — customers are reminded the result is informational and
   our Terms govern use. Kept low-contrast so it doesn't compete with the
   verdict itself, but visible enough that it can't be missed on a scan. */
.result-disclaimer {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-subtle);
    font-size: 0.75rem;
    line-height: 1.55;
    color: var(--text-tertiary, #8a8f97);
}
.result-disclaimer a {
    color: var(--text-secondary, #b0b8c4);
    text-decoration: underline;
    text-underline-offset: 2px;
}
.result-disclaimer a:hover {
    color: var(--text-primary, #e6e8eb);
}

/* ── Signals ─────────────────────────────── */

.signals-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-bottom: 2rem;
}

.signal-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    background: var(--bg-deep);
    border: 1px solid var(--border-subtle);
    padding: 0.75rem 1rem;
    font-size: 0.82rem;
    line-height: 1.5;
    font-weight: 300;
}

.signal-severity {
    flex-shrink: 0;
    width: 6px;
    height: 6px;
    margin-top: 0.45rem;
}

.sev-low { background: var(--low); }
.sev-medium { background: var(--medium); }
.sev-high { background: var(--high); }
.sev-critical { background: var(--critical); }

.signal-item strong {
    font-weight: 500;
    color: var(--text);
}

.signal-meta {
    color: var(--text-muted);
    font-size: 0.75rem;
}

/* ── Meta grid ───────────────────────────── */

.meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.5rem;
}

.meta-item {
    background: var(--bg-deep);
    border: 1px solid var(--border-subtle);
    padding: 0.75rem;
}

.meta-item dt {
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-bottom: 0.3rem;
}

.meta-item dd {
    font-size: 0.85rem;
    font-weight: 500;
}

/* ── History ─────────────────────────────── */

.history { margin-top: 2.5rem; }

.history-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    margin-bottom: 0.35rem;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}

.history-item:hover {
    border-color: var(--accent);
    background: var(--surface-hover);
}

.history-entity {
    font-size: 0.85rem;
    font-weight: 400;
    word-break: break-all;
}

.history-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

/* ── Pipeline trace ──────────────────────── */

.pipeline-empty {
    text-align: center;
    color: var(--text-muted);
    padding: 4rem 1rem;
    font-size: 0.85rem;
    font-weight: 300;
}

.pipeline-step {
    background: var(--surface);
    border: 1px solid var(--border);
    margin-bottom: 0.5rem;
    overflow: hidden;
}

.pipeline-step-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 1.25rem;
    cursor: pointer;
    user-select: none;
    transition: background 0.15s;
}

.pipeline-step-header:hover { background: var(--surface-hover); }

.pipeline-step-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 400;
    font-size: 0.85rem;
}

.step-number {
    width: 22px;
    height: 22px;
    background: var(--accent);
    color: white;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    font-weight: 600;
    flex-shrink: 0;
}

.step-chevron {
    color: var(--text-muted);
    font-size: 0.7rem;
    transition: transform 0.2s;
}

.pipeline-step.expanded .step-chevron { transform: rotate(90deg); }

.pipeline-step-body {
    display: none;
    padding: 0 1.25rem 1.25rem;
    border-top: 1px solid var(--border);
}

.pipeline-step.expanded .pipeline-step-body { display: block; }

.trace-row {
    display: flex;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-subtle);
    font-size: 0.82rem;
}

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

.trace-label {
    color: var(--text-muted);
    min-width: 130px;
    flex-shrink: 0;
    font-size: 0.65rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding-top: 0.15rem;
}

.trace-value {
    color: var(--text-secondary);
    word-break: break-all;
    font-weight: 300;
}

.trace-value code {
    background: var(--bg-deep);
    border: 1px solid var(--border-subtle);
    padding: 0.1rem 0.4rem;
    font-size: 0.78rem;
    font-family: 'SF Mono', 'Fira Code', monospace;
}

.enrichment-card {
    background: var(--bg-deep);
    border: 1px solid var(--border);
    padding: 0.85rem 1rem;
    margin-top: 0.5rem;
}

.enrichment-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.enrichment-card-source {
    font-weight: 500;
    font-size: 0.82rem;
}

.enrichment-card-timing {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 400;
}

.enrichment-card-error {
    color: var(--critical);
    font-size: 0.78rem;
    margin-top: 0.25rem;
}

.pill {
    display: inline-block;
    border: 1px solid var(--border);
    padding: 0.12rem 0.5rem;
    font-size: 0.68rem;
    font-weight: 400;
    margin: 0.15rem 0.1rem 0 0;
    color: var(--text-muted);
}

.pill.green { border-color: rgba(34,197,94,0.35); color: var(--safe); }
.pill.red { border-color: rgba(239,68,68,0.35); color: var(--critical); }
.pill.yellow { border-color: rgba(234,179,8,0.35); color: var(--medium); }

.verdict-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.verdict-summary-item {
    background: var(--bg-deep);
    border: 1px solid var(--border-subtle);
    padding: 0.75rem;
    text-align: center;
}

.verdict-summary-item dt {
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.verdict-summary-item dd {
    font-size: 1.05rem;
    font-weight: 400;
}

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

.footer {
    text-align: center;
    padding: 3rem 2rem 2rem;
    color: var(--text-muted);
    font-size: 0.65rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.footer span { color: var(--accent-light); }

/* ── Security news feed ─────────────────── */

.news-section {
    margin-bottom: 0;
}

.news-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.news-header h2 {
    font-size: 0.65rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-muted);
}

.news-feed {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    max-height: 350px;
    overflow-y: auto;
}

.news-feed::-webkit-scrollbar { width: 4px; }
.news-feed::-webkit-scrollbar-track { background: var(--bg); }
.news-feed::-webkit-scrollbar-thumb { background: var(--border); }

.news-item {
    display: flex;
    gap: 0.75rem;
    padding: 0.65rem 0.85rem;
    background: var(--surface);
    border: 1px solid var(--border-subtle);
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.2s;
}

.news-item:hover {
    border-color: var(--accent);
}

.news-item-content {
    flex: 1;
    min-width: 0;
}

.news-item-title {
    font-size: 0.75rem;
    font-weight: 400;
    line-height: 1.4;
    color: var(--text);
    margin-bottom: 0.25rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-item-meta {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.6rem;
    color: var(--text-muted);
}

.news-source-badge {
    font-size: 0.55rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0.1rem 0.4rem;
    border: 1px solid var(--border);
    color: var(--text-secondary);
}

.news-category {
    font-size: 0.55rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--accent-light);
}

.news-empty {
    padding: 1.5rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.75rem;
    background: var(--surface);
    border: 1px solid var(--border-subtle);
}

/* ── Resources / Security guide ─────────── */

.resources-section {
    margin-top: 3rem;
    margin-bottom: 2rem;
}

.resources-header {
    margin-bottom: 1.25rem;
}

.resources-header h2 {
    font-size: 0.65rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-muted);
    margin-bottom: 0.4rem;
}

.resources-header p {
    font-size: 0.78rem;
    color: var(--text-secondary);
    font-weight: 300;
}

.resource-accordion {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.resource-item {
    background: var(--surface);
    border: 1px solid var(--border-subtle);
}

.resource-item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: background 0.15s;
}

.resource-item-header:hover {
    background: var(--surface-hover);
}

.resource-item-header h3 {
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text);
}

.resource-item-header .chevron {
    width: 16px;
    height: 16px;
    color: var(--text-muted);
    transition: transform 0.2s;
}

.resource-item.expanded .chevron {
    transform: rotate(180deg);
}

.resource-item-body {
    display: none;
    padding: 0 1rem 1rem;
    font-size: 0.75rem;
    line-height: 1.65;
    color: var(--text-secondary);
}

.resource-item.expanded .resource-item-body {
    display: block;
}

.resource-item-body ul {
    margin: 0.5rem 0;
    padding-left: 1.25rem;
}

.resource-item-body li {
    margin-bottom: 0.35rem;
}

.resource-item-body a {
    color: var(--accent-light);
    text-decoration: none;
}

.resource-item-body a:hover {
    text-decoration: underline;
}

.resource-item-body strong {
    color: var(--text);
    font-weight: 500;
}

/* Bot / API commands rendered as <code> — keep the dark chip background
   but raise the text to near-white so they stand out from body prose.
   Reported 2026-04-21: the grey-on-grey was too muted for a reference
   section where the commands are the point. */
.resource-item-body code {
    color: var(--text);
    font-weight: 500;
    font-family: "SF Mono", Menlo, Consolas, monospace;
    font-size: 0.88em;
    background: var(--bg-deep);
    border: 1px solid var(--border-subtle);
    padding: 0.08rem 0.35rem;
    border-radius: 2px;
}

/* ── Page views ──────────────────────────── */

.page-view { display: none; }
.page-view.active { display: block; }

/* ── Auth bar ────────────────────────────── */

.topbar-nav {
    display: flex;
    align-items: center;
    gap: 0.15rem;
}

.topbar-nav-item {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.4rem 0.7rem;
    font-size: 0.7rem;
    font-weight: 400;
    color: var(--text-secondary);
    text-decoration: none;
    letter-spacing: 0.04em;
    cursor: pointer;
    transition: color 0.2s;
}

.topbar-nav-item:hover {
    color: var(--text);
}

.topbar-nav-item.active {
    color: var(--accent-light);
}

.topbar-nav-item svg {
    width: 10px;
    height: 10px;
}

/* Dropdown menu */
.nav-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 180px;
    background: var(--bg);
    border: 1px solid var(--border);
    z-index: 100;
    padding: 0.3rem 0;
}

.topbar-nav-item:hover .nav-dropdown {
    display: block;
}

.nav-dropdown a {
    display: block;
    padding: 0.5rem 0.85rem;
    font-size: 0.7rem;
    font-weight: 400;
    color: var(--text-secondary);
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
}

.nav-dropdown a:hover {
    background: var(--surface-hover);
    color: var(--text);
}

.topbar-auth {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.auth-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    padding: 0.35rem 0.75rem;
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    cursor: pointer;
    text-decoration: none;
    transition: border-color 0.2s, color 0.2s;
}

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

.auth-btn svg {
    width: 14px;
    height: 14px;
}

.user-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.72rem;
    color: var(--text-secondary);
}

.user-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 1px solid var(--border);
}

.user-avatar-placeholder {
    background: var(--surface);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6rem;
    color: var(--text-muted);
}

.user-plan-badge {
    font-size: 0.6rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 0.15rem 0.5rem;
    border: 1px solid var(--accent);
    color: var(--accent-light);
}

.user-role-badge {
    font-size: 0.55rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0.12rem 0.4rem;
    border: 1px solid var(--safe);
    color: var(--safe);
}

.user-logout {
    font-size: 0.65rem;
    color: var(--text-muted);
    text-decoration: none;
    cursor: pointer;
    transition: color 0.2s;
}

.user-logout:hover {
    color: var(--critical);
}

.signin-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: var(--surface);
    border: 1px solid var(--accent);
    color: var(--accent-light);
    padding: 0.4rem 1rem;
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.signin-btn:hover {
    background: var(--accent-dim);
    color: var(--text);
}

/* ── Login modal ────────────────────────── */

.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: var(--bg);
    border: 1px solid var(--border);
    width: 380px;
    max-width: 90vw;
    padding: 2rem;
}

.modal-title {
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: -0.01em;
    margin-bottom: 0.4rem;
}

.modal-subtitle {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.modal-providers {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.modal-provider-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    padding: 0.65rem 1rem;
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 0.78rem;
    font-weight: 400;
    cursor: pointer;
    text-decoration: none;
    transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.modal-provider-btn:hover {
    border-color: var(--accent);
    color: var(--text);
    background: var(--surface-hover);
}

.modal-provider-btn svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.modal-divider {
    margin: 1.25rem 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.modal-divider::before,
.modal-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.modal-divider span {
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-muted);
}

.modal-enterprise {
    text-align: center;
    font-size: 0.7rem;
    color: var(--text-muted);
}

.modal-enterprise a {
    color: var(--accent-light);
    text-decoration: none;
}

.modal-enterprise a:hover {
    text-decoration: underline;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.25rem;
    line-height: 1;
}

.modal-close:hover {
    color: var(--text);
}

/* ── Tab lock / auth gate ───────────────── */

.tab-btn .lock-icon {
    display: inline-block;
    width: 10px;
    height: 10px;
    margin-left: 0.3rem;
    opacity: 0.5;
    vertical-align: middle;
}

.tab-gate {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
    text-align: center;
    gap: 1rem;
}

.tab-gate-icon {
    width: 40px;
    height: 40px;
    color: var(--text-muted);
    opacity: 0.4;
}

.tab-gate p {
    font-size: 0.82rem;
    color: var(--text-muted);
    max-width: 320px;
}

.tab-gate .signin-btn {
    margin-top: 0.5rem;
}

/* ── Insights feed ───────────────────────── */

.insights-section {
    margin-bottom: 0;
}

.insights-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.insights-header h2 {
    font-size: 0.65rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-muted);
}

.insights-live {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.6rem;
    color: var(--safe);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.insights-live .live-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--safe);
    animation: pulse-dot 2s ease-in-out infinite;
}

.insights-feed {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    max-height: 280px;
    overflow-y: auto;
}

.insights-feed::-webkit-scrollbar {
    width: 3px;
}

.insights-feed::-webkit-scrollbar-thumb {
    background: var(--border);
}

.insight-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 0.65rem 1rem;
    transition: border-color 0.2s;
}

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

.insight-severity {
    width: 4px;
    height: 28px;
    flex-shrink: 0;
}

.insight-body {
    flex: 1;
    min-width: 0;
}

.insight-headline {
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--text);
    margin-bottom: 0.15rem;
}

.insight-meta {
    font-size: 0.68rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.insight-entity {
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-size: 0.68rem;
    color: var(--text-secondary);
}

.insight-score {
    flex-shrink: 0;
    font-size: 0.85rem;
    font-weight: 400;
    min-width: 32px;
    text-align: right;
}

.insight-time {
    flex-shrink: 0;
    font-size: 0.62rem;
    color: var(--text-muted);
    min-width: 40px;
    text-align: right;
}

.insights-empty {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--text-muted);
    font-size: 0.82rem;
    font-weight: 300;
    background: var(--surface);
    border: 1px solid var(--border);
}

/* Intel provenance badge on each insight row. Keep the label vague
   (category, not specific hunter name) — see api/insights.py
   _SOURCE_TO_CATEGORY for the mapping rationale. */
.insight-intel-badge {
    font-size: 0.6rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 0.1rem 0.4rem;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    background: var(--surface-alt, transparent);
}
.insight-intel-badge[data-cat="Crypto Intel"]    { border-color: #b0b8c4; color: #b0b8c4; }
.insight-intel-badge[data-cat="Domain Intel"]    { border-color: #9fb89f; color: #9fb89f; }
.insight-intel-badge[data-cat="Community Intel"] { border-color: #c4aea0; color: #c4aea0; }
.insight-intel-badge[data-cat="Intel Hunter"]    { border-color: #8f95a0; color: #8f95a0; }
.insight-intel-badge[data-cat="Direct Scan"]     { display: none; }  /* no moat value showing "customer asked" */

/* ── Hunter yield card ───────────────────────── */

.hunter-yield-card {
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 0.85rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.hunter-yield-totals {
    display: flex;
    gap: 0.75rem;
    align-items: baseline;
    flex-wrap: wrap;
}

.hunter-yield-headline {
    font-size: 1.3rem;
    font-weight: 400;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.hunter-yield-headline-sub {
    font-size: 0.72rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.hunter-yield-rows {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.hunter-yield-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.5rem;
    font-size: 0.75rem;
    padding: 0.2rem 0;
    border-top: 1px solid var(--border);
}

.hunter-yield-row:first-child {
    border-top: none;
}

.hunter-yield-row-label {
    color: var(--text-secondary);
}

.hunter-yield-row-count {
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
}

.hunter-yield-row-sub {
    color: var(--text-muted);
    font-size: 0.68rem;
    margin-left: 0.4rem;
}

/* ── Stats bar ───────────────────────────── */

.stats-bar {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2.5rem;
}

.stat-card {
    flex: 1;
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 0.85rem;
    text-align: center;
}

.stat-card dt {
    font-size: 0.55rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.stat-card dd {
    font-size: 1.25rem;
    font-weight: 300;
    color: var(--accent-light);
}

/* ── Graph visualisation ─────────────────── */

.graph-container {
    background: var(--bg-deep);
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
    min-height: 420px;
}

.graph-container svg {
    width: 100%;
    height: 420px;
}

.graph-empty {
    text-align: center;
    color: var(--text-muted);
    padding: 4rem 1rem;
    font-size: 0.85rem;
    font-weight: 300;
}

.graph-stats {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.graph-stat {
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 0.65rem 1rem;
    flex: 1;
    text-align: center;
}

.graph-stat dt {
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-bottom: 0.2rem;
}

.graph-stat dd {
    font-size: 1.1rem;
    font-weight: 400;
    color: var(--accent-light);
}

.graph-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 0.75rem;
    padding: 0.5rem 0;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.68rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.legend-dot {
    width: 8px;
    height: 8px;
}

/* ══════════════════════════════════════════
   RESPONSIVE — Mobile-first progressive
   ══════════════════════════════════════════ */

/* Tablet & small desktop */
@media (max-width: 1024px) {
    .main {
        padding: 2rem 1.25rem;
    }

    .content-layout {
        grid-template-columns: 1fr 280px;
        gap: 1rem;
    }
}

/* Mobile */
@media (max-width: 768px) {
    /* ── Topbar ── */
    .topbar {
        padding: 0.5rem 1rem;
        flex-wrap: wrap;
        gap: 0.4rem;
    }

    .topbar-brand {
        gap: 0.5rem;
    }

    .topbar-logo {
        width: 22px;
        height: 22px;
    }

    .topbar-name {
        font-size: 0.75rem;
    }

    .topbar-nav {
        order: 3;
        width: 100%;
        justify-content: center;
        gap: 0;
        border-top: 1px solid var(--border-subtle);
        padding-top: 0.4rem;
        margin-top: 0.2rem;
    }

    .topbar-nav-item {
        font-size: 0.65rem;
        padding: 0.35rem 0.6rem;
    }

    .topbar-status {
        font-size: 0.6rem;
    }

    /* ── Main container ── */
    .main {
        padding: 1.5rem 1rem;
    }

    /* ── Two-column → single column ── */
    .content-layout {
        grid-template-columns: 1fr;
    }

    .content-sidebar {
        position: static;
        max-height: none;
    }

    /* ── Page header ── */
    .page-header {
        margin-bottom: 1.5rem;
    }

    .page-header h1 {
        font-size: 1.5rem;
    }

    .page-header p {
        font-size: 0.8rem;
    }

    /* ── Stats bar ── */
    .stats-bar {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 0.35rem;
        margin-bottom: 1.5rem;
    }

    .stat-card {
        padding: 0.5rem;
    }

    .stat-card dt {
        font-size: 0.5rem;
    }

    .stat-card dd {
        font-size: 1rem;
    }

    /* ── Search form ── */
    .search-box {
        padding: 1rem;
    }

    .input-row {
        flex-direction: column;
        gap: 0.4rem;
    }

    .input-row select {
        width: 100%;
    }

    .input-row input {
        width: 100%;
        min-width: 0;
    }

    .btn-primary {
        width: 100%;
        padding: 0.75rem;
        font-size: 0.85rem;
    }

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

    .hint code {
        font-size: 0.6rem;
    }

    /* ── Tabs ── */
    .tab-bar {
        margin-bottom: 1.5rem;
    }

    .tab-btn {
        font-size: 0.65rem;
        padding: 0.6rem 0.75rem;
    }

    /* ── Insights & news feeds ── */
    .insights-feed, .news-feed {
        max-height: 250px;
    }

    .insight-item, .news-item {
        padding: 0.5rem 0.65rem;
    }

    .news-item-title {
        font-size: 0.7rem;
    }

    /* ── Resources accordion ── */
    .resource-item-header {
        padding: 0.6rem 0.75rem;
    }

    .resource-item-header h3 {
        font-size: 0.72rem;
    }

    .resource-item-body {
        padding: 0 0.75rem 0.75rem;
        font-size: 0.7rem;
    }

    /* ── Modal ── */
    .modal {
        width: 95vw;
        padding: 1.5rem;
        margin: 0 auto;
    }

    /* ── Footer ── */
    .footer {
        padding: 2rem 1rem 1.5rem;
    }

    /* ── Result cards ── */
    .verdict-summary-grid, .meta-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }

    /* ── Graph ── */
    .graph-container {
        min-height: 200px;
    }

    .graph-stats {
        flex-wrap: wrap;
    }

    .graph-legend {
        flex-wrap: wrap;
        gap: 0.4rem;
    }

    /* ── Pipeline ── */
    .pipeline-step-header {
        padding: 0.6rem 0.75rem;
        font-size: 0.7rem;
    }

    .pipeline-step-body {
        padding: 0 0.75rem 0.75rem;
        font-size: 0.68rem;
    }

    /* ── History ── */
    .history-item {
        padding: 0.5rem 0.65rem;
        font-size: 0.7rem;
    }
}

/* Small phones */
@media (max-width: 380px) {
    .main {
        padding: 1rem 0.75rem;
    }

    .topbar {
        padding: 0.4rem 0.75rem;
    }

    .page-header h1 {
        font-size: 1.3rem;
    }

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

    .stat-card:last-child {
        grid-column: span 2;
    }
}

/* PWA-like feel: safe area support for notched phones */
@supports (padding-top: env(safe-area-inset-top)) {
    .topbar {
        padding-top: calc(0.5rem + env(safe-area-inset-top));
        padding-left: calc(1rem + env(safe-area-inset-left));
        padding-right: calc(1rem + env(safe-area-inset-right));
    }
    .footer {
        padding-bottom: calc(1.5rem + env(safe-area-inset-bottom));
    }
}

/* ══ Pricing page ═══════════════════════ */

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.pricing-card {
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
}

.pricing-card.popular {
    border-color: var(--accent);
    position: relative;
}

.pricing-card.popular::before {
    content: 'MOST POPULAR';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent);
    color: var(--bgDeep);
    font-size: 0.55rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    padding: 0.2rem 0.6rem;
}

.pricing-card.addon {
    border-style: dashed;
}

.pricing-name {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 0.25rem;
}

.pricing-price {
    font-size: 2rem;
    font-weight: 300;
    color: var(--accent-light);
    margin-bottom: 0.15rem;
}

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

.pricing-desc {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.pricing-features {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem;
    flex: 1;
}

.pricing-features li {
    font-size: 0.72rem;
    color: var(--text-secondary);
    padding: 0.3rem 0;
    border-bottom: 1px solid var(--border-subtle);
}

.pricing-features li::before {
    content: '✓ ';
    color: var(--safe);
}

.pricing-cta {
    display: block;
    text-align: center;
    padding: 0.6rem;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    border: 1px solid var(--accent);
    color: var(--accent-light);
    background: none;
    transition: background 0.2s;
    font-family: 'Inter', system-ui, sans-serif;
}

.pricing-cta:hover {
    background: var(--accent-dim);
}

.pricing-cta.current {
    background: var(--surface-hover);
    border-color: var(--border);
    color: var(--text-muted);
    cursor: default;
}

/* Feature comparison table (TradingView-style) */
.pricing-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.75rem;
}

.pricing-table thead th {
    position: sticky;
    top: 0;
    background: var(--bg);
    z-index: 10;
    padding: 1rem 0.75rem 0.5rem;
    vertical-align: top;
    min-width: 140px;
}

.pricing-table th.plan-col {
    text-align: center;
    border-bottom: 2px solid var(--border);
}

.pricing-table th.plan-col.popular {
    border-bottom-color: var(--accent);
    position: relative;
}

.pricing-table th.plan-col.popular::after {
    content: 'POPULAR';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent);
    color: var(--bg);
    font-size: 0.55rem;
    font-weight: 600;
    padding: 0.1rem 0.5rem;
    letter-spacing: 0.05em;
}

.pricing-table th.feat-name-header {
    min-width: 200px;
}

.pricing-table .plan-name {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-primary);
}

.pricing-table .plan-price {
    font-size: 1.8rem;
    font-weight: 300;
    color: var(--text-primary);
    margin: 0.3rem 0;
}

.pricing-table .plan-period {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.pricing-table .plan-desc {
    font-size: 0.65rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.pricing-table .pricing-cta {
    display: inline-block;
    margin-bottom: 0.25rem;
    font-size: 0.65rem;
    padding: 0.35rem 1rem;
}

.pricing-table .category-row td {
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0.75rem 0.5rem 0.25rem;
    border-bottom: 1px solid var(--border);
    background: var(--bg);
}

.pricing-table tbody tr:not(.category-row) {
    border-bottom: 1px solid var(--border-subtle, rgba(255,255,255,0.04));
}

.pricing-table tbody tr:not(.category-row):hover {
    background: var(--surface-hover, rgba(255,255,255,0.02));
}

.pricing-table .feat-name {
    padding: 0.4rem 0.5rem;
    color: var(--text-secondary);
    font-size: 0.72rem;
}

.pricing-table .feat-val {
    text-align: center;
    padding: 0.4rem 0.5rem;
    color: var(--text-secondary);
    font-size: 0.72rem;
}

.pricing-table .feat-val .check {
    color: var(--safe);
    font-weight: 600;
    font-size: 0.85rem;
}

.pricing-table .feat-val .dash {
    color: var(--text-muted);
    opacity: 0.3;
}

@media (max-width: 900px) {
    .pricing-table {
        display: block;
        overflow-x: auto;
    }
}

/* ══ Support chat widget ════════════════ */

.chat-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 500;
}

.chat-fab {
    width: 50px;
    height: 50px;
    border: 1px solid var(--accent);
    background: var(--bg);
    color: var(--accent-light);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.chat-fab:hover {
    background: var(--surface);
}

.chat-panel {
    position: absolute;
    bottom: 60px;
    right: 0;
    width: 340px;
    max-height: 450px;
    background: var(--bg);
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
}

.chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 0.85rem;
    border-bottom: 1px solid var(--border);
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text);
}

.chat-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-height: 320px;
}

.chat-msg {
    font-size: 0.73rem;
    line-height: 1.5;
    padding: 0.5rem 0.75rem;
    max-width: 85%;
}

.chat-msg.bot {
    background: var(--surface);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    align-self: flex-start;
}

.chat-msg.user {
    background: var(--accent-dim);
    border: 1px solid var(--accent);
    color: var(--text);
    align-self: flex-end;
}

.chat-input-row {
    display: flex;
    border-top: 1px solid var(--border);
}

.chat-input-row input {
    flex: 1;
    background: var(--surface);
    border: none;
    color: var(--text);
    padding: 0.65rem 0.75rem;
    font-size: 0.73rem;
    font-family: 'Inter', system-ui, sans-serif;
    outline: none;
}

.chat-input-row button {
    background: var(--accent);
    border: none;
    color: var(--bgDeep);
    padding: 0 1rem;
    font-size: 0.7rem;
    font-weight: 600;
    cursor: pointer;
    font-family: 'Inter', system-ui, sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ══ Admin portal ═══════════════════════ */

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.72rem;
}

.admin-table th {
    text-align: left;
    padding: 0.6rem 0.75rem;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 0.6rem;
    border-bottom: 1px solid var(--border);
}

.admin-table td {
    padding: 0.55rem 0.75rem;
    border-bottom: 1px solid var(--border-subtle);
    color: var(--text-secondary);
}

.admin-table tr:hover td {
    background: var(--surface-hover);
}

@media (max-width: 768px) {
    .pricing-grid {
        grid-template-columns: 1fr;
    }
    .chat-panel {
        width: 290px;
        right: -10px;
    }
}

/* ══ Cookie consent banner ══════════════ */

.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg);
    border-top: 1px solid var(--border);
    z-index: 600;
    padding: 0.75rem 1.5rem;
}

.cookie-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.cookie-content p {
    font-size: 0.72rem;
    color: var(--text-secondary);
    margin: 0;
    flex: 1;
}

.cookie-content a {
    color: var(--accent-light);
    text-decoration: none;
}

.cookie-accept {
    background: var(--accent);
    border: none;
    color: var(--bgDeep);
    padding: 0.4rem 1rem;
    font-size: 0.7rem;
    font-weight: 600;
    cursor: pointer;
    font-family: 'Inter', system-ui, sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .cookie-content {
        flex-direction: column;
        text-align: center;
    }
}
