:root {
    --color-brand: #7c2d12;
    --color-cta: #00E5FF;
    --text-dark: #1a1a1a;
    --text-body: #2d2d2d;
    --text-muted: #777;
    --border: #ccc;
    --bg-warm: #f0ede8;
    --bg-white: #fff;
}

.skip-link {
    position: absolute;
    top: -50px;
    left: 0;
    background-color: var(--color-brand);
    color: #fff;
    padding: 8px 16px;
    z-index: 200;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
}

.skip-link:focus {
    top: 0;
}

.article-page {
    max-width: 100%;
    overflow-x: hidden;
    background-color: var(--bg-white);
}

.article-hero {
    background-color: var(--color-brand);
    color: #fff;
    padding: 64px 24px;
    text-align: center;
}

.article-hero h1,
.article-hero p,
.article-hero span {
    color: #fff;
}

.article-hero__inner {
    max-width: 900px;
    margin: 0 auto;
}

.article-hero h1 {
    font-size: 36px;
    font-weight: 700;
    line-height: 1.6;
    margin: 0 0 14px;
}

.article-hero__lead {
    font-size: 18px;
    line-height: 1.6;
    opacity: 0.88;
    margin: 0 0 18px;
}

.article-hero__meta {
    display: flex;
    gap: 20px;
    justify-content: center;
    font-size: 14px;
    opacity: 0.72;
    line-height: 1.6;
}

.article-body {
    max-width: 860px;
    margin: 0 auto;
    padding: 40px 24px 64px;
}

.article-section {
    margin-bottom: 48px;
}

.article-section:last-child {
    margin-bottom: 0;
}

.article-body h2 {
    font-size: 28px;
    font-weight: 700;
    line-height: 1.6;
    color: var(--text-dark);
    margin: 0 0 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--color-brand);
}

.article-body h3 {
    font-size: 22px;
    font-weight: 700;
    line-height: 1.6;
    color: var(--text-dark);
    margin: 32px 0 10px;
}

.article-body p {
    font-size: 17px;
    line-height: 1.6;
    color: var(--text-body);
    margin: 0 0 16px;
}

.article-body ul,
.article-body ol {
    font-size: 17px;
    line-height: 1.6;
    color: var(--text-body);
    margin: 0 0 16px;
    padding-left: 24px;
}

.article-body li {
    margin-bottom: 8px;
}

.article-body li:last-child {
    margin-bottom: 0;
}

.article-body strong {
    font-weight: 700;
    color: var(--text-dark);
}

.article-img {
    margin: 28px 0;
}

.article-img img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 6px;
}

.article-img figcaption {
    font-size: 14px;
    color: var(--text-muted);
    margin-top: 8px;
    text-align: center;
    line-height: 1.6;
}

.table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 24px;
    border-radius: 6px;
    border: 1px solid var(--border);
}

.stats-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
}

.stats-table th {
    background-color: var(--color-brand);
    color: #fff;
    padding: 12px 16px;
    text-align: left;
    font-weight: 700;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    line-height: 1.6;
}

.stats-table td {
    padding: 10px 16px;
    border-bottom: 1px solid #ddd;
    line-height: 1.6;
    color: var(--text-body);
}

.stats-table tbody tr:nth-child(even) {
    background-color: var(--bg-warm);
}

.stats-table tbody tr:hover {
    background-color: #e8e2da;
}

.stat-highlight {
    font-weight: 700;
    color: var(--color-brand);
}

.progress-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    text-align: center;
    margin-bottom: 24px;
}

.progress-item svg {
    display: block;
    margin: 0 auto 10px;
}

.progress-item__value {
    fill: var(--text-dark);
    font-size: 22px;
    font-weight: 700;
    font-family: inherit;
}

.progress-item__label {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.6;
    margin: 0;
}

.timeline {
    position: relative;
    padding-left: 44px;
    margin-bottom: 24px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 16px;
    top: 4px;
    bottom: 4px;
    width: 2px;
    background-color: var(--color-brand);
}

.timeline-item {
    position: relative;
    padding-bottom: 28px;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -36px;
    top: 6px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--color-brand);
    border: 3px solid var(--bg-warm);
}

.timeline-item__date {
    font-size: 14px;
    font-weight: 700;
    color: var(--color-brand);
    margin: 0 0 4px;
    line-height: 1.6;
}

.timeline-item__title {
    font-size: 17px;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0 0 4px;
    line-height: 1.6;
}

.timeline-item__detail {
    font-size: 15px;
    color: var(--text-muted);
    line-height: 1.6;
    margin: 0;
}

.calculator-box {
    background-color: var(--bg-warm);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 32px;
    margin-bottom: 24px;
}

.calculator-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}

.calc-field label {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 6px;
    line-height: 1.6;
}

.calc-field input {
    width: 100%;
    padding: 10px 12px;
    font-size: 16px;
    border: 1px solid var(--border);
    border-radius: 4px;
    background-color: var(--bg-white);
    color: var(--text-dark);
    box-sizing: border-box;
    line-height: 1.6;
}

.calc-field input:focus {
    outline: 2px solid var(--color-brand);
    outline-offset: 1px;
    border-color: var(--color-brand);
}

.btn-calc {
    background-color: var(--color-cta);
    color: var(--text-dark);
    border: none;
    padding: 12px 28px;
    font-size: 16px;
    font-weight: 700;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s;
    line-height: 1.6;
}

.btn-calc:hover {
    background-color: #00c8e0;
}

.btn-calc:focus {
    outline: 2px solid var(--text-dark);
    outline-offset: 2px;
}

.calc-result {
    margin-top: 16px;
    font-size: 17px;
    color: var(--text-dark);
    font-weight: 700;
    line-height: 1.6;
    min-height: 26px;
}

.calc-noscript {
    font-size: 14px;
    color: var(--text-muted);
    margin-top: 12px;
    line-height: 1.6;
}

.faq-list {
    margin-bottom: 24px;
}

.faq-item {
    margin-bottom: 28px;
    padding-bottom: 28px;
    border-bottom: 1px solid #ddd;
}

.faq-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.faq-item h3 {
    margin-top: 0;
    margin-bottom: 10px;
}

.faq-item p {
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .article-hero {
        padding: 44px 16px;
    }

    .article-hero h1 {
        font-size: 26px;
    }

    .article-hero__lead {
        font-size: 16px;
    }

    .article-hero__meta {
        flex-direction: column;
        gap: 6px;
    }

    .article-body {
        padding: 28px 16px 48px;
    }

    .article-body h2 {
        font-size: 24px;
    }

    .article-body h3 {
        font-size: 20px;
    }

    .article-body p,
    .article-body ul,
    .article-body ol {
        font-size: 16px;
    }

    .progress-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
    }

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

    .calculator-box {
        padding: 20px;
    }

    .timeline {
        padding-left: 36px;
    }

    .timeline::before {
        left: 12px;
    }

    .timeline-item::before {
        left: -32px;
    }
}

@media (max-width: 480px) {
    .article-hero {
        padding: 32px 14px;
    }

    .article-hero h1 {
        font-size: 22px;
    }

    .article-hero__lead {
        font-size: 15px;
    }

    .article-body h2 {
        font-size: 21px;
    }

    .article-body h3 {
        font-size: 18px;
    }

    .progress-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }

    .progress-item svg {
        width: 100px;
        height: 100px;
    }

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

    .stats-table th,
    .stats-table td {
        padding: 8px 10px;
        font-size: 13px;
    }

    .timeline {
        padding-left: 32px;
    }

    .timeline::before {
        left: 10px;
    }

    .timeline-item::before {
        left: -30px;
        width: 8px;
        height: 8px;
    }

    .timeline-item__title {
        font-size: 15px;
    }

    .timeline-item__detail {
        font-size: 14px;
    }
}

/* ===== TYPOGRAPHY SPACING FIX (APS_ARTICLE_TYPO_REQUIRED_v2) ===== */
/* Defensive guard against universal * { margin: 0 } reset in global.css. */
/* body-scoped via :where() so specificity stays at 0,0,0,1 — beats * but
   loses to any component rule like .tip-box p / .faq-item p. */
body :where(p)              { margin-bottom: 1.1rem; }
body :where(h2)             { margin-top: 2.5rem; margin-bottom: 1rem; }
body :where(h3)             { margin-top: 1.75rem; margin-bottom: 0.75rem; }
body :where(h4)             { margin-top: 1.25rem; margin-bottom: 0.5rem; }
body :where(ul, ol)         { margin-bottom: 1.1rem; padding-left: 1.5rem; }
body :where(li)             { margin-bottom: 0.4rem; }
body :where(blockquote)     { margin: 1.5rem 0; }
