/* ============================================
   Drawing Maps — Article Components
   ============================================ */

/* --- Article Body --- */

article {
    padding-bottom: 120px;
}

article p {
    margin-bottom: 1.6em;
    font-weight: 300;
}

article strong {
    font-weight: 500;
}

article a {
    color: var(--text);
    border-bottom: 1px solid var(--rule);
}

article a:hover {
    border-color: var(--text);
}

article code {
    font-family: 'DM Mono', monospace;
    font-size: 0.88em;
    background: var(--code-bg);
    padding: 1px 5px;
    border-radius: 2px;
}

/* --- Stats Grid --- */

.stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    margin: 48px 0;
    border-top: 1px solid var(--rule);
    border-bottom: 1px solid var(--rule);
}

.stat {
    padding: 32px 0;
    text-align: left;
}

.stat:not(:first-child) {
    padding-left: 24px;
    border-left: 1px solid var(--rule-light);
}

.stat-number {
    font-weight: 300;
    font-size: 2rem;
    letter-spacing: -1px;
    color: var(--accent);
    display: block;
    line-height: 1;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-light);
    line-height: 1.4;
    letter-spacing: 0.2px;
}

/* --- Callout --- */

.callout {
    margin: 48px 0;
    padding-left: 20px;
    border-left: 2px solid var(--rule);
}

.callout p {
    font-size: 0.95rem;
    color: var(--text-mid);
}

.callout em {
    font-style: italic;
    color: var(--text);
}

/* --- Two-Column Comparison --- */

.columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    margin: 40px 0;
    border-top: 1px solid var(--rule);
    border-bottom: 1px solid var(--rule);
}

.col {
    padding: 28px 0;
}

.col:last-child {
    padding-left: 24px;
    border-left: 1px solid var(--rule-light);
}

.col-head {
    font-family: 'DM Mono', monospace;
    font-size: 0.7rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 16px;
    display: block;
}

.col:first-child .col-head { color: var(--green); }
.col:last-child .col-head { color: var(--red); }

.col ul {
    list-style: none;
    padding: 0;
}

.col li {
    font-size: 0.9rem;
    font-weight: 300;
    padding: 4px 0;
    color: var(--text-mid);
}

/* --- Code Block --- */

.code-block {
    background: var(--code-bg);
    border: 1px solid var(--code-border);
    border-radius: 2px;
    margin: 40px 0;
    overflow: hidden;
}

.code-header {
    padding: 10px 20px;
    font-family: 'DM Mono', monospace;
    font-size: 0.72rem;
    color: var(--text-light);
    border-bottom: 1px solid var(--code-border);
    letter-spacing: 0.5px;
}

pre {
    padding: 24px 20px;
    overflow-x: auto;
    font-family: 'DM Mono', monospace;
    font-size: 0.8rem;
    line-height: 1.75;
    color: var(--text);
}

.code-comment { color: var(--text-light); }
.code-heading { color: var(--text); font-weight: 500; }
.code-value { color: var(--text-mid); }

/* --- Numbered Items --- */

.numbered-item {
    margin-bottom: 1.6em;
}

.numbered-item p {
    margin-bottom: 0.6em;
}

/* --- Separator & Article Footer --- */

.sep {
    margin: 64px 0;
    border: none;
    border-top: 1px solid var(--rule);
}

.article-footer {
    padding-top: 24px;
    border-top: 1px solid var(--rule);
    font-size: 0.8rem;
    color: var(--text-light);
    font-weight: 300;
    margin-bottom: 64px;
}

.article-footer a {
    color: var(--text-mid);
    border-bottom: 1px solid var(--rule);
}

/* --- Reading Progress Bar --- */

.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 2px;
    background: var(--accent);
    width: 0%;
    z-index: 100;
    pointer-events: none;
}

/* --- Scroll Header --- */

.scroll-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--rule-light);
    transform: translateY(-100%);
    transition: transform 0.3s var(--ease);
    z-index: 99;
    padding: 12px 0;
}

.scroll-header.visible {
    transform: translateY(0);
}

.scroll-header-title {
    font-size: 0.85rem;
    font-weight: 400;
    color: var(--text-mid);
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 var(--body-px);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* --- Responsive --- */

@media (max-width: 520px) {
    header {
        padding-top: 72px;
        padding-bottom: 56px;
    }

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

    .stat:not(:first-child) {
        padding-left: 0;
        border-left: none;
        border-top: 1px solid var(--rule-light);
    }

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

    .col:last-child {
        padding-left: 0;
        border-left: none;
        border-top: 1px solid var(--rule-light);
    }
}
