:root {
    --bg: #f7f1e8;
    --bg-alt: #efe5d7;
    --panel: rgba(255, 252, 247, 0.84);
    --text: #1f1a17;
    --muted: #5c5149;
    --line: rgba(31, 26, 23, 0.14);
    --accent: #9f3d22;
    --accent-dark: #6d2815;
    --accent-soft: #f0c9a9;
    --shadow: 0 18px 45px rgba(61, 36, 18, 0.12);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(159, 61, 34, 0.16), transparent 28%),
        radial-gradient(circle at top right, rgba(114, 146, 118, 0.16), transparent 24%),
        linear-gradient(180deg, var(--bg), #fcf8f3 52%, var(--bg-alt));
    font-family: Georgia, "Times New Roman", serif;
    line-height: 1.7;
}

body.light {
    --bg: #fffdf9;
    --bg-alt: #f4eee5;
    --panel: rgba(255, 255, 255, 0.92);
}

a {
    color: var(--accent-dark);
    text-decoration-thickness: 1px;
    text-underline-offset: 0.16em;
}

img {
    max-width: 100%;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    backdrop-filter: blur(14px);
    background: rgba(247, 241, 232, 0.86);
    border-bottom: 1px solid var(--line);
}

.navbar,
main,
.site-footer {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
}

.navbar {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 16px 0;
}

.logo {
    color: var(--text);
    text-decoration: none;
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.nav-links {
    display: flex;
    flex: 1;
    gap: 18px;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-links a {
    color: var(--muted);
    text-decoration: none;
    font-size: 0.95rem;
}

#theme-toggle,
.button-primary,
.button-secondary,
#contact-form button {
    border-radius: 999px;
    border: 1px solid transparent;
    cursor: pointer;
    font: inherit;
}

#theme-toggle {
    padding: 10px 16px;
    background: var(--text);
    color: #fff;
}

main {
    padding: 44px 0 80px;
}

.hero-section,
.finder-section,
.category-section,
.types-overview-section,
.editorial-section,
.faq-section,
.contact-section,
.page-hero,
.longform-list {
    margin-bottom: 56px;
}

.hero-section {
    display: grid;
    grid-template-columns: 1.35fr 0.9fr;
    gap: 28px;
    align-items: stretch;
}

.hero-copy,
.hero-panel,
.finder-card,
.info-card,
.type-card,
.policy-card,
.faq-item,
.profile-block {
    background: var(--panel);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.hero-copy,
.hero-panel {
    border-radius: 28px;
    padding: 36px;
}

.eyebrow {
    margin: 0 0 10px;
    color: var(--accent-dark);
    font-size: 0.85rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-weight: 700;
}

h1,
h2,
h3 {
    line-height: 1.2;
    margin-top: 0;
}

h1 {
    font-size: clamp(2.4rem, 5vw, 4.4rem);
    margin-bottom: 16px;
}

h2 {
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    margin-bottom: 12px;
}

h3 {
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.hero-text,
.section-heading p,
.page-hero p,
.profile-block p,
.info-card p,
.policy-card p {
    color: var(--muted);
}

.hero-actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 28px;
}

.button-primary,
.button-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 20px;
    text-decoration: none;
}

.button-primary {
    background: var(--accent);
    color: #fff;
}

.button-secondary {
    border-color: var(--line);
    color: var(--text);
    background: transparent;
}

.check-list,
.book-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.check-list li,
.book-list li {
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
}

.check-list li:last-child,
.book-list li:last-child {
    border-bottom: 0;
}

.section-heading {
    max-width: 760px;
    margin-bottom: 24px;
}

.finder-card,
.page-hero,
.profile-block {
    border-radius: 24px;
    padding: 28px;
}

.finder-card {
    max-width: 760px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
}

select,
#contact-form input,
#contact-form textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 14px 16px;
    font: inherit;
    color: var(--text);
    background: rgba(255, 255, 255, 0.72);
}

.note,
.section-desc,
.last-updated {
    color: var(--muted);
    font-size: 0.95rem;
}

.result-panel {
    margin-top: 22px;
    padding: 22px;
    border-radius: 20px;
    background: rgba(159, 61, 34, 0.07);
}

.result-header p,
.result-link {
    margin-bottom: 0;
}

.book-list strong,
.book-list span {
    display: block;
}

.book-list span {
    color: var(--muted);
    margin-top: 4px;
}

.info-grid,
.type-grid,
.editorial-grid {
    display: grid;
    gap: 18px;
}

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

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

.info-card,
.type-card,
.policy-card {
    border-radius: 22px;
    padding: 22px;
}

.type-card {
    min-height: 168px;
}

.section-link {
    margin-top: 18px;
}

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

.faq-item {
    border-radius: 20px;
    padding: 20px 22px;
}

.faq-item summary {
    font-weight: 700;
    cursor: pointer;
}

.faq-item p {
    margin: 12px 0 0;
    color: var(--muted);
}

#contact-form {
    display: grid;
    gap: 14px;
    max-width: 720px;
}

#contact-form button {
    min-height: 50px;
    background: var(--accent);
    color: #fff;
}

.page-shell {
    max-width: 880px;
}

.longform-list {
    display: grid;
    gap: 18px;
}

.site-footer {
    padding: 0 0 32px;
    color: var(--muted);
}

.disclaimer {
    font-size: 0.9rem;
    margin-top: 8px;
}

[hidden] {
    display: none !important;
}

@media (max-width: 960px) {
    .hero-section,
    .info-grid,
    .type-grid,
    .editorial-grid {
        grid-template-columns: 1fr 1fr;
    }

    .hero-section {
        grid-template-columns: 1fr;
    }

    .navbar {
        flex-wrap: wrap;
    }

    .nav-links {
        flex-basis: 100%;
        flex-wrap: wrap;
    }
}

@media (max-width: 640px) {
    body {
        line-height: 1.6;
    }

    .navbar,
    main,
    .site-footer {
        width: min(100% - 24px, 1120px);
    }

    .info-grid,
    .type-grid,
    .editorial-grid {
        grid-template-columns: 1fr;
    }

    .hero-copy,
    .hero-panel,
    .finder-card,
    .page-hero,
    .profile-block {
        padding: 24px;
    }
}
