:root {
  color-scheme: dark;
  --bg: #101015;
  --panel: #1a1a22;
  --line: #353540;
  --text: #f1eee9;
  --muted: #aaa6a6;
  --accent: #d9a780;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.65 system-ui, -apple-system, "Segoe UI", sans-serif; }
a { color: inherit; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; }
.site-shell { width: min(100% - 40px, 1100px); margin-inline: auto; }
.site-header { display: flex; align-items: baseline; gap: 12px; padding: 28px 0; border-bottom: 1px solid var(--line); }
.brand { font-weight: 750; font-size: 1.15rem; letter-spacing: .04em; text-decoration: none; }
.brand:hover, .site-footer a:hover { color: var(--accent); }
.breadcrumb, .eyebrow { color: var(--accent); font-size: .72rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.hero { padding: clamp(70px, 12vw, 150px) 0 clamp(75px, 10vw, 120px); max-width: 780px; }
.story-hero { padding-bottom: 75px; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { line-height: 1.12; }
h1 { font-family: Georgia, serif; font-size: clamp(3.4rem, 8vw, 7rem); font-weight: 400; letter-spacing: -.055em; margin-bottom: 26px; }
h2 { font-family: Georgia, serif; font-size: clamp(2.1rem, 4.5vw, 3.8rem); font-weight: 400; letter-spacing: -.035em; }
h3 { font-family: Georgia, serif; font-size: 1.7rem; font-weight: 400; }
.lede { color: var(--muted); font-size: clamp(1.1rem, 2vw, 1.4rem); max-width: 650px; }
.section { padding: 42px 0 80px; border-top: 1px solid var(--line); scroll-margin-top: 40px; }
.section-heading { margin-bottom: 30px; }
.section-heading h2 { margin-bottom: 0; }
.story-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 18px; }
.story-card { display: flex; flex-direction: column; min-height: 320px; padding: 30px; border: 1px solid var(--line); background: var(--panel); text-decoration: none; transition: border-color .2s, transform .2s; }
.story-card:hover { border-color: var(--accent); transform: translateY(-3px); }
.story-number { color: var(--accent); font-size: .75rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.story-card h3 { margin: 35px 0 12px; font-size: 2.6rem; }
.story-card p { color: var(--muted); max-width: 330px; }
.card-link { margin-top: auto; color: var(--accent); font-weight: 650; }
.content-panel { max-width: 820px; padding: clamp(24px, 5vw, 48px); border: 1px solid var(--line); background: var(--panel); }
.content-panel h3 { margin-bottom: 18px; }
.content-panel p:last-child { margin-bottom: 0; }
.chapter-text { font-family: Georgia, serif; font-size: clamp(1.08rem, 1.8vw, 1.27rem); line-height: 1.8; }
.chapter-text h3 { margin-bottom: 30px; }
.chapter-text p { margin-bottom: 1.35em; }
.chapter-figure { margin: 1.8em 0 2em; }
.chapter-figure a { display: block; cursor: zoom-in; }
.chapter-figure img { display: block; width: 100%; height: auto; border: 1px solid var(--line); }
.reading-page { width: min(100% - 40px, 918.4px); margin: 0 auto; padding: clamp(48px, 7vw, 100px) 0 120px; }
.reading-page h1 { margin-bottom: 22px; }
.reading-page h2 { margin-bottom: clamp(36px, 5vw, 60px); font-size: clamp(1.7rem, 3vw, 2.3rem); }
.reading-page .next-chapter { margin-top: clamp(80px, 11vw, 140px); }
.reading-page .chapter-text { max-width: none; }
.reading-page .chapter-figure { margin-block: 2em 2.4em; }
@media (max-width: 600px) { .reading-page { width: min(100% - 28px, 918.4px); padding-bottom: 70px; } }
.image-lightbox { width: calc(100vw - 24px); max-width: none; height: calc(100vh - 24px); max-height: none; padding: 0; border: 1px solid var(--line); background: #0b0b0f; color: var(--text); }
.image-lightbox::backdrop { background: rgb(0 0 0 / 86%); }
.lightbox-toolbar { height: 56px; display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding: 8px 14px; }
.lightbox-toolbar button { min-height: 38px; padding: 5px 13px; border: 1px solid var(--line); background: var(--panel); color: var(--text); font: inherit; cursor: pointer; }
.lightbox-toolbar button:hover { border-color: var(--accent); }
.lightbox-close { min-width: 38px; font-size: 1.5rem !important; line-height: 1; }
.lightbox-media { height: calc(100% - 56px); overflow: auto; display: grid; place-items: center; }
.lightbox-media img { display: block; width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain; }
.image-lightbox.is-zoomed .lightbox-media { display: block; }
.image-lightbox.is-zoomed .lightbox-media img { max-width: none; max-height: none; margin: auto; }
.empty-note { color: var(--muted); margin-bottom: 0; }
.section-nav { display: flex; flex-wrap: wrap; gap: 10px 24px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.section-nav a { color: var(--muted); font-size: .86rem; text-decoration: none; }
.section-nav a:hover { color: var(--accent); }
.site-footer { padding: 38px 0 60px; border-top: 1px solid var(--line); color: var(--muted); font-size: .85rem; }
.site-footer a { text-decoration: none; }
@media (max-width: 600px) { .site-shell { width: min(100% - 28px, 1100px); } .site-header { padding: 19px 0; } .hero { padding-top: 72px; } .section { padding-bottom: 58px; } }
