:root {
    --bg: #f7f8f5;
    --surface: #ffffff;
    --surface-soft: #eef4ef;
    --felt: #0c5b47;
    --felt-deep: #083a30;
    --ink: #151a1d;
    --muted: #5f6b68;
    --line: #d9e0dc;
    --line-strong: #bdc9c3;
    --red: #b12b35;
    --blue: #244f7a;
    --gold: #b9872f;
    --shadow: 0 14px 34px rgba(13, 24, 32, 0.08);
    --radius: 8px;
    --container: min(1160px, calc(100% - 32px));
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    background:
        linear-gradient(180deg, rgba(247, 248, 245, 0.96), rgba(247, 248, 245, 0.98)),
        url("card-felt-pattern.webp") top right / 620px auto no-repeat,
        var(--bg);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.65;
    text-rendering: optimizeLegibility;
}

a {
    color: var(--felt);
    text-decoration: none;
}

a:hover {
    color: var(--red);
}

img {
    max-width: 100%;
}

main {
    min-height: 62vh;
    padding-bottom: 38px;
}

.container {
    width: var(--container);
    margin: 0 auto;
}

.site-top {
    padding: 14px 0 0;
}

.topbar {
    display: grid;
    grid-template-columns: minmax(220px, auto) 1fr;
    gap: 18px;
    align-items: center;
    padding: 10px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 10px 28px rgba(13, 24, 32, 0.06);
}

.brand {
    display: inline-flex;
    min-width: 0;
    align-items: center;
    gap: 10px;
    color: var(--ink);
}

.brand-mark {
    display: grid;
    width: 40px;
    height: 40px;
    place-items: center;
    color: #fff;
    background: linear-gradient(135deg, var(--red), var(--felt-deep));
    border-radius: var(--radius);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.35rem;
    font-weight: 800;
    line-height: 1;
}

.brand strong,
.brand small {
    display: block;
}

.brand strong {
    color: var(--ink);
    font-size: 1rem;
    line-height: 1.15;
}

.brand small {
    max-width: 230px;
    overflow: hidden;
    color: var(--muted);
    font-size: 0.82rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.primary-nav,
.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: flex-end;
}

.primary-nav a,
.nav-menu summary,
.footer-links a {
    display: inline-flex;
    min-height: 34px;
    align-items: center;
    padding: 0 11px;
    color: var(--ink);
    border: 1px solid transparent;
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-weight: 750;
}

.primary-nav a:hover,
.nav-menu summary:hover,
.nav-menu[open] summary,
.footer-links a:hover {
    color: var(--felt-deep);
    background: var(--surface-soft);
    border-color: var(--line);
}

.nav-menu {
    position: relative;
}

.nav-menu summary {
    cursor: pointer;
    list-style: none;
}

.nav-menu summary::-webkit-details-marker {
    display: none;
}

.nav-menu summary::after {
    width: 0;
    height: 0;
    margin-left: 8px;
    border-top: 5px solid currentColor;
    border-right: 4px solid transparent;
    border-left: 4px solid transparent;
    content: "";
}

.nav-menu[open] summary::after {
    transform: rotate(180deg);
}

.nav-menu-panel {
    position: absolute;
    z-index: 20;
    top: calc(100% + 8px);
    right: 0;
    display: grid;
    width: min(320px, calc(100vw - 32px));
    max-height: min(420px, calc(100vh - 120px));
    overflow-y: auto;
    padding: 8px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 18px 42px rgba(13, 24, 32, 0.14);
}

.primary-nav .nav-menu-panel a {
    justify-content: flex-start;
    min-height: 38px;
    color: var(--ink);
}

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin: 16px 0 0;
    color: var(--muted);
    font-size: 0.92rem;
}

.breadcrumbs a {
    color: var(--muted);
}

.breadcrumbs a:hover {
    color: var(--felt);
}

.home-hero {
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(340px, 1.05fr);
    grid-template-areas:
        "copy art"
        "stats art";
    gap: 18px;
    align-items: stretch;
    margin: 18px 0 34px;
    padding: 18px;
    color: #fff;
    background:
        linear-gradient(135deg, rgba(8, 58, 48, 0.96), rgba(12, 91, 71, 0.94)),
        var(--felt-deep);
    border-radius: var(--radius);
    box-shadow: 0 18px 42px rgba(8, 58, 48, 0.22);
}

.hero-copy {
    grid-area: copy;
    display: flex;
    min-width: 0;
    flex-direction: column;
    justify-content: center;
    padding: 22px 16px 10px;
}

.home-hero h1,
.hub-hero h1,
.article-header h1 {
    margin: 10px 0 12px;
    line-height: 1.03;
    letter-spacing: 0;
}

.home-hero h1 {
    max-width: 11ch;
    color: #fff;
    font-size: 4rem;
}

.hero-lead,
.home-hero .hero-copy > p:not(.eyebrow) {
    max-width: 62ch;
    color: rgba(255, 255, 255, 0.84);
    font-size: 1.08rem;
}

.eyebrow {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    gap: 8px;
    margin: 0;
    color: var(--gold);
    font-size: 0.76rem;
    font-weight: 850;
    letter-spacing: 0;
    text-transform: uppercase;
}

.eyebrow::before {
    width: 20px;
    height: 2px;
    background: currentColor;
    content: "";
}

.hero-actions,
.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.btn,
.text-link,
.side-link {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    padding: 0 15px;
    color: #fff;
    background: var(--red);
    border: 1px solid var(--red);
    border-radius: var(--radius);
    font-weight: 800;
}

.btn:hover,
.text-link:hover,
.side-link:hover {
    color: #fff;
    background: #8f1f29;
    border-color: #8f1f29;
}

.btn-light {
    color: var(--ink);
    background: #fff;
    border-color: var(--line);
}

.btn-light:hover {
    color: var(--felt-deep);
    background: var(--surface-soft);
    border-color: var(--line-strong);
}

.hero-art {
    grid-area: art;
    min-height: 420px;
    overflow: hidden;
    background: var(--felt-deep);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: var(--radius);
}

.hero-art img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-stats {
    grid-area: stats;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin: 0;
    padding: 0 16px 16px;
}

.hero-stats div,
.hub-stats div {
    padding: 14px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: var(--radius);
}

.hero-stats dt,
.hub-stats dt {
    color: rgba(255, 255, 255, 0.74);
    font-size: 0.74rem;
    font-weight: 850;
    text-transform: uppercase;
}

.hero-stats dd,
.hub-stats dd {
    margin: 5px 0 0;
    color: #fff;
    font-size: 1.75rem;
    font-weight: 900;
    line-height: 1;
}

.content-band,
.split-feature,
.table-section,
.faq-section {
    margin: 32px 0;
}

.section-heading {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: end;
    margin: 30px 0 14px;
}

.section-heading h2 {
    margin: 5px 0 0;
    color: var(--ink);
    font-size: 2rem;
    line-height: 1.14;
    letter-spacing: 0;
}

.section-heading p {
    max-width: 68ch;
    color: var(--muted);
}

.count-label {
    flex: 0 0 auto;
    color: var(--muted);
    font-weight: 750;
}

.editorial-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.editorial-card,
.topic-card,
.guide-card,
.article-card,
.side-card,
.archive-group,
.empty-state,
.letter-nav,
.sitemap-list a,
.feature-panel {
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.editorial-card,
.topic-card,
.guide-card,
.side-card,
.archive-group,
.feature-panel {
    padding: 18px;
}

.editorial-card h3,
.topic-card h3,
.guide-card h3,
.side-card h2,
.feature-panel h3,
.archive-group h3 {
    margin: 7px 0 8px;
    color: var(--ink);
    font-size: 1.08rem;
    line-height: 1.22;
    letter-spacing: 0;
}

.editorial-card p:last-child,
.topic-card p:last-child,
.guide-card p:last-child,
.side-card p:last-child,
.feature-panel p:last-child {
    margin-bottom: 0;
}

.mini-meta {
    margin: 0;
    color: var(--blue);
    font-size: 0.82rem;
    font-weight: 800;
}

.split-feature {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
    gap: 20px;
    align-items: start;
    padding: 24px 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.split-feature h2 {
    margin: 6px 0 12px;
    font-size: 2.2rem;
    line-height: 1.12;
    letter-spacing: 0;
}

.split-feature p,
.editorial-card p,
.topic-card p,
.guide-card p,
.side-card p,
.article-header .lead {
    color: var(--muted);
}

.check-list {
    display: grid;
    gap: 10px;
    margin: 12px 0 0;
    padding: 0;
    list-style: none;
}

.check-list li {
    position: relative;
    padding-left: 22px;
}

.check-list li::before {
    position: absolute;
    left: 0;
    top: 0.55em;
    width: 9px;
    height: 9px;
    background: var(--red);
    border-radius: 50%;
    content: "";
}

.table-wrap {
    overflow-x: auto;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.variant-table {
    width: 100%;
    min-width: 760px;
    border-collapse: collapse;
}

.variant-table caption {
    padding: 14px 16px;
    color: var(--muted);
    text-align: left;
    border-bottom: 1px solid var(--line);
}

.variant-table th,
.variant-table td {
    padding: 13px 16px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}

.variant-table thead th {
    color: var(--felt-deep);
    background: var(--surface-soft);
    font-size: 0.84rem;
    text-transform: uppercase;
}

.variant-table tbody th {
    color: var(--ink);
}

.variant-table tr:last-child th,
.variant-table tr:last-child td {
    border-bottom: 0;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.card-grid.slim {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.topic-card {
    position: relative;
    min-width: 0;
    overflow: hidden;
}

.topic-card::after {
    position: absolute;
    right: 14px;
    top: 10px;
    color: rgba(12, 91, 71, 0.08);
    content: "A";
    font-family: Georgia, "Times New Roman", serif;
    font-size: 4rem;
    font-weight: 800;
    line-height: 1;
}

.topic-card h3,
.topic-card p,
.topic-card .mini-meta {
    position: relative;
    z-index: 1;
}

.topic-card h3 a,
.guide-card h3 a {
    color: var(--ink);
}

.topic-card h3 a:hover,
.guide-card h3 a:hover {
    color: var(--red);
}

.guide-list {
    display: grid;
    gap: 12px;
}

.guide-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
}

.text-link {
    min-height: 38px;
    padding: 0 13px;
    font-size: 0.92rem;
}

.faq-list {
    display: grid;
    gap: 10px;
}

.faq-list details {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.faq-list summary {
    cursor: pointer;
    padding: 16px 18px;
    color: var(--ink);
    font-weight: 850;
}

.faq-list details[open] summary {
    border-bottom: 1px solid var(--line);
}

.faq-list p {
    margin: 0;
    padding: 0 18px 16px;
    color: var(--muted);
}

.hub-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(190px, 260px);
    gap: 18px;
    align-items: center;
    margin: 18px 0 28px;
    padding: 24px;
    color: #fff;
    background: linear-gradient(135deg, var(--felt-deep), var(--felt));
    border-radius: var(--radius);
    box-shadow: 0 18px 42px rgba(8, 58, 48, 0.18);
}

.hub-hero h1 {
    max-width: 14ch;
    color: #fff;
    font-size: 3.25rem;
}

.hub-hero p:not(.eyebrow) {
    max-width: 76ch;
    color: rgba(255, 255, 255, 0.82);
}

.hub-stats {
    margin: 0;
}

.letter-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-bottom: 14px;
    padding: 10px;
}

.letter-nav a {
    display: inline-flex;
    min-width: 34px;
    min-height: 34px;
    align-items: center;
    justify-content: center;
    color: var(--ink);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    font-weight: 850;
}

.letter-nav a:hover {
    color: var(--felt-deep);
    background: var(--surface-soft);
}

.archive-groups {
    display: grid;
    gap: 14px;
}

.archive-group {
    scroll-margin-top: 18px;
}

.archive-group h3 span {
    color: var(--muted);
    font-weight: 650;
}

.archive-links {
    column-width: 270px;
    column-gap: 14px;
}

.archive-links a {
    display: block;
    break-inside: avoid;
    margin: 0 0 10px;
    padding: 10px 11px;
    color: var(--ink);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    font-weight: 750;
    line-height: 1.32;
}

.archive-links a:hover {
    color: var(--felt-deep);
    background: var(--surface-soft);
}

.archive-links small,
.sitemap-list small,
.side-list small {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-weight: 600;
}

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

.article-card {
    min-width: 0;
    padding: 28px;
}

.article-header {
    margin-bottom: 22px;
}

.article-header.compact {
    margin-bottom: 14px;
}

.article-header h1 {
    color: var(--ink);
    font-size: 3rem;
}

.article-header h2 {
    margin: 0;
    color: var(--ink);
    font-size: 1.85rem;
    line-height: 1.14;
    letter-spacing: 0;
}

.article-header .lead {
    margin: 0;
    font-size: 1.06rem;
}

.badge {
    display: inline-flex;
    min-height: 30px;
    align-items: center;
    padding: 0 10px;
    color: var(--felt-deep);
    background: var(--surface-soft);
    border: 1px solid rgba(12, 91, 71, 0.14);
    border-radius: var(--radius);
    font-size: 0.82rem;
    font-weight: 800;
}

.article-image {
    margin: 0 0 22px;
}

.article-image img {
    display: block;
    width: 100%;
    height: auto;
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.article-body {
    font-size: 1.03rem;
}

.article-body h2,
.article-body h3 {
    color: var(--ink);
    line-height: 1.18;
    letter-spacing: 0;
}

.article-body h2 {
    margin: 32px 0 12px;
    font-size: 1.55rem;
}

.article-body h3 {
    margin: 24px 0 10px;
    font-size: 1.18rem;
}

.article-body p,
.article-body ul,
.article-body ol {
    margin-top: 0;
    margin-bottom: 16px;
}

.article-body ul,
.article-body ol {
    padding-left: 22px;
}

.article-body li {
    margin-bottom: 7px;
}

.article-body table {
    width: 100%;
    margin: 20px 0;
    border-collapse: collapse;
}

.article-body th,
.article-body td {
    padding: 11px;
    border: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}

.article-body th {
    background: var(--surface-soft);
}

.article-body blockquote {
    margin: 20px 0;
    padding: 16px 18px;
    background: var(--surface-soft);
    border-left: 4px solid var(--felt);
    border-radius: var(--radius);
}

.article-body .article-inline-link {
    padding: 13px 14px;
    background: #fff6e5;
    border: 1px solid rgba(185, 135, 47, 0.28);
    border-radius: var(--radius);
}

.sidebar {
    display: grid;
    gap: 14px;
    position: sticky;
    top: 16px;
}

.side-card h2 {
    font-size: 1rem;
}

.side-link {
    width: 100%;
    margin-top: 14px;
}

.side-list,
.sitemap-list {
    display: grid;
    gap: 9px;
    margin-top: 12px;
}

.side-list a,
.sitemap-list a {
    display: block;
    padding: 10px 11px;
    color: var(--ink);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    font-weight: 750;
}

.side-list a:hover,
.sitemap-list a:hover {
    color: var(--felt-deep);
    background: var(--surface-soft);
}

.pagination {
    margin-top: 22px;
}

.empty-state {
    padding: 22px;
    color: var(--muted);
    text-align: center;
}

.not-found {
    margin-top: 18px;
}

.site-footer {
    padding: 10px 0 34px;
}

.footer-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    padding: 18px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.footer-grid strong {
    display: block;
    color: var(--ink);
}

.footer-grid p {
    max-width: 72ch;
    margin: 5px 0 0;
    color: var(--muted);
}

.footer-links {
    align-items: center;
}

.footer-links span {
    color: var(--muted);
}

@media (max-width: 980px) {
    .topbar,
    .home-hero,
    .hub-hero,
    .article-layout,
    .split-feature,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .home-hero {
        grid-template-areas:
            "art"
            "copy"
            "stats";
    }

    .primary-nav,
    .footer-links {
        justify-content: flex-start;
    }

    .hero-art {
        min-height: 300px;
    }

    .editorial-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .card-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .sidebar {
        position: static;
    }
}

@media (max-width: 700px) {
    body {
        font-size: 15px;
        background-size: 480px auto;
    }

    .container {
        width: min(100% - 22px, 1160px);
    }

    .topbar {
        gap: 12px;
    }

    .primary-nav {
        flex-wrap: wrap;
        justify-content: flex-start;
        margin: 0 -2px;
        overflow: visible;
    }

    .primary-nav a {
        flex: 0 0 auto;
    }

    .nav-menu {
        flex: 0 0 auto;
    }

    .nav-menu-panel {
        position: static;
        width: 100%;
        max-height: 280px;
        margin-top: 8px;
        box-shadow: 0 12px 30px rgba(13, 24, 32, 0.12);
    }

    .nav-menu[open] {
        flex-basis: 100%;
    }

    .brand small {
        max-width: 190px;
    }

    .home-hero,
    .hub-hero,
    .article-card {
        padding: 16px;
    }

    .home-hero h1,
    .hub-hero h1,
    .article-header h1 {
        font-size: 2.35rem;
    }

    .section-heading {
        align-items: start;
        flex-direction: column;
        margin-top: 24px;
    }

    .section-heading h2,
    .split-feature h2 {
        font-size: 1.65rem;
    }

    .hero-stats,
    .editorial-grid,
    .card-grid,
    .guide-card {
        grid-template-columns: 1fr;
    }

    .hero-stats {
        padding: 0;
    }

    .guide-card {
        align-items: start;
    }

    .text-link {
        width: 100%;
    }

    .archive-links {
        column-width: auto;
    }

    .article-body {
        font-size: 1rem;
    }
}
