:root {
  --font-display: 'Playfair Display', serif;
  --font-body: 'Source Sans 3', sans-serif;
  --font-mono: 'Source Code Pro', ui-monospace, monospace;
  --paper: #fff6ef;
  --paper-raised: #ffffff;
  --ink: #1b2344;
  --muted: #5a4d6a;
  --line: #f3c8b4;
  --green: #0e9b8c;
  --green-deep: #07645c;
  --green-soft: #c7f6ef;
  --wine: #e23b6a;
  --wine-dark: #b41848;
  --gold: #f5a524;
  --measure: min(91vw, 1240px);
  --shadow: 0 18px 50px rgba(226, 59, 106, .14);
  --radius: 1.1rem;
  color-scheme: light;
}

html[data-theme="light"] {
  --paper: #fff6ef;
  --paper-raised: #ffffff;
  --ink: #1b2344;
  --muted: #5a4d6a;
  color-scheme: light;
}

html[data-theme="dark"], html.dark {
  --paper: #17122a;
  --paper-raised: #241b3d;
  --ink: #fff4ea;
  --muted: #d7c4e8;
  --line: #4a3568;
  --green: #2ad4c2;
  --green-deep: #0c1c28;
  --green-soft: #2a4a62;
  --wine: #ff6b93;
  --wine-dark: #ffc1d4;
  --gold: #ffc14d;
  --shadow: 0 18px 50px rgba(0, 0, 0, .35);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--paper); }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--font-body); font-size: 1.06rem; line-height: 1.6; overflow-x: hidden; }
img { max-width: 100%; display: block; filter: saturate(1.45) contrast(1.08); }
a { color: var(--wine); text-decoration-thickness: .08em; text-underline-offset: .16em; }
a:hover { color: var(--wine-dark); }
button, input, select, textarea { font: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
button { cursor: pointer; }

.site-header { position: relative; z-index: 5; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--paper) 92%, transparent); backdrop-filter: blur(14px); }
.header-inner { width: var(--measure); margin: 0 auto; min-height: 5.8rem; display: flex; align-items: center; gap: 2rem; }
.brand { display: inline-flex; align-items: center; gap: .75rem; color: var(--ink); text-decoration: none; flex: 0 0 auto; }
.brand-mark { width: 2.7rem; height: 2.7rem; color: var(--wine); }
.brand-name { font-family: var(--font-display); font-size: clamp(1.25rem, 2vw, 1.6rem); font-weight: 700; letter-spacing: -.025em; }
.brand-name span { color: var(--wine); }
.site-nav { margin-left: auto; display: flex; align-items: center; gap: clamp(.7rem, 1.5vw, 1.5rem); }
.site-nav a { color: var(--ink); text-decoration: none; font-size: .95rem; font-weight: 600; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--wine); }
.header-tools { display: flex; align-items: center; gap: .55rem; margin-left: .25rem; }
[data-theme-toggle], .menu-toggle { border: 1px solid var(--line); background: transparent; color: var(--ink); width: 2.6rem; height: 2.6rem; border-radius: 50%; display: grid; place-items: center; }
[data-theme-toggle] { font-size: 1.1rem; }
.menu-toggle { display: none; }

.page-wrap { width: var(--measure); margin: 0 auto; }
.rail-layout { display: grid; grid-template-columns: minmax(0, 1fr) 11.5rem; gap: clamp(1.5rem, 4vw, 4rem); align-items: start; padding: 3.4rem 0 6rem; }
.rail-layout:has([data-side-links][hidden]), .rail-layout:has([data-side-links]:empty) { grid-template-columns: minmax(0, 1fr); }
[data-side-links][hidden] { display: none; }
.side-links { position: sticky; top: 1.5rem; border-left: 2px solid var(--gold); padding: .2rem 0 1rem 1.1rem; }
.side-links h2 { margin: 0 0 .65rem; font-family: var(--font-mono); font-size: .66rem; letter-spacing: .13em; text-transform: uppercase; color: var(--muted); }
.side-links ol { margin: 0; padding: 0; list-style: none; }
.side-links li + li { margin-top: .6rem; }
.side-links a { color: var(--ink); font-size: .9rem; text-decoration: none; }
.side-links a:hover { color: var(--wine); }

.eyebrow { margin: 0 0 .8rem; color: var(--wine); font-family: var(--font-mono); font-size: .72rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.1; letter-spacing: -.025em; }
h1 { margin: 0; font-size: clamp(2.7rem, 6vw, 5.4rem); }
h2 { margin: 0; font-size: clamp(2rem, 4vw, 3.2rem); }
h3 { margin: 0; font-size: 1.55rem; }
p { margin: 0; }
.lede { max-width: 38rem; color: var(--muted); font-size: 1.22rem; line-height: 1.5; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 1.7rem; }
.section-heading p { color: var(--muted); max-width: 30rem; }
.section-heading a { white-space: nowrap; font-weight: 700; }

.hero { position: relative; z-index: 0; min-height: min(720px, 76vh); display: grid; align-items: end; overflow: hidden; color: #fffdf8; border-radius: 0 0 var(--radius) var(--radius); }
.hero-media { position: absolute; inset: 0; z-index: 0; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; }
.hero::after { content: ''; position: absolute; inset: 0; z-index: 1; background: linear-gradient(100deg, rgba(8, 22, 18, .82) 0%, rgba(8, 22, 18, .62) 52%, rgba(8, 22, 18, .38) 100%); }
.hero-copy { position: relative; z-index: 2; width: var(--measure); margin: 0 auto; padding: 7rem 0 5.5rem; }
.hero h1 { max-width: 14ch; font-size: clamp(2.8rem, 5.4vw, 4.6rem); }
.hero .eyebrow { color: #f0c88e; }
.hero .lede { color: rgba(255, 253, 248, .84); margin: 1.5rem 0 2rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .85rem; }

.button { display: inline-flex; justify-content: center; align-items: center; min-height: 3rem; padding: .7rem 1.1rem; border: 1px solid var(--wine); border-radius: 999px; background: var(--wine); color: #fffdf8; font-weight: 700; text-decoration: none; transition: transform .2s ease, background .2s ease; }
.button:hover { background: var(--wine-dark); color: #fffdf8; transform: translateY(-2px); }
.button.secondary { border-color: rgba(255,255,255,.65); background: transparent; color: #fffdf8; }
.button.secondary:hover { background: rgba(255,255,255,.12); }
.button.ink { background: var(--green); border-color: var(--green); color: #fffdf8; }

.intro-band { padding: 5rem 0 4.5rem; display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(2rem, 7vw, 8rem); border-bottom: 1px solid var(--line); }
.intro-band h2 { max-width: 13ch; }
.intro-band p + p { margin-top: 1rem; }
.promise-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin-top: 2rem; }
.promise { padding-top: 1rem; border-top: 2px solid var(--gold); }
.promise strong { display: block; font-family: var(--font-display); font-size: 1.35rem; }
.promise span { display: block; margin-top: .35rem; color: var(--muted); font-size: .95rem; }

.section { padding: 5.5rem 0; }
.genre-grid, .book-grid, .author-grid, .news-grid, .archive-results { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); gap: 1.25rem; align-items: start; }
.genre-card { position: relative; min-height: 12rem; padding: 1.35rem; display: flex; flex-direction: column; justify-content: end; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper-raised); overflow: hidden; text-decoration: none; color: var(--ink); }
.genre-card::before { content: ''; position: absolute; width: 8rem; height: 8rem; right: -2rem; top: -2.2rem; border: 1px solid var(--green-soft); border-radius: 50%; }
.genre-card:nth-child(odd) { background: #0e9b8c; color: #f8fffd; }
.genre-card:nth-child(even) { background: #c41e52; color: #fff8f2; }
html[data-theme="dark"] .genre-card:nth-child(odd), html.dark .genre-card:nth-child(odd) { background: #0a5c54; color: #f4fffc; }
html[data-theme="dark"] .genre-card:nth-child(even), html.dark .genre-card:nth-child(even) { background: #8e1844; color: #fff8f2; }
.genre-card .number { position: absolute; top: 1rem; right: 1.2rem; font-family: var(--font-mono); font-size: .72rem; opacity: .85; }
.genre-card h3 { font-size: 1.7rem; color: inherit; }
.genre-card p { margin-top: .4rem; color: inherit; opacity: .92; font-size: .95rem; }

.book-card, .story-card { min-width: 0; padding-bottom: .8rem; }
.book-cover, .story-image { display: block; position: relative; aspect-ratio: 4 / 5; overflow: hidden; border-radius: .6rem; background: var(--green-soft); margin-bottom: 1rem; }
.book-cover::after { content: ''; position: absolute; inset: 0; box-shadow: inset 0 0 0 1px rgba(255,255,255,.16); pointer-events: none; }
.book-cover img, .story-image img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.book-card h3, .story-card h3 { font-size: 1.35rem; }
.book-card .book-author { color: var(--muted); margin: .25rem 0 .7rem; }
.book-card .book-note { color: var(--muted); font-size: .94rem; }
.book-actions { display: flex; align-items: center; gap: .55rem; margin-top: 1rem; }
.text-link { font-weight: 700; }
.favorite { border: 1px solid var(--line); color: var(--wine); background: transparent; border-radius: 50%; width: 2.35rem; height: 2.35rem; }
.favorite[aria-pressed="true"] { background: var(--wine); color: #fff; }

.feature-band { margin: 1rem 0; padding: 3rem; display: grid; grid-template-columns: minmax(0, .75fr) minmax(0, 1.25fr); gap: 3rem; align-items: center; border-radius: var(--radius); background: linear-gradient(135deg, #0e9b8c 0%, #1b4fd8 55%, #e23b6a 140%); color: #f8fffd; }
.feature-band img { width: 100%; aspect-ratio: 5 / 4; object-fit: cover; border-radius: .6rem; }
.feature-band .eyebrow { color: #e0bc7b; }
.feature-band p { color: rgba(248,244,234,.78); margin: 1rem 0 1.5rem; }
.feature-band .button { background: var(--gold); border-color: var(--gold); color: #1b2344; }

.news-grid .story-image { aspect-ratio: 16 / 10; }
.story-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .75rem; color: var(--muted); font-family: var(--font-mono); font-size: .67rem; letter-spacing: .06em; text-transform: uppercase; margin-bottom: .6rem; }
.category-label { color: var(--wine); }
.story-card h3 { font-size: 1.45rem; }
.story-card p:not(.story-meta) { color: var(--muted); margin-top: .5rem; }
.empty-state { color: var(--muted); padding: 1rem 0; }

.page-hero { padding: 2rem 0 3.5rem; border-bottom: 1px solid var(--line); }
.page-hero h1 { max-width: 14ch; }
.page-hero .lede { margin-top: 1rem; }
.archive-toolbar { display: flex; flex-wrap: wrap; gap: .75rem; align-items: end; padding: 1.3rem; margin: 2rem 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper-raised); }
.archive-toolbar label { display: grid; gap: .3rem; flex: 1 1 18rem; color: var(--muted); font-size: .83rem; font-weight: 700; }
.archive-toolbar input, .archive-toolbar select, .newsletter input, textarea { width: 100%; border: 1px solid var(--line); border-radius: .55rem; background: var(--paper); color: var(--ink); padding: .72rem .85rem; }
.filter-list { display: flex; flex-wrap: wrap; gap: .55rem; margin-bottom: 1.8rem; }
.filter-list a { padding: .4rem .7rem; border: 1px solid var(--line); border-radius: 999px; color: var(--ink); text-decoration: none; font-size: .88rem; }
.filter-list a:hover { border-color: var(--wine); color: var(--wine); }

.rating { color: var(--wine); font-weight: 700; letter-spacing: .08em; }
.review-list { display: grid; gap: 1.15rem; }
.review-item { display: grid; grid-template-columns: 7rem minmax(0, 1fr); gap: 1.25rem; align-items: start; padding: 1.2rem 0; border-top: 1px solid var(--line); }
.review-item img { width: 7rem; aspect-ratio: 2 / 3; object-fit: cover; border-radius: .35rem; background: var(--green-soft); }
.review-item h3 { font-size: 1.65rem; }
.review-item p { color: var(--muted); margin: .35rem 0 .65rem; }

.author-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr)); }
.author-card { padding: 1.25rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper-raised); }
.author-card .initials { width: 4rem; height: 4rem; display: grid; place-items: center; border-radius: 50%; background: var(--green); color: #f8fffd; font-family: var(--font-display); font-size: 1.45rem; }
.author-card h3 { margin-top: 1rem; }
.author-card p { color: var(--muted); margin-top: .45rem; }
.author-card a { display: inline-block; margin-top: 1rem; font-weight: 700; }

.newsletter { padding: 2.4rem; border-radius: var(--radius); background: linear-gradient(120deg, #e23b6a, #f5a524); color: #fff8f2; display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 2rem; align-items: center; }
.newsletter h2 { font-size: 2.3rem; }
.newsletter p { margin-top: .45rem; color: rgba(255,248,242,.8); }
.newsletter form { display: flex; gap: .55rem; }
.newsletter input { border: 0; background: #fff8f2; color: var(--ink); }
.newsletter .button { background: #1b2344; border-color: #1b2344; color: #fff8f2; }
.breadcrumbs { width: var(--measure); margin: 0 auto; padding: 1rem 0 0; }
.breadcrumbs ol { display: flex; flex-wrap: wrap; gap: .35rem .55rem; list-style: none; margin: 0; padding: 0; font-size: .92rem; font-weight: 600; }
.breadcrumbs li { display: inline-flex; align-items: center; gap: .55rem; }
.breadcrumbs li + li::before { content: '/'; color: var(--gold); font-weight: 700; }
.breadcrumbs a { color: var(--green-deep); text-decoration: none; }
html[data-theme="dark"] .breadcrumbs a, html.dark .breadcrumbs a { color: var(--gold); }
.breadcrumbs [aria-current="page"] { color: var(--wine); }
.cta-band { margin: 2rem 0 0; padding: 1.6rem 1.4rem; display: flex; flex-wrap: wrap; gap: 1rem 1.5rem; align-items: center; justify-content: space-between; border-radius: var(--radius); background: linear-gradient(120deg, #fff 0%, #ffe3c2 45%, #ffd0de 100%); border: 2px solid var(--gold); }
html[data-theme="dark"] .cta-band, html.dark .cta-band { background: linear-gradient(120deg, #2a1848, #12384a); }
.cta-band h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
.cta-band p { margin-top: .4rem; color: var(--muted); max-width: 36rem; }
.bestsellers { margin-top: 2.2rem; }
.rank { display: inline-block; margin-bottom: .35rem; color: var(--wine); font-family: var(--font-mono); font-size: .75rem; font-weight: 700; letter-spacing: .08em; }
.form-note { grid-column: 2; color: #ffe8ca; font-size: .9rem; }

.article-layout { max-width: 54rem; }
.byline { display: grid; grid-template-columns: 3.5rem 1fr; gap: .8rem; margin: 0 0 2rem; padding: .9rem 0; border-bottom: 1px solid var(--line); }
.byline img { width: 3.5rem; height: 3.5rem; border-radius: 50%; object-fit: cover; }
.byline strong { align-self: end; }
.byline p { grid-column: 2; color: var(--muted); font-size: .92rem; }
.byline[hidden] { display: none; }
.article-header { padding-bottom: 1.5rem; }
.article-header h1 { max-width: 18ch; }
.article-deck { max-width: 42rem; color: var(--muted); font-size: 1.25rem; margin-top: 1rem; }
.article-cover { width: 100%; max-height: 34rem; object-fit: cover; border-radius: var(--radius); margin: 1rem 0 2rem; }
.prose { max-width: 42rem; }
.prose p { font-family: var(--font-body); font-size: 1.18rem; line-height: 1.75; margin: 0 0 1.35rem; }
.prose h2, .prose h3 { margin: 2.4rem 0 .8rem; }
.prose a { color: var(--wine); font-weight: 600; }
.prose ul, .prose ol { padding-left: 1.3rem; margin-bottom: 1.4rem; }

.site-footer { padding: 3rem 0 2rem; border-top: 1px solid var(--line); }
.footer-inner { width: var(--measure); margin: 0 auto; display: grid; grid-template-columns: 1.2fr .8fr .8fr; gap: 2rem; }
.footer-inner h2 { font-size: 1.35rem; }
.footer-inner p { color: var(--muted); max-width: 24rem; margin-top: .6rem; }
.footer-links { display: grid; gap: .35rem; align-content: start; }
.footer-links a { color: var(--ink); text-decoration: none; }
.footer-links a:hover { color: var(--wine); }
.footer-bottom { width: var(--measure); margin: 2.5rem auto 0; padding-top: 1rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .85rem; }

@media (max-width: 850px) {
  .header-inner { min-height: 5rem; }
  .site-nav { position: absolute; left: 0; right: 0; top: 100%; display: none; padding: 1rem 4.5vw 1.3rem; border-bottom: 1px solid var(--line); background: var(--paper); box-shadow: var(--shadow); }
  .site-nav.is-open { display: grid; gap: .8rem; }
  .site-nav a { font-size: 1.05rem; }
  .header-tools { margin-left: auto; }
  .menu-toggle { display: grid; }
  .intro-band, .feature-band, .newsletter { grid-template-columns: 1fr; }
  .feature-band { padding: 1.4rem; }
  .form-note { grid-column: auto; }
  .newsletter form { flex-wrap: wrap; }
  .newsletter .button { width: 100%; }
}
@media (max-width: 650px) {
  .rail-layout { padding-top: 2.2rem; }
  .side-links { position: static; }
  .hero { min-height: 620px; border-radius: 0; }
  .hero-copy { padding: 5rem 0 3.5rem; }
  .promise-list { grid-template-columns: 1fr; }
  .section { padding: 3.7rem 0; }
  .section-heading { display: block; }
  .section-heading a { display: inline-block; margin-top: .8rem; }
  .review-item { grid-template-columns: 5rem minmax(0, 1fr); gap: .9rem; }
  .review-item img { width: 5rem; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-inner > :first-child { grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .18s; }
