:root {
    --color-brand: #2d2d2d;
    --color-cta: #FF5E78;
    --text-muted: #888;
    --border: #e0e0e0;
    --bg-light: #f7f7f7;
}

html, body {
    overflow-x: hidden;
}

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

img, video, iframe, svg {
    max-width: 100%;
    height: auto;
}

.article-hero {
    background-color: var(--color-brand);
    padding: 80px 32px;
    text-align: center;
}

.article-hero__content {
    max-width: 780px;
    margin: 0 auto;
}

.article-hero__title {
    font-size: 44px;
    font-weight: 700;
    color: #fff;
    line-height: 1.6;
    margin: 0 0 20px;
}

.article-hero__subtitle {
    font-size: 18px;
    color: rgba(255,255,255,0.85);
    line-height: 1.6;
    margin: 0 0 16px;
}

.article-hero__meta {
    display: flex;
    justify-content: center;
    gap: 24px;
    font-size: 14px;
    color: rgba(255,255,255,0.6);
    margin-bottom: 32px;
}

.article-hero__meta time,
.article-hero__meta span {
    color: rgba(255,255,255,0.6);
}

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

.btn-cta:hover,
.btn-cta:focus {
    background-color: #e44e68;
    color: var(--color-brand);
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.article-section {
    padding: 64px 24px;
}

.article-section--white {
    background-color: #fff;
}

.article-section--light {
    background-color: var(--bg-light);
}

.article-container {
    max-width: 1200px;
    margin: 0 auto;
}

.article-prose {
    max-width: 780px;
    margin: 0 auto;
}

.article-prose p {
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    margin: 0 0 20px;
}

.article-prose blockquote {
    margin: 32px 0;
    padding: 24px 28px;
    border-left: 2px solid #ccc;
    font-size: 18px;
    line-height: 1.6;
    font-style: italic;
    color: #444;
}

.article-prose blockquote p {
    margin: 0;
    color: #444;
    font-size: 18px;
}

.article-prose blockquote cite {
    display: block;
    margin-top: 12px;
    font-size: 14px;
    font-style: normal;
    color: var(--text-muted);
}

.section-header {
    margin-bottom: 40px;
    max-width: 780px;
}

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

.section-header__title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background-color: var(--color-brand);
    margin-top: 12px;
}

.section-header__desc {
    font-size: 16px;
    line-height: 1.6;
    color: #555;
    margin: 0;
}

.build-timeline {
    position: relative;
    padding: 0 0 0 0;
    margin: 0;
    list-style: none;
    max-width: 780px;
}

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

.build-step {
    position: relative;
    padding-left: 64px;
    padding-bottom: 36px;
}

.build-step:last-child {
    padding-bottom: 0;
}

.build-step__dot {
    position: absolute;
    left: 12px;
    top: 0;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background-color: var(--color-brand);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
}

.build-step__title {
    display: block;
    font-size: 20px;
    font-weight: 700;
    color: var(--color-brand);
    line-height: 1.6;
    margin: 0 0 8px;
}

.build-step__body p {
    font-size: 16px;
    line-height: 1.6;
    color: #444;
    margin: 0;
}

.piece-category {
    margin-top: 48px;
}

.piece-category:first-child {
    margin-top: 0;
}

.piece-category__name {
    font-size: 24px;
    font-weight: 700;
    color: var(--color-brand);
    line-height: 1.6;
    margin: 0 0 8px;
}

.piece-category__intro {
    font-size: 16px;
    line-height: 1.6;
    color: #555;
    margin: 0 0 24px;
}

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

.pieces-grid--two {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.piece-card {
    background: #fff;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: box-shadow 0.2s;
}

.piece-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

.piece-card__image-wrap {
    overflow: hidden;
}

.piece-card__image-wrap img {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    display: block;
}

.piece-card__body {
    padding: 20px 22px 24px;
}

.piece-card__name {
    display: block;
    font-size: 18px;
    font-weight: 700;
    color: var(--color-brand);
    line-height: 1.6;
    margin: 0 0 8px;
}

.piece-card__body > p {
    font-size: 15px;
    line-height: 1.6;
    color: #444;
    margin: 0 0 12px;
}

.piece-card__features {
    list-style: none;
    padding: 0;
    margin: 0;
}

.piece-card__features li {
    position: relative;
    padding-left: 18px;
    font-size: 14px;
    line-height: 1.6;
    color: #666;
    margin-bottom: 4px;
}

.piece-card__features li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--color-brand);
}

.table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 16px;
}

.styled-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
    line-height: 1.6;
}

.styled-table th {
    background-color: var(--color-brand);
    color: #fff;
    font-weight: 700;
    padding: 14px 16px;
    text-align: left;
    font-size: 14px;
    white-space: nowrap;
}

.styled-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    color: #333;
    vertical-align: top;
}

.styled-table tbody tr:nth-child(even) {
    background-color: #fafafa;
}

.styled-table tbody tr:hover {
    background-color: #f0f0f0;
}

.styled-table td strong {
    font-weight: 700;
    color: var(--color-brand);
}

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

.faq-item {
    margin-bottom: 32px;
}

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

.faq-item__question {
    font-size: 20px;
    font-weight: 700;
    color: var(--color-brand);
    line-height: 1.6;
    margin: 0 0 12px;
}

.faq-item__answer {
    font-size: 16px;
    line-height: 1.6;
    color: #444;
    margin: 0;
}

.article-conclusion {
    background-color: var(--color-brand);
    padding: 64px 24px;
}

.article-conclusion__content {
    max-width: 780px;
    margin: 0 auto;
    text-align: center;
}

.article-conclusion h2,
.article-conclusion p,
.article-conclusion span,
.article-conclusion strong,
.article-conclusion em,
.article-conclusion li,
.article-conclusion a:not(.btn-cta) {
    color: #fff;
}

.article-conclusion h2 {
    font-size: 30px;
    font-weight: 700;
    line-height: 1.6;
    margin: 0 0 24px;
}

.article-conclusion p {
    font-size: 16px;
    line-height: 1.6;
    margin: 0 0 20px;
}

.article-conclusion .btn-cta {
    margin-top: 16px;
}

.article-hero h1,
.article-hero h2,
.article-hero h3,
.article-hero p,
.article-hero span,
.article-hero strong,
.article-hero em,
.article-hero time,
.article-hero a:not(.btn-cta) {
    color: #fff;
}

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

    .article-hero__title {
        font-size: 28px;
    }

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

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

    .article-section {
        padding: 48px 16px;
    }

    .section-header__title {
        font-size: 24px;
    }

    .piece-category__name {
        font-size: 20px;
    }

    .pieces-grid {
        grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
        gap: 20px;
    }

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

    .piece-card__body {
        padding: 16px 18px 20px;
    }

    .styled-table {
        font-size: 13px;
    }

    .styled-table th,
    .styled-table td {
        padding: 10px 12px;
    }

    .faq-item__question {
        font-size: 18px;
    }

    .article-conclusion {
        padding: 48px 16px;
    }

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

    .build-timeline::before {
        left: 18px;
    }

    .build-step {
        padding-left: 52px;
    }

    .build-step__dot {
        left: 6px;
    }
}

@media (max-width: 480px) {
    .article-hero__title {
        font-size: 24px;
    }

    .article-section {
        padding: 36px 12px;
    }

    .section-header__title {
        font-size: 22px;
    }

    .section-header__title::after {
        width: 40px;
    }

    .pieces-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .piece-card__image-wrap img {
        aspect-ratio: 16 / 10;
    }

    .btn-cta {
        padding: 12px 24px;
        font-size: 15px;
        width: 100%;
        text-align: center;
    }

    .styled-table th {
        font-size: 12px;
    }

    .styled-table td {
        font-size: 12px;
        padding: 8px 10px;
    }
}

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