/* Articles — help center / blog (matches store / leaderboard shell) */

.articles-app {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
    background: #121314;
    color: var(--text);
    font-family: var(--font-body);
}

.articles-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
}

.articles-wrap {
    max-width: 72rem;
}

.articles-wrap--narrow {
    max-width: 50rem;
}

.articles-detail-layout {
    max-width: 76rem;
    display: grid;
    grid-template-columns: minmax(0, 13rem) minmax(0, 1fr) minmax(0, 13rem);
    gap: 1.25rem 1.5rem;
    align-items: start;
}

.articles-detail-main {
    min-width: 0;
    max-width: 50rem;
    justify-self: center;
    width: 100%;
}

.articles-sponsor-rail {
    position: sticky;
    top: 1rem;
    align-self: start;
}

.articles-sponsor-rail__link {
    display: block;
    border-radius: 2px;
    overflow: hidden;
    border: 1px solid var(--border-md);
    background: var(--bg-card);
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.articles-sponsor-rail__link:hover {
    border-color: rgba(196, 70, 26, 0.55);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
    transform: translateY(-2px);
}

.articles-sponsor-rail__img {
    display: block;
    width: 100%;
    height: auto;
    vertical-align: middle;
}

.articles-sponsor-rail--left {
    justify-self: end;
}

.articles-sponsor-rail--right {
    justify-self: start;
}

@media (max-width: 1180px) {
    .articles-detail-layout {
        grid-template-columns: minmax(0, 1fr);
        max-width: 50rem;
    }

    .articles-sponsor-rail {
        display: none;
    }

    .articles-detail-main {
        max-width: none;
    }
}

/* ─── Page header ─────────────────────────────────────────────────────── */
.articles-page-head {
    margin-bottom: 1.5rem;
}
.articles-page-head__title {
    font-family: var(--font-display);
    font-size: 2.25rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    line-height: 1;
    margin: 0 0 0.35rem;
    color: var(--text);
}
.articles-page-head__sub {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.55;
    margin: 0;
    max-width: 50ch;
}

/* ─── Breadcrumbs ─────────────────────────────────────────────────────── */
.articles-crumbs {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin: 0 0 1.25rem;
    display: flex;
    gap: 0.4rem;
    align-items: center;
    flex-wrap: wrap;
}
.articles-crumbs a {
    color: var(--text-muted);
    text-decoration: none;
}
.articles-crumbs a:hover {
    color: var(--text);
}
.articles-crumbs-sep {
    opacity: 0.45;
}

/* ─── Category bar (list view — uses .filter-bar from main.css) ─────── */
.articles-filter .pill-count {
    opacity: 0.55;
    margin-left: 0.2rem;
}

/* ─── Card grid ───────────────────────────────────────────────────────── */
.articles-grid {
    display: grid;
    gap: 1.25rem;
    grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr));
}
.articles-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}
.articles-card {
    background: var(--bg-card);
    border: 1px solid var(--border-md);
    border-radius: 2px;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.articles-card-link:hover .articles-card {
    border-color: rgba(196, 70, 26, 0.55);
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
}
.articles-card-thumb {
    aspect-ratio: 16 / 9;
    background-size: cover;
    background-position: center;
    background-color: var(--bg-deeper);
    position: relative;
    border-bottom: 1px solid var(--border);
    overflow: hidden;
}
.articles-card-thumb--fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.4rem;
    line-height: 1;
    background: linear-gradient(135deg, rgba(196, 70, 26, 0.2), rgba(80, 50, 120, 0.12));
}
.articles-card-thumb-cat {
    position: absolute;
    top: 0.65rem;
    left: 0.65rem;
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 0.25rem 0.6rem;
    border-radius: 2px;
    background: rgba(0, 0, 0, 0.72);
    color: #fff;
}
.articles-card-body {
    padding: 1rem 1.1rem 1.1rem;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    flex: 1;
}
.articles-card h3 {
    margin: 0;
    color: var(--text);
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    line-height: 1.15;
}
.articles-card p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.88rem;
    line-height: 1.55;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.articles-card-foot {
    margin-top: 0.45rem;
    padding-top: 0.65rem;
    display: flex;
    gap: 0.8rem;
    align-items: center;
    justify-content: space-between;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
    border-top: 1px solid var(--border);
}
.articles-card-arrow {
    color: var(--accent);
    font-weight: 700;
}
.articles-card-meta-row {
    display: flex;
    gap: 0.55rem;
    align-items: center;
}

@media (min-width: 720px) {
    .articles-grid > .articles-card-link.is-featured {
        grid-column: 1 / -1;
    }
    .articles-card-link.is-featured .articles-card {
        flex-direction: row;
    }
    .articles-card-link.is-featured .articles-card-thumb {
        aspect-ratio: auto;
        flex: 1 1 58%;
        min-height: 16rem;
        border-bottom: none;
        border-right: 1px solid var(--border);
    }
    .articles-card-link.is-featured .articles-card-body {
        flex: 1 1 42%;
        padding: 1.4rem 1.6rem;
        gap: 0.6rem;
    }
    .articles-card-link.is-featured h3 {
        font-size: 1.55rem;
    }
    .articles-card-link.is-featured p {
        -webkit-line-clamp: 4;
    }
}

.articles-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
    background: var(--bg-card);
    border: 1px solid var(--border-md);
    border-radius: 2px;
}
.articles-empty h3 {
    font-family: var(--font-display);
    font-size: 1.35rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text);
    margin: 0 0 0.35rem;
}
.articles-empty a {
    color: var(--accent);
}

/* ─── Detail view ─────────────────────────────────────────────────────── */
.articles-meta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin: 0 0 1.5rem;
}
.articles-meta .pill {
    font-size: 0.65rem;
    padding: 0.2rem 0.55rem;
}
.articles-summary {
    color: rgba(255, 255, 255, 0.88);
    font-size: 1.05rem;
    line-height: 1.6;
    margin: 0 0 1.75rem;
    padding-bottom: 1.4rem;
    border-bottom: 1px solid var(--border-md);
}
.articles-body {
    color: var(--text);
    font-size: 1rem;
    line-height: 1.75;
    margin: 0;
}
.articles-body h3 {
    font-family: var(--font-display);
    font-size: 1.45rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin: 2rem 0 0.8rem;
    color: var(--text);
    padding-bottom: 0.35rem;
    border-bottom: 1px solid var(--border);
}
.articles-body h3:first-child {
    margin-top: 0;
}
.articles-body h4 {
    font-size: 1.1rem;
    margin: 1.5rem 0 0.5rem;
    color: var(--text);
}
.articles-body p {
    margin: 0 0 1rem;
}
.articles-body strong {
    color: var(--text);
}
.articles-body em {
    font-style: italic;
    color: rgba(255, 255, 255, 0.85);
}
.articles-body a {
    color: var(--accent);
}
.articles-body a:hover {
    color: var(--accent-glow);
}
.articles-body code {
    background: var(--bg-deeper);
    padding: 0.1rem 0.4rem;
    border-radius: 2px;
    font-family: Consolas, "JetBrains Mono", monospace;
    font-size: 0.88rem;
}
.articles-body pre.art-code {
    background: var(--bg-deeper);
    border: 1px solid var(--border-md);
    border-radius: 2px;
    padding: 0.9rem 1.1rem;
    overflow-x: auto;
    font-size: 0.85rem;
    line-height: 1.55;
    margin: 1rem 0;
}
.articles-body pre.art-code code {
    background: transparent;
    padding: 0;
    font-size: inherit;
}
.articles-body blockquote.art-q {
    margin: 1rem 0;
    padding: 0.8rem 1.1rem;
    border-left: 3px solid var(--accent);
    background: rgba(196, 70, 26, 0.08);
    color: rgba(255, 255, 255, 0.92);
    border-radius: 0 2px 2px 0;
}
.articles-body figure.art-figure {
    margin: 1.5rem 0;
    text-align: center;
}
.articles-body figure.art-figure img {
    max-width: 100%;
    height: auto;
    border-radius: 2px;
    border: 1px solid var(--border-md);
    display: block;
    margin: 0 auto;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}
.articles-body figure.art-figure figcaption {
    margin-top: 0.55rem;
    font-size: 0.82rem;
    color: var(--text-muted);
    font-style: italic;
}

.articles-hero {
    margin: 0 0 2rem;
    aspect-ratio: 21 / 9;
    max-height: 22rem;
    background-size: cover;
    background-position: center;
    background-color: var(--bg-deeper);
    border: 1px solid var(--border-md);
    border-radius: 2px;
    position: relative;
    overflow: hidden;
}
.articles-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.55) 100%);
}

.articles-helpful {
    margin: 2.5rem 0 1.25rem;
    padding: 1rem 1.15rem;
    background: var(--bg-card);
    border: 1px solid var(--border-md);
    border-radius: 2px;
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}
.articles-helpful-q {
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-size: 0.8rem;
    color: var(--text);
    flex: 1 1 auto;
    min-width: 12rem;
}
.articles-helpful-btns {
    display: flex;
    gap: 0.5rem;
}
.articles-helpful-btn {
    background: var(--bg-deeper);
    border: 1px solid var(--border-md);
    color: var(--text);
    padding: 0.45rem 1rem;
    border-radius: 2px;
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 0.88rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}
.articles-helpful-btn:hover {
    border-color: var(--accent);
}
.articles-helpful-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.articles-helpful-thanks {
    color: #2fde88;
    font-weight: 700;
    font-size: 0.85rem;
}

.articles-related {
    margin-top: 2rem;
}
.articles-related h3 {
    font-family: var(--font-display);
    font-size: 0.95rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin: 0 0 0.8rem;
    font-weight: 700;
}
.articles-related-grid {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
}
.articles-related-card {
    display: block;
    background: var(--bg-card);
    border: 1px solid var(--border-md);
    border-radius: 2px;
    padding: 0.8rem 1rem;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.12s ease;
}
.articles-related-card:hover {
    border-color: rgba(196, 70, 26, 0.55);
}
.articles-related-card-title {
    color: var(--text);
    font-size: 0.92rem;
    font-weight: 700;
    line-height: 1.3;
}
.articles-related-card-summary {
    color: var(--text-muted);
    font-size: 0.78rem;
    margin-top: 0.25rem;
    line-height: 1.45;
}

.articles-back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-top: 2rem;
}
.articles-back-link:hover {
    color: var(--text);
}

.articles-staff-edit {
    float: right;
    background: rgba(196, 70, 26, 0.12);
    border: 1px solid rgba(196, 70, 26, 0.4);
    color: var(--accent);
    padding: 0.35rem 0.8rem;
    border-radius: 2px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-decoration: none;
}
.articles-staff-edit:hover {
    background: rgba(196, 70, 26, 0.22);
}

@media (max-width: 600px) {
    .articles-page-head__title {
        font-size: 1.65rem;
    }
    .articles-body h3 {
        font-size: 1.2rem;
    }
}
