/* Guide index and recommendation articles share the library paper surface. */
.guide-index-main,
.guide-article {
    --guide-paper: #f5f1e9;
    --guide-card: #fffdfa;
    --guide-ink: #242a32;
    --guide-muted: #5f656e;
    --guide-line: #e2ddd4;
    --guide-blue: #2455a0;
    --guide-gold: #c9a24a;
    --guide-gold-soft: #efe4c8;
    --guide-shadow: 0 10px 28px rgba(47, 42, 32, 0.06);
    color: var(--guide-ink);
    background: var(--guide-paper);
}

.guide-index-main a,
.guide-article a {
    text-decoration: none;
}

.guide-index-main :is(a, button):focus-visible,
.guide-article :is(a, button, [tabindex="0"]):focus-visible {
    outline: 3px solid var(--guide-blue);
    outline-offset: 4px;
    border-radius: 4px;
}

.guide-index-main {
    flex: 1;
    padding-bottom: 4rem;
}

.guide-index-hero {
    padding: 3.25rem 0 0;
}

.guide-index-eyebrow {
    margin: 0 0 0.75rem;
    color: var(--guide-blue);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.1em;
}

.guide-index-title {
    max-width: 900px;
    margin: 0;
    font-size: clamp(2rem, 4vw, 3.25rem);
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.035em;
    text-wrap: balance;
}

.guide-index-intro,
.guide-index-language {
    max-width: 720px;
    margin: 1rem 0 0;
    color: var(--guide-muted);
    line-height: 1.8;
}

.guide-index-language {
    margin-top: 0.75rem;
    font-size: 0.875rem;
}

.guide-index-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.5rem;
    margin-top: 1.75rem;
    border-bottom: 1px solid #dcd7ce;
}

.guide-index-nav a {
    display: inline-flex;
    align-items: center;
    min-height: 48px;
    padding: 0.5rem 0;
    color: var(--guide-ink);
    font-weight: 700;
    border-bottom: 3px solid transparent;
}

.guide-index-nav a:hover {
    color: var(--guide-blue);
    border-bottom-color: var(--guide-blue);
}

.guide-index-group {
    padding-top: 2.75rem;
    scroll-margin-top: 100px;
}

.guide-index-group-head {
    margin-bottom: 1.25rem;
}

.guide-index-group-title {
    margin: 0;
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 800;
    line-height: 1.3;
}

.guide-index-group-desc {
    margin: 0.6rem 0 0;
    color: var(--guide-muted);
    line-height: 1.7;
}

.guide-index-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
}

.guide-index-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--guide-line);
    border-radius: 16px;
    background: var(--guide-card);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.guide-index-card:hover {
    border-color: #d2cbbd;
    box-shadow: var(--guide-shadow);
}

.guide-index-group:first-child .guide-index-card {
    border-top: 3px solid var(--guide-gold);
}

.guide-index-card-link,
.guide-index-card-head {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr);
    gap: 1.25rem;
    align-items: center;
    min-width: 0;
    color: inherit;
}

.guide-index-card-link {
    flex: 1;
    padding: 1.35rem 1.4rem 1.15rem;
}

.guide-index-card-head {
    padding: 1.35rem 1.4rem 0;
}

.guide-index-card-media {
    width: 120px;
    height: 120px;
    overflow: hidden;
    border-radius: 14px;
    background: #efe9dc;
}

.guide-index-card-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.guide-index-card-copy {
    min-width: 0;
}

.guide-index-card-title {
    margin: 0;
    font-size: 1.28rem;
    font-weight: 800;
    line-height: 1.35;
}

.guide-index-card-desc {
    margin: 0.45rem 0 0;
    color: var(--guide-muted);
    font-size: 0.92rem;
    line-height: 1.7;
}

.guide-index-card-cta,
.guide-index-links a {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    min-height: 44px;
    color: var(--guide-blue);
    font-size: 0.9rem;
    font-weight: 700;
}

.guide-index-card-cta {
    margin-top: 0.55rem;
}

.guide-index-card-link:hover .guide-index-card-title,
.guide-index-links a:hover {
    color: var(--guide-blue);
}

.guide-index-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 1.25rem;
    padding: 0.85rem 1.4rem 1.15rem;
    margin-top: auto;
    border-top: 1px solid #ece7df;
}

.guide-index-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 1.5rem;
    margin-top: 3rem;
    padding: 1.5rem 0;
    border-top: 1px solid #dcd7ce;
}

.guide-index-actions strong {
    margin-right: auto;
}

.guide-index-action {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    color: var(--guide-blue);
    font-weight: 700;
}

.guide-article {
    min-height: calc(100vh - 180px);
    padding: 0 0 4.5rem;
}

.guide-article-hero {
    padding: 2.4rem 0 0;
}

.guide-article-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(220px, 0.85fr);
    gap: clamp(1.5rem, 4vw, 3.5rem);
    align-items: center;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--guide-line);
}

.guide-article-kicker {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    margin: 0 0 0.85rem;
    padding: 0.2rem 0.7rem;
    border-radius: 999px;
    background: var(--guide-gold-soft);
    color: #6a5318;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.06em;
}

.guide-article-title {
    margin: 0 0 0.85rem;
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    line-height: 1.18;
    letter-spacing: -0.035em;
    text-wrap: balance;
}

.guide-article-summary {
    max-width: 42rem;
    margin: 0 0 1.15rem;
    color: var(--guide-muted);
    font-size: 1.02rem;
    line-height: 1.8;
}

.guide-article .guide-article-meta {
    margin: 0 0 1.25rem;
    color: var(--guide-muted);
}

.guide-article .guide-article-meta-item > span,
.guide-article .guide-article-meta-item time {
    color: var(--guide-ink);
}

.guide-article-hero .guide-link {
    margin-right: 0.75rem;
}

.guide-article-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    box-sizing: border-box;
    padding: 0.75rem 1.25rem;
    border-radius: 10px;
    background: var(--guide-blue);
    color: #fff;
    font-weight: 700;
    transition: background-color 0.18s ease, transform 0.18s ease;
}

.guide-article-cta:hover {
    background: #1d4686;
}

.guide-article-cta:active {
    transform: translateY(1px);
}

.guide-article-cover {
    margin: 0;
    padding: 1.15rem;
    border: 1px solid var(--guide-line);
    border-radius: 20px;
    background: #fffef8;
    box-shadow: var(--guide-shadow);
}

.guide-article-cover img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 360px;
    object-fit: contain;
    aspect-ratio: 1;
}

.guide-article-toc {
    display: flex;
    gap: 0.55rem;
    padding: 1rem 0 0.25rem;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-width: thin;
}

.guide-article-toc a {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    min-height: 44px;
    padding: 0 0.95rem;
    border: 1px solid var(--guide-line);
    border-radius: 999px;
    background: var(--guide-card);
    color: #3d4652;
    font-size: 0.88rem;
    font-weight: 700;
    white-space: nowrap;
}

.guide-article-toc a:hover {
    border-color: #c9d4e4;
    color: var(--guide-blue);
    background: #f4f7fb;
}

.guide-article .guide-section {
    padding: 2.1rem 0;
    border-bottom: 1px solid var(--guide-line);
}

.guide-article .guide-section-title {
    margin: 0 0 0.4rem;
    font-size: clamp(1.35rem, 2.4vw, 1.7rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    scroll-margin-top: calc(var(--navbar-height, 56px) + 16px);
}

.guide-article .guide-section-sub {
    margin: 0 0 1.25rem;
    color: var(--guide-muted);
    line-height: 1.7;
}

.guide-article .guide-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.guide-article .guide-card {
    min-width: 0;
    padding: 1.25rem 1.3rem 1.3rem;
    border: 1px solid var(--guide-line);
    border-radius: 14px;
    background: var(--guide-card);
}

.guide-article .guide-card:last-child:nth-child(odd) {
    grid-column: 1 / -1;
}

.guide-article .guide-card-title {
    margin: 0 0 0.55rem;
    font-size: 1.05rem;
    font-weight: 800;
    line-height: 1.4;
}

.guide-article .guide-card-title a {
    color: inherit;
}

.guide-article .guide-card-title a:hover {
    color: var(--guide-blue);
}

.guide-article .guide-card-body,
.guide-article .guide-card-desc {
    margin: 0;
    color: #4d545e;
    line-height: 1.78;
}

.guide-article .guide-card-index {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    margin-bottom: 0.7rem;
    border-radius: 8px;
    background: var(--guide-gold-soft);
    color: #6a5318;
    font-size: 0.78rem;
    font-weight: 800;
}

.guide-table-note {
    margin: 0 0 0.75rem;
    color: var(--guide-muted);
    font-size: 0.88rem;
}

.guide-article .guide-table-scroll {
    width: 100%;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    border: 1px solid var(--guide-line);
    border-radius: 14px;
    background: var(--guide-card);
}

.guide-article .guide-comparison-table {
    width: 100%;
    min-width: 1040px;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.guide-article .guide-comparison-table th,
.guide-article .guide-comparison-table td {
    padding: 0.85rem 0.8rem;
    border-bottom: 1px solid #eee8dc;
    text-align: left;
    vertical-align: top;
    white-space: nowrap;
}

.guide-article .guide-comparison-table thead th {
    background: #f7f2e7;
    color: var(--guide-ink);
    font-size: 0.82rem;
    font-weight: 800;
}

.guide-article .guide-comparison-table thead th:first-child,
.guide-article .guide-comparison-table tbody th {
    position: sticky;
    left: 0;
    z-index: 1;
    background: var(--guide-card);
}

.guide-article .guide-comparison-table thead th:first-child {
    z-index: 2;
    background: #f7f2e7;
}

.guide-article .guide-comparison-table tbody th {
    font-weight: 800;
}

.guide-article .guide-comparison-table tbody th a {
    color: var(--guide-blue);
    font-weight: 800;
}

.guide-article .guide-comparison-table tbody tr:last-child th,
.guide-article .guide-comparison-table tbody tr:last-child td {
    border-bottom: 0;
}

.guide-article .guide-copy-block {
    padding: 1.2rem;
    border: 1px solid var(--guide-line);
    border-radius: 14px;
    background: #f7f3ea;
}

.guide-article .guide-copy-intro {
    margin: 0 0 1rem;
    color: var(--guide-muted);
    line-height: 1.72;
}

.guide-article .guide-copy-pre {
    max-width: 100%;
    margin: 0;
    padding: 1rem;
    overflow-x: auto;
    border: 1px solid var(--guide-line);
    border-radius: 10px;
    background: var(--guide-card);
    color: var(--guide-ink);
    font: inherit;
    font-size: 0.92rem;
    line-height: 1.72;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.guide-article .guide-faq-list {
    display: grid;
    gap: 0.85rem;
}

.guide-article .guide-faq-item {
    padding: 1.15rem 1.2rem;
    border: 1px solid var(--guide-line);
    border-left: 4px solid var(--guide-gold);
    border-radius: 14px;
    background: var(--guide-card);
}

.guide-article .guide-faq-q {
    margin: 0 0 0.45rem;
    font-size: 1.02rem;
    font-weight: 800;
}

.guide-article .guide-faq-a {
    margin: 0;
    color: #4d545e;
    line-height: 1.75;
}

.guide-article .guide-links,
.guide-article-topic-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.guide-article .guide-link {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    box-sizing: border-box;
    padding: 0.5rem 0.95rem;
    border: 1px solid var(--guide-line);
    border-radius: 999px;
    background: var(--guide-card);
    color: var(--guide-blue);
    font-weight: 700;
}

.guide-article .guide-link:hover {
    border-color: #c9d4e4;
    background: #f4f7fb;
}

.guide-article .boardgame-guide-section {
    padding: 2.1rem 0;
    border-bottom: 1px solid var(--guide-line);
}

@media (min-width: 720px) {
    .guide-index-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 720px) and (max-width: 1099px) {
    .guide-index-group:not(:first-child) .guide-index-card:last-child:nth-child(odd) {
        grid-column: 1 / -1;
    }
}

@media (min-width: 1100px) {
    .guide-index-group:not(:first-child) .guide-index-grid {
        grid-template-columns: repeat(12, minmax(0, 1fr));
    }

    .guide-index-group:not(:first-child) .guide-index-card {
        grid-column: span 4;
    }

    .guide-index-group:not(:first-child) .guide-index-card:nth-last-child(1):nth-child(3n + 1) {
        grid-column: span 12;
    }

    .guide-index-group:not(:first-child) .guide-index-card:nth-last-child(2):nth-child(3n + 1),
    .guide-index-group:not(:first-child) .guide-index-card:nth-last-child(1):nth-child(3n + 2) {
        grid-column: span 6;
    }
}

@media (max-width: 900px) {
    .guide-article-hero-grid,
    .guide-article .guide-grid {
        grid-template-columns: minmax(0, 1fr);
        width: 100%;
        min-width: 0;
    }

    .guide-article-cover {
        order: -1;
        width: min(100%, 280px);
        min-width: 0;
        justify-self: center;
        padding: 0.9rem;
        box-sizing: border-box;
    }
}

@media (max-width: 720px) {
    .guide-index-main,
    .guide-article {
        padding-bottom: 2.25rem;
    }

    .guide-index-hero,
    .guide-article-hero {
        padding-top: 1.6rem;
    }

    .guide-index-nav {
        gap: 0.25rem 1rem;
    }

    .guide-index-nav a {
        font-size: 0.875rem;
    }

    .guide-index-group {
        padding-top: 2rem;
    }

    .guide-index-grid,
    .guide-index-card,
    .guide-article .guide-card,
    .guide-article .guide-section {
        width: 100%;
        min-width: 0;
    }

    .guide-index-card-link,
    .guide-index-card-head {
        grid-template-columns: minmax(0, 1fr);
        gap: 0.9rem;
        padding: 0;
    }

    .guide-index-card-link,
    .guide-index-card-copy {
        padding: 0 1rem 0.15rem;
    }

    .guide-index-card-link {
        padding-bottom: 1rem;
    }

    .guide-index-card-head {
        padding-bottom: 0;
    }

    .guide-index-card-media {
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 9;
        border-radius: 0;
    }

    .guide-index-card-copy {
        padding: 0 1rem 0.2rem;
    }

    .guide-index-card-title {
        font-size: 1.18rem;
    }

    .guide-index-links {
        padding: 0.35rem 1rem 0.95rem;
    }

    .guide-index-actions {
        flex-direction: column;
        align-items: flex-start;
    }

    .guide-article-title {
        font-size: 1.7rem;
    }

    .guide-article-cta,
    .guide-article .guide-link {
        width: 100%;
        justify-content: center;
    }

    .guide-article-cover {
        width: 100%;
        max-width: none;
        border-radius: 16px;
    }

    .guide-article-cover img {
        max-height: 220px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .guide-index-card,
    .guide-article-cta {
        transition: none;
    }
}
