/* ─── Vermillion AI — claw-craft-studio aesthetic ─── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

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

:root {
    --cream: #f2ede4;
    --cream-light: #faf7f2;
    --card-bg: #ffffff;
    --card-border: #e0dbd3;
    --section-bg: #faf8f5;
    --section-border: #ebe6de;
    --teal: #1a8a7d;
    --teal-hover: #157a6e;
    --teal-light: rgba(26, 138, 125, 0.08);
    --amber: #c98a2e;
    --text-dark: #1a1a1a;
    --text-body: #555;
    --text-muted: #86868b;
    --green: #34c759;
    --green-bg: #f0faf0;
    --mono: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--cream);
    color: var(--text-dark);
    line-height: 1.6;
}

/* ─── Header ─── */
header {
    background: var(--cream-light);
    border-bottom: 1px solid var(--card-border);
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-mark {
    width: 36px;
    height: 36px;
    background: var(--teal);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: -0.5px;
    flex-shrink: 0;
}

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.logo-text .brand {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-dark);
}

.logo-text .brand .ai {
    color: var(--teal);
}

.logo-text .tagline {
    font-size: 0.72rem;
    color: var(--text-muted);
    letter-spacing: 0.3px;
}

.beta-badge {
    font-family: var(--mono);
    font-size: 0.6rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--teal);
    border: 1px solid var(--teal);
    border-radius: 20px;
    padding: 2px 10px;
    margin-left: 0.25rem;
}

/* ─── Header Nav ─── */
.header-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: inherit;
}

.header-nav {
    margin-left: auto;
    display: flex;
    gap: 0.25rem;
}

.nav-link {
    font-family: var(--mono);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: var(--text-muted);
    text-decoration: none;
    padding: 6px 14px;
    border-radius: 6px;
    transition: all 0.2s;
}

.nav-link:hover {
    color: var(--teal);
    background: var(--teal-light);
}

.nav-link.active {
    color: var(--teal);
    background: var(--teal-light);
}

/* ─── Step Progress Indicator ─── */
.step-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    padding: 1.5rem 1rem 0.5rem;
    max-width: 600px;
    margin: 0 auto;
}

.step-dot {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: default;
}

.step-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--mono);
    font-size: 0.75rem;
    font-weight: 600;
    border: 2px solid var(--card-border);
    color: var(--text-muted);
    background: var(--card-bg);
    transition: all 0.3s ease;
}

.step-dot.active .step-circle {
    background: var(--teal);
    border-color: var(--teal);
    color: white;
}

.step-dot.completed .step-circle {
    background: var(--teal);
    border-color: var(--teal);
    color: white;
}

.step-label {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-muted);
    transition: color 0.3s ease;
}

.step-dot.active .step-label {
    color: var(--teal);
    font-weight: 600;
}

.step-dot.completed .step-label {
    color: var(--teal);
}

.step-line {
    flex: 1;
    height: 2px;
    background: var(--card-border);
    margin: 0 0.75rem;
    min-width: 40px;
    transition: background 0.3s ease;
}

.step-line.filled {
    background: var(--teal);
}

/* ─── Main Container ─── */
main {
    max-width: 960px;
    margin: 1rem auto 2rem;
    padding: 0 1rem;
}

/* ─── Steps (Cards) ─── */
.step {
    display: none;
    background: var(--card-bg);
    border-radius: 12px;
    padding: 2rem;
    border: 1px solid var(--card-border);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.step.active {
    display: block;
}

.step h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
    color: var(--text-dark);
}

.step h2 .accent {
    color: var(--teal);
}

.hint {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

/* ─── Forms ─── */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.form-group label {
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-body);
}

select, input[type="text"], textarea {
    padding: 0.6rem 0.8rem;
    border: 1px solid var(--card-border);
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: 'Inter', sans-serif;
    background: white;
    transition: border-color 0.2s, box-shadow 0.2s;
}

select:focus, input[type="text"]:focus, textarea:focus {
    outline: none;
    border-color: var(--teal);
    box-shadow: 0 0 0 3px rgba(26, 138, 125, 0.1);
}

select:disabled {
    background: var(--cream);
    color: #999;
}

input.extracted {
    background: var(--green-bg);
    border-color: var(--green);
}

/* ─── Upload Area ─── */
.upload-area {
    border: 2px dashed var(--card-border);
    border-radius: 12px;
    padding: 2.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 1rem;
}

.upload-area:hover, .upload-area.dragover {
    border-color: var(--teal);
    background: var(--teal-light);
}

.upload-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--teal);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.75rem;
}

.upload-icon svg {
    width: 24px;
    height: 24px;
    stroke: white;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.upload-area p {
    color: var(--text-dark);
    font-weight: 500;
}

/* ─── File List ─── */
.file-list {
    margin-bottom: 1rem;
}

.file-item {
    padding: 0.5rem 0.8rem;
    background: var(--green-bg);
    border-radius: 6px;
    margin-bottom: 0.3rem;
    font-size: 0.9rem;
}

.file-item .check {
    color: var(--green);
    margin-right: 0.5rem;
}

/* ─── Buttons ─── */
.actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
}

.btn {
    padding: 0.7rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: all 0.2s;
}

.btn.primary {
    background: var(--teal);
    color: white;
    box-shadow: 0 1px 3px rgba(26, 138, 125, 0.3);
}

.btn.primary:hover {
    background: var(--teal-hover);
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(26, 138, 125, 0.25);
}

.btn.primary:disabled {
    background: #b8b8b8;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn.secondary {
    background: var(--cream);
    color: var(--text-dark);
    border: 1px solid var(--card-border);
}

.btn.secondary:hover {
    background: var(--section-border);
}

/* ─── Review Grid ─── */
.review-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.review-section {
    background: var(--section-bg);
    border-radius: 10px;
    padding: 1.2rem;
    border: 1px solid var(--section-border);
}

.review-section h3 {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.section-pill {
    font-family: var(--mono);
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--teal);
    border: 1px solid var(--teal);
    border-radius: 20px;
    padding: 3px 12px;
    white-space: nowrap;
}

.section-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--teal);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.section-icon svg {
    width: 14px;
    height: 14px;
    stroke: white;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.field-group {
    margin-bottom: 0.6rem;
}

.field-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-body);
    margin-bottom: 0.2rem;
}

.field-group input[type="text"],
.field-group textarea,
.field-group select {
    width: 100%;
    padding: 0.45rem 2.2rem 0.45rem 0.6rem;
    font-size: 0.9rem;
}

.field-group select {
    padding-right: 0.6rem;
}

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

/* ─── Confidence Badges ─── */
.confidence {
    font-size: 0.65rem;
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    font-weight: 600;
    text-transform: uppercase;
    font-family: var(--mono);
    letter-spacing: 0.5px;
}

.conf-high {
    background: #d4edda;
    color: #155724;
}

.conf-med {
    background: #fff3cd;
    color: #856404;
}

.conf-low {
    background: #f8d7da;
    color: #721c24;
}

/* ─── Status ─── */
.status {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

/* ─── Success Box ─── */
.success-box {
    text-align: center;
    padding: 3rem 2rem;
}

.success-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: var(--teal);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem;
    animation: scaleIn 0.4s ease-out;
}

.success-icon svg {
    width: 36px;
    height: 36px;
    stroke: white;
    fill: none;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

@keyframes scaleIn {
    0% { transform: scale(0); opacity: 0; }
    60% { transform: scale(1.15); }
    100% { transform: scale(1); opacity: 1; }
}

.success-box p {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.success-stat {
    font-size: 2rem;
    font-weight: 700;
    color: var(--amber);
    margin-bottom: 0.25rem;
}

.success-stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.success-box .actions {
    justify-content: center;
}

/* ─── Loading Overlay ─── */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(242, 237, 228, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
}

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

.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--card-border);
    border-top-color: var(--teal);
    border-radius: 50%;
    margin: 0 auto 1rem;
    animation: spin 0.8s linear infinite;
}

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

.loading-content p {
    font-size: 1rem;
    color: var(--text-body);
}

/* ─── Validation Message ─── */
.validation-msg {
    background: #fff3cd;
    color: #856404;
    padding: 0.6rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    margin-top: 1rem;
    border: 1px solid #f0e1a0;
}

/* ─── Error Banner ─── */
.error-banner {
    background: #fff5f5;
    color: #c53030;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    margin-top: 1rem;
    border: 1px solid #fecaca;
    display: none;
}

.error-banner.visible {
    display: block;
}

/* ─── Hero Section ─── */
.hero-section {
    text-align: center;
    padding: 2rem 1rem 1.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--section-border);
}

.hero-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--text-body);
    margin-bottom: 1.5rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 2.5rem;
}

.hero-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--teal);
}

.hero-stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ─── Trust Bar ─── */
.trust-bar {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 1.25rem;
    flex-wrap: wrap;
}

.trust-badge {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--teal);
    background: var(--teal-light);
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    border: 1px solid rgba(26, 138, 125, 0.15);
}

.trust-badge svg {
    flex-shrink: 0;
}

/* ─── Treatment History Entries ─── */
.tx-entry {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    padding: 0.75rem;
    margin-bottom: 0.75rem;
    background: var(--section-bg);
    border: 1px solid var(--section-border);
    border-radius: 8px;
}

.tx-entry .field-group {
    grid-column: span 1;
}

.tx-entry .field-group:first-child,
.tx-entry .field-group:last-child {
    grid-column: span 2;
}

.tx-entry .field-group.half {
    grid-column: span 1;
}

/* ─── Extraction Summary ─── */
.extraction-summary {
    background: var(--green-bg);
    color: #2d6a2e;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    border: 1px solid #c6e6c6;
    font-weight: 500;
}

/* ─── Demo Banner ─── */
.demo-banner {
    border: 1px solid var(--teal);
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
    background: rgba(26, 138, 125, 0.04);
    text-align: center;
}

.demo-banner-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--amber);
    margin-bottom: 0.25rem;
}

.demo-banner-subtitle {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.demo-grid-label {
    font-family: var(--mono);
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-top: 0.75rem;
    margin-bottom: 0.1rem;
    text-align: left;
}

.demo-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin-top: 0.35rem;
}

.demo-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 10px;
    padding: 1rem;
    text-align: center;
    transition: border-color 0.2s;
}

.demo-card:hover {
    border-color: var(--teal);
}

.demo-drug-name {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-dark);
    margin-bottom: 0.1rem;
}

.demo-brand-name {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.6rem;
}

.demo-insurers {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    justify-content: center;
}

.demo-insurer-btn {
    font-family: var(--mono);
    font-size: 0.6rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: var(--teal);
    border: 1px solid var(--teal);
    border-radius: 20px;
    padding: 3px 10px;
    background: transparent;
    cursor: pointer;
    transition: all 0.2s;
}

.demo-insurer-btn:hover {
    background: var(--teal);
    color: white;
}

/* ─── Demo Mode Badge ─── */
.demo-badge {
    display: none;
    font-family: var(--mono);
    font-size: 0.6rem;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--amber);
    border: 1px solid var(--amber);
    border-radius: 20px;
    padding: 2px 10px;
    margin-left: 0.5rem;
}

.demo-badge.visible {
    display: inline-block;
}

/* ─── Voice Input ─── */
.voice-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.6rem 1rem;
    padding: 0.6rem 1rem;
    margin-bottom: 1rem;
    border: 1px solid var(--teal);
    border-radius: 10px;
    background: rgba(26, 138, 125, 0.04);
}

.voice-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--mono);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: var(--teal);
    background: transparent;
    border: 1px solid var(--teal);
    border-radius: 20px;
    padding: 6px 14px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.voice-toggle:hover {
    background: var(--teal);
    color: white;
}

.voice-toggle .mic-icon {
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.voice-toggle.recording {
    background: #c0392b;
    border-color: #c0392b;
    color: white;
    animation: voice-pulse 1.5s ease-in-out infinite;
}

@keyframes voice-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(192, 57, 43, 0.4); }
    50% { box-shadow: 0 0 0 8px rgba(192, 57, 43, 0); }
}

.voice-done-btn {
    background: var(--teal);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 0.35rem 1rem;
    font-family: var(--mono);
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    white-space: nowrap;
}

.voice-done-btn:hover {
    background: #157a6e;
}

.voice-status {
    font-size: 0.78rem;
    color: var(--text-muted);
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.voice-transcript {
    width: 100%;
    background: rgba(26, 138, 125, 0.06);
    border: 1px solid rgba(26, 138, 125, 0.15);
    border-radius: 6px;
    padding: 0.6rem 0.8rem;
    font-size: 0.82rem;
    line-height: 1.5;
    color: var(--text);
    min-height: 2.4rem;
    max-height: 8rem;
    overflow-y: auto;
    margin-top: 0.3rem;
}

/* Per-field mic buttons */
.field-group {
    position: relative;
}

.mic-field-btn {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(2px);
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 1px solid var(--card-border);
    background: var(--card-bg);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    padding: 0;
}

.mic-field-btn svg {
    fill: none;
    stroke: var(--text-muted);
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.mic-field-btn:hover {
    border-color: var(--teal);
}

.mic-field-btn:hover svg {
    stroke: var(--teal);
}

.mic-field-btn.recording {
    background: #c0392b;
    border-color: #c0392b;
    animation: voice-pulse 1.5s ease-in-out infinite;
}

.mic-field-btn.recording svg {
    stroke: white;
}

input.voice-active,
textarea.voice-active {
    border-color: #c0392b !important;
    box-shadow: 0 0 0 2px rgba(192, 57, 43, 0.15);
}

/* ─── PDF Preview ─── */
.pdf-preview {
    margin-top: 2rem;
    border: 1px solid var(--card-border);
    border-radius: 12px;
    overflow: hidden;
    background: var(--section-bg);
}

.pdf-preview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--section-border);
}

.pdf-page-nav {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.pdf-page-nav span {
    font-size: 0.82rem;
    color: var(--text-muted);
    font-family: var(--mono);
    font-size: 0.7rem;
}

.btn-page {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: 1px solid var(--card-border);
    background: var(--card-bg);
    cursor: pointer;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.btn-page:hover:not(:disabled) {
    border-color: var(--teal);
    color: var(--teal);
}

.btn-page:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.pdf-canvas-wrapper {
    padding: 1rem;
    text-align: center;
    background: #e8e4dc;
    max-height: 800px;
    overflow-y: auto;
}

.pdf-canvas-wrapper canvas {
    max-width: 100%;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
    background: white;
}

/* ─── Analytics Dashboard ─── */
.stats-page {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

.stats-page h2 {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin: 1.5rem 0;
}

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

.stat-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 1.25rem;
    text-align: center;
    transition: border-color 0.2s;
}

.stat-card:hover {
    border-color: var(--teal);
}

.stat-card.highlight {
    border-color: var(--teal);
    background: rgba(26, 138, 125, 0.03);
}

.stat-icon {
    margin-bottom: 0.75rem;
}

.stat-icon svg {
    width: 28px;
    height: 28px;
    fill: none;
    stroke: var(--teal);
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.stat-number {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1;
    margin-bottom: 0.35rem;
}

.stat-unit {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-left: 2px;
}

.stat-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-body);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-compare {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 0.35rem;
}

/* Stats sections */
.stats-section {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.25rem;
}

.stats-section h3 {
    margin-bottom: 1rem;
}

/* Bar chart */
.bar-chart {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.bar-row {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.bar-label {
    width: 120px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-body);
    text-align: right;
    flex-shrink: 0;
}

.bar-track {
    flex: 1;
    background: var(--section-bg);
    border-radius: 6px;
    height: 32px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    border-radius: 6px;
    display: flex;
    align-items: center;
    padding: 0 10px;
    transition: width 1s ease-out;
    min-width: fit-content;
}

.bar-fill.manual {
    background: var(--card-border);
}

.bar-fill.automated {
    background: var(--teal);
}

.bar-value {
    font-family: var(--mono);
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-dark);
    white-space: nowrap;
}

.bar-fill.automated .bar-value {
    color: white;
}

.chart-caption {
    text-align: center;
    font-size: 0.82rem;
    color: var(--amber);
    font-weight: 600;
    margin-top: 0.75rem;
}

/* Mini stats */
.stat-mini {
    text-align: center;
    padding: 1rem;
}

.stat-mini-number {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--teal);
}

.stat-mini-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* Coverage grid */
.coverage-grid {
    display: grid;
    grid-template-columns: 1fr 80px 80px 80px 80px 80px 80px;
    gap: 0;
    border: 1px solid var(--section-border);
    border-radius: 8px;
    overflow: hidden;
}

.coverage-header {
    background: var(--section-bg);
    padding: 0.6rem 0.75rem;
    font-family: var(--mono);
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: var(--text-muted);
    border-bottom: 1px solid var(--section-border);
    text-align: center;
}

.coverage-header:first-child {
    text-align: left;
}

.coverage-drug {
    padding: 0.55rem 0.75rem;
    border-bottom: 1px solid var(--section-border);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.coverage-drug strong {
    font-size: 0.85rem;
}

.coverage-brand {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.coverage-cell {
    padding: 0.55rem;
    border-bottom: 1px solid var(--section-border);
    border-left: 1px solid var(--section-border);
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.coverage-cell.covered svg {
    fill: none;
    stroke: var(--teal);
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.coverage-cell.not-covered {
    color: var(--card-border);
}

.coverage-dash {
    font-size: 0.8rem;
}

.coverage-summary {
    text-align: center;
    font-size: 0.82rem;
    color: var(--text-body);
    margin-top: 0.75rem;
    padding: 0.5rem;
}

/* Trend chart */
.trend-chart {
    display: flex;
    align-items: flex-end;
    gap: 1rem;
    height: 160px;
    padding: 0 2rem;
}

.trend-bar {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    height: 100%;
}

.trend-bar::before {
    content: '';
    width: 100%;
    max-width: 48px;
    height: var(--height);
    background: var(--teal);
    border-radius: 6px 6px 0 0;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.trend-bar:hover::before {
    opacity: 1;
}

.trend-bar.today::before {
    background: var(--amber);
    opacity: 1;
}

.trend-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
    font-weight: 500;
}

.trend-value {
    font-family: var(--mono);
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-body);
    margin-bottom: 0.25rem;
}

/* ─── Footer ─── */
footer {
    text-align: center;
    padding: 1.5rem;
    color: var(--text-muted);
    font-size: 0.8rem;
}

footer .footer-brand {
    font-weight: 600;
    color: var(--text-body);
}

/* ─── Responsive ─── */
@media (max-width: 768px) {
    header {
        padding: 0.75rem 1rem;
    }

    .form-row, .review-grid {
        grid-template-columns: 1fr;
    }

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

    .step-indicator {
        gap: 0;
    }

    .step-label {
        font-size: 0.7rem;
    }

    .step-line {
        min-width: 20px;
    }
}

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

    .coverage-grid {
        grid-template-columns: 1fr 65px 65px 65px 65px 65px 65px;
    }

    .voice-bar {
        flex-direction: column;
        gap: 0.5rem;
    }
}

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

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

    .coverage-grid {
        grid-template-columns: 1fr 50px 50px 50px 50px 50px 50px;
        font-size: 0.8rem;
    }
}

/* ─── Platform Page ─── */
.platform-page {
    max-width: 1100px;
    margin: 0 auto;
    padding: 2rem 2rem 3rem;
}

.platform-page .hero-section {
    margin-bottom: 2rem;
}

.platform-page .hero-subtitle {
    font-size: 1.15rem;
    line-height: 1.65;
}

.platform-section {
    background: var(--section-bg);
    border: 1px solid var(--section-border);
    border-radius: 14px;
    padding: 2rem 2.25rem;
    margin-bottom: 1.5rem;
}

.platform-section h3 {
    margin-bottom: 1rem;
}

.platform-page .section-pill {
    font-size: 0.95rem;
    padding: 0.45rem 1rem;
    letter-spacing: 0.5px;
}

.platform-body {
    color: var(--text-body);
    font-size: 1.1rem;
    line-height: 1.75;
    max-width: 900px;
}

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

/* How It Works grid */
.how-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 1rem;
    margin-top: 0.5rem;
}

.how-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 1.5rem 1.5rem 1.65rem;
    transition: all 0.2s;
}

.how-card:hover {
    border-color: var(--teal);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(26, 138, 125, 0.08);
}

.how-number {
    font-family: var(--mono);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--teal);
    letter-spacing: 1px;
    margin-bottom: 0.6rem;
}

.how-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.how-desc {
    font-size: 1rem;
    color: var(--text-body);
    line-height: 1.6;
}

/* Tech stack grid */
.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.tech-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 10px;
    padding: 1.15rem 1.3rem;
}

.tech-label {
    font-family: var(--mono);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 0.45rem;
}

.tech-value {
    font-size: 1.05rem;
    font-weight: 500;
    color: var(--text-dark);
    line-height: 1.5;
}

.region-pill {
    font-family: var(--mono);
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--teal);
    background: var(--teal-light);
    padding: 3px 10px;
    border-radius: 4px;
    margin-left: 4px;
    white-space: nowrap;
}

/* Coverage summary */
.coverage-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin-top: 0.5rem;
}

.coverage-summary-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 1.5rem 1.25rem;
    text-align: center;
}

.coverage-big-number {
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--teal);
    line-height: 1;
    margin-bottom: 0.6rem;
}

.coverage-label {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.85rem;
}

.coverage-detail {
    font-size: 0.92rem;
    color: var(--text-muted);
    line-height: 1.55;
}

.therapeutic-areas {
    margin-top: 1.4rem;
    padding: 1rem 1.25rem;
    background: var(--card-bg);
    border-left: 3px solid var(--amber);
    border-radius: 6px;
    font-size: 1.02rem;
    color: var(--text-body);
}

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

/* Why It Matters grid */
.why-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
    margin-top: 0.5rem;
}

.why-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 1.25rem;
}

.why-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: var(--teal-light);
    color: var(--teal);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.85rem;
}

.why-icon svg {
    width: 20px;
    height: 20px;
}

.why-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.why-desc {
    font-size: 1rem;
    color: var(--text-body);
    line-height: 1.6;
}

/* CTA block */
.platform-cta {
    background: var(--text-dark);
    color: white;
    border-radius: 14px;
    padding: 2.25rem 2rem;
    text-align: center;
    margin-top: 1rem;
}

.cta-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.cta-subtitle {
    font-size: 1.08rem;
    color: rgba(255, 255, 255, 0.75);
    margin-bottom: 1.75rem;
}

.cta-button {
    display: inline-block;
    background: var(--teal);
    color: white;
    text-decoration: none;
    padding: 0.95rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1.05rem;
    transition: all 0.2s;
}

.cta-button:hover {
    background: var(--teal-hover);
    transform: translateY(-1px);
}

@media (max-width: 640px) {
    .platform-page {
        padding: 1.25rem 1rem 2rem;
    }

    .platform-section {
        padding: 1.25rem 1.1rem;
    }

    .coverage-big-number {
        font-size: 2.25rem;
    }
}
