/* ============================================
 * variables.css — Design tokens and CSS custom properties
 * ============================================ */

:root {
    --purple: #7715C0;
    --purple50: #f3eafc;
    --magenta: #CB31AE;
    --teal: #11C2F3;
    --green: #00A651;
    --gradient: linear-gradient(135deg, #7715C0 0%, #CB31AE 100%);
    --gradient-wide: linear-gradient(135deg, #7715C0 0%, #CB31AE 50%, #E84D8A 100%);
    --dark: #1A1A2E;
    --gray50: #F8F9FC;
    --gray100: #EEF0F6;
    --gray500: #6B7194;
    --gray700: #3D4167;
    --radius: 12px;
    --shadow: 0 2px 12px rgba(26,26,46,0.06);
    --shadow-hover: 0 8px 24px rgba(26,26,46,0.12);
}


/* ============================================
 * base.css — Reset, body styles, and base utilities
 * ============================================ */

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

body {
    font-family: 'Nunito Sans', 'Poppins', sans-serif;
    background-color: var(--gray50);
    color: var(--dark);
    line-height: 1.6;
}

h1, h2, h3, h4, .hero-title, .tile-label, .section-header h2 {
    font-family: 'Poppins', 'Nunito Sans', sans-serif;
}

.hidden {
    display: none !important;
}

.loading {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--gray500);
}

.error-message {
    background-color: #FADBD8;
    border-left: 4px solid #E74C3C;
    color: #C0392B;
    padding: 1rem 1.5rem;
    border-radius: var(--radius);
    margin: 1rem 0;
}


/* ============================================
 * gate.css — Password gate and loading states
 * ============================================ */

#passwordGate {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(160deg, #1A1A2E 0%, #2D1B4E 40%, #4A1A6B 70%, #7715C0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 1;
    transition: opacity 0.4s ease;
}

#passwordGate::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at 30% 20%, rgba(119,21,192,0.15) 0%, transparent 60%),
                radial-gradient(ellipse at 70% 80%, rgba(203,49,174,0.12) 0%, transparent 50%);
    pointer-events: none;
}

#passwordGate.hidden {
    opacity: 0;
    pointer-events: none;
}

.password-gate-content {
    background: rgba(255,255,255,0.97);
    border-radius: 20px;
    padding: 2.5rem 2.5rem 2rem;
    box-shadow: 0 24px 80px rgba(0,0,0,0.35);
    max-width: 420px;
    width: 90%;
    text-align: center;
    position: relative;
    z-index: 1;
    backdrop-filter: blur(20px);
}

.password-gate-logo {
    width: 180px;
    margin: 0 auto 0.5rem;
    display: block;
}

.password-gate-content h1 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.3rem;
    color: var(--dark);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.password-gate-content p {
    color: var(--gray500);
    margin-bottom: 1.75rem;
    font-size: 0.9rem;
}

.password-input-group {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

#accessCode {
    flex: 1;
    padding: 0.8rem 1rem;
    border: 2px solid var(--gray100);
    border-radius: 10px;
    font-size: 0.95rem;
    font-family: 'Nunito Sans', sans-serif;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: var(--gray50);
}

#accessCode:focus {
    outline: none;
    border-color: var(--purple);
    box-shadow: 0 0 0 3px rgba(119,21,192,0.1);
    background: white;
}

#accessCode:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

#submitAccessCode {
    padding: 0.8rem 1.5rem;
    background: var(--gradient);
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.95rem;
    font-family: 'Poppins', sans-serif;
    transition: transform 0.2s, box-shadow 0.2s;
    white-space: nowrap;
}

#submitAccessCode:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(119,21,192,0.35);
}

#submitAccessCode:active:not(:disabled) {
    transform: translateY(0);
}

#submitAccessCode:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.password-gate-error {
    color: #E74C3C;
    font-size: 0.85rem;
    margin-top: 1rem;
    display: none;
}

.password-gate-error.show {
    display: block;
}

.loading-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-top: 1.5rem;
}

.loading-indicator.hidden {
    display: none;
}

.loading-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--gray100);
    border-top-color: var(--purple);
    border-right-color: var(--magenta);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

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

.loading-text {
    font-size: 0.9rem;
    color: var(--gray500);
    font-weight: 600;
}

.loading-dots::after {
    content: '';
    animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
    0%  { content: ''; }
    25% { content: '.'; }
    50% { content: '..'; }
    75% { content: '...'; }
}


/* ============================================
 * layout.css — Main dashboard layout
 * ============================================ */

#dashboard {
    opacity: 0;
    transition: opacity 0.3s ease;
}

#dashboard.visible {
    opacity: 1;
}

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

.dashboard-topbar {
    background: var(--dark);
    position: sticky;
    top: 0;
    z-index: 100;
    margin-bottom: 2rem;
    transition: all 0.3s;
}

.dashboard-topbar-main {
    padding: 0.75rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.dashboard-topbar-logo {
    height: 28px;
    filter: brightness(0) invert(1);
    opacity: 0.85;
}

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

.dashboard-topbar-label {
    font-family: 'Poppins', sans-serif;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: rgba(255,255,255,0.5);
}

.dashboard-topbar .diag-btn {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 1.5px solid rgba(255,255,255,0.3);
    background: transparent;
    color: rgba(255,255,255,0.5);
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    margin: 0;
    position: static;
    top: auto;
}

.dashboard-topbar .diag-btn:hover {
    border-color: rgba(255,255,255,0.7);
    color: white;
    background: rgba(255,255,255,0.1);
}

.section {
    margin-bottom: 2rem;
}

.section-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem 1rem;
    margin-bottom: 1.5rem;
    padding-left: 1rem;
}

.section-header::before {
    content: '';
    display: block;
    width: 4px;
    height: 2rem;
    background: var(--gradient);
    border-radius: 2px;
    margin-left: -1rem;
}

.section-header h2 {
    font-size: 1.5rem;
    color: var(--dark);
    font-weight: 700;
}

.section-subtitle {
    width: 100%;
    margin: 0;
    padding-left: 0;
    font-size: 0.85rem;
    color: var(--gray500);
    font-weight: 400;
    line-height: 1.4;
}

.card {
    background: white;
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    transition: box-shadow 0.2s, transform 0.2s;
}

.card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

.hero-banner {
    background: var(--gradient);
    color: white;
    padding: 2.5rem;
    border-radius: var(--radius);
    margin-bottom: 2rem;
}

.hero-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.hero-pill {
    background: rgba(255, 255, 255, 0.25);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

.hero-countdown {
    font-weight: 600;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 20px;
}

.hero-intended {
    font-size: 0.9rem;
    opacity: 0.85;
}

.hero-intended strong {
    opacity: 1;
}

/* ── Topbar Morph Nav (appears on scroll past hero) ── */

.topbar-nav {
    display: flex;
    align-items: center;
    gap: 0;
    padding: 0 2rem;
    max-height: 0;
    overflow: hidden;
    border-top: 1px solid transparent;
    transition: max-height 0.35s ease, padding 0.35s ease, border-color 0.35s;
}

.topbar-nav.visible {
    max-height: 40px;
    padding: 0 2rem 0.4rem;
    border-top-color: rgba(255,255,255,0.06);
}

.topbar-nav-title {
    font-family: 'Poppins', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--magenta);
    margin-right: 0.75rem;
    cursor: pointer;
    white-space: nowrap;
    padding: 0.3rem 0;
    flex-shrink: 0;
    transition: opacity 0.2s;
}

.topbar-nav-title:hover {
    opacity: 0.8;
}

.topbar-nav-intended {
    font-size: 0.65rem;
    color: rgba(255,255,255,0.3);
    margin-right: auto;
    white-space: nowrap;
    padding: 0.3rem 0;
    flex-shrink: 0;
}

.topbar-nav-intended strong {
    color: rgba(255,255,255,0.5);
}

.topbar-nav-links {
    display: flex;
    gap: 0;
    flex-shrink: 0;
    overflow-x: auto;
    scrollbar-width: none;
}

.topbar-nav-links::-webkit-scrollbar {
    display: none;
}

.topbar-nav-links a {
    padding: 0.3rem 0.65rem;
    font-size: 0.68rem;
    font-weight: 600;
    color: rgba(255,255,255,0.35);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
    white-space: nowrap;
}

.topbar-nav-links a:hover {
    color: rgba(255,255,255,0.75);
}

.topbar-nav-links a.active {
    color: white;
    border-bottom-color: var(--magenta);
}

@media (max-width: 768px) {
    .topbar-nav-intended {
        display: none;
    }
    .topbar-nav-links a {
        padding: 0.3rem 0.45rem;
        font-size: 0.62rem;
    }
}

@media print {
    .topbar-nav {
        display: none;
    }
}

/* ── Export Buttons ── */

.export-btn-group {
    display: flex;
    gap: 4px;
    margin-right: 0.25rem;
}

.export-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border: 1.5px solid rgba(255,255,255,0.2);
    border-radius: 6px;
    background: transparent;
    color: rgba(255,255,255,0.6);
    font-family: 'Poppins', sans-serif;
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.export-btn:hover {
    border-color: rgba(255,255,255,0.5);
    color: white;
    background: rgba(255,255,255,0.08);
}

.export-btn:active {
    transform: scale(0.96);
}

.export-btn[disabled] {
    pointer-events: none;
}

.export-icon {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.export-label {
    transition: opacity 0.2s;
}

.export-spinner {
    display: none;
    width: 12px;
    height: 12px;
    border: 2px solid rgba(255,255,255,0.2);
    border-top-color: var(--magenta);
    border-radius: 50%;
    animation: export-spin 0.6s linear infinite;
    position: absolute;
    right: 8px;
}

.export-loading .export-label {
    opacity: 0.3;
}

.export-loading .export-spinner {
    display: block;
}

.export-loading .export-icon {
    opacity: 0.3;
}

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

/* Export toast notification */
.export-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--dark);
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 0.82rem;
    font-family: 'Nunito Sans', sans-serif;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    z-index: 10000;
    transition: opacity 0.3s;
}

.export-toast-error {
    background: #b91c1c;
}

.export-toast-fade {
    opacity: 0;
}

@media print {
    .export-btn-group {
        display: none;
    }
}

.footer {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--gray500);
    font-size: 0.8rem;
    border-top: 1px solid var(--gray100);
    margin-top: 3rem;
}


/* ============================================
 * tiles.css — Tile grid and metrics (Option E / Palette 2)
 * ============================================ */

.tiles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.25rem;
}

/* ── Base tile: full-color glass card ── */
.tile {
    border-radius: 14px;
    padding: 1.5rem;
    text-align: center;
    transition: transform 0.15s, box-shadow 0.15s;
    display: flex;
    flex-direction: column;
    color: white;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

/* Glass highlight removed — was causing visible vertical bar artifact */

.tile:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.18);
}

/* ── Palette 2: Medlive Purple + CME Blue (AA accessible) ──
 * All backgrounds tested for ≥4.5:1 contrast ratio with #fff.
 * Purple  #5E0EA0 → #7715C0  lightest = 7.2:1 ✓
 * Blue    #005A99 → #006BB3   lightest = 5.1:1 ✓
 * Magenta #9B1F8E → #7715C0   lightest = 7.2:1 ✓
 * Navy    #132D42 → #1A5276   lightest = 8.9:1 ✓
 */
.tile-audience   { background: linear-gradient(135deg, #5E0EA0, #7715C0); }
.tile-knowledge  { background: linear-gradient(135deg, #005A99, #006BB3); }
.tile-practice   { background: linear-gradient(135deg, #9B1F8E, #7715C0); }
.tile-funnel     { background: linear-gradient(135deg, #132D42, #1A5276); }

/* ── Label ── */
.tile .tile-label {
    flex-shrink: 0;
}

.tile-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255,255,255,0.85);
    margin-bottom: 0.75rem;
}

/* ── Hero value ── */
.tile .tile-value {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.tile-value {
    font-size: 2.8rem;
    font-weight: 900;
    color: white;
    margin-bottom: 0.5rem;
    line-height: 1;
}

/* ── Sub-stats ── */
.tile-stat {
    font-size: 0.78rem;
    color: rgba(255,255,255,0.9);
    line-height: 1.6;
}

.tile-stat strong {
    color: white;
}

/* ── Knowledge dual layout ── */
.tile .tile-ki-grid {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tile-ki-grid {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    flex: 1;
}

.tile-ki-cell {
    flex: 1;
    text-align: center;
    background: rgba(255,255,255,0.15);
    border-radius: 10px;
    padding: 12px 6px;
}

.tile-ki-number {
    font-size: 1.8rem;
    font-weight: 900;
    color: white;
    line-height: 1;
}

.tile-ki-sublabel {
    font-size: 0.7rem;
    font-weight: 600;
    color: rgba(255,255,255,0.9);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-top: 0.25rem;
}

.tile-ki-divider {
    display: none; /* replaced by pill-style cells */
}

.tile .tile-ki-detail {
    font-size: 0.76rem;
    color: white;
    margin-top: 0.5rem;
    line-height: 1.4;
}

/* ── Funnel bars (on dark bg) ── */
.tile .funnel-container {
    flex: 1;
}

.tile-funnel .funnel-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.tile-funnel .funnel-label,
.tile-funnel .funnel-value {
    color: rgba(255,255,255,0.92);
    font-size: 0.74rem;
}

.tile-funnel .funnel-value {
    font-weight: 700;
    color: white;
}

.tile-funnel .funnel-track {
    background: rgba(255,255,255,0.2);
}

.tile-funnel .funnel-bar {
    background: rgba(255,255,255,0.55);
}

/* ── Clickable hint ── */
.tile-clickable {
    cursor: pointer;
}

.tile-clickable::after {
    content: 'Click for details';
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.65rem;
    color: rgba(255,255,255,0.7);
    opacity: 0;
    transition: opacity 0.2s;
}

.tile-clickable:hover::after {
    opacity: 1;
}

/* ── Print: ensure tiles have backgrounds ── */
@media print {
    .tile {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
        box-shadow: none;
    }
}


/* ============================================
 * charts.css — Progress, funnel, donut, bar, and other charts
 * ============================================ */

.progress-container {
    margin: 1.5rem 0;
}

.progress-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.progress-label-text {
    color: var(--dark);
    font-weight: 600;
}

.progress-label-value {
    color: var(--purple);
    font-weight: 700;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background-color: var(--gray100);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--gradient);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.funnel-container {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-top: 1rem;
}

.funnel-item {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.funnel-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.funnel-label {
    font-size: 0.75rem;
    color: var(--gray700);
    font-weight: 600;
}

.funnel-value {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--dark);
}

.funnel-track {
    width: 100%;
    height: 18px;
    background: var(--gray100);
    border-radius: 4px;
    overflow: hidden;
}

.funnel-bar {
    height: 100%;
    background: var(--gradient);
    border-radius: 4px;
    min-width: 2px;
}

.chart-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    margin: 1.5rem 0;
    flex-wrap: wrap;
}

.donut-svg {
    width: 200px;
    height: 200px;
}

.donut-legend {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.donut-legend-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
}

.donut-legend-color {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.bar-chart {
    margin: 1.5rem 0;
}

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

.bar-label {
    min-width: 150px;
    font-size: 0.9rem;
    color: var(--dark);
    font-weight: 500;
}

.bar-container {
    flex: 1;
    height: 24px;
    background-color: var(--gray100);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.bar-fill {
    height: 100%;
    background: var(--gradient);
    border-radius: 4px;
    transition: width 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 0.75rem;
}

.bar-value {
    min-width: 50px;
    text-align: right;
    font-weight: 600;
    color: var(--dark);
    font-size: 0.9rem;
}

.pi-chart {
    margin: 1rem 0;
}

.pi-row {
    margin-bottom: 1rem;
}

.pi-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 0.3rem;
}

.pi-label {
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--dark);
    line-height: 1.3;
    flex: 1;
    padding-right: 1rem;
}

.pi-value {
    font-weight: 700;
    font-size: 0.88rem;
    color: var(--dark);
    white-space: nowrap;
}

.pi-pct {
    font-weight: 400;
    color: var(--gray500);
}

.pi-track {
    width: 100%;
    height: 20px;
    background: var(--gray100);
    border-radius: 6px;
    overflow: hidden;
}

.pi-bar {
    height: 100%;
    background: var(--gradient);
    border-radius: 6px;
    transition: width 0.4s ease;
    min-width: 4px;
}

/* ── Practice Impact: Stacked Horizontal Bar ── */

.pi-stacked-bar {
    height: 40px;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    margin: 1rem 0;
}

.pi-stacked-bar > div {
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.72rem;
    font-weight: 700;
    transition: width 0.4s ease;
    min-width: 0;
}

.pi-stacked-legend {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

.pi-stacked-legend-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.78rem;
    color: var(--gray700);
}

.pi-stacked-legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.pi-stacked-summary {
    font-size: 0.85rem;
    color: var(--gray500);
    margin-top: 0.75rem;
    text-align: center;
}

.badge {
    display: inline-block;
    background: var(--gray100);
    color: var(--purple);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.delta-badge {
    display: inline-block;
    padding: 0.5rem 0.75rem;
    background: var(--gray100);
    color: var(--green);
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.9rem;
    margin-top: 0.75rem;
}

.delta-badge.negative {
    color: #E74C3C;
}

/* ── Engagement: Option E (KPI Strip + Three Panels) ── */

.eng-kpi-strip {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

.eng-kpi {
    text-align: center;
    padding: 14px 8px;
    background: var(--purple50, #f3eafc);
    border-radius: 10px;
    transition: box-shadow 0.15s, transform 0.15s;
    cursor: pointer;
}

.eng-kpi:hover {
    box-shadow: 0 4px 12px rgba(94, 14, 160, 0.12);
    transform: translateY(-1px);
}

.eng-kpi-val {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--purple);
}

.eng-kpi-label {
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #7c3aed;
    margin-top: 2px;
}

.eng-kpi-sub {
    font-size: 0.66rem;
    color: var(--gray500);
    margin-top: 1px;
}

/* ── Detail panels row ── */

.eng-panels {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 16px;
}

.eng-panel {
    border: 1px solid var(--gray100, #e2e8f0);
    border-radius: 12px;
    padding: 18px;
    background: white;
    transition: box-shadow 0.15s, transform 0.15s;
}

.eng-panel-clickable {
    cursor: pointer;
}

.eng-panel-clickable:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-1px);
}

.eng-panel-title {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--purple);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.eng-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.eng-dot-purple { background: #5E0EA0; }
.eng-dot-blue { background: #005A99; }
.eng-dot-magenta { background: #9B1F8E; }

/* ── Row items ── */

.eng-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 0;
    font-size: 0.8rem;
}

.eng-row-label {
    color: var(--gray700, #475569);
    flex: 1;
    min-width: 0;
}

.eng-row-val {
    font-weight: 700;
    color: var(--dark, #1e293b);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.eng-row-bar {
    display: inline-block;
    width: 48px;
    height: 5px;
    background: var(--gray100, #e2e8f0);
    border-radius: 3px;
    overflow: hidden;
    vertical-align: middle;
}

.eng-row-fill {
    display: block;
    height: 100%;
    border-radius: 3px;
}

.eng-fill-purple { background: #5E0EA0; }
.eng-fill-blue { background: #005A99; }
.eng-fill-magenta { background: #9B1F8E; }

.eng-panel-footer {
    margin-top: 10px;
    font-size: 0.7rem;
    color: var(--gray500);
}

.eng-panel-empty {
    font-size: 0.82rem;
    color: var(--gray500);
    font-style: italic;
    padding: 12px 0;
}

/* ── Credential grid ── */

.eng-cred-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.eng-cred-card {
    background: var(--purple50, #f3eafc);
    border-radius: 8px;
    padding: 10px;
    text-align: center;
}

.eng-cred-group {
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--purple);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 6px;
}

.eng-cred-tag {
    display: inline-block;
    font-size: 0.62rem;
    font-weight: 700;
    color: white;
    background: var(--purple);
    border-radius: 10px;
    padding: 2px 8px;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.eng-cred-tag-target {
    background: linear-gradient(135deg, var(--purple), #9B1F8E);
}

.eng-cred-stats {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.eng-cred-stat {
    flex: 1;
}

.eng-cred-val {
    font-size: 1rem;
    font-weight: 800;
    color: var(--purple);
}

.eng-cred-label {
    font-size: 0.6rem;
    color: #7c3aed;
    font-weight: 600;
}

.eng-cred-target {
    background: linear-gradient(135deg, rgba(94,14,160,0.08), rgba(155,31,142,0.08));
    border: 1px solid rgba(94,14,160,0.15);
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .eng-kpi-strip {
        grid-template-columns: repeat(3, 1fr);
    }
    .eng-panels {
        grid-template-columns: 1fr;
    }
}

/* ── Legacy (keep for backwards compat) ── */
.engagement-metrics-row { display: none; }
.engagement-metric-card { display: none; }
.progress-container.clickable:hover { opacity: 0.85; }

.region-chart {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin: 1rem 0;
}

.region-segment {
    flex: 1;
    min-width: 100px;
    text-align: center;
    padding: 0.75rem;
    border-radius: var(--radius);
    background: var(--gray50);
}

.region-segment .region-pct {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--purple);
}

.region-segment .region-name {
    font-size: 0.75rem;
    color: var(--gray500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.patient-reach-callout {
    background: linear-gradient(135deg, #F8F4FF, #EEE8F8);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin: 1.5rem 0;
    text-align: center;
    border: 1px solid #E0D4F0;
}

.patient-reach-headline {
    font-size: 2rem;
    font-weight: 700;
    color: var(--purple);
}

.patient-reach-sub {
    font-size: 1rem;
    color: var(--gray700);
    margin-top: 0.25rem;
}

.patient-reach-detail {
    font-size: 0.85rem;
    color: var(--gray500);
    margin-top: 0.75rem;
}

/* ── Education Engagement Chart ── */

.view-retention-card {
    padding: 1.25rem;
    margin-bottom: 1rem;
}

.view-retention-card:last-child {
    margin-bottom: 0;
}

.vr-video-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gray700);
    margin-bottom: 0.75rem;
}

.vr-cohort-toggles {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.vr-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 20px;
    border: 2px solid var(--gray100);
    background: white;
    cursor: pointer;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--gray500);
    transition: all 0.15s ease;
    user-select: none;
}

.vr-toggle:hover {
    border-color: var(--gray500);
}

.vr-toggle.active {
    border-color: currentColor;
    background: var(--gray50);
}

.vr-toggle:not(.active) .vr-swatch {
    opacity: 0.3;
}

.vr-toggle .vr-swatch {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.vr-toggle .vr-count {
    font-weight: 400;
    color: var(--gray500);
}

.vr-canvas-wrap {
    position: relative;
    width: 100%;
}

.vr-canvas-wrap canvas {
    display: block;
    width: 100%;
    cursor: crosshair;
}

.vr-tooltip {
    position: fixed;
    padding: 10px 14px;
    background: var(--dark);
    color: white;
    border-radius: 8px;
    font-size: 0.78rem;
    pointer-events: none;
    z-index: 1000;
    min-width: 160px;
    opacity: 0;
    transition: opacity 0.1s;
    box-shadow: 0 4px 16px rgba(0,0,0,0.25);
    line-height: 1.4;
}

.vr-tooltip.visible {
    opacity: 1;
}


/* ============================================
 * tables.css — Data tables and table styles
 * ============================================ */

.data-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 0.9rem;
}

.data-table thead {
    background-color: var(--gray100);
}

.data-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--dark);
    border-bottom: 2px solid var(--gray100);
}

.data-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--gray100);
    color: var(--gray700);
}

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

.sortable-th {
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
    position: relative;
    padding-right: 1.5rem !important;
}

.sortable-th:hover {
    background: var(--gray50);
}

.sortable-th::after {
    content: '\2195';
    position: absolute;
    right: 0.4rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.7rem;
    color: var(--gray500);
}

.sortable-th.sort-asc::after {
    content: '\25B2';
    color: var(--purple);
}

.sortable-th.sort-desc::after {
    content: '\25BC';
    color: var(--purple);
}

.status-yes {
    display: inline-block;
    background: #E8F8E8;
    color: #27AE60;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 600;
}

.status-no {
    display: inline-block;
    background: var(--gray100);
    color: var(--gray500);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 600;
}

.state-detail-summary {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.state-detail-stat {
    text-align: center;
}

.state-detail-stat .stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--purple);
}

.state-detail-stat .stat-label {
    font-size: 0.75rem;
    color: var(--gray500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Response distribution table styles */
.response-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    margin: 0.75rem 0;
}

.response-table th {
    text-align: left;
    font-size: 0.75rem;
    color: var(--gray500);
    font-weight: 600;
    padding: 6px 8px;
    border-bottom: 2px solid var(--gray200);
}

.response-table td {
    padding: 6px 8px;
    border-bottom: 1px solid var(--gray100);
}

.response-table .correct-row {
    background: #f0fdf4;
}

.response-table .correct-row td:first-child {
    font-weight: 600;
    color: #15803d;
}

.response-table .positive {
    color: #15803d;
    font-weight: 600;
}

.response-table .negative {
    color: #dc2626;
    font-weight: 600;
}

.chi-square-line {
    font-size: 0.8rem;
    color: var(--gray500);
    margin-top: 0.5rem;
}

/* Learning Gains — Option A: Gradient Accent Cards */
.lg-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}
.lg-grid.lg-single {
    grid-template-columns: 1fr;
}

.lg-card {
    border-radius: 12px;
    padding: 24px 28px;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
}
.lg-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}
.lg-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
}

/* Intended Specialty — blue/cyan accent */
.lg-intended {
    background: linear-gradient(135deg, #eff6ff 0%, #f0f9ff 100%);
    border: 1px solid #bfdbfe;
}
.lg-intended::before {
    background: linear-gradient(90deg, #3b82f6, #06b6d4);
}
.lg-intended .lg-card-title {
    color: #2563eb;
}

/* Other Professionals — purple/pink accent */
.lg-other {
    background: linear-gradient(135deg, #faf5ff 0%, #fdf4ff 100%);
    border: 1px solid #e9d5ff;
}
.lg-other::before {
    background: linear-gradient(90deg, #8b5cf6, #d946ef);
}
.lg-other .lg-card-title {
    color: #7c3aed;
}

.lg-card-title {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 4px;
}

.lg-card-spec {
    font-size: 0.75rem;
    color: #94a3b8;
    margin-bottom: 16px;
}

.lg-small-sample {
    background: #fef3c7;
    border: 1px solid #f59e0b;
    border-radius: 6px;
    padding: 6px 10px;
    margin-bottom: 12px;
    font-size: 0.78rem;
    color: #92400e;
}

.lg-metrics {
    display: flex;
    gap: 0;
}

.lg-metric {
    flex: 1;
    text-align: center;
}
.lg-metric + .lg-metric {
    border-left: 1px solid rgba(0, 0, 0, 0.06);
}

.lg-metric-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #94a3b8;
    font-weight: 700;
    margin-bottom: 6px;
}

.lg-metric-value {
    font-size: 1.6rem;
    font-weight: 800;
    color: #1e293b;
}

.lg-metric-delta {
    color: #059669 !important;
    background: #ecfdf5;
    border-radius: 8px;
    padding: 4px 0;
    display: inline-block;
    min-width: 80px;
}

.lg-card-detail {
    font-size: 0.72rem;
    color: #94a3b8;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px dashed rgba(0, 0, 0, 0.08);
}

.lg-card-click {
    font-size: 0.68rem;
    color: #3b82f6;
    font-weight: 600;
    margin-top: 10px;
    opacity: 0;
    transition: opacity 0.15s;
}
.lg-card:hover .lg-card-click {
    opacity: 1;
}

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

.tile-ki-detail {
    font-size: 0.65rem;
    color: var(--gray500);
    margin-top: 4px;
    text-align: center;
}


/* ============================================
 * cards.css — Card grids and card components
 * ============================================ */

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin: 1.5rem 0;
}

.themed-card {
    background: white;
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--purple);
    transition: box-shadow 0.2s, transform 0.2s;
}

.themed-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

.themed-card-title {
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 0.75rem;
}

.themed-card-text {
    color: var(--gray700);
    font-size: 0.9rem;
    font-style: italic;
}

.themed-card-meta {
    margin-top: 1rem;
    font-size: 0.8rem;
    color: var(--gray500);
}

.question-block {
    background: white;
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    margin-bottom: 1.5rem;
    transition: box-shadow 0.2s, transform 0.2s;
}

.question-block:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

.question-text {
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.question-user-counts {
    font-size: 0.8rem;
    color: var(--gray500);
    margin-bottom: 1rem;
}

.question-comparison {
    display: flex;
    gap: 2rem;
    align-items: flex-end;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.comparison-group {
    flex: 1;
    min-width: 200px;
}

.comparison-title {
    font-size: 0.85rem;
    color: var(--gray500);
    font-weight: 600;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.comparison-bars {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.comparison-bar-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
}

.comparison-label {
    min-width: 80px;
    color: var(--gray700);
}

.comparison-bar {
    flex: 1;
    height: 20px;
    background-color: var(--gray100);
    border-radius: 3px;
    overflow: hidden;
    min-width: 80px;
}

.comparison-fill-pre {
    background: #A0D995;
    height: 100%;
}

.comparison-fill-post {
    background: var(--purple);
    height: 100%;
}

.comparison-value {
    min-width: 45px;
    text-align: right;
    font-weight: 600;
    color: var(--dark);
}

.info-box {
    background: linear-gradient(135deg, rgba(119, 21, 192, 0.1), rgba(203, 49, 174, 0.1));
    border-left: 4px solid var(--purple);
    padding: 1rem 1.5rem;
    border-radius: var(--radius);
    margin: 1.5rem 0;
    font-size: 0.9rem;
    color: var(--gray700);
}


/* ============================================
 * map.css — State map and legend styles
 * ============================================ */

.state-map-container {
    position: relative;
    width: 100%;
}

.state-map-container svg {
    width: 100%;
    height: auto;
    display: block;
}

.state-map-container path {
    transition: opacity 0.2s;
    cursor: pointer;
    stroke: white;
    stroke-width: 1;
}

.state-map-container path:hover {
    opacity: 0.8;
    stroke-width: 2;
}

.state-tooltip {
    position: absolute;
    background: var(--dark);
    color: white;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
    pointer-events: none;
    white-space: nowrap;
    z-index: 10;
    display: none;
}

.state-legend {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 1.5rem;
    font-size: 0.85rem;
    color: var(--gray500);
}

.state-legend-bar {
    flex: 1;
    height: 20px;
    border-radius: 4px;
    background: linear-gradient(to right, #EEF0F6, #D4A8E8, #9B4FD0, #7715C0);
}

.state-legend-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--gray500);
    margin-top: 0.5rem;
}


/* ============================================
 * insights.css — AI insights and analysis components
 * ============================================ */

.ai-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: var(--gradient);
    color: white;
    padding: 0.2rem 0.6rem;
    border-radius: 10px;
    margin-left: 0.75rem;
    vertical-align: middle;
}

.insights-card {
    background: linear-gradient(135deg, rgba(119, 21, 192, 0.04) 0%, rgba(203, 49, 174, 0.04) 100%);
    border: 1px solid rgba(119, 21, 192, 0.15);
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem;
}

.insights-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.insights-icon {
    width: 20px;
    height: 20px;
    color: var(--purple);
    flex-shrink: 0;
}

.insights-title {
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: var(--dark);
}

.insights-body {
    font-size: 0.92rem;
    line-height: 1.65;
    color: var(--gray700);
}

.insights-body p { margin: 0 0 0.6rem; }
.insights-body p:last-child { margin-bottom: 0; }

.insights-section-header {
    font-family: 'Poppins', sans-serif;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--dark);
    margin: 1.25rem 0 0.4rem;
    padding-bottom: 0.25rem;
    border-bottom: 1px solid rgba(119, 21, 192, 0.12);
}

.insights-body .insights-section-header:first-child { margin-top: 0; }

.insights-body ul {
    margin: 0 0 0.75rem;
    padding-left: 1.25rem;
}

.insights-body li {
    margin-bottom: 0.35rem;
    font-size: 0.9rem;
    line-height: 1.55;
}

.ai-timestamp {
    font-size: 0.7rem;
    color: var(--gray500);
    margin-left: auto;
    font-weight: 400;
}

/* ── Option D: Executive Brief ── */

.insights-card-v2 {
    padding: 1.5rem;
}

.insights-callouts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.75rem;
    margin: 1rem 0 1.25rem;
}

.insights-callout {
    border-radius: var(--radius);
    padding: 0.85rem 1rem;
    transition: transform 0.15s, box-shadow 0.15s;
}

.insights-callout:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

.insights-callout-value {
    font-size: 1.75rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 0.15rem;
}

.insights-callout-label {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--gray500);
    margin-bottom: 0.25rem;
}

.insights-callout-detail {
    font-size: 0.78rem;
    color: var(--gray700);
    line-height: 1.35;
}

.insights-top-cards {
    margin: 1rem 0 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* Strengths & Weaknesses split */
.insights-sw-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.insights-sw-card {
    border-radius: var(--radius);
    padding: 0.85rem 1rem;
}

.insights-sw-strengths {
    background: #f0fdf4;
    border-left: 4px solid #16a34a;
}

.insights-sw-weaknesses {
    background: #fef2f2;
    border-left: 4px solid #dc2626;
}

.insights-sw-title {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.insights-sw-title-good { color: #166534; }
.insights-sw-title-risk { color: #991b1b; }
.insights-sw-title-warn { color: #92400e; }

.insights-sw-anomalies {
    background: #fffbeb;
    border-left: 4px solid #f59e0b;
}

.insights-sw-anomalies .insights-sw-list li { color: #92400e; }

.insights-sw-list {
    margin: 0;
    padding-left: 1.1rem;
}

.insights-sw-list li {
    font-size: 0.82rem;
    line-height: 1.5;
    margin-bottom: 0.3rem;
}

.insights-sw-strengths .insights-sw-list li { color: #166534; }
.insights-sw-weaknesses .insights-sw-list li { color: #991b1b; }

/* Accordion sections */
.insights-sections {
    border: 1px solid var(--gray100);
    border-radius: var(--radius);
    overflow: hidden;
}

.insights-accordion + .insights-accordion {
    border-top: 1px solid var(--gray100);
}

.insights-accordion-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.65rem 1rem;
    cursor: pointer;
    user-select: none;
    transition: background 0.15s;
}

.insights-accordion-header:hover {
    background: rgba(94,14,160,0.04);
}

.insights-accordion-left {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.insights-accordion-icon {
    width: 18px;
    height: 18px;
    color: var(--purple);
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.insights-accordion-icon svg {
    width: 18px;
    height: 18px;
}

.insights-accordion-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--dark);
}

.insights-accordion-chevron {
    font-size: 0.6rem;
    color: var(--gray500);
    transition: transform 0.2s;
}

.insights-accordion.open .insights-accordion-chevron {
    transform: rotate(90deg);
}

.insights-accordion-body {
    display: none;
    padding: 0 1rem 0.75rem 2.75rem;
}

.insights-accordion.open .insights-accordion-body {
    display: block;
}

.insights-accordion-body ul {
    margin: 0;
    padding-left: 1rem;
}

.insights-accordion-body li {
    font-size: 0.82rem;
    line-height: 1.55;
    color: var(--gray700);
    margin-bottom: 0.3rem;
}

@media (max-width: 768px) {
    .insights-callouts {
        grid-template-columns: 1fr;
    }
    .insights-sw-grid {
        grid-template-columns: 1fr;
    }
}

.ai-content-timestamp {
    font-size: 0.75rem;
    color: var(--gray500);
    margin-bottom: 1rem;
    font-style: italic;
}

.oe-card {
    margin-bottom: 1.5rem;
}

.oe-question {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 0.3rem;
}

.oe-meta {
    font-size: 0.8rem;
    color: var(--gray500);
    margin-bottom: 1rem;
}

.oe-error {
    color: var(--gray500);
    font-style: italic;
    font-size: 0.9rem;
}

.oe-sentiment-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.oe-sentiment-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: white;
    padding: 0.2rem 0.6rem;
    border-radius: 10px;
    flex-shrink: 0;
}

.oe-sentiment-summary {
    font-size: 0.9rem;
    color: var(--gray700);
}

.oe-takeaway {
    font-size: 0.9rem;
    color: var(--dark);
    background: var(--gray50);
    border-left: 3px solid var(--purple);
    padding: 0.75rem 1rem;
    border-radius: 0 var(--radius) var(--radius) 0;
    margin-bottom: 1rem;
}

.oe-themes-header, .oe-quotes-header {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--gray500);
    margin-bottom: 0.5rem;
    margin-top: 1rem;
}

.oe-themes {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.oe-theme {
    background: var(--gray50);
    border-radius: var(--radius);
    padding: 0.75rem 1rem;
}

.oe-theme-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 0.25rem;
}

.oe-theme-title {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--dark);
}

.oe-theme-prev {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: capitalize;
}

.oe-theme-summary {
    font-size: 0.85rem;
    color: var(--gray700);
    line-height: 1.4;
}

.oe-quotes {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.oe-quote {
    font-size: 0.85rem;
    color: var(--gray700);
    font-style: italic;
    border-left: 2px solid var(--gray100);
    padding: 0.4rem 0.75rem;
    margin: 0;
    line-height: 1.4;
}

.gap-item {
    background: #FFF8F0;
    border: 1px solid #F0DFC8;
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
    margin-bottom: 0.75rem;
}

.gap-item .gap-question {
    font-size: 0.9rem;
    color: var(--dark);
    margin-bottom: 0.5rem;
}

.gap-item .gap-stats {
    font-size: 0.85rem;
    color: var(--gray500);
}

.gap-item .gap-pct {
    font-size: 1.1rem;
    font-weight: 700;
    color: #E67E22;
}


/* ============================================
 * ds-command-center.css — DS Command Center dashboard styles
 * ============================================ */

/* ── DS Dashboard Container ── */

.ds-dashboard {
    max-width: 1280px;
    margin: 0 auto;
    padding: 1rem 1.5rem 3rem;
}

/* ── Header ── */

.ds-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 2rem;
    padding: 1.5rem 2rem;
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 1.25rem;
}

.ds-header-left {
    flex: 1;
    min-width: 0;
}

.ds-program-name {
    font-family: 'Poppins', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 0.35rem;
    line-height: 1.3;
}

.ds-header-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.ds-client {
    font-weight: 600;
    color: var(--gray700);
    font-size: 0.95rem;
}

.ds-pill {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 999px;
    background: var(--purple50);
    color: var(--purple);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.ds-days-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 999px;
    background: #dbeafe;
    color: #1d4ed8;
    font-size: 0.75rem;
    font-weight: 700;
}

.ds-days-badge.ds-days-ended {
    background: var(--gray100);
    color: var(--gray500);
}

.ds-header-dates {
    display: flex;
    gap: 1rem;
    font-size: 0.82rem;
    color: var(--gray500);
}

.ds-header-dates span::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--gray100);
    margin-right: 5px;
    vertical-align: middle;
}

.ds-header-right {
    flex-shrink: 0;
}

/* ── Team ── */

.ds-team {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    text-align: right;
}

.ds-team-member {
    font-size: 0.82rem;
    color: var(--gray700);
}

.ds-team-role {
    font-weight: 600;
    color: var(--gray500);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-right: 0.3rem;
}

/* ── KPI Strip ── */

.ds-kpi-strip {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.ds-kpi-card {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1rem 1.1rem;
    text-align: center;
    min-width: 0;
}

.ds-kpi-label {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--gray500);
    margin-bottom: 0.25rem;
}

.ds-kpi-value {
    font-family: 'Poppins', sans-serif;
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--dark);
    line-height: 1.2;
}

.ds-kpi-sub {
    font-size: 0.78rem;
    color: var(--gray500);
    margin-top: 0.2rem;
}

.ds-kpi-progress {
    height: 5px;
    background: var(--gray100);
    border-radius: 3px;
    margin-top: 0.5rem;
    overflow: hidden;
}

.ds-kpi-progress-bar {
    height: 100%;
    border-radius: 3px;
    transition: width 0.6s ease;
}

.ds-kpi-pct {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--gray500);
    margin-top: 2px;
    display: block;
}

/* ── KPI Status Badges ── */

.ds-kpi-status {
    display: inline-block;
    padding: 1px 8px;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    vertical-align: middle;
    margin-left: 0.25rem;
}

.ds-status-met {
    background: #d1fae5;
    color: #065f46;
}

.ds-status-ontrack {
    background: #fef3c7;
    color: #92400e;
}

.ds-status-behind {
    background: #fee2e2;
    color: #991b1b;
}

.ds-status-unknown {
    background: var(--gray100);
    color: var(--gray500);
}

/* ── Three-Panel Grid ── */

.ds-panels {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.ds-panel {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.25rem 1.5rem;
}

.ds-panel-title {
    font-family: 'Poppins', sans-serif;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--gray100);
}

/* ── Video Performance ── */

.ds-video-summary {
    display: flex;
    gap: 1.25rem;
    margin-bottom: 0.75rem;
    font-size: 0.85rem;
    color: var(--gray700);
}

.ds-video-stat strong {
    color: var(--dark);
}

.ds-video-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
}

.ds-video-table thead th {
    text-align: left;
    padding: 0.5rem 0.6rem;
    font-weight: 600;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--gray500);
    border-bottom: 2px solid var(--gray100);
}

.ds-video-table tbody td {
    padding: 0.55rem 0.6rem;
    border-bottom: 1px solid var(--gray100);
    vertical-align: middle;
}

.ds-video-title {
    max-width: 260px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 500;
    color: var(--dark);
}

.ds-video-num {
    text-align: right;
    color: var(--gray700);
    white-space: nowrap;
}

.ds-completion-bar-wrap {
    display: inline-block;
    width: 60px;
    height: 6px;
    background: var(--gray100);
    border-radius: 3px;
    overflow: hidden;
    vertical-align: middle;
    margin-right: 0.4rem;
}

.ds-completion-bar {
    height: 100%;
    border-radius: 3px;
    transition: width 0.5s ease;
}

/* ── Audience Quality ── */

.ds-audience-rings {
    display: flex;
    justify-content: center;
    gap: 2rem;
    padding: 0.5rem 0 0.75rem;
}

.ds-ring-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.ds-ring-svg {
    display: block;
    margin-bottom: 0.4rem;
}

.ds-ring-label {
    text-align: center;
}

.ds-ring-value {
    font-family: 'Poppins', sans-serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--dark);
}

.ds-ring-name {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--gray500);
}

.ds-ring-count {
    font-size: 0.78rem;
    color: var(--gray500);
    margin-top: 0.15rem;
}

.ds-audience-target {
    text-align: center;
    font-size: 0.82rem;
    color: var(--gray500);
    border-top: 1px solid var(--gray100);
    padding-top: 0.6rem;
    margin-top: 0.4rem;
}

/* ── Social & Reach ── */

.ds-social-metric {
    text-align: center;
    padding: 0.5rem 0;
}

.ds-social-value {
    font-family: 'Poppins', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--dark);
    line-height: 1.1;
}

.ds-social-label {
    font-size: 0.78rem;
    color: var(--gray500);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-top: 0.15rem;
}

.ds-social-goal {
    margin-top: 0.75rem;
}

.ds-social-goal-label {
    font-size: 0.82rem;
    color: var(--gray700);
    margin-bottom: 0.35rem;
}

.ds-social-progress {
    height: 8px;
    background: var(--gray100);
    border-radius: 4px;
    overflow: hidden;
}

.ds-social-progress-bar {
    height: 100%;
    border-radius: 4px;
    transition: width 0.6s ease;
}

.ds-social-pct {
    font-size: 0.78rem;
    color: var(--gray500);
    margin-top: 0.3rem;
    text-align: center;
}

.ds-social-status {
    text-align: center;
    margin-top: 0.5rem;
}

/* ── Timeline Chart ── */

.ds-timeline-section {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.25rem;
}

.ds-timeline-chart-wrap {
    width: 100%;
    overflow: hidden;
}

.ds-timeline-chart-wrap canvas {
    display: block;
    width: 100%;
}

/* ── Questions Section ── */

.ds-questions-section {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.25rem;
}

.ds-question-card {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--gray100);
}

.ds-question-card:last-child {
    border-bottom: none;
}

.ds-question-text {
    font-weight: 600;
    font-size: 0.88rem;
    color: var(--dark);
    margin-bottom: 0.25rem;
}

.ds-question-meta {
    font-size: 0.75rem;
    color: var(--gray500);
    margin-bottom: 0.5rem;
}

/* ── Answer Distribution Bars ── */

.ds-answer-dist {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.ds-answer-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.ds-answer-text {
    flex: 0 0 200px;
    font-size: 0.8rem;
    color: var(--gray700);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ds-answer-bar-wrap {
    flex: 1;
    height: 8px;
    background: var(--gray100);
    border-radius: 4px;
    overflow: hidden;
}

.ds-answer-bar {
    height: 100%;
    border-radius: 4px;
    background: var(--purple);
    transition: width 0.5s ease;
}

.ds-answer-pct {
    flex: 0 0 40px;
    text-align: right;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--gray500);
}

/* ── No Data ── */

.ds-no-data {
    text-align: center;
    padding: 1.5rem;
    color: var(--gray500);
    font-size: 0.88rem;
    font-style: italic;
}

/* ── Responsive ── */

@media (max-width: 1024px) {
    .ds-kpi-strip {
        grid-template-columns: repeat(3, 1fr);
    }
    .ds-panels {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .ds-header {
        flex-direction: column;
        gap: 1rem;
    }
    .ds-team {
        text-align: left;
    }
    .ds-kpi-strip {
        grid-template-columns: repeat(2, 1fr);
    }
    .ds-header-dates {
        flex-direction: column;
        gap: 0.25rem;
    }
    .ds-answer-text {
        flex: 0 0 120px;
    }
}

@media print {
    .ds-dashboard {
        padding: 0;
    }
    .ds-header,
    .ds-kpi-card,
    .ds-panel,
    .ds-timeline-section,
    .ds-questions-section {
        box-shadow: none;
        break-inside: avoid;
    }
}


/* ============================================
 * modals.css — Modal dialogs and overlays
 * ============================================ */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(26,26,46,0.5);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background: white;
    border-radius: var(--radius);
    padding: 2rem;
    max-width: 700px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(26,26,46,0.3);
}

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

.modal-header h3 {
    font-size: 1.25rem;
    color: var(--dark);
    font-weight: 700;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--gray500);
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

.modal-close:hover {
    background: var(--gray100);
    color: var(--dark);
}

.modal-section {
    margin-bottom: 1.5rem;
}

.modal-section h4 {
    font-size: 0.9rem;
    color: var(--gray500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.modal-section p {
    font-size: 0.9rem;
    color: var(--gray700);
    line-height: 1.7;
}

.modal-formula {
    background: var(--gray50);
    border: 1px solid var(--gray100);
    border-radius: 8px;
    padding: 1rem 1.25rem;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    color: var(--dark);
    margin: 0.75rem 0;
}

.modal-data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    margin: 0.75rem 0;
}

.modal-data-table th {
    background: var(--gray100);
    padding: 0.5rem 0.75rem;
    text-align: left;
    font-weight: 600;
    color: var(--dark);
}

.modal-data-table td {
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid var(--gray100);
    color: var(--gray700);
}

.modal-content.modal-wide {
    max-width: 960px;
}

.diag-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid var(--purple);
    background: white;
    color: var(--purple);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 0.75rem;
    transition: all 0.2s;
    vertical-align: middle;
    position: relative;
    top: -2px;
}

.diag-btn:hover {
    background: var(--purple);
    color: white;
}

.diag-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
}

.diag-table th {
    background: var(--gray100);
    padding: 0.5rem 0.6rem;
    text-align: left;
    font-weight: 600;
    color: var(--dark);
    position: sticky;
    top: 0;
    z-index: 1;
}

.diag-table td {
    padding: 0.4rem 0.6rem;
    border-bottom: 1px solid var(--gray100);
    color: var(--gray700);
    vertical-align: top;
}

.diag-table tr:hover td {
    background: var(--gray50);
}

.diag-cat-pill {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 600;
    margin: 1px 2px;
    white-space: nowrap;
}

.diag-cat-knowledge {
    background: #E3F2FD;
    color: #1565C0;
}

.diag-cat-practice {
    background: #E8F5E9;
    color: #2E7D32;
}

.diag-cat-polling {
    background: #FFF3E0;
    color: #E65100;
}

.diag-cat-patient {
    background: #F3E5F5;
    color: #7B1FA2;
}

.diag-cat-yip {
    background: #E0F7FA;
    color: #00695C;
}

.diag-cat-practype {
    background: #FFF8E1;
    color: #F57F17;
}

.diag-cat-eval {
    background: var(--gray100);
    color: var(--gray500);
}

.diag-cat-uncat {
    background: #FFEBEE;
    color: #C62828;
}

.diag-cat-impact {
    background: #EDE7F6;
    color: #4527A0;
}

.diag-expand-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.7rem;
    color: var(--purple);
    padding: 2px 6px 2px 0;
    vertical-align: middle;
}

.diag-expand-btn:hover {
    color: var(--magenta);
}

.diag-detail-row td {
    padding: 0 !important;
}

.diag-detail-content {
    padding: 1rem 1.5rem;
    background: var(--gray50);
    border-bottom: 2px solid var(--gray100);
    font-size: 0.85rem;
}

.diag-detail-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 0.25rem;
    font-size: 0.8rem;
}

.diag-detail-table th {
    text-align: left;
    padding: 4px 8px;
    border-bottom: 1px solid var(--gray100);
    font-weight: 600;
    color: var(--gray500);
    font-size: 0.75rem;
    text-transform: uppercase;
}

.diag-detail-table td {
    padding: 3px 8px;
    border-bottom: 1px solid var(--gray50);
}

.kg-detail-table td {
    font-size: 0.82rem;
}

.kg-detail-table th {
    font-size: 0.75rem;
}

.diag-summary {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--gray100);
}

.diag-summary-item {
    text-align: center;
}

.diag-summary-item .diag-sum-val {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--purple);
}

.diag-summary-item .diag-sum-label {
    font-size: 0.7rem;
    color: var(--gray500);
    text-transform: uppercase;
}

/* ── Modal Table (filterable, sortable, exportable) ── */

.mt-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.mt-toolbar-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.mt-toolbar-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.mt-row-count {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--dark);
}

.mt-filtered-badge {
    display: inline-block;
    background: #fef3c7;
    color: #92400e;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.72rem;
    font-weight: 600;
    margin-left: 4px;
}

.mt-clear-filters {
    background: none;
    border: 1px solid var(--gray200, #e2e8f0);
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 0.75rem;
    color: var(--gray500);
    cursor: pointer;
    transition: all 0.15s;
}

.mt-clear-filters:hover {
    background: var(--gray100);
    color: var(--dark);
}

.mt-export-btn {
    background: var(--purple);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 6px 14px;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}

.mt-export-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.mt-filter-row th {
    padding: 4px 4px 8px !important;
    background: white !important;
    border-bottom: 2px solid var(--gray100) !important;
    position: relative;
}

.mt-filter-select {
    width: 100%;
    padding: 3px 6px;
    border: 1px solid var(--gray200, #e2e8f0);
    border-radius: 4px;
    font-size: 0.72rem;
    color: var(--gray700);
    background: white;
    cursor: pointer;
    appearance: auto;
}

.mt-filter-select.mt-filter-active {
    border-color: var(--purple);
    background: #f8f4ff;
    font-weight: 600;
    color: var(--purple);
}

.mt-filter-select:focus {
    outline: none;
    border-color: var(--purple);
    box-shadow: 0 0 0 2px rgba(94, 14, 160, 0.1);
}

.mt-filter-clear {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--purple);
    color: white;
    border: none;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    font-size: 0.65rem;
    line-height: 16px;
    text-align: center;
    cursor: pointer;
    padding: 0;
}

.mt-filter-clear:hover {
    background: var(--dark);
}

.moore-ladder {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin: 1rem 0;
}

.moore-rung {
    display: flex;
    align-items: stretch;
    min-height: 80px;
    border-left: 4px solid var(--purple);
    position: relative;
}

.moore-rung:last-child {
    border-left-color: var(--gray100);
}

.moore-level-badge {
    flex-shrink: 0;
    width: 90px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 0.5rem;
}

.moore-level-num {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--purple);
}

.moore-level-label {
    font-size: 0.65rem;
    color: var(--gray500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: center;
    line-height: 1.2;
    margin-top: 2px;
}

.moore-rung-body {
    flex: 1;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--gray100);
}

.moore-rung-body h4 {
    font-size: 0.95rem;
    color: var(--dark);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.moore-metric-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.moore-metric-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--purple);
    min-width: 60px;
}

.moore-metric-label {
    font-size: 0.85rem;
    color: var(--gray700);
}

.moore-rung.moore-empty .moore-level-num {
    color: var(--gray500);
}

.moore-rung.moore-empty .moore-rung-body {
    opacity: 0.5;
}

.moore-rung.moore-empty {
    border-left-color: var(--gray100);
}


/* ============================================
 * responsive.css — Mobile and responsive styles
 * ============================================ */

@media (max-width: 768px) {
    .dashboard-container {
        padding: 1rem 0.75rem;
    }

    .dashboard-topbar {
        padding: 0.6rem 1rem;
    }

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

    .hero-banner {
        padding: 1.5rem;
    }

    .hero-title {
        font-size: 1.5rem;
    }

    .hero-meta {
        flex-direction: column;
        gap: 0.5rem;
    }

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

    .chart-container {
        flex-direction: column;
        gap: 1rem;
    }

    .donut-svg {
        width: 150px;
        height: 150px;
    }

    .bar-label {
        min-width: 100px;
        font-size: 0.85rem;
    }

    .question-comparison {
        flex-direction: column;
        gap: 1rem;
    }

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

    .card {
        padding: 1rem;
    }
}


/* ============================================
 * print.css — Print styles and media queries
 * ============================================ */

@media print {
    #passwordGate {
        display: none !important;
    }

    .dashboard-topbar {
        background: white !important;
        border-bottom: 2px solid var(--gray100);
    }

    .dashboard-topbar-logo {
        filter: none !important;
        opacity: 1 !important;
    }

    .dashboard-topbar-label {
        color: var(--dark) !important;
    }

    body {
        background: white;
        font-size: 11pt;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .card, .tile, .question-block, .themed-card {
        box-shadow: none;
        border: 1px solid var(--gray100);
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .dashboard-container {
        max-width: 100%;
        padding: 0 1rem;
    }

    .section {
        break-inside: avoid;
        page-break-inside: avoid;
        margin-bottom: 2rem;
    }

    .hero-banner {
        break-inside: avoid;
        page-break-inside: avoid;
        background: var(--gradient) !important;
    }

    .state-tooltip {
        display: none !important;
    }

    .state-map-container path:hover {
        opacity: 1;
    }

    .state-legend-bar {
        background: linear-gradient(to right, #EEF0F6, #D4A8E8, #9B4FD0, #7715C0) !important;
    }

    .comparison-fill-pre, .comparison-fill-post, .bar-fill, .progress-fill {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .section-header h2::after {
        display: none;
    }

    .modal-overlay {
        display: none !important;
    }

    .tile-clickable::after {
        display: none;
    }

    .diag-btn {
        display: none;
    }
}


