/* Article hub and article page layout (Crash Card Game) */

html.article-smooth-scroll {
    scroll-behavior: smooth;
}

.articles-hub-card {
    background: rgba(0, 0, 0, 0.22);
    border: 1px solid var(--panel-border);
    border-radius: 12px;
    padding: 18px 20px;
    margin-bottom: 14px;
}

.articles-hub-card h2 {
    margin: 0 0 8px;
    font-size: 1.2rem;
}

.articles-hub-card h2 a {
    color: var(--gold-light);
    text-decoration: none;
}

.articles-hub-card h2 a:hover,
.articles-hub-card h2 a:focus-visible {
    color: var(--gold);
    outline: none;
    text-decoration: underline;
}

.articles-hub-meta {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.articles-hub-description {
    margin-bottom: 14px;
}

.articles-empty-state {
    text-align: center;
    padding: 10px 0 6px;
}

.articles-empty-state p {
    margin-bottom: 16px;
}

.article-layout {
    display: grid;
    grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
    gap: 22px;
    align-items: start;
    margin-top: 18px;
}

.article-sidebar {
    position: sticky;
    top: 16px;
}

.article-sidebar-cta {
    display: block;
    width: 100%;
    text-align: center;
    margin-bottom: 18px;
    text-decoration: none;
}

.article-page .article-sidebar-cta:hover,
.article-page .article-sidebar-cta:focus-visible {
    text-decoration: none;
}

.article-sidebar-heading {
    font-size: 1rem;
    margin: 0 0 12px;
    letter-spacing: 0.3px;
}

.article-sidebar-heading a {
    color: var(--gold);
    text-decoration: none;
    font-weight: 800;
    line-height: 1.35;
}

.article-sidebar-heading a:hover,
.article-sidebar-heading a:focus-visible {
    color: var(--gold-light);
    text-decoration: underline;
    outline: none;
}

/* Articles hub only — keep Read Article / Play Crash buttons free of link underline */
.articles-hub .btn {
    text-decoration: none;
}

.articles-hub .btn:hover,
.articles-hub .btn:focus-visible {
    text-decoration: none;
}

.article-sidebar-nav {
    list-style: none;
    padding: 0;
    margin: 0;
    background: rgba(0, 0, 0, 0.22);
    border: 1px solid var(--panel-border);
    border-radius: 12px;
    padding: 12px 14px;
}

.article-sidebar-nav li + li {
    margin-top: 8px;
}

.article-sidebar-nav a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 600;
    line-height: 1.45;
    display: block;
}

.article-sidebar-nav a:hover,
.article-sidebar-nav a:focus-visible {
    color: var(--gold-light);
    outline: none;
}

.article-sidebar-nav a.is-current {
    color: var(--gold);
    font-weight: 800;
}

.article-main-panel {
    min-width: 0;
}

.article-page .content-card {
    max-width: none;
    margin-top: 0;
    padding: 26px 28px 30px;
}

.article-header h1 {
    margin: 0 0 14px;
    padding-bottom: 0;
    border-bottom: none;
}

.article-meta {
    margin: 0 0 24px;
    padding-bottom: 22px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.article-meta-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.article-meta-item {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    min-width: 0;
    padding: 10px 14px;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.26);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.article-meta-label {
    color: var(--gold);
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    line-height: 1.2;
}

.article-meta-value {
    color: var(--text-primary);
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.35;
    white-space: nowrap;
}

.article-meta-value time {
    font-weight: inherit;
}

.article-opening {
    margin-bottom: 8px;
}

/* Readable article prose (opening + body) */
.article-page .article-opening,
.article-page .article-body {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-secondary);
}

.article-page .article-opening p,
.article-page .article-body p {
    margin: 0 0 1.2rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

.article-page .article-body > h2 {
    color: var(--gold-light);
    font-size: 1.4rem;
    line-height: 1.35;
    margin: 2.4rem 0 0.9rem;
    padding-top: 1.4rem;
    border-top: 1px solid rgba(201, 169, 89, 0.2);
    letter-spacing: 0.2px;
    scroll-margin-top: 18px;
}

.article-page .article-body > h2:first-child {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.article-page .article-body h3 {
    color: var(--text-primary);
    font-size: 1.08rem;
    line-height: 1.4;
    margin: 1.6rem 0 0.65rem;
}

.article-page .article-body ul,
.article-page .article-body ol {
    margin: 0 0 1.35rem;
    padding-left: 1.5rem;
}

.article-page .article-body ul {
    list-style: disc;
}

.article-page .article-body ol {
    list-style: decimal;
}

.article-page .article-body li {
    margin-bottom: 0.6rem;
    padding-left: 0.2rem;
    line-height: 1.75;
    color: var(--text-secondary);
}

.article-page .article-body li:last-child {
    margin-bottom: 0;
}

.article-page .article-body li::marker {
    color: var(--gold);
}

.article-page .article-body strong {
    color: var(--text-primary);
    font-weight: 700;
}

.article-page .article-body a {
    color: var(--gold-light);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.article-page .article-body a:hover,
.article-page .article-body a:focus-visible {
    color: var(--gold);
    outline: none;
}

.article-page .article-body code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.92em;
    padding: 0.12em 0.35em;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.28);
    color: var(--text-primary);
}

/* Callout / note blocks */
.article-note {
    margin: 1.5rem 0 1.65rem;
    padding: 14px 16px 14px 18px;
    border-left: 4px solid var(--gold);
    border-radius: 0 10px 10px 0;
    background: rgba(0, 0, 0, 0.24);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    color: var(--text-secondary);
    line-height: 1.75;
}

.article-note strong {
    color: var(--gold-light);
}

/* Responsive data tables */
.article-table-scroll {
    margin: 1.35rem 0 1.65rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 10px;
    border: 1px solid var(--panel-border);
    background: rgba(0, 0, 0, 0.2);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.article-table-scroll table {
    width: 100%;
    min-width: 520px;
    border-collapse: collapse;
    border-spacing: 0;
    font-size: 0.95rem;
    line-height: 1.5;
}

.article-table-scroll caption {
    caption-side: top;
    padding: 12px 14px 0;
    text-align: left;
    font-weight: 700;
    color: var(--gold-light);
}

.article-table-scroll thead th {
    padding: 12px 14px;
    text-align: left;
    vertical-align: top;
    font-weight: 700;
    color: var(--gold-light);
    background: rgba(0, 0, 0, 0.38);
    border-bottom: 2px solid rgba(201, 169, 89, 0.35);
    white-space: nowrap;
}

.article-table-scroll tbody td {
    padding: 11px 14px;
    text-align: left;
    vertical-align: top;
    color: var(--text-secondary);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.article-table-scroll tbody tr:last-child td {
    border-bottom: none;
}

.article-table-scroll tbody tr:nth-child(even) {
    background: rgba(0, 0, 0, 0.14);
}

.article-table-scroll tbody tr:hover {
    background: rgba(36, 107, 58, 0.18);
}

.article-table-scroll td strong {
    color: var(--text-primary);
}

.article-toc {
    margin: 0 0 26px;
    padding: 16px 18px;
    border-radius: 12px;
    border: 1px solid rgba(201, 169, 89, 0.25);
    background: rgba(0, 0, 0, 0.18);
}

.article-toc-heading {
    color: var(--gold-light);
    font-size: 1rem;
    margin: 0 0 12px;
}

.article-toc ol {
    margin: 0;
    padding-left: 22px;
}

.article-toc li {
    margin-bottom: 8px;
    line-height: 1.5;
}

.article-toc li:last-child {
    margin-bottom: 0;
}

.article-toc a {
    color: var(--gold-light);
    text-decoration: none;
    font-weight: 600;
}

.article-toc a:hover,
.article-toc a:focus-visible {
    color: var(--gold);
    text-decoration: underline;
    outline: none;
}

.article-bottom-cta {
    margin-top: 2.5rem;
    padding: 22px 20px;
    border-radius: 12px;
    border: 1px solid rgba(201, 169, 89, 0.3);
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.28) 0%, rgba(36, 107, 58, 0.35) 100%);
    text-align: center;
}

.article-bottom-cta h2 {
    color: var(--gold);
    margin: 0 0 10px;
    font-size: 1.35rem;
    border-top: none;
    padding-top: 0;
}

.article-bottom-cta p {
    margin-bottom: 16px;
}

.article-bottom-cta .btn {
    display: inline-block;
    text-decoration: none;
}

@media (max-width: 900px) {
    .article-layout {
        grid-template-columns: 1fr;
    }

    .article-sidebar {
        position: static;
        order: -1;
    }
}

@media (max-width: 768px) {
    .articles-hub-card {
        padding: 16px;
    }

    .article-page .content-card {
        padding: 20px 16px 24px;
    }

    .article-meta-item {
        flex: 1 1 calc(50% - 10px);
    }

    .article-meta-value {
        white-space: normal;
    }

    .article-page .article-body > h2 {
        font-size: 1.22rem;
        margin-top: 2rem;
        padding-top: 1.1rem;
    }

    .article-table-scroll table {
        min-width: 440px;
        font-size: 0.9rem;
    }

    .article-table-scroll thead th,
    .article-table-scroll tbody td {
        padding: 10px 12px;
    }

    .article-bottom-cta {
        padding: 18px 16px;
    }
}
