:root {
    --accent: #e65521;
    --ink: #222624;
    --muted: #69706b;
    --line: #e6e8e1;
    --paper: #fff;
    --background: #f7f8f3;
    --radius: 18px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 24px;
}

body {
    margin: 0;
    color: var(--ink);
    background: var(--background);
    font: 16px/1.8 "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
}

a {
    color: inherit;
    text-decoration: none;
}

button, input {
    font: inherit;
}

button, summary, a {
    -webkit-tap-highlight-color: transparent;
}

button, summary {
    cursor: pointer;
}

button {
    color: inherit;
}

a:hover {
    color: var(--accent);
}

:focus-visible {
    outline: 3px solid #bc471c;
    outline-offset: 4px;
}

img {
    display: block;
    max-width: 100%;
    width: 100%;
    height: auto;
    object-fit: cover;
    background: #e7e9df;
}

h1, h2, h3, p, figure {
    margin: 0;
}

h1, h2, h3 {
    line-height: 1.4;
}

h2 {
    font-size: 26px;
    letter-spacing: -.6px;
}

h3 {
    font-size: 18px;
}

p {
    color: var(--muted);
}

.container {
    width: min(1200px, calc(100% - 48px));
    margin-inline: auto;
}

.icon {
    width: 21px;
    height: 21px;
    flex-shrink: 0;
    vertical-align: middle;
}

.site-header {
    background: var(--paper);
    border-bottom: 1px solid var(--line);
}

.masthead {
    display: flex;
    align-items: center;
    gap: 24px;
    min-height: 94px;
}

.brand, .actions, .button, .text-link, .light-link, .section-heading h2, .about h2, .category-note h2 {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand {
    flex-shrink: 0;
}

.brand-icon {
    width: 44px;
    height: 44px;
    background: transparent;
}

.brand-name {
    font-size: 27px;
    font-weight: 850;
    letter-spacing: -1px;
}

.brand-note {
    padding-left: 24px;
    color: var(--muted);
    border-left: 1px solid var(--line);
    font-size: 14px;
}

.search {
    margin-left: auto;
    display: flex;
    width: 300px;
    background: var(--background);
    border: 1px solid var(--line);
    border-radius: 30px;
    padding: 7px 12px 7px 18px;
}

.search input {
    width: 100%;
    min-width: 0;
    border: 0;
    background: transparent;
    font-size: 14px;
    outline-offset: 0;
    color: var(--ink);
}

.search button, .menu-button {
    border: 0;
    background: transparent;
}

.primary-nav {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    padding-block: 8px 14px;
}

.nav-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 13px;
    border-radius: 9px;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
}

.nav-link.active {
    background: #fff0e9;
    color: #bd4117;
}

.menu-button {
    display: none;
}

main > section {
    margin-block: 68px;
}

.hero {
    margin-top: 34px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 478px;
    border-radius: 24px;
    overflow: hidden;
    background: #eef0e4;
}

.hero-copy {
    padding: 44px 40px;
}

.pill {
    display: inline-block;
    font-size: 13px;
    border: 1px solid #ccd2ba;
    padding: 3px 12px;
    border-radius: 30px;
    color: #516139;
}

.hero h1 {
    font-size: 17px;
    margin: 20px 0 10px;
    color: #6a774f;
}

.hero-title {
    font-size: clamp(28px, 3.2vw, 42px);
    line-height: 1.4;
    font-weight: 850;
    letter-spacing: -1.6px;
    color: var(--ink);
}

.hero-desc {
    max-width: 430px;
    margin-top: 19px;
    font-size: 15px;
}

.actions {
    flex-wrap: wrap;
    margin-top: 25px;
}

.button {
    justify-content: center;
    border: 1px solid transparent;
    padding: 11px 20px;
    border-radius: 9px;
    background: var(--accent);
    color: white;
    font-size: 14px;
    font-weight: 650;
}

.button:hover {
    background: #c64719;
    color: white;
}

.button.secondary {
    background: var(--paper);
    color: var(--ink);
    border-color: var(--line);
}

.button.dark {
    background: #242f28;
    align-self: flex-start;
}

.hero-foot {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    align-items: center;
    font-size: 12px;
    margin-top: 27px;
    color: #657054;
}

.hero-art {
    position: relative;
    min-height: 450px;
    background: #385343;
}

.hero-image {
    position: absolute;
    height: 100%;
    inset: 0;
}

.hero-art::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(10, 29, 23, .88), transparent 85%);
}

.hero-caption {
    position: absolute;
    z-index: 1;
    bottom: 32px;
    left: 34px;
    right: 28px;
    color: white;
}

.hero-caption h2 {
    font-size: 34px;
    margin: 5px 0;
}

.hero-caption p {
    color: #edf1e8;
}

.hero-caption span, .edition {
    font-size: 12px;
    letter-spacing: 2px;
}

.light-link {
    margin-top: 18px;
    font-size: 14px;
}

.edition {
    position: absolute;
    top: 25px;
    right: 25px;
    z-index: 1;
    background: #fff;
    padding: 4px 10px;
    color: #273a2d;
}

.section-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 25px;
}

.section-heading h2 .icon, .about .icon {
    color: var(--accent);
    width: 25px;
    height: 25px;
}

.section-heading p {
    margin-top: 7px;
    font-size: 14px;
}

.text-link {
    font-size: 14px;
    color: var(--accent);
    flex-shrink: 0;
}

.cards, .category-grid, .chapter-grid, .guide-grid {
    display: grid;
    gap: 22px;
}

.six {
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

.cover {
    display: block;
    position: relative;
    overflow: hidden;
    border-radius: 12px;
}

.cover img {
    aspect-ratio: 3 / 4;
    transition: transform .25s;
}

.cover:hover img {
    transform: scale(1.04);
}

.cover-tag {
    position: absolute;
    left: 9px;
    bottom: 9px;
    background: #ffffffeb;
    color: #29322b;
    border-radius: 5px;
    font-size: 12px;
    padding: 1px 7px;
}

.card-copy {
    padding-top: 12px;
}

.eyebrow {
    color: var(--accent);
    font-size: 12px;
    font-weight: 650;
    letter-spacing: .7px;
    margin-bottom: 6px;
}

.card-copy h3 {
    font-size: 16px;
    margin-bottom: 4px;
}

.card-copy p:last-child {
    font-size: 13px;
}

.ranking-section {
    padding: 30px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.ranking-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 35px;
}

.rank-item {
    display: flex;
    align-items: center;
    gap: 20px;
    border-top: 1px solid var(--line);
    padding: 22px 0;
}

.rank-number {
    font: italic 42px Georgia, serif;
    color: #d97042;
}

.rank-item p:last-child {
    font-size: 13px;
    margin-top: 4px;
}

.round-link {
    margin-left: auto;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    flex-shrink: 0;
}

.spotlight {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border-radius: var(--radius);
    background: #f0eae1;
    overflow: hidden;
}

.spotlight-image img {
    height: 100%;
    aspect-ratio: 6 / 5;
}

.spotlight-copy {
    padding: 38px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.spotlight-copy h2 {
    font-size: 34px;
}

.spotlight-copy p {
    font-size: 15px;
}

.category-grid, .chapter-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.category-tile {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 25px;
}

.category-tile > .icon {
    box-sizing: content-box;
    padding: 10px;
    background: #fff0e8;
    color: #d35221;
    border-radius: 12px;
    margin-bottom: 16px;
}

.category-tile:nth-child(2n) > .icon {
    background: #eaf0e6;
    color: #557144;
}

.category-tile p {
    font-size: 14px;
    margin-top: 9px;
}

.timeline {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 25px;
}

.timeline article {
    border-top: 3px solid #e6a27a;
    padding-top: 15px;
}

.timeline time {
    font-size: 13px;
    color: var(--accent);
}

.timeline h3 {
    margin: 10px 0;
}

.timeline p {
    font-size: 14px;
    margin-bottom: 15px;
}

.editor-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.editor-card {
    display: flex;
    gap: 23px;
    background: #e9ede2;
    border-radius: 14px;
    padding: 30px;
}

.editor-card:nth-child(2) {
    background: #eee9e1;
}

.editor-mark {
    font: 48px Georgia, serif;
    color: #879171;
}

.editor-card p:not(.eyebrow) {
    font-size: 14px;
    margin: 12px 0 18px;
}

.bookshelf {
    border-block: 1px solid var(--line);
    padding-block: 30px;
}

.shelf-intro {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 25px;
}

.shelf-intro p {
    margin-top: 8px;
    max-width: 660px;
    font-size: 14px;
}

.guide-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 36px;
}

.step {
    font-size: 13px;
    display: inline-block;
    border-bottom: 2px solid var(--accent);
    margin-bottom: 15px;
}

.guide-grid p {
    margin-top: 12px;
    font-size: 14px;
}

.faq-section {
    max-width: 900px;
    margin-inline: auto;
}

details {
    border-bottom: 1px solid var(--line);
    padding: 20px 0;
}

summary {
    font-weight: 650;
}

details p {
    margin-top: 14px;
}

.about {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 40px;
    padding-top: 35px;
    border-top: 1px solid var(--line);
}

.about p + p {
    margin-top: 15px;
}

.subscribe {
    display: grid;
    grid-template-columns: 170px 1fr;
    gap: 40px;
    align-items: center;
    background: #27372d;
    color: #fff;
    border-radius: 18px;
    padding: 40px;
}

.subscribe h2 {
    margin-bottom: 12px;
}

.subscribe p {
    color: #d0d9ce;
}

.subscribe .eyebrow {
    color: #ffc9a5;
}

.subscribe-brand {
    border: 1px solid #778772;
    border-radius: 20px;
    font-size: 78px;
    font-weight: 800;
    text-align: center;
    line-height: 1.2;
    padding: 15px 10px;
}

.subscribe-brand span {
    display: block;
    font-size: 12px;
    letter-spacing: 2px;
    line-height: 1.6;
}

.small {
    margin-top: 16px;
    font-size: 12px;
    overflow-wrap: anywhere;
}

.footer {
    background: var(--paper);
    border-top: 1px solid var(--line);
    font-size: 13px;
    padding: 25px 0;
}

.footer-inner, .footer-inner > div {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
}

.breadcrumbs {
    display: flex;
    gap: 15px;
    font-size: 14px;
    margin: 30px 0;
}

.category-hero {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 55px;
    margin-top: 0;
    padding: 35px;
    background: #eef0e4;
    border-radius: 20px;
    align-items: center;
}

.category-hero h1 {
    font-size: 38px;
    margin-bottom: 14px;
}

.category-hero h2 {
    font-size: 23px;
    margin-bottom: 12px;
}

.category-hero p {
    margin-bottom: 18px;
}

.category-hero img {
    aspect-ratio: 4 / 5;
    border-radius: 12px;
}

.category-hero .button {
    display: inline-flex;
}

.chapter-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 25px;
    display: flex;
    flex-direction: column;
}

.chapter-card p {
    font-size: 14px;
    margin: 15px 0 22px;
}

.chapter-card .text-link {
    margin-top: auto;
}

.category-note {
    padding: 30px;
    border-left: 3px solid var(--accent);
    background: #fff;
}

.category-note p {
    margin-top: 15px;
}

.reader {
    max-width: 840px;
    margin: 0 auto 60px;
}

.reader h1 {
    font-size: 32px;
    margin: 14px 0;
}

.reader .meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 14px;
}

.reader-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 25px 0;
}

.reading-note {
    background: #eef0e4;
    padding: 22px;
    border-radius: 12px;
    margin-bottom: 35px;
}

.reading-note h2 {
    font-size: 16px;
    margin-bottom: 8px;
}

.reading-note p {
    font-size: 14px;
}

.panel {
    margin-bottom: 35px;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 14px;
    overflow: hidden;
}

.panel img {
    aspect-ratio: 4 / 3;
    object-fit: contain;
}

figcaption {
    padding: 28px;
    display: flex;
    gap: 20px;
}

figcaption p {
    color: var(--ink);
    font-size: 18px;
    line-height: 2;
}

.panel-number {
    font: italic 28px Georgia, serif;
    color: var(--accent);
}

.chapter-end {
    text-align: center;
    padding: 25px 0 35px;
}

.chapter-end span {
    display: block;
    color: var(--accent);
    margin-bottom: 18px;
    font-size: 25px;
}

.chapter-end p {
    margin-top: 15px;
}

.chapter-navigation {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.previous svg {
    transform: rotate(180deg);
}

.night {
    --background: #19211d;
    --paper: #243128;
    --ink: #f1f4ed;
    --muted: #b9c4b8;
    --line: #465245;
}

.night .reading-note {
    background: #2b3b2e;
}

.large-text figcaption p {
    font-size: 23px;
}

.policy {
    max-width: 850px;
    margin-inline: auto;
}

.policy h2 {
    margin: 30px 0 10px;
}

.policy .button {
    margin-top: 30px;
}

.toast {
    position: fixed;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    background: #22382c;
    color: #fff;
    padding: 12px 23px;
    border-radius: 9px;
    z-index: 5;
    max-width: calc(100% - 32px);
    display: none;
}

.toast.visible {
    display: block;
}

.search-results {
    padding: 25px;
    margin-top: 25px;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 12px;
}

.result-link, .saved-item {
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.saved-item button {
    border: 0;
    background: transparent;
    color: var(--accent);
    flex-shrink: 0;
}

.sr-only, .skip:not(:focus) {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

.skip:focus {
    display: block;
    padding: 10px;
}

@media (max-width: 1100px) {
    .primary-nav {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .six {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .brand-note {
        display: none;
    }

    .hero-copy, .spotlight-copy {
        padding: 30px;
    }

    .hero-foot {
        font-size: 12px;
    }
}

@media (max-width: 760px) {
    .container {
        width: calc(100% - 32px);
    }

    .masthead {
        gap: 14px;
        flex-wrap: wrap;
        padding: 18px 0;
    }

    .brand-name {
        font-size: 23px;
    }

    .brand-icon {
        width: 38px;
        height: 38px;
    }

    .search {
        order: 3;
        width: 100%;
    }

    .menu-button {
        display: block;
        margin-left: auto;
        min-width: 44px;
        min-height: 44px;
    }

    .primary-nav {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .js .primary-nav:not(.open) {
        display: none;
    }

    .nav-link {
        justify-content: flex-start;
        font-size: 14px;
    }

    main > section {
        margin-block: 46px;
    }

    .hero {
        grid-template-columns: 1fr;
        margin-top: 25px;
        border-radius: 18px;
    }

    .hero-copy {
        padding: 30px 24px;
    }

    .hero-title {
        font-size: 33px;
    }

    .hero-art {
        min-height: 330px;
    }

    .hero-caption {
        left: 25px;
        bottom: 25px;
    }

    .hero-caption h2 {
        font-size: 30px;
    }

    h2 {
        font-size: 23px;
    }

    .section-heading {
        gap: 16px;
        flex-wrap: wrap;
    }

    .six, .category-grid, .chapter-grid, .timeline {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 22px 14px;
    }

    .ranking-section {
        padding: 24px 18px;
    }

    .ranking-grid, .spotlight, .editor-grid, .about, .subscribe, .category-hero {
        grid-template-columns: 1fr;
    }

    .rank-item {
        gap: 16px;
    }

    .spotlight-image img {
        aspect-ratio: 4 / 3;
    }

    .spotlight-copy {
        padding: 25px;
    }

    .category-tile, .chapter-card {
        padding: 20px 16px;
    }

    .category-tile h3, .chapter-card h3 {
        font-size: 17px;
    }

    .editor-card {
        padding: 25px;
    }

    .shelf-intro {
        align-items: flex-start;
        flex-direction: column;
    }

    .guide-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .guide-grid article {
        border-bottom: 1px solid var(--line);
        padding-bottom: 20px;
    }

    .about {
        gap: 22px;
    }

    .subscribe {
        padding: 28px 24px;
        gap: 24px;
    }

    .subscribe-brand {
        width: 120px;
        font-size: 48px;
    }

    .footer-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .category-hero {
        padding: 25px;
        gap: 25px;
        margin-top: 0;
    }

    .category-hero img {
        aspect-ratio: 4 / 3;
    }

    .category-hero h1 {
        font-size: 31px;
    }

    .reader h1 {
        font-size: 26px;
    }

    .reader-toolbar {
        gap: 8px;
    }

    .reader-toolbar .button {
        padding: 9px 12px;
    }

    figcaption {
        padding: 22px 18px;
        gap: 12px;
    }

    .chapter-navigation {
        gap: 8px;
    }

    .chapter-navigation .button {
        padding: 10px 6px;
        font-size: 13px;
        gap: 3px;
    }

    .chapter-navigation .icon {
        width: 16px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .cover img {
        transition: none;
    }
}
