:root {
    --color-brand: #2c1810;
    --color-cta: #00B894;
    --text-main: #222;
    --text-muted: #666;
    --border-color: #d5d0cb;
    --bg-warm: #f7f4f1;
    --bg-card: #efeae5;
}

html,
body {
    overflow-x: hidden;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    color: var(--text-main);
    font-size: 16px;
    line-height: 1.6;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--color-brand);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.article-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

.article-hero {
    background-color: var(--color-brand);
    color: #fff;
    padding: 80px 24px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.article-hero h1,
.article-hero h2,
.article-hero h3,
.article-hero h4,
.article-hero h5,
.article-hero h6,
.article-hero p,
.article-hero li,
.article-hero dt,
.article-hero dd,
.article-hero span:not(.stat-unit),
.article-hero label,
.article-hero strong,
.article-hero em,
.article-hero blockquote,
.article-hero a:not(.btn-cta) {
    color: #fff;
}

.hero-deco {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.hero-inner {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
}

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

.hero-subtitle {
    font-size: 18px;
    margin: 0 0 32px 0;
    opacity: 0.9;
}

.btn-cta {
    display: inline-block;
    background-color: var(--color-cta);
    color: var(--color-brand);
    padding: 14px 32px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 16px;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-cta:hover {
    background-color: #009e80;
    text-decoration: none;
}

.article-intro {
    padding: 60px 0 20px;
}

.article-intro p {
    font-size: 18px;
    margin: 0 0 24px 0;
    color: var(--text-main);
}

.article-figure {
    margin: 28px 0 0 0;
    border-radius: 8px;
    overflow: hidden;
}

.article-figure img {
    width: 100%;
    height: auto;
}

.stats-section {
    background-color: var(--bg-warm);
    padding: 50px 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    text-align: center;
}

.stat-card {
    padding: 24px 16px;
}

.stat-number {
    font-size: 52px;
    font-weight: 700;
    color: var(--color-brand);
    line-height: 1;
}

.stat-unit {
    font-size: 22px;
    font-weight: 700;
    color: var(--color-brand);
    margin-left: 2px;
}

.stat-label {
    font-size: 14px;
    color: var(--text-muted);
    margin: 8px 0 0 0;
}

.timeline-section {
    padding: 64px 0;
}

.timeline {
    position: relative;
    padding-left: 60px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 21px;
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: var(--border-color);
}

.timeline-item {
    position: relative;
    margin-bottom: 52px;
}

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

.timeline-marker {
    position: absolute;
    left: -60px;
    top: 4px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background-color: var(--color-brand);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.timeline-content h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--color-brand);
    margin: 0 0 16px 0;
    line-height: 1.6;
}

.timeline-content h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--color-brand);
    margin: 28px 0 12px 0;
    line-height: 1.6;
}

.timeline-content p {
    font-size: 16px;
    color: var(--text-main);
    margin: 0 0 16px 0;
}

.timeline-content ol,
.timeline-content ul {
    margin: 0 0 16px 0;
    padding-left: 24px;
}

.timeline-content li {
    font-size: 16px;
    color: var(--text-main);
    margin-bottom: 8px;
    line-height: 1.6;
}

.timeline-content li:last-child {
    margin-bottom: 0;
}

.timeline-tip {
    font-size: 14px;
    color: var(--text-muted);
    margin: 20px 0 0 0;
    font-style: italic;
    line-height: 1.6;
}

.comparison-section {
    background-color: var(--bg-warm);
    padding: 64px 0;
}

.comparison-section h2 {
    font-size: 28px;
    font-weight: 700;
    color: var(--color-brand);
    margin: 0 0 12px 0;
    line-height: 1.6;
}

.comparison-section > .article-container > p {
    font-size: 16px;
    color: var(--text-main);
    margin: 0 0 8px 0;
}

.slider-hint {
    font-size: 14px;
    color: var(--text-muted);
    margin: 0 0 20px 0;
}

.slider-wrapper {
    overflow: hidden;
    margin: 0 -24px;
    padding: 0 24px;
}

.slider-track {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding: 4px 4px 20px 4px;
}

.slide-card {
    flex: 0 0 260px;
    scroll-snap-align: start;
    background-color: #fff;
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.slide-card h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--color-brand);
    margin: 0 0 16px 0;
    line-height: 1.6;
}

.slide-card dl {
    margin: 0;
}

.slide-card dt {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    margin-top: 12px;
    letter-spacing: 0.02em;
}

.slide-card dt:first-of-type {
    margin-top: 0;
}

.slide-card dd {
    font-size: 15px;
    color: var(--text-main);
    margin: 4px 0 0 0;
    line-height: 1.6;
}

.rating-bar {
    display: inline-block;
    width: 60px;
    height: 4px;
    background: #ddd;
    border-radius: 2px;
    margin-right: 8px;
    vertical-align: middle;
    position: relative;
}

.rating-bar::after {
    content: '';
    display: block;
    height: 100%;
    border-radius: 2px;
    background-color: var(--color-brand);
    width: calc(var(--rating) * 20%);
}

.calculator-section {
    padding: 64px 0;
}

.calculator-section h2 {
    font-size: 28px;
    font-weight: 700;
    color: var(--color-brand);
    margin: 0 0 12px 0;
    line-height: 1.6;
}

.calculator-section > .article-container > p {
    font-size: 16px;
    color: var(--text-main);
    margin: 0 0 32px 0;
}

.calculator {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    align-items: start;
}

.calc-checklist {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.calc-label {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: var(--bg-warm);
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.calc-label:hover {
    background-color: var(--bg-card);
}

.calc-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: var(--color-cta);
    cursor: pointer;
    flex-shrink: 0;
}

.calc-label span {
    font-size: 15px;
    color: var(--text-main);
    line-height: 1.6;
}

.calc-results {
    padding: 24px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.calc-results h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--color-brand);
    margin: 0 0 16px 0;
    line-height: 1.6;
}

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

.calc-method {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    border-radius: 6px;
    margin-bottom: 8px;
}

.calc-method:last-child {
    margin-bottom: 0;
}

.calc-available {
    background-color: var(--bg-warm);
    border: 1px solid var(--color-brand);
}

.calc-unavailable {
    background-color: #f5f3f0;
    border: 1px solid #ddd;
    opacity: 0.5;
}

.calc-name {
    font-weight: 700;
    font-size: 14px;
    color: var(--text-main);
}

.calc-meta {
    font-size: 13px;
    color: var(--text-muted);
}

.calc-status {
    font-size: 13px;
    font-weight: 700;
    color: var(--color-brand);
}

.prevention-section {
    background-color: var(--bg-warm);
    padding: 64px 0;
}

.prevention-section h2 {
    font-size: 28px;
    font-weight: 700;
    color: var(--color-brand);
    margin: 0 0 12px 0;
    line-height: 1.6;
}

.prevention-section > .article-container > p {
    font-size: 16px;
    color: var(--text-main);
    margin: 0 0 32px 0;
}

.prevention-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.prevention-card {
    background: #fff;
    border-radius: 8px;
    padding: 32px 24px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.prevention-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    color: var(--color-brand);
}

.prevention-card h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--color-brand);
    margin: 0 0 12px 0;
    line-height: 1.6;
}

.prevention-card p {
    font-size: 15px;
    color: var(--text-main);
    margin: 0;
    line-height: 1.6;
}

.faq-section {
    padding: 64px 0;
}

.faq-section h2 {
    font-size: 28px;
    font-weight: 700;
    color: var(--color-brand);
    margin: 0 0 32px 0;
    line-height: 1.6;
}

.faq-list {
    max-width: 820px;
}

.faq-item {
    padding-bottom: 28px;
    margin-bottom: 28px;
    border-bottom: 1px solid var(--border-color);
}

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

.faq-item h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--color-brand);
    margin: 0 0 8px 0;
    line-height: 1.6;
}

.faq-item p {
    font-size: 16px;
    color: var(--text-main);
    margin: 0;
    line-height: 1.6;
}

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

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

    .hero-subtitle {
        font-size: 16px;
    }

    .hero-deco {
        width: 200px;
        height: 200px;
    }

    .article-container {
        padding: 0 16px;
    }

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

    .stat-number {
        font-size: 40px;
    }

    .timeline {
        padding-left: 50px;
    }

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

    .timeline-marker {
        left: -50px;
        width: 36px;
        height: 36px;
    }

    .timeline-content h2 {
        font-size: 20px;
    }

    .timeline-content h3 {
        font-size: 16px;
    }

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

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

    .slide-card {
        flex: 0 0 240px;
    }

    .slider-wrapper {
        margin: 0 -16px;
        padding: 0 16px;
    }

    .comparison-section,
    .calculator-section,
    .prevention-section,
    .faq-section {
        padding: 48px 0;
    }

    .timeline-section {
        padding: 48px 0;
    }

    .article-intro {
        padding: 40px 0 10px;
    }

    .faq-item {
        padding-bottom: 20px;
        margin-bottom: 20px;
    }
}

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

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

    .btn-cta {
        display: block;
        text-align: center;
        padding: 14px 20px;
    }

    .timeline {
        padding-left: 44px;
    }

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

    .timeline-marker {
        left: -44px;
        width: 32px;
        height: 32px;
    }

    .timeline-marker svg {
        width: 14px;
        height: 14px;
    }

    .timeline-content h2 {
        font-size: 18px;
    }

    .timeline-item {
        margin-bottom: 40px;
    }

    .calc-method {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .calc-results {
        padding: 16px;
    }

    .prevention-card {
        padding: 24px 18px;
    }

    .stat-number {
        font-size: 36px;
    }

    .article-intro p {
        font-size: 16px;
    }

    .hero-deco {
        width: 160px;
        height: 160px;
    }
}

/* ===== 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; }
