:root {
    --primary: #16344d;
    --secondary: #2a5f86;
    --accent: #3182ce;
    --accent2: #2b6cb0;
    --ink: #1f2c3a;
    --muted: #5a6c7d;
    --paper: #f7fbff;
    --paper-2: #ffffff;
    --border: #d8e4ef;
    --success: #0d7a66;
    --warning: #8f5d1d;
    --danger: #c53030;
    --purple: #5a4ca8;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--ink);
    background: radial-gradient(1100px 500px at 90% -30%, rgba(22, 52, 77, 0.08), transparent 65%), var(--paper);
    line-height: 1.7;
    max-width: 980px;
    margin: 0 auto;
    padding: 48px 28px 60px;
}

h1,
h2,
h3,
h4 {
    color: var(--primary);
    line-height: 1.2;
    margin-top: 0;
}

h1 {
    font-size: clamp(2rem, 4vw, 2.7rem);
    margin-bottom: 8px;
    font-family: 'Source Serif 4', Georgia, serif;
}

h2 {
    font-size: clamp(1.35rem, 2.2vw, 1.8rem);
    margin-top: 34px;
    margin-bottom: 12px;
    border-bottom: 2px solid #e3edf6;
    padding-bottom: 8px;
    font-family: 'Source Serif 4', Georgia, serif;
}

h3 {
    font-size: 1.15rem;
    margin-top: 24px;
    margin-bottom: 10px;
}

p {
    margin: 0 0 14px;
}

a {
    color: var(--secondary);
}

.subtitle,
.meta {
    color: var(--muted);
    margin-bottom: 8px;
}

.meta {
    font-size: 0.82rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.toc {
    margin-top: 22px;
    margin-bottom: 24px;
    background: var(--paper-2);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
}

.toc ul {
    margin: 10px 0 0;
    padding-left: 20px;
}

.toc li {
    margin-bottom: 4px;
    color: var(--muted);
    font-size: 0.92rem;
}

.abstract {
    border-radius: 12px;
    padding: 18px;
    margin-bottom: 22px;
}

.callout,
.conclusion-box,
.section {
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--paper-2);
    padding: 14px 15px;
    margin: 14px 0;
}

.callout-success {
    border-left: 4px solid var(--success);
}

.callout-purple {
    border-left: 4px solid var(--purple);
}

.callout-blue {
    border-left: 4px solid var(--accent);
}

.callout-warning {
    border-left: 4px solid var(--warning);
}

.callout-danger {
    border-left: 4px solid var(--danger);
}

.warning-row {
    background: #fff6e8;
}

.green {
    color: var(--success);
}

.orange {
    color: var(--warning);
}

.purple {
    color: var(--purple);
}

.grid-2,
.grid-4 {
    display: grid;
    gap: 12px;
}

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

.grid-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.stat-box {
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 12px;
    background: var(--paper-2);
}

.stat-number {
    font-size: 1.35rem;
    color: var(--success);
    font-weight: 700;
    line-height: 1.1;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--muted);
    margin-top: 4px;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
}

th,
td {
    padding: 10px;
    border-bottom: 1px solid #e8eef5;
    text-align: left;
    vertical-align: top;
    font-size: 0.88rem;
}

th {
    background: #f3f8fd;
    color: var(--primary);
    font-family: 'JetBrains Mono', Menlo, monospace;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.references {
    margin-top: 24px;
}

.references li,
.references p {
    font-size: 0.84rem;
    color: var(--muted);
}

.pmid {
    font-family: 'JetBrains Mono', Menlo, monospace;
    font-size: 0.78rem;
    color: var(--secondary);
}

.highlight {
    background: #ecf7ff;
}

.snv-row {
    background: #f4fbf8;
}

.bar-container {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.bar-wrapper {
    flex: 1;
    min-width: 0;
    border: 1px solid var(--border);
    border-radius: 999px;
    overflow: hidden;
    background: #f2f7fb;
}

.bar {
    height: 10px;
    background: linear-gradient(90deg, #2a5f86, #0d7a66);
}

.bar-visual {
    background: var(--paper-2);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 14px;
    margin: 18px 0;
}

.bar-label {
    font-size: 0.78rem;
    color: var(--muted);
    white-space: nowrap;
    min-width: 140px;
    flex-shrink: 0;
}

.bar-value {
    font-size: 0.78rem;
    color: var(--muted);
    white-space: nowrap;
    min-width: 60px;
    flex-shrink: 0;
    text-align: right;
}

.figure-container {
    background: var(--paper-2);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 14px;
    margin: 18px 0;
    text-align: center;
}

.figure-container img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 10px;
    border: 1px solid var(--border);
}

.figure-container .caption {
    font-size: 0.82rem;
    color: var(--muted);
    line-height: 1.6;
    text-align: left;
}

.figure-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin: 18px 0;
}

@media (max-width: 800px) {
    body {
        padding: 34px 16px 46px;
    }

    .grid-2,
    .grid-4 {
        grid-template-columns: 1fr;
    }

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

    table {
        display: block;
        overflow-x: auto;
    }
}
