/* Shared layout for Perspectives articles (white papers published as web pages).
   Loaded by pages that set $page_stylesheets = ['/assets/css/article.css'] before including the header. */

/* Long article titles need a shorter, flexible hero */
.secondary-hero.article-hero {
    height: auto;
    min-height: 550px;
    padding: 140px 0 90px;
}

.article-hero h1 {
    font-size: clamp(34px, 6vw, 64px);
    max-width: 1000px;
    margin: 0 auto;
}

.article-hero-eyebrow {
    font-family: var(--font-heading);
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0.85;
    margin-bottom: 20px;
}

.article-container {
    max-width: 760px;
}

.article-breadcrumb {
    font-size: 15px;
    color: #888;
    margin-bottom: 28px;
}

.article-breadcrumb a {
    color: var(--primary-color) !important;
}

/* Byline */
.article-byline {
    display: flex;
    align-items: center;
    gap: 16px;
    padding-bottom: 32px;
    margin-bottom: 40px;
    border-bottom: 1px solid #ececec;
}

.article-byline-photo {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
}

.article-byline-name {
    font-weight: 500;
    line-height: 1.4;
}

.article-byline-meta {
    font-size: 15px;
    color: #777;
    line-height: 1.5;
}

.article-byline a {
    color: var(--primary-color) !important;
    text-decoration: underline;
}

/* Body */
.article-body p {
    font-size: 19px;
    line-height: 1.75;
    margin-bottom: 22px;
}

.article-body h2 {
    font-size: clamp(26px, 3.4vw, 36px);
    line-height: 1.2;
    margin-bottom: 20px;
}

.article-body h3 {
    font-size: clamp(20px, 2.4vw, 24px);
    line-height: 1.3;
    margin: 28px 0 10px;
}

.article-body a {
    color: var(--primary-color) !important;
    text-decoration: underline;
}

.article-body .article-eyebrow {
    font-family: var(--font-heading);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--primary-color);
    margin: 56px 0 8px;
    scroll-margin-top: 120px;
}

.article-body blockquote {
    font-family: var(--font-heading);
    font-size: clamp(21px, 2.6vw, 26px);
    font-weight: 600;
    line-height: 1.4;
    margin: 32px 0;
    padding: 6px 0 6px 24px;
    border-left: 4px solid var(--primary-color);
}

/* Table of contents */
.article-toc {
    background: var(--gray-color);
    border: 1px solid #ececec;
    border-radius: 18px;
    padding: 28px 32px;
    margin-bottom: 48px;
}

.article-body .article-toc-title {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 18px;
    margin-bottom: 10px;
}

.article-toc ol {
    padding-left: 22px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 17px;
    line-height: 1.5;
}

.article-toc a {
    text-decoration: none !important;
}

/* FAQ + CTA */
.article-faq {
    margin-top: 64px;
    padding-top: 48px;
    border-top: 1px solid #ececec;
    scroll-margin-top: 120px;
}

.article-cta {
    margin-top: 56px;
    background: var(--gray-color);
    border: 1px solid #ececec;
    border-radius: 24px;
    padding: 40px;
}

.article-cta-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 8px;
}

.article-cta-actions a {
    text-decoration: none !important;
}

.article-cta-actions button {
    margin: 0;
    font-size: 17px;
    padding: 15px 22px;
}

button.outline-dark {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    cursor: pointer;
    transition: all 0.3s ease;
}

button.outline-dark:hover {
    background-color: var(--primary-color);
    color: var(--secondary-color);
}

/* Byline when the author is the agency rather than a person */
.article-byline-photo.is-logo {
    border-radius: 14px;
}

/* Small print under a table or chart */
.article-body .article-source {
    font-size: 14px;
    line-height: 1.6;
    color: #888;
}

/* Bulleted lists with bold lead-ins */
.article-list {
    padding-left: 22px;
    margin: 0 0 22px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    font-size: 19px;
    font-weight: 300;
    line-height: 1.7;
}

.article-list strong {
    font-weight: 700;
}

/* Stat tables: number, what it means, source */
.article-table-wrap {
    overflow-x: auto;
    margin: 8px 0 14px;
}

.article-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 16px;
    line-height: 1.5;
}

.article-table th {
    text-align: left;
    font-family: var(--font-heading);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #777;
    padding: 10px 14px;
    border-bottom: 2px solid #ececec;
}

.article-table td {
    padding: 14px;
    border-bottom: 1px solid #ececec;
    vertical-align: top;
}

.article-table td:first-child {
    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: 800;
    color: var(--primary-color);
    white-space: nowrap;
}

.article-table td:last-child {
    font-size: 14px;
    color: #777;
}

/* Stat tiles */
.article-stats {
    margin: 36px 0;
}

.article-stats figcaption {
    font-family: var(--font-heading);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #777;
    margin-bottom: 14px;
}

.article-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.article-stat {
    background: var(--gray-color);
    border: 1px solid #ececec;
    border-radius: 16px;
    padding: 22px 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.article-stat-number {
    font-family: var(--font-heading);
    font-size: clamp(30px, 4vw, 40px);
    font-weight: 800;
    line-height: 1.1;
    color: var(--primary-color);
}

.article-stat-label {
    font-size: 15px;
    line-height: 1.45;
    color: #555;
}

/* Numbered step cards */
.article-steps {
    list-style: none;
    padding: 0;
    margin: 24px 0 36px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.article-steps li {
    background: var(--gray-color);
    border: 1px solid #ececec;
    border-radius: 16px;
    padding: 22px 20px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.article-step-num {
    font-family: var(--font-heading);
    font-size: 28px;
    font-weight: 800;
    line-height: 1;
    color: var(--primary-color);
}

.article-steps strong {
    font-family: var(--font-heading);
    font-size: 19px;
}

.article-step-text {
    font-size: 16px;
    font-weight: 300;
    line-height: 1.5;
}

.article-sources {
    margin-top: 48px;
}

.article-sources .article-list {
    font-size: 16px;
    gap: 4px;
}

@media screen and (max-width: 780px) {
    .secondary-hero.article-hero {
        padding: 120px 0 60px;
    }

    .article-body p,
    .article-list {
        font-size: 17px;
    }

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

    .article-cta {
        padding: 28px 22px;
    }

    .article-cta-actions,
    .article-cta-actions a,
    .article-cta-actions button {
        width: 100%;
    }
}

/* Phones: stack each stat-table row (number, meaning, source) instead of scrolling sideways */
@media screen and (max-width: 600px) {
    .article-table thead {
        display: none;
    }

    .article-table,
    .article-table tbody,
    .article-table tr,
    .article-table td {
        display: block;
        width: 100%;
    }

    .article-table tr {
        padding: 14px 0;
        border-bottom: 1px solid #ececec;
    }

    .article-table td {
        padding: 2px 0;
        border: 0;
    }

    .article-table td:first-child {
        white-space: normal;
    }
}
