/* ============================================
   Bigtalk — Articles (index + detail)
   ============================================ */

.article-index {
    max-width: 1060px;
    padding-top: clamp(120px, 16vh, 170px);
    padding-bottom: 80px;
}

.article-index-hero {
    margin-bottom: 28px;
    max-width: 760px;
}

.article-index-hero__eyebrow {
    display: inline-block;
    font-family: var(--font-heading);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--green-primary);
    margin-bottom: 16px;
    padding: 6px 14px;
    background: var(--green-glow);
    border: 1px solid var(--border-accent);
    border-radius: 100px;
}

.article-index-hero h1 {
    font-size: clamp(36px, 5vw, 56px);
    line-height: 1.08;
    letter-spacing: -0.03em;
    margin-bottom: 16px;
}

.article-index-hero__intro {
    color: var(--text-secondary);
    font-size: clamp(16px, 1.6vw, 18px);
    line-height: 1.7;
}

.article-index-hero__intro p {
    margin: 0;
}

/* ---- Topic toolbar ---- */

.article-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.article-toolbar__label {
    font-size: 14px;
    color: var(--text-secondary);
}

.article-toolbar__select {
    min-width: 220px;
    border-radius: 999px;
    border: 1px solid var(--border-subtle);
    background: var(--bg-secondary);
    color: var(--text-primary);
    padding: 9px 38px 9px 14px;
    font-family: var(--font-body);
    font-size: 14px;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%23f0f2f5' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 12px 8px;
    cursor: pointer;
    transition: border-color 0.25s ease;
}

[data-theme="light"] .article-toolbar__select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%231a1d23' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.article-toolbar__select:hover {
    border-color: var(--hover-border-strong);
}

.article-toolbar__reset {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    border: 1px solid var(--border-subtle);
    background: var(--bg-glass);
    color: var(--text-secondary);
    text-decoration: none;
    padding: 8px 14px;
    font-size: 13px;
    transition: all 0.25s ease;
}

.article-toolbar__reset:hover {
    color: var(--text-primary);
    border-color: var(--hover-border);
    background: var(--bg-card-hover);
}

/* ---- Chips & meta ---- */

.article-chip {
    display: inline-block;
    font-family: var(--font-heading);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--green-primary);
    background: var(--green-glow);
    border: 1px solid var(--border-accent);
    padding: 4px 12px;
    border-radius: 100px;
    margin-bottom: 12px;
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    font-size: 13px;
    color: var(--text-muted);
}

.article-meta span + span::before {
    content: "";
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--text-muted);
    margin-right: 10px;
}

.article-meta--large {
    font-size: 14px;
    margin-bottom: 24px;
}

/* ---- Featured card ---- */

.article-featured-card {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 22px;
    margin-bottom: 18px;
    padding: 22px;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    background: var(--bg-card);
    text-decoration: none;
    color: inherit;
    transition: all 0.35s var(--ease-out-expo);
}

.article-featured-card:hover {
    border-color: var(--hover-border);
    background: var(--bg-card-hover);
    transform: translateY(-3px);
}

.article-featured-card__content {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.article-featured-card__content h2 {
    font-size: clamp(24px, 2.6vw, 32px);
    line-height: 1.15;
    margin-bottom: 12px;
}

.article-featured-card__content p {
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 20px;
}

.article-featured-card__image {
    border-radius: var(--radius-lg);
    overflow: hidden;
    min-height: 220px;
}

.article-featured-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ---- Cards grid ---- */

.article-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin-top: 18px;
}

.article-card {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    background: var(--bg-card);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: all 0.35s var(--ease-out-expo);
}

.article-card:hover {
    border-color: var(--hover-border);
    background: var(--bg-card-hover);
    transform: translateY(-4px);
}

.article-card__image {
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--bg-secondary);
}

.article-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.6s var(--ease-out-expo);
}

.article-card:hover .article-card__image img {
    transform: scale(1.05);
}

.article-card__body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.article-card__body h3 {
    font-size: 19px;
    line-height: 1.25;
    margin-bottom: 8px;
}

.article-card__body p {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.55;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-card__body .article-meta {
    margin-top: auto;
}

.article-card__body .article-chip {
    align-self: flex-start;
}

/* ---- Fallback cover ---- */

.article-fallback-cover {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    min-height: 220px;
    padding: 24px;
    color: var(--text-primary);
    text-align: center;
    font-family: var(--font-heading);
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.02em;
    background: linear-gradient(145deg, rgba(37, 211, 102, 0.18) 0%, rgba(18, 140, 126, 0.08) 100%);
    border: 1px solid var(--border-accent);
}

.article-fallback-cover--small {
    min-height: 0;
    font-size: 22px;
}

/* ---- Empty state ---- */

.article-empty {
    text-align: center;
    padding: 80px 24px;
    border: 1px dashed var(--border-subtle);
    border-radius: var(--radius-xl);
}

.article-empty h2 {
    font-size: 24px;
    margin-bottom: 10px;
}

.article-empty p {
    color: var(--text-secondary);
}

/* ---- Pagination ---- */

.article-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 36px;
}

.article-pagination__link {
    min-width: 40px;
    text-align: center;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-subtle);
    background: var(--bg-card);
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.25s ease;
}

.article-pagination__link:hover {
    color: var(--text-primary);
    border-color: var(--hover-border);
    background: var(--bg-card-hover);
}

.article-pagination__link.is-active {
    color: #fff;
    background: var(--green-gradient);
    border-color: transparent;
    box-shadow: 0 0 20px rgba(37, 211, 102, 0.25);
}

.article-pagination__ellipsis {
    color: var(--text-muted);
    padding: 0 4px;
}

/* ============================================
   Article detail
   ============================================ */

.article-detail {
    max-width: 860px;
    padding-top: clamp(120px, 16vh, 170px);
    padding-bottom: 80px;
}

.article-detail__hero h1 {
    font-size: clamp(34px, 4.6vw, 52px);
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin-bottom: 14px;
}

.article-detail__subtitle {
    color: var(--text-secondary);
    font-size: clamp(17px, 1.8vw, 21px);
    line-height: 1.5;
    margin-bottom: 16px;
}

.article-detail__cover {
    margin-top: 26px;
    border-radius: var(--radius-xl);
    overflow: hidden;
    border: 1px solid var(--border-subtle);
    line-height: 0;
}

.article-detail__cover img {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: 480px;
    margin: 0 auto;
    border-radius: calc(var(--radius-xl) - 1px);
}

/* ---- Article body / rich text ---- */

.article-detail__body {
    margin-top: 40px;
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.75;
    color: var(--text-primary);
}

.article-detail__lead {
    color: var(--text-secondary);
    font-size: clamp(18px, 1.8vw, 21px);
    line-height: 1.6;
    margin-bottom: 24px;
}

.article-detail__body h1,
.article-detail__body h2,
.article-detail__body h3,
.article-detail__body h4,
.article-rich-text h1,
.article-rich-text h2,
.article-rich-text h3,
.article-rich-text h4 {
    font-family: var(--font-heading);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
    margin: 1.6em 0 0.6em;
}

.article-detail__body h1,
.article-rich-text h1 { font-size: 34px; }
.article-detail__body h2,
.article-rich-text h2 { font-size: 28px; }
.article-detail__body h3,
.article-rich-text h3 { font-size: 23px; }
.article-detail__body h4,
.article-rich-text h4 { font-size: 19px; }

.article-detail__body p,
.article-rich-text p,
.article-image-text__text p {
    margin: 0 0 1.2em;
}

.article-detail__body a,
.article-rich-text a {
    color: var(--green-primary);
    text-decoration-thickness: 2px;
    text-underline-offset: 2px;
}

.article-detail__body strong,
.article-rich-text strong { font-weight: 600; }

.article-detail__body ul,
.article-detail__body ol,
.article-rich-text ul,
.article-rich-text ol {
    margin: 0 0 1.2em;
    padding-left: 1.4em;
}

.article-detail__body li,
.article-rich-text li { margin-bottom: 0.4em; }

.article-detail__body hr,
.article-rich-text hr {
    border: 0;
    height: 2px;
    margin: 2em 0;
    background: linear-gradient(90deg, transparent 0%, var(--border-subtle) 30%, var(--border-subtle) 70%, transparent 100%);
}

.article-detail__body code,
.article-rich-text code {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.9em;
    padding: 2px 6px;
    border-radius: 6px;
    background: var(--bg-glass);
    border: 1px solid var(--border-subtle);
}

.article-detail__body pre,
.article-rich-text pre {
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 20px;
    overflow-x: auto;
    margin-bottom: 1.4em;
    font-size: 14px;
    line-height: 1.6;
}

.article-detail__body pre code,
.article-rich-text pre code {
    background: none;
    border: 0;
    padding: 0;
}

/* ---- Stream blocks ---- */

.article-block-heading:first-child {
    margin-top: 0;
}

.article-image {
    margin: 1.8em 0;
}

.article-image img {
    border-radius: var(--radius-lg);
    display: block;
}

.article-image figcaption {
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
    margin-top: 10px;
}

.article-image--left { text-align: left; }
.article-image--center { text-align: center; }
.article-image--right { text-align: right; }

.article-image--left,
.article-image--center,
.article-image--right {
    text-align: center;
}

.article-image--small img { width: 25%; }
.article-image--medium img { width: 50%; }
.article-image--large img { width: 75%; }
.article-image--full img { width: 100%; }

.article-image--left img,
.article-image--right img {
    width: 50%;
}

@media (max-width: 768px) {
    .article-image--small img,
    .article-image--medium img,
    .article-image--large img,
    .article-image--left img,
    .article-image--right img {
        width: 100%;
    }
}

.article-image-text {
    display: grid;
    align-items: center;
    gap: 24px;
    margin: 1.8em 0;
}

.article-image-text--img-one-third { grid-template-columns: 1fr 2fr; }
.article-image-text--img-half { grid-template-columns: 1fr 1fr; }
.article-image-text--img-two-thirds { grid-template-columns: 2fr 1fr; }

.article-image-text--right,
.article-image-text--right.article-image-text--img-half,
.article-image-text--right.article-image-text--img-one-third,
.article-image-text--right.article-image-text--img-two-thirds {
    direction: rtl;
}

.article-image-text--right > * {
    direction: ltr;
}

.article-image-text__image img {
    border-radius: var(--radius-lg);
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.article-image-text__text *:last-child {
    margin-bottom: 0;
}

.article-quote {
    margin: 1.8em 0;
    padding: 10px 0 10px 26px;
    border-left: 3px solid var(--green-primary);
    color: var(--text-secondary);
    font-size: clamp(19px, 2vw, 24px);
    font-weight: 500;
    line-height: 1.5;
    font-family: var(--font-heading);
}

.article-quote p {
    margin: 0 0 8px;
}

.article-quote cite {
    display: block;
    font-family: var(--font-body);
    font-size: 14px;
    font-style: normal;
    color: var(--text-muted);
}

/* ---- Related ---- */

.article-related {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid var(--border-subtle);
}

.article-related h2 {
    font-size: 24px;
    margin-bottom: 6px;
}

/* ---- Responsive ---- */

@media (max-width: 1024px) {
    .article-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .article-index,
    .article-detail {
        padding-top: 110px;
        padding-bottom: 60px;
    }

    .article-featured-card {
        grid-template-columns: 1fr;
    }

    .article-featured-card__image {
        min-height: 0;
        order: -1;
    }

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

    .article-image-text--img-one-third,
    .article-image-text--img-half,
    .article-image-text--img-two-thirds {
        grid-template-columns: 1fr;
    }

    .article-image-text {
        gap: 12px;
    }
}