/* Zervio.ai — Medicare Billing Anomaly Reports */
:root {
    --bg: #0d1117;
    --surface: #161b22;
    --surface-hover: #1c2129;
    --border: #30363d;
    --text: #e6edf3;
    --text-muted: #8b949e;
    --accent: #58a6ff;
    --accent-dim: #1f6feb;
    --accent-glow: rgba(88,166,255,0.12);
    --red: #f85149;
    --orange: #d29922;
    --yellow: #e3b341;
    --green: #3fb950;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; scroll-behavior: smooth; }
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

/* ── Layout ─────────────────────────────────────────────── */
.container { max-width: 1100px; margin: 0 auto; padding: 0 1.5rem; }
header {
    border-bottom: 1px solid var(--border);
    padding: 0.75rem 0;
    position: sticky;
    top: 0;
    background: rgba(13,17,23,0.95);
    backdrop-filter: blur(8px);
    z-index: 100;
}
header .container { display: flex; align-items: center; justify-content: space-between; }
.logo { font-size: 1.4rem; font-weight: 700; color: var(--accent); text-decoration: none; }
.logo span { color: var(--text-muted); font-weight: 400; font-size: 0.85rem; margin-left: 0.25rem; }
nav { display: flex; align-items: center; gap: 0.25rem; }
nav a {
    color: var(--text-muted);
    text-decoration: none;
    padding: 0.4rem 0.7rem;
    border-radius: 6px;
    font-size: 0.85rem;
    transition: color 0.15s, background 0.15s;
}
nav a:hover { color: var(--text); background: var(--surface); }
nav a.active { color: var(--accent); background: var(--accent-glow); }

.nav-toggle { display: none; background: none; border: none; color: var(--text-muted); font-size: 1.4rem; cursor: pointer; padding: 0.25rem; }

main { padding: 2rem 0 4rem; }

footer {
    border-top: 1px solid var(--border);
    padding: 2rem 0;
    color: var(--text-muted);
    font-size: 0.8rem;
    text-align: center;
}
footer a { color: var(--accent); text-decoration: none; }
footer a:hover { text-decoration: underline; }

/* ── Buttons ────────────────────────────────────────────── */
.btn {
    display: inline-block;
    padding: 0.6rem 1.4rem;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.15s;
    cursor: pointer;
    border: none;
}
.btn-primary {
    background: var(--accent-dim);
    color: #fff;
}
.btn-primary:hover { background: var(--accent); color: #fff; }
.btn-secondary {
    background: transparent;
    color: var(--accent);
    border: 1px solid var(--accent-dim);
}
.btn-secondary:hover { background: var(--accent-glow); }
.btn-group { display: flex; gap: 0.75rem; flex-wrap: wrap; }

/* ── Hero (Landing) ─────────────────────────────────────── */
.hero {
    text-align: center;
    padding: 4rem 0 2.5rem;
}
.hero h1 {
    font-size: 2.6rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 0.75rem;
    background: linear-gradient(135deg, var(--text) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero .subtitle {
    color: var(--text-muted);
    font-size: 1.15rem;
    max-width: 700px;
    margin: 0 auto 2rem;
    line-height: 1.7;
}
.hero .btn-group { justify-content: center; margin-top: 1.5rem; }

/* ── Stats Bar ──────────────────────────────────────────── */
.stats-bar {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin: 2.5rem 0;
    flex-wrap: wrap;
}
.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.25rem 1.5rem;
    text-align: center;
    min-width: 170px;
    flex: 1;
    max-width: 220px;
}
.stat-card .value { font-size: 1.8rem; font-weight: 700; color: var(--accent); }
.stat-card .label { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; margin-top: 0.25rem; }

/* ── Feature Grid ───────────────────────────────────────── */
.features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin: 2rem 0;
}
.feature-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.5rem;
}
.feature-card .feature-icon {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
    display: block;
}
.feature-card h3 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    color: var(--text);
}
.feature-card p {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* ── Section Headers ────────────────────────────────────── */
.section-header {
    text-align: center;
    margin: 3rem 0 1.5rem;
}
.section-header h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}
.section-header p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* ── Value Props ─────────────────────────────────────────── */
.value-props {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
    margin: 1.5rem 0;
}
.value-prop {
    display: flex;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
}
.value-prop .vp-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
    margin-top: 0.1rem;
}
.value-prop h4 { font-size: 0.9rem; margin-bottom: 0.25rem; }
.value-prop p { font-size: 0.82rem; color: var(--text-muted); }

/* ── Featured Cases ──────────────────────────────────────── */
.featured-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}
.featured-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.25rem;
    transition: border-color 0.15s;
    text-decoration: none;
    color: inherit;
    display: block;
}
.featured-card:hover { border-color: var(--accent-dim); }
.featured-card .fc-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 0.75rem; }
.featured-card .fc-name { font-weight: 600; font-size: 0.95rem; }
.featured-card .fc-specialty { font-size: 0.8rem; color: var(--text-muted); }
.featured-card .fc-location { font-size: 0.8rem; color: var(--text-muted); }
.featured-card .fc-stats { display: flex; gap: 1rem; margin-top: 0.75rem; padding-top: 0.75rem; border-top: 1px solid var(--border); }
.featured-card .fc-stat-label { font-size: 0.7rem; color: var(--text-muted); text-transform: uppercase; }
.featured-card .fc-stat-value { font-size: 1rem; font-weight: 700; }

/* ── CTA Block ───────────────────────────────────────────── */
.cta-block {
    text-align: center;
    padding: 3rem 2rem;
    margin: 3rem 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
}
.cta-block h2 { font-size: 1.4rem; margin-bottom: 0.5rem; }
.cta-block p { color: var(--text-muted); margin-bottom: 1.5rem; max-width: 500px; margin-left: auto; margin-right: auto; }

/* ── Gated Content Block (Report page) ───────────────────── */
.gated-block {
    position: relative;
    margin: 2rem 0;
    border-radius: 12px;
    overflow: hidden;
}
.gated-placeholder {
    padding: 2rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    filter: blur(3px);
    opacity: 0.4;
    user-select: none;
    pointer-events: none;
    font-size: 0.85rem;
    line-height: 1.8;
    color: var(--text-muted);
}
.gated-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
    background: rgba(13,17,23,0.7);
    border-radius: 12px;
    border: 1px solid var(--border);
}
.gated-overlay h3 { font-size: 1.2rem; margin-bottom: 0.5rem; }
.gated-overlay p { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 0.5rem; max-width: 450px; }
.gated-overlay ul { text-align: left; color: var(--text-muted); font-size: 0.85rem; margin: 0.75rem 0 1.25rem 1.5rem; }
.gated-overlay li { margin-bottom: 0.3rem; }

/* ── Key Findings (Report page) ──────────────────────────── */
.key-findings {
    margin: 1.5rem 0;
    padding: 1.25rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
}
.key-findings h2 { font-size: 1.1rem; margin-bottom: 0.75rem; }
.key-findings ul { margin-left: 1.25rem; }
.key-findings li {
    font-size: 0.9rem;
    margin-bottom: 0.4rem;
    color: var(--text-muted);
}

/* ── Filters ─────────────────────────────────────────────── */
.filters {
    display: flex;
    gap: 0.75rem;
    margin: 1.5rem 0;
    flex-wrap: wrap;
    align-items: center;
}
.filters input, .filters select {
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-size: 0.9rem;
}
.filters input:focus, .filters select:focus { outline: none; border-color: var(--accent); }
.filters input[type="text"] { width: 250px; }

/* ── Report Table ────────────────────────────────────────── */
.report-table { width: 100%; border-collapse: collapse; margin-top: 1rem; }
.report-table th, .report-table td {
    padding: 0.6rem 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
}
.report-table th {
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    position: sticky;
    top: 48px;
    background: var(--bg);
}
.report-table tr:hover { background: var(--surface-hover); }
.report-table a { color: var(--accent); text-decoration: none; }
.report-table a:hover { text-decoration: underline; }

/* ── Tier Badges ─────────────────────────────────────────── */
.tier {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.tier-priority { background: rgba(248,81,73,0.15); color: var(--red); }
.tier-watchlist { background: rgba(210,153,34,0.15); color: var(--orange); }
.tier-flag { background: rgba(227,179,65,0.15); color: var(--yellow); }
.tier-low { background: rgba(63,185,80,0.15); color: var(--green); }

/* ── Report Detail Page ──────────────────────────────────── */
.report-header {
    border-bottom: 1px solid var(--border);
    padding-bottom: 1.5rem;
    margin-bottom: 2rem;
}
.report-header h1 { font-size: 1.6rem; margin-bottom: 0.25rem; }
.report-meta {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 0.5rem;
}
.report-meta strong { color: var(--text); }

.metric-row { display: flex; gap: 1rem; margin: 1.5rem 0; flex-wrap: wrap; }
.metric-box {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.75rem 1.25rem;
    flex: 1;
    min-width: 140px;
}
.metric-box .metric-label { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; }
.metric-box .metric-value { font-size: 1.4rem; font-weight: 700; }

.section {
    margin: 2rem 0;
    padding: 1.5rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
}
.section h2 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
}
.section pre {
    white-space: pre-wrap;
    word-wrap: break-word;
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-size: 0.85rem;
    color: var(--text);
    line-height: 1.5;
}

/* ── Disclaimer Box ──────────────────────────────────────── */
.disclaimer-box {
    background: rgba(210,153,34,0.08);
    border: 1px solid rgba(210,153,34,0.3);
    border-radius: 8px;
    padding: 1.25rem;
    margin: 2rem 0;
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.7;
}
.disclaimer-box strong { color: var(--orange); }

.back-link {
    display: inline-block;
    color: var(--accent);
    text-decoration: none;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}
.back-link:hover { text-decoration: underline; }

/* ── Content Pages (Methodology, About, Disclaimer) ──────── */
.content-page h1 { font-size: 1.8rem; margin-bottom: 1rem; }
.content-page h2 { font-size: 1.3rem; margin: 2rem 0 0.75rem; color: var(--accent); }
.content-page h3 { font-size: 1.1rem; margin: 1.5rem 0 0.5rem; }
.content-page p { margin-bottom: 0.75rem; color: var(--text); }
.content-page ul { margin: 0.5rem 0 1rem 1.5rem; }
.content-page li { margin-bottom: 0.35rem; }
.content-page code {
    background: var(--surface);
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-size: 0.85rem;
}

/* ── Contact Page ────────────────────────────────────────── */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin: 2rem 0;
}
.contact-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.5rem;
}
.contact-card h3 { font-size: 1rem; margin-bottom: 0.75rem; }
.contact-card p { font-size: 0.9rem; color: var(--text-muted); }
.contact-card a { color: var(--accent); }
.contact-card ul { margin: 0.75rem 0 0 1.25rem; }
.contact-card li { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 0.3rem; }

/* ── Timestamp ───────────────────────────────────────────── */
.timestamp {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 768px) {
    .nav-toggle { display: block; }
    nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg);
        border-bottom: 1px solid var(--border);
        flex-direction: column;
        padding: 0.5rem 1rem;
    }
    nav.open { display: flex; }
    nav a { padding: 0.6rem 0.5rem; }

    .hero h1 { font-size: 1.8rem; }
    .hero .subtitle { font-size: 1rem; }
    .features { grid-template-columns: 1fr; }
    .value-props { grid-template-columns: 1fr; }
    .stats-bar { flex-direction: column; align-items: center; }
    .stat-card { max-width: 100%; width: 100%; }
    .metric-row { flex-direction: column; }
    .report-table { font-size: 0.8rem; }
    .filters input[type="text"] { width: 100%; }
    .contact-grid { grid-template-columns: 1fr; }
    .featured-grid { grid-template-columns: 1fr; }
}
