@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
    --bg: #f4f6f9;
    --bg-white: #ffffff;
    --bg-subtle: #eef1f6;
    --border: #dce1ea;
    --border-strong: #c2cad8;

    --text-primary: #111827;
    --text-secondary: #374151;
    --text-muted: #6b7280;
    --text-light: #9ca3af;

    --blue: #1e40af;
    --blue-mid: #2563eb;
    --blue-light: #eff6ff;
    --blue-border: #bfdbfe;

    --cat-oral: #065f46;
    --cat-oral-bg: #ecfdf5;
    --cat-oral-border: #a7f3d0;
    --cat-gene: #1e3a8a;
    --cat-gene-bg: #eff6ff;
    --cat-gene-border: #bfdbfe;
    --cat-aso-ns: #7f1d1d;
    --cat-aso-ns-bg: #fef2f2;
    --cat-aso-ns-border: #fecaca;
    --cat-aso-sel: #4c1d95;
    --cat-aso-sel-bg: #f5f3ff;
    --cat-aso-sel-border: #ddd6fe;

    --pos-high: #15803d;
    --pos-medium: #b45309;
    --pos-low: #b91c1c;
    --pos-very-low: #9f1239;

    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08), 0 1px 4px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.1), 0 2px 8px rgba(0, 0, 0, 0.06);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.5;
    font-size: 14px;
}

/* ===== TOP BANNER ===== */
.top-banner {
    background: var(--blue);
    color: white;
    padding: 10px 0;
    text-align: center;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.03em;
}

.top-banner .live-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    background: #4ade80;
    border-radius: 50%;
    margin-right: 7px;
    vertical-align: middle;
    animation: pulseGreen 2s infinite;
}

@keyframes pulseGreen {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.4;
    }
}

/* ===== LAYOUT ===== */
#app {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px 60px;
}

/* ===== SIDE TAB BUTTONS (fixed left edge) ===== */
.side-tabs-fixed {
    position: fixed;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.side-tab-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    background: var(--blue);
    color: white;
    border: none;
    padding: 14px 10px;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.2s, padding-left 0.2s;
    width: 58px;
}

.side-tab-btn:first-child {
    border-radius: 0 8px 0 0;
}

.side-tab-btn:last-child {
    border-radius: 0 0 8px 0;
}

.side-tab-btn:hover {
    background: var(--blue-mid);
    padding-left: 14px;
}

.stb-icon {
    font-size: 18px;
    line-height: 1;
}

.stb-label {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    line-height: 1.2;
    text-align: center;
}

/* ===== SIDE PANEL ===== */
.side-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.25);
    z-index: 1100;
}

.side-overlay.open {
    display: block;
}

.side-panel {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 420px;
    max-width: 90vw;
    background: var(--bg-white);
    border-right: 1px solid var(--border);
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.12);
    z-index: 1200;
    transform: translateX(-100%);
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.side-panel.open {
    transform: translateX(0);
}

.side-panel-header {
    display: flex;
    align-items: center;
    padding: 16px 16px 0;
    gap: 12px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0;
}

.side-panel-tabs {
    display: flex;
    gap: 0;
    flex: 1;
}

.sp-tab {
    flex: 1;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    padding: 12px 10px;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-muted);
    cursor: pointer;
    font-family: inherit;
    transition: color 0.15s, border-color 0.15s;
    white-space: nowrap;
}

.sp-tab:hover {
    color: var(--blue);
}

.sp-tab.active {
    color: var(--blue);
    border-bottom-color: var(--blue);
}

.side-panel-close {
    background: none;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    width: 30px;
    height: 30px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    transition: background 0.15s;
    flex-shrink: 0;
}

.side-panel-close:hover {
    background: var(--bg-subtle);
    color: var(--text-primary);
}

.sp-content {
    display: none;
    padding: 24px 20px;
    overflow-y: auto;
    flex: 1;
}

.sp-content.active {
    display: block;
}

.sp-content h3 {
    font-size: 16px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.sp-intro {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 16px;
    padding: 12px;
    background: var(--blue-light);
    border-left: 3px solid var(--blue-mid);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.sp-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 0;
}

.sp-list li {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
    padding: 10px 12px;
    background: var(--bg-subtle);
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--border-strong);
}

.sp-list li strong {
    color: var(--text-primary);
    display: block;
    margin-bottom: 2px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* ===== HEADER ===== */

.site-header {
    padding: 36px 0 28px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 32px;
}

.header-inner {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}

.header-left h1 {
    font-size: 26px;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    margin-bottom: 6px;
}

.header-left p {
    font-size: 14px;
    color: var(--text-muted);
    max-width: 580px;
    line-height: 1.6;
}

.header-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.header-tag {
    background: var(--bg-subtle);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 3px 10px;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.header-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
}

.update-badge {
    background: #dcfce7;
    border: 1px solid #86efac;
    border-radius: 4px;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 600;
    color: #15803d;
}

.source-note {
    font-size: 11px;
    color: var(--text-light);
    text-align: right;
}

/* ===== STATS BAR ===== */
.stats-bar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 36px;
}

.stat-card {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 20px 24px;
    box-shadow: var(--shadow-sm);
}

.stat-card .stat-value {
    font-size: 30px;
    font-weight: 800;
    color: var(--blue);
    letter-spacing: -0.03em;
    line-height: 1;
    margin-bottom: 5px;
}

.stat-card .stat-label {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
}

/* ===== QUICK LINKS ===== */
.quick-links-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.quick-link-card {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 20px 24px;
    box-shadow: var(--shadow-sm);
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.quick-link-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--blue-mid);
}

.quick-link-card .ql-icon {
    font-size: 28px;
    line-height: 1;
}

.quick-link-card .ql-content h3 {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.quick-link-card .ql-content p {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 500;
    line-height: 1.3;
}

/* ===== SECTION TITLE ===== */
.section-header {
    margin-bottom: 16px;
}

.section-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 3px;
}

.section-subtitle {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.6;
}

/* ===== TIMELINE ===== */
.timeline-section {
    margin-bottom: 40px;
}

.timeline-wrapper {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px;
    box-shadow: var(--shadow-sm);
    overflow-x: auto;
    position: relative;
    padding-bottom: 80px;
}

.timeline-line {
    position: absolute;
    top: 50px;
    left: 40px;
    right: 40px;
    height: 4px;
    background: var(--border-strong);
    border-radius: 2px;
}

.tl-node {
    position: absolute;
    top: 50px;
}

.tl-node-inner {
    width: 16px;
    height: 16px;
    background: var(--blue);
    border: 3px solid var(--bg-white);
    border-radius: 50%;
    box-shadow: 0 0 0 2px var(--blue);
    position: absolute;
    left: -8px;
    top: -8px;
    z-index: 2;
}

.tl-node-inner.pulse {
    animation: pulse 2s infinite;
}

.tl-node-inner.warn {
    background: #d97706;
    box-shadow: 0 0 0 2px #d97706;
}

.tl-node-inner.current {
    background: #16a34a;
    box-shadow: 0 0 0 2px #16a34a;
}

.tl-label-top,
.tl-label-bottom {
    position: absolute;
    text-align: center;
    font-size: 11px;
    color: var(--text-secondary);
    line-height: 1.4;
}

.tl-label-top {
    bottom: 25px;
}

.tl-label-bottom {
    top: 25px;
}

.tl-label-top strong,
.tl-label-bottom strong {
    font-size: 13px;
    color: var(--text-primary);
}

.timeline-legend {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
}

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

#timeline-canvas-wrapper {
    width: 100%;
    overflow-x: auto;
}

#timeline-chart {
    min-width: 900px;
    display: block;
}

/* ===== RANKING ===== */
.ranking-section {
    margin-bottom: 40px;
}

.ranking-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ranking-item {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 14px 20px;
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.2s, border-color 0.2s;
}

.ranking-item:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--border-strong);
}

.rank-number {
    font-size: 16px;
    font-weight: 800;
    color: var(--text-light);
    min-width: 32px;
    font-family: 'JetBrains Mono', monospace;
}

.rank-number.rank-1 {
    color: #d97706;
}

.rank-number.rank-2 {
    color: #6b7280;
}

.rank-number.rank-3 {
    color: #b45309;
}

.rank-info {
    flex: 0 0 180px;
}

.rank-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.rank-company {
    font-size: 11px;
    color: var(--text-muted);
}

.rank-bar-wrap {
    flex: 1;
}

.rank-bar-bg {
    height: 6px;
    background: var(--bg-subtle);
    border-radius: 100px;
    overflow: hidden;
    margin-bottom: 4px;
}

.rank-bar-fill {
    height: 100%;
    border-radius: 100px;
    transition: width 1.2s ease;
}

.rank-bar-label {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    color: var(--text-light);
    font-weight: 500;
}

.rank-pos {
    font-size: 18px;
    font-weight: 800;
    min-width: 50px;
    text-align: right;
    font-family: 'JetBrains Mono', monospace;
}

.pos-high {
    color: var(--pos-high);
}

.pos-medium {
    color: var(--pos-medium);
}

.pos-low {
    color: var(--pos-low);
}

.pos-very-low {
    color: var(--pos-very-low);
}

/* ===== FILTERS ===== */
.filters-row {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.filter-btn {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.15s;
    font-family: inherit;
    display: flex;
    align-items: center;
    gap: 6px;
}

.filter-btn:hover {
    border-color: var(--border-strong);
    color: var(--text-primary);
    background: var(--bg-subtle);
}

.filter-btn.active {
    background: var(--blue);
    border-color: var(--blue);
    color: white;
}

.filter-btn .cat-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* ===== TREATMENT GRID ===== */
.treatments-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 16px;
    margin-bottom: 48px;
}

/* ===== TREATMENT CARD ===== */
.treatment-card {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.2s, border-color 0.2s;
    position: relative;
    overflow: hidden;
}

.treatment-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
}

.treatment-card[data-category="oral"]::before {
    background: #10b981;
}

.treatment-card[data-category="gene"]::before {
    background: #3b82f6;
}

.treatment-card[data-category="aso_ns"]::before {
    background: #ef4444;
}

.treatment-card[data-category="aso_sel"]::before {
    background: #8b5cf6;
}

.treatment-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--border-strong);
}

.treatment-card.hidden {
    display: none;
}

/* Card header */
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 14px;
}

.card-title-group h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 3px;
}

.card-company {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 500;
}

.phase-badge {
    flex-shrink: 0;
    border-radius: 4px;
    padding: 4px 9px;
    font-size: 10px;
    font-weight: 700;
    text-align: right;
    line-height: 1.3;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.phase-badge.phase-preclinical {
    background: #f3f4f6;
    color: #6b7280;
    border: 1px solid #e5e7eb;
}

.phase-badge.phase-1 {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.phase-badge.phase-1-2 {
    background: #fffbeb;
    color: #b45309;
    border: 1px solid #fde68a;
}

.phase-badge.phase-2 {
    background: #f0fdf4;
    color: #15803d;
    border: 1px solid #bbf7d0;
}

.phase-badge.phase-2-3 {
    background: #dcfce7;
    color: #15803d;
    border: 1px solid #86efac;
}

.phase-badge.phase-3 {
    background: #eff6ff;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

/* Category tag */
.cat-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    border-radius: 4px;
    padding: 3px 9px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 14px;
    border: 1px solid;
}

.cat-tag[data-category="oral"] {
    background: var(--cat-oral-bg);
    color: var(--cat-oral);
    border-color: var(--cat-oral-border);
}

.cat-tag[data-category="gene"] {
    background: var(--cat-gene-bg);
    color: var(--cat-gene);
    border-color: var(--cat-gene-border);
}

.cat-tag[data-category="aso_ns"] {
    background: var(--cat-aso-ns-bg);
    color: var(--cat-aso-ns);
    border-color: var(--cat-aso-ns-border);
}

.cat-tag[data-category="aso_sel"] {
    background: var(--cat-aso-sel-bg);
    color: var(--cat-aso-sel);
    border-color: var(--cat-aso-sel-border);
}

/* PoS bar */
.pos-bar-section {
    margin-bottom: 14px;
}

.pos-bar-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 6px;
}

.pos-label-text {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.pos-value-text {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.03em;
    font-family: 'JetBrains Mono', monospace;
}

.pos-confidence {
    font-size: 11px;
    color: var(--text-light);
    margin-top: 4px;
}

.pos-bar-bg {
    height: 8px;
    background: var(--bg-subtle);
    border-radius: 100px;
    overflow: hidden;
}

.pos-bar-fill {
    height: 100%;
    border-radius: 100px;
    transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Admin & meta chips */
.card-meta-row {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.meta-chip {
    background: var(--bg-subtle);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 4px 9px;
    font-size: 11px;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Dates */
.dates-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 12px;
}

.date-item {
    background: var(--bg-subtle);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
}

.date-item .di-label {
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--text-light);
    margin-bottom: 3px;
    font-weight: 700;
}

.date-item .di-value {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
}

/* Expand btn */
.expand-btn {
    width: 100%;
    background: var(--bg-subtle);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 9px;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.expand-btn:hover {
    background: var(--bg);
    border-color: var(--border-strong);
    color: var(--text-secondary);
}

/* Expanded content */
.card-expanded {
    display: none;
    margin-top: 14px;
    border-top: 1px solid var(--border);
    padding-top: 14px;
    animation: expandIn 0.2s ease;
}

.card-expanded.open {
    display: block;
}

@keyframes expandIn {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.expanded-section {
    margin-bottom: 14px;
}

.expanded-section h4 {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    font-weight: 700;
    margin-bottom: 7px;
}

.exp-mech {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.6;
    border-left: 2px solid var(--blue-border);
    padding-left: 10px;
    font-style: italic;
}

.strengths-list,
.risks-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.strengths-list li {
    font-size: 12px;
    color: var(--text-secondary);
    padding-left: 16px;
    position: relative;
    line-height: 1.5;
}

.strengths-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #16a34a;
    font-weight: 700;
    font-size: 11px;
}

.risks-list li {
    font-size: 12px;
    color: var(--text-secondary);
    padding-left: 16px;
    position: relative;
    line-height: 1.5;
}

.risks-list li::before {
    content: '!';
    position: absolute;
    left: 0;
    color: #d97706;
    font-weight: 900;
    font-size: 11px;
}

/* Milestones */
.milestones-mini {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.milestone-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 12px;
}

.milestone-year {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    font-weight: 700;
    color: var(--blue-mid);
    min-width: 32px;
    padding-top: 2px;
}

.milestone-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 4px;
}

.milestone-dot.done {
    background: #16a34a;
}

.milestone-dot.upcoming {
    background: #d97706;
}

.milestone-dot.future {
    background: #d1d5db;
    border: 1px solid #9ca3af;
}

.milestone-text {
    color: var(--text-secondary);
    line-height: 1.4;
}

/* ===== INFO GRID ===== */
.info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 48px;
}

.info-card {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 22px;
    box-shadow: var(--shadow-sm);
}

.info-card h3 {
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.info-card p,
.info-card li {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.7;
}

.info-card ul {
    padding-left: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.info-card li {
    padding-left: 14px;
    position: relative;
}

.info-card li::before {
    content: '›';
    position: absolute;
    left: 0;
    color: var(--blue-mid);
    font-weight: 700;
}

/* ===== FOOTER ===== */
.site-footer {
    border-top: 1px solid var(--border);
    padding: 28px 0;
    text-align: center;
    color: var(--text-light);
    font-size: 11px;
    line-height: 2;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
    .stats-bar {
        grid-template-columns: repeat(2, 1fr);
    }

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

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

    .header-inner {
        flex-direction: column;
    }

    .header-right {
        align-items: flex-start;
    }
}

/* ===== SCROLL ===== */
::-webkit-scrollbar {
    width: 5px;
    height: 5px;
}

::-webkit-scrollbar-track {
    background: var(--bg-subtle);
}

::-webkit-scrollbar-thumb {
    background: var(--border-strong);
    border-radius: 100px;
}

/* ===== ACCORDION ===== */
.accordion-wrap {
    margin-bottom: 28px;
}

.accordion-trigger {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 12px 18px;
    font-size: 13px;
    font-weight: 600;
    color: var(--blue);
    cursor: pointer;
    font-family: inherit;
    transition: background 0.15s, border-color 0.15s;
    text-align: left;
    box-shadow: var(--shadow-sm);
}

.accordion-trigger:hover {
    background: var(--blue-light);
    border-color: var(--blue-border);
}

.accordion-trigger[aria-expanded="true"] {
    background: var(--blue-light);
    border-color: var(--blue-border);
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    border-bottom: none;
}

.accordion-icon {
    font-size: 15px;
    opacity: 0.8;
}

.accordion-arrow {
    margin-left: auto;
    font-size: 14px;
    transition: transform 0.2s ease;
    color: var(--text-muted);
}

.accordion-trigger[aria-expanded="true"] .accordion-arrow {
    transform: rotate(180deg);
}

.accordion-body {
    display: none;
    border: 1px solid var(--blue-border);
    border-top: none;
    border-bottom-left-radius: var(--radius-md);
    border-bottom-right-radius: var(--radius-md);
    background: var(--blue-light);
    padding: 20px;
    animation: expandIn 0.2s ease;
}

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

.accordion-body .info-grid {
    margin-bottom: 0;
}

.accordion-body .info-card {
    box-shadow: none;
    border-color: var(--blue-border);
}

/* ===== INTRO SECTION ===== */
.intro-section {
    margin-bottom: 40px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Why / Race blocks */
.intro-block {
    display: flex;
    gap: 18px;
    align-items: flex-start;
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px 28px;
    box-shadow: var(--shadow-sm);
}

.intro-why {
    border-left: 4px solid var(--blue-mid);
}

.intro-race {
    border-left: 4px solid #d97706;
    background: #fffbeb;
    border-color: #fde68a;
}

.intro-block-icon {
    font-size: 28px;
    line-height: 1;
    flex-shrink: 0;
    padding-top: 2px;
}

.intro-block-body h2 {
    font-size: 16px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 8px;
    letter-spacing: -0.01em;
}

.intro-block-body p {
    font-size: 13.5px;
    color: var(--text-secondary);
    line-height: 1.75;
}

.intro-block-body p strong {
    color: var(--text-primary);
}

/* Therapies grid */
.intro-therapies {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px 28px;
    box-shadow: var(--shadow-sm);
}

.intro-therapies-title {
    font-size: 16px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 16px;
    letter-spacing: -0.01em;
    border-bottom: 1px solid var(--border);
    padding-bottom: 12px;
}

.therapy-cards-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}

.therapy-explain-card {
    background: var(--bg-subtle);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    border-top: 3px solid var(--border-strong);
    transition: box-shadow 0.2s;
}

.therapy-explain-card:hover {
    box-shadow: var(--shadow-md);
}

.therapy-explain-card[data-cat="oral"] {
    border-top-color: #10b981;
}

.therapy-explain-card[data-cat="aso_ns"] {
    border-top-color: #ef4444;
}

.therapy-explain-card[data-cat="aso_sel"] {
    border-top-color: #8b5cf6;
}

.therapy-explain-card[data-cat="gene"] {
    border-top-color: #3b82f6;
}

.tec-icon {
    font-size: 22px;
    line-height: 1;
}

.tec-badge {
    display: inline-block;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--text-muted);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 2px 8px;
    background: var(--bg-white);
    width: fit-content;
}

.therapy-explain-card h4 {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.3;
}

.therapy-explain-card p {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.65;
    flex: 1;
}

.tec-example {
    font-size: 11px;
    color: var(--text-muted);
    font-style: italic;
    border-top: 1px solid var(--border);
    padding-top: 8px;
    margin-top: 2px;
}

@media (max-width: 900px) {
    .therapy-cards-row {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 560px) {
    .therapy-cards-row {
        grid-template-columns: 1fr;
    }

    .intro-block {
        flex-direction: column;
        gap: 10px;
    }
}

/* ===== COMPARISON TABLE ===== */
.intro-compare {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px 28px;
    box-shadow: var(--shadow-sm);
}

.compare-header {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 20px;
}

.compare-title-icon {
    font-size: 26px;
    flex-shrink: 0;
    padding-top: 2px;
}

.compare-header h2 {
    font-size: 16px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 4px;
    letter-spacing: -0.01em;
}

.compare-subtitle {
    font-size: 12px;
    color: var(--text-muted);
}

.compare-table-wrap {
    overflow-x: auto;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    margin-bottom: 16px;
}

.compare-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12.5px;
}

.compare-table thead tr {
    background: var(--bg-subtle);
}

.compare-table th {
    padding: 11px 14px;
    text-align: left;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 2px solid var(--border);
    white-space: nowrap;
}

.compare-table th.col-hd {
    background: #ecfdf5;
    color: #065f46;
    border-bottom-color: #6ee7b7;
}

.compare-table tbody tr:nth-child(even) {
    background: #fafbfc;
}

.compare-table tbody tr:hover {
    background: var(--blue-light);
}

.compare-table td {
    padding: 11px 14px;
    vertical-align: top;
    border-bottom: 1px solid var(--border);
    line-height: 1.5;
    color: var(--text-secondary);
}

.compare-table td:first-child {
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    background: var(--bg-subtle);
    font-size: 12px;
}

.compare-table small {
    display: block;
    font-size: 10.5px;
    color: var(--text-muted);
    margin-top: 2px;
    font-style: italic;
}

/* HD column highlight */
.col-hd {
    background: #f0fdf4 !important;
    border-left: 2px solid #86efac;
    border-right: 2px solid #86efac;
    font-weight: 600;
}

/* Cell status colours */
.cell-yes {
    color: #15803d;
}

.cell-partial {
    color: #b45309;
}

.cell-no {
    color: #b91c1c;
}

.compare-note {
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-left: 4px solid #d97706;
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.compare-note strong {
    color: var(--text-primary);
}

/* ===== STICKY NAV ===== */
.sticky-nav {
    position: sticky;
    top: 0;
    z-index: 900;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.sticky-nav-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 4px;
    height: 42px;
}

.snav-link {
    text-decoration: none;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-muted);
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    transition: color 0.15s, background 0.15s;
    border-bottom: 2px solid transparent;
}

.snav-link:hover {
    color: var(--blue);
    background: var(--blue-light);
}

.snav-link.active {
    color: var(--blue);
    border-bottom-color: var(--blue);
}

.snav-sep {
    color: var(--border-strong);
    font-size: 14px;
    user-select: none;
}

/* RESPONSIVE NAV */
.burger-btn {
    display: none;
    background: transparent;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-primary);
    padding: 4px;
}

.snav-spacer {
    flex: 1;
}

.nav-links-wrapper {
    display: flex;
    align-items: center;
    gap: 4px;
}

@media (max-width: 768px) {
    .burger-btn {
        display: block;
    }

    .nav-links-wrapper {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(255, 255, 255, 0.98);
        flex-direction: column;
        align-items: stretch;
        padding: 10px 24px 20px 24px;
        border-bottom: 1px solid var(--border);
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
        gap: 0;
    }

    .nav-links-wrapper.open {
        display: flex;
    }

    .snav-sep {
        display: none;
    }

    .snav-link {
        width: 100%;
        padding: 12px 0;
        border-bottom: 1px solid var(--bg-subtle);
        font-size: 15px;
        border-radius: 0;
    }

    .snav-link.active {
        border-bottom-color: var(--blue);
    }
}

/* ===== TOOLTIP ===== */
.tl-tooltip {
    display: none;
    position: fixed;
    z-index: 5000;
    background: #1e293b;
    color: white;
    border-radius: var(--radius-md);
    padding: 10px 14px;
    min-width: 180px;
    max-width: 240px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
    pointer-events: none;
    font-family: 'Inter', sans-serif;
}

.tt-drug {
    font-size: 13px;
    font-weight: 800;
    margin-bottom: 4px;
    color: #f8fafc;
}

.tt-type {
    font-size: 11px;
    color: #94a3b8;
    margin-bottom: 3px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.tt-year {
    font-size: 12px;
    color: #cbd5e1;
    margin-bottom: 2px;
}

.tt-status {
    font-size: 11px;
    margin-top: 4px;
    padding-top: 4px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #94a3b8;
}

/* ===== SEARCH ===== */
.search-row {
    margin-bottom: 12px;
}

.search-input {
    width: 100%;
    padding: 10px 14px;
    font-size: 13px;
    font-family: inherit;
    color: var(--text-primary);
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.search-input:focus {
    border-color: var(--blue-mid);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.search-input::placeholder {
    color: var(--text-light);
}

/* ===== NEW FILTER DROPDOWNS ===== */
.filter-dropdown-container {
    position: relative;
    margin-bottom: 0px;
    min-width: 200px;
}

.filter-dropdown-container::after {
    content: '▾';
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: var(--text-muted);
}

.filter-select {
    width: 100%;
    appearance: none;
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    padding: 8px 30px 8px 16px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.filter-select:hover,
.filter-select:focus {
    border-color: var(--blue-mid);
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* No results */
.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 48px 0;
    font-size: 14px;
    color: var(--text-muted);
    background: var(--bg-white);
    border: 1px dashed var(--border);
    border-radius: var(--radius-lg);
}

/* ===== NEWS ENCART ===== */
.card-news {
    margin-top: 14px;
    border-top: 1px solid var(--border);
    padding-top: 12px;
}

.card-news-title {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.news-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 7px 9px;
    border-radius: var(--radius-sm);
    background: var(--bg-subtle);
    border: 1px solid var(--border);
    margin-bottom: 5px;
    text-decoration: none;
    transition: background 0.15s, border-color 0.15s;
}

.news-item:last-child {
    margin-bottom: 0;
}

.news-item:hover {
    background: var(--blue-light);
    border-color: var(--blue-border);
}

.news-date {
    font-size: 10px;
    font-weight: 700;
    color: var(--text-light);
    white-space: nowrap;
    padding-top: 1px;
    min-width: 50px;
    font-family: 'JetBrains Mono', monospace;
}

.news-headline {
    font-size: 11.5px;
    color: var(--text-secondary);
    line-height: 1.5;
    flex: 1;
}

.news-source {
    font-size: 9px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    white-space: nowrap;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    align-self: flex-start;
    margin-top: 1px;
}

.news-source--hdbuzz {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

.news-source--ct {
    background: var(--blue-light);
    color: var(--blue);
    border: 1px solid var(--blue-border);
}

/* ===== POS CHART ===== */
.pos-chart-section {
    margin-bottom: 40px;
}

.pos-chart-wrap {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px 24px;
    box-shadow: var(--shadow-sm);
}

.pos-chart-legend {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.pcl-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 500;
}

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

.pcl-line {
    width: 18px;
    height: 3px;
    border-radius: 2px;
    flex-shrink: 0;
}

.pos-chart-bars {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.pcb-row {
    display: grid;
    grid-template-columns: 180px 1fr 50px 80px;
    align-items: center;
    gap: 10px;
}

.pcb-label {
    display: flex;
    flex-direction: column;
    gap: 1px;
    text-align: right;
}

.pcb-name {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pcb-company {
    font-size: 10px;
    color: var(--text-muted);
}

.pcb-bar-track {
    position: relative;
    height: 20px;
    background: var(--bg-subtle);
    border-radius: 4px;
    overflow: hidden;
}

.pcb-ref-line {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #e2e8f0;
    z-index: 1;
}

.pcb-ref-orphan {
    background: #fde68a;
}

.pcb-bar-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    border-radius: 4px;
    z-index: 0;
}

.pcb-value {
    font-size: 13px;
    font-weight: 800;
    font-family: 'JetBrains Mono', monospace;
    text-align: right;
}

.pcb-aap {
    font-size: 10px;
    color: var(--text-muted);
    font-weight: 500;
    white-space: nowrap;
}

@media (max-width: 700px) {
    .pcb-row {
        grid-template-columns: 120px 1fr 44px;
    }

    .pcb-aap {
        display: none;
    }
}

/* ===== MODE TOGGLE ===== */
.snav-spacer {
    flex: 1;
}

.mode-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--bg-subtle);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 4px 12px;
    font-size: 11.5px;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.mode-toggle:hover {
    border-color: var(--blue-mid);
    color: var(--blue);
}

.mode-toggle.active {
    background: #f0fdf4;
    border-color: #86efac;
    color: #15803d;
}

/* ===== INFO DRAWER ===== */
.info-drawer {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 28px;
}

.info-card-drawer {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.icd-trigger {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    padding: 16px 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    text-align: left;
    transition: background 0.15s;
}

.icd-trigger:hover {
    background: var(--bg-subtle);
}

.icd-icon {
    font-size: 22px;
    flex-shrink: 0;
}

.icd-trigger-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
}

.icd-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
}

.icd-subtitle {
    font-size: 11.5px;
    color: var(--text-muted);
}

.icd-chevron {
    font-size: 14px;
    color: var(--text-light);
    transition: transform 0.2s;
    flex-shrink: 0;
}

.icd-trigger[aria-expanded="true"] .icd-chevron {
    transform: rotate(180deg);
}

.icd-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
}

.icd-content.open {
    max-height: 600px;
}

.icd-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1px;
    background: var(--border);
    border-top: 1px solid var(--border);
    padding: 0;
}

.icd-kv {
    display: flex;
    flex-direction: column;
    gap: 3px;
    background: var(--bg-white);
    padding: 12px 16px;
}

.icd-kv--alert {
    background: #fff7f7;
}

.icd-k {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
}

.icd-v {
    font-size: 12.5px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.icd-kv--alert .icd-v {
    color: #b91c1c;
    font-weight: 600;
}

/* ===== LEAFLET MAP ===== */
.map-section {
    margin-bottom: 40px;
}

.map-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}

.mf-btn {
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 600;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--bg-white);
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.15s;
}

.mf-btn:hover {
    border-color: var(--blue-mid);
    color: var(--blue);
}

.mf-btn.active {
    background: var(--blue);
    border-color: var(--blue);
    color: #fff;
}

.trial-map-container {
    height: 450px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

/* Leaflet popup override */
.hd-popup .leaflet-popup-content-wrapper {
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    padding: 0;
}

.hd-popup .leaflet-popup-content {
    margin: 0;
}

.map-popup {
    padding: 12px 14px;
    min-width: 190px;
}

.mp-hospital {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.mp-city {
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.mp-trial {
    font-size: 11.5px;
    color: var(--text-secondary);
    margin-bottom: 6px;
    font-style: italic;
}

.mp-status {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.mp-contact {
    font-size: 10.5px;
    color: var(--text-muted);
}

/* ===== COMPARATOR BAR ===== */
.compare-bar {
    position: fixed;
    bottom: -80px;
    left: 0;
    right: 0;
    z-index: 800;
    transition: bottom 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.compare-bar.visible {
    bottom: 0;
    pointer-events: all;
}

.compare-bar-inner {
    max-width: 800px;
    margin: 0 auto 16px;
    background: #1e293b;
    color: white;
    border-radius: var(--radius-lg);
    padding: 12px 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.cbar-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: #94a3b8;
    flex-shrink: 0;
}

.cbar-selected {
    display: flex;
    gap: 6px;
    flex: 1;
    flex-wrap: wrap;
}

.cbar-tag {
    background: #334155;
    border: 1px solid #475569;
    color: #f1f5f9;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 12px;
}

.cbar-open-btn {
    background: var(--blue);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.15s;
}

.cbar-open-btn:hover {
    background: #1d4ed8;
}

.cbar-clear {
    background: transparent;
    color: #64748b;
    border: 1px solid #334155;
    border-radius: var(--radius-md);
    padding: 6px 10px;
    font-size: 11px;
    cursor: pointer;
    flex-shrink: 0;
}

.cbar-clear:hover {
    color: #ef4444;
    border-color: #ef4444;
}

/* Compare button on cards */
.compare-check-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
    padding: 5px 12px;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-subtle);
    cursor: pointer;
    transition: all 0.15s;
    width: 100%;
    justify-content: center;
}

.compare-check-btn:hover {
    border-color: var(--blue-mid);
    color: var(--blue);
}

.compare-check-btn.selected {
    background: var(--blue-light);
    border-color: var(--blue);
    color: var(--blue);
}

.ccb-box {
    display: inline-flex;
    width: 14px;
    height: 14px;
    border: 1.5px solid currentColor;
    border-radius: 3px;
    align-items: center;
    justify-content: center;
    font-size: 10px;
}

/* ===== COMPARATOR MODAL ===== */
.compare-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.compare-modal-overlay.open {
    display: flex;
}

.compare-modal {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 900px;
    width: 100%;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.compare-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.compare-modal-title {
    font-size: 15px;
    font-weight: 800;
    color: var(--text-primary);
}

.compare-modal-close {
    background: var(--bg-subtle);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 4px 10px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-muted);
}

.compare-modal-body {
    overflow: auto;
    padding: 16px;
}

.cmp-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12.5px;
}

.cmp-table th {
    padding: 12px 14px;
    background: var(--bg-subtle);
    border-bottom: 2px solid var(--border);
    text-align: left;
}

.cmp-th-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
}

.cmp-th-co {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 400;
}

.cmp-table td {
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
    color: var(--text-secondary);
    vertical-align: top;
}

.cmp-row-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: var(--bg-subtle);
    white-space: nowrap;
}

.cmp-table tbody tr:hover {
    background: var(--bg-subtle);
}

/* ===== CARD HEADER RIGHT (sparkline + badge) ===== */
.card-header-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    flex-shrink: 0;
}

/* ===== SPARKLINE ===== */
.sparkline-svg {
    display: block;
    width: 80px;
    height: 28px;
    flex-shrink: 0;
    margin-top: 4px;
}

/* ============================================================
   PHASE 3: SCROLL REVEAL, PIPELINE, CD, MODAL, GLOSSARY
   ============================================================ */

/* 0. GLOSSARY TERMS */
.glossary-term {
    border-bottom: 1px dashed var(--text-muted);
    cursor: help;
    transition: all 0.2s;
    position: relative;
    color: var(--blue-mid);
    font-weight: 500;
}

.glossary-term:hover {
    color: var(--blue);
    border-bottom-color: var(--blue);
    background: rgba(37, 99, 235, 0.05);
}

/* 1. SCROLL REVEAL */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* 2. STATS BAR UPDATE & COUNTDOWN ROW */
.stats-countdown-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin: 2rem auto;
    max-width: var(--max-w);
}

.stats-bar {
    flex: 2;
    margin: 0;
    /* Override old margin */
}

/* 3. COUNTDOWN WIDGET */
.countdown-widget {
    flex: 1;
    min-width: 300px;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
}

.cd-header {
    font-weight: 700;
    color: var(--text-heading);
    margin-bottom: 1rem;
    font-size: 1.05rem;
    border-bottom: 2px solid var(--border-light);
    padding-bottom: 0.5rem;
}

.cd-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.cd-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.cd-days {
    font-weight: 800;
    font-size: 0.9rem;
    padding: 4px 8px;
    border-radius: 6px;
    color: black;
    min-width: 60px;
    text-align: center;
}

.bg-red {
    background: var(--ch-red);
}

.bg-blue {
    background: var(--ch-blue);
}

.bg-green {
    background: var(--ch-green);
}

.cd-text {
    font-size: 0.85rem;
    color: black;
    line-height: 1.3;
}

/* 4. CLINICAL PIPELINE (FUNNEL) */
.funnel-section {
    padding: 3rem 1.5rem;
    background: #f8fafc;
    border-bottom: 1px solid var(--border-light);
}

.funnel-container {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
}

.pipeline-stage {
    width: 100%;
    background: var(--bg-card);
    border-top: 4px solid #ccc;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
    padding: 1.25rem;
    display: flex;
    align-items: center;
    transition: transform 0.2s;
    position: relative;
}

.pipeline-stage:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
}

.stage-header {
    width: 25%;
    min-width: 180px;
    border-right: 1px solid var(--border-light);
    padding-right: 1rem;
    margin-right: 1.5rem;
}

.stage-title {
    font-weight: 800;
    font-size: 1.1rem;
    letter-spacing: -0.01em;
}

.stage-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.stage-chips {
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.stage-empty {
    color: var(--text-muted);
    font-style: italic;
    font-size: 0.9rem;
}

.pipeline-chip {
    background: var(--bg-subtle);
    border: 1px solid var(--border-light);
    border-left: 4px solid #ccc;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}

.pipeline-chip:hover {
    background: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* 5. DETAIL MODAL (FULL WIDTH) */
.detail-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

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

.detail-modal {
    background: var(--bg-card);
    width: 95%;
    /* More full screen */
    max-width: 1200px;
    max-height: 90vh;
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    transform: translateY(20px);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
}

.detail-modal-overlay.open .detail-modal {
    transform: translateY(0);
}

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

.dm-header-left {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.detail-modal-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-heading);
}

.detail-modal-company {
    font-size: 0.95rem;
    color: var(--text-muted);
}

.detail-modal-close {
    background: white;
    border: 1px solid var(--border-light);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: all 0.2s;
}

.detail-modal-close:hover {
    background: var(--text-heading);
    color: white;
    border-color: var(--text-heading);
}

.detail-modal-body {
    padding: 2rem;
    overflow-y: auto;
}

.dm-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
}

.dm-section {
    margin-bottom: 2rem;
}

.dm-section h4 {
    font-size: 1.1rem;
    color: var(--text-heading);
    border-bottom: 2px solid var(--border-light);
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

.dm-kv {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px dashed var(--border-light);
    font-size: 0.9rem;
}

.dm-kv span {
    color: var(--text-muted);
}

.dm-kv strong {
    color: var(--text-body);
    text-align: right;
}

.dm-kv strong a {
    color: var(--primary);
    text-decoration: none;
}

.dm-kv strong a:hover {
    text-decoration: underline;
}

.dm-pos-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-subtle);
    padding: 1rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
}

.dm-pos-val {
    font-size: 1.8rem;
    font-weight: 800;
}

.dm-news {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.dm-news li {
    font-size: 0.85rem;
    color: var(--text-body);
}

.dm-news .date {
    font-weight: 700;
    color: var(--text-heading);
    display: inline-block;
    width: 75px;
}

.dm-news a {
    color: var(--primary);
    text-decoration: none;
}

.dm-news a:hover {
    text-decoration: underline;
}

.dm-list {
    padding-left: 1.2rem;
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--text-body);
}

.dm-list li {
    margin-bottom: 0.5rem;
}

.dm-list.bull li::marker {
    color: #16a34a;
}

.dm-list.bear li::marker {
    color: #dc2626;
}

.milestones-mini {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.milestones-timeline-container {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding-top: 1rem;
    position: relative;
    overflow-x: auto;
    padding-bottom: 1rem;
}

.milestones-timeline-container::-webkit-scrollbar {
    height: 6px;
}

.milestones-timeline-container::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

.milestones-timeline-container::before {
    content: '';
    position: absolute;
    top: 36px;
    left: 20px;
    right: 20px;
    height: 3px;
    background: var(--border);
    z-index: 0;
}

.mt-node {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100px;
    flex-shrink: 0;
}

.mt-year {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.mt-point {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: var(--bg-white);
    border: 3px solid var(--text-light);
    margin-bottom: 8px;
    transition: all 0.3s;
}

.mt-label {
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.3;
}

/* Past events */
.mt-node.past .mt-point {
    background: #10b981;
    border-color: #10b981;
}

.mt-node.past .mt-year,
.mt-node.past .mt-label {
    color: var(--text-secondary);
}

/* Current event (upcoming) */
.mt-node.current .mt-point {
    background: var(--blue-mid);
    border-color: var(--blue-mid);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.2);
}

.mt-node.current .mt-year {
    color: var(--blue-mid);
}

.mt-node.current .mt-label {
    color: var(--text-primary);
    font-weight: 600;
}

/* Base milestone styling for inside models */

@media (max-width: 900px) {
    .dm-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .funnel-container {
        padding: 0 1rem;
    }

    .pipeline-stage {
        flex-direction: column;
        align-items: flex-start;
    }

    .stage-header {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border-light);
        padding-right: 0;
        margin-right: 0;
        padding-bottom: 0.75rem;
        margin-bottom: 0.75rem;
    }
}

/* 6. GLOSSARY TOOLTIPS */
.glossary-term {
    border-bottom: 1px dotted var(--text-heading);
    cursor: help;
    color: var(--text-heading);
    font-weight: 600;
}

.glossary-term:hover {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

/* RESPONSIVE LAYOUT TWEAKS */
#timeline-canvas-wrapper {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

@media (max-width: 768px) {
    .section-title {
        font-size: 20px;
    }

    .section-header {
        margin-bottom: 24px;
        padding: 0 16px;
    }

    section.reveal {
        margin-top: 40px;
        margin-bottom: 40px;
        padding: 0 16px;
    }

    #app {
        padding: 0 12px 40px;
    }
}

/* ============================================================
   PHASE 4: AI CHATBOT WIDGET
   ============================================================ */

.ai-chat-btn {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--blue), #4f46e5);
    color: white;
    border: none;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.4);
    cursor: pointer;
    z-index: 9000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, box-shadow 0.2s;
}

.ai-chat-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.5);
}

.ai-icon {
    font-size: 28px;
}

.ai-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #ef4444;
    color: white;
    font-size: 11px;
    font-weight: 800;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
}

.ai-chat-window {
    position: fixed;
    bottom: 100px;
    right: 24px;
    width: 350px;
    height: 500px;
    max-height: calc(100vh - 120px);
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    z-index: 9000;
    overflow: hidden;
    transform-origin: bottom right;
    transform: scale(0);
    opacity: 0;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s;
    border: 1px solid var(--border);
}

.ai-chat-window.open {
    transform: scale(1);
    opacity: 1;
}

.ai-chat-header {
    background: linear-gradient(to right, var(--blue-dark), var(--blue));
    color: white;
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.ai-chat-header strong {
    font-size: 15px;
    letter-spacing: -0.01em;
}

#ai-chat-close {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.8);
    font-size: 24px;
    cursor: pointer;
    transition: color 0.2s;
}

#ai-chat-close:hover {
    color: white;
}

.ai-chat-body {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    background: #f8fafc;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chat-msg {
    max-width: 85%;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 13.5px;
    line-height: 1.5;
}

.chat-msg.bot {
    background: white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-light);
    color: var(--text-primary);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

.chat-msg.user {
    background: var(--blue-mid);
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.ai-chat-input-area {
    padding: 12px;
    background: white;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 8px;
}

#ai-chat-input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 13px;
    outline: none;
    transition: border-color 0.2s;
}

#ai-chat-input:focus {
    border-color: var(--blue-mid);
}

#ai-chat-send {
    background: var(--blue-mid);
    color: white;
    border: none;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: background 0.2s;
    flex-shrink: 0;
}

#ai-chat-send:hover {
    background: var(--blue);
}

@media (max-width: 480px) {
    .ai-chat-window {
        right: 10px;
        bottom: 80px;
        width: calc(100vw - 20px);
    }
}

/* ============================================================
   PHASE 4: PUSH NOTIFICATIONS UI
   ============================================================ */
.notif-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}

.notif-option {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.notif-option:hover {
    border-color: var(--blue-mid);
    background: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.notif-option input[type="checkbox"] {
    margin-top: 4px;
    width: 18px;
    height: 18px;
    accent-color: var(--blue-mid);
    cursor: pointer;
}

.notif-content strong {
    display: block;
    color: var(--blue-dark);
    font-size: 15px;
    margin-bottom: 4px;
}

.notif-content span {
    display: block;
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.4;
}

.email-mockup {
    display: none;
}

.email-mockup.open {
    display: block !important;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}