
:root {
  --bg: #0d0f12;
  --bg-soft: #141820;
  --paper: #f5efe4;
  --paper-2: #efe5d4;
  --ink: #efe9dd;
  --muted: #b9afa2;
  --line: rgba(255,255,255,.12);
  --accent: #d49745;
  --accent-2: #e8c98e;
  --shadow: 0 24px 80px rgba(0,0,0,.45);
  --reader-ink: #201914;
  --reader-muted: #67594c;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background:
    radial-gradient(circle at 20% 0%, rgba(212,151,69,.18), transparent 30%),
    radial-gradient(circle at 80% 5%, rgba(100,130,150,.12), transparent 28%),
    linear-gradient(135deg, #0b0c0e 0%, #121821 50%, #0d0f12 100%);
  color: var(--ink);
  font-family: Georgia, 'Times New Roman', serif;
  line-height: 1.65;
}
a { color: inherit; }
.progress {
  position: fixed; inset: 0 0 auto 0; height: 4px; z-index: 30; background: rgba(255,255,255,.08);
}
.progress span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.site-header {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px clamp(18px, 4vw, 64px);
  backdrop-filter: blur(18px);
  background: rgba(13,15,18,.72);
  border-bottom: 1px solid var(--line);
}
.brand { font-weight: 700; text-decoration: none; letter-spacing: .04em; }
.top-nav { display: flex; gap: 18px; align-items: center; font-family: system-ui, -apple-system, Segoe UI, sans-serif; font-size: .95rem; }
.top-nav a { text-decoration: none; color: var(--muted); }
.top-nav a:hover { color: var(--ink); }
main { width: min(1180px, calc(100% - 36px)); margin: 0 auto; }
.hero {
  min-height: calc(100svh - 66px);
  display: grid; grid-template-columns: minmax(260px, 430px) minmax(280px, 1fr);
  align-items: center; gap: clamp(32px, 6vw, 90px);
  padding: 56px 0 72px;
}
.hero-art { position: relative; }
.hero-art::before {
  content: ''; position: absolute; inset: 18px -18px -18px 18px;
  border: 1px solid rgba(212,151,69,.42); border-radius: 8px; z-index: 0;
}
.hero-art img { position: relative; z-index: 1; display: block; width: 100%; border-radius: 6px; box-shadow: var(--shadow); }
.eyebrow, .section-label { font-family: system-ui, -apple-system, Segoe UI, sans-serif; color: var(--accent-2); text-transform: uppercase; letter-spacing: .18em; font-size: .76rem; font-weight: 700; margin: 0 0 12px; }
h1 { font-size: clamp(4rem, 10vw, 8.4rem); line-height: .86; margin: 0 0 24px; letter-spacing: -.06em; }
.subtitle { font-size: clamp(1.2rem, 2.6vw, 2rem); max-width: 740px; color: #e7ded0; line-height: 1.35; margin: 0 0 18px; }
.byline { color: var(--muted); font-size: 1.05rem; margin-bottom: 28px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 46px; padding: 0 18px; border-radius: 999px;
  border: 1px solid rgba(255,255,255,.2); text-decoration: none;
  font-family: system-ui, -apple-system, Segoe UI, sans-serif; font-weight: 700; color: var(--ink);
  background: rgba(255,255,255,.06);
}
.button:hover { transform: translateY(-1px); background: rgba(255,255,255,.1); }
.button.primary { background: var(--accent); color: #1b1208; border-color: var(--accent); }
.button.ghost { color: var(--muted); }
.small-note { color: var(--muted); font-size: .95rem; font-family: system-ui, -apple-system, Segoe UI, sans-serif; }
.panel, .note-panel {
  margin: 28px 0; padding: clamp(26px, 5vw, 54px);
  background: rgba(20,24,32,.78); border: 1px solid var(--line); border-radius: 22px;
  box-shadow: 0 20px 60px rgba(0,0,0,.24);
}
.panel-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(22px, 5vw, 58px); }
.panel h2, .note-panel h2 { font-size: clamp(2rem, 4vw, 3.6rem); line-height: 1.04; margin: 0; letter-spacing: -.04em; }
.description p, .note-panel p { color: #ddd2c4; margin-top: 0; font-size: 1.05rem; }
.read-layout { display: grid; grid-template-columns: 280px minmax(0, 780px); gap: 34px; align-items: start; padding: 58px 0; }
.toc { position: sticky; top: 90px; padding: 22px; background: rgba(20,24,32,.7); border: 1px solid var(--line); border-radius: 18px; max-height: calc(100svh - 112px); overflow: auto; }
.toc nav { display: grid; gap: 8px; }
.toc a { padding: 12px 12px; border-radius: 12px; text-decoration: none; color: var(--muted); line-height: 1.25; display: grid; gap: 2px; }
.toc a:hover { background: rgba(255,255,255,.07); color: var(--ink); }
.toc span { color: var(--accent-2); font-size: .78rem; font-family: system-ui, -apple-system, Segoe UI, sans-serif; text-transform: uppercase; letter-spacing: .12em; }
.reader {
  background: var(--paper); color: var(--reader-ink); border-radius: 22px;
  padding: clamp(28px, 5.4vw, 70px);
  box-shadow: var(--shadow); border: 1px solid rgba(0,0,0,.09);
}
.reader .section-label { color: #9b6730; }
.reader-title { font-size: clamp(2.6rem, 7vw, 5rem); line-height: .95; margin: 0 0 44px; letter-spacing: -.05em; color: #21160f; }
.chapter { padding: 44px 0 38px; border-top: 1px solid rgba(32,25,20,.15); }
.chapter:first-of-type { border-top: 0; }
.chapter-kicker { font-family: system-ui, -apple-system, Segoe UI, sans-serif; color: #9b6730; text-transform: uppercase; letter-spacing: .16em; font-size: .78rem; font-weight: 800; margin-bottom: 8px; }
.chapter h2 { font-size: clamp(2.1rem, 5vw, 4.2rem); line-height: 1; margin: 0 0 34px; color: #20140d; letter-spacing: -.05em; }
.chapter-body p { font-size: clamp(1.04rem, 2.2vw, 1.18rem); margin: 0 0 1.08em; color: var(--reader-ink); }
.chapter-body p:nth-child(1)::first-letter { float: left; font-size: 4.6rem; line-height: .82; padding: .06em .11em 0 0; color: #8d5724; }
.back-top { font-family: system-ui, -apple-system, Segoe UI, sans-serif; font-size: .9rem; margin-top: 36px; }
.back-top a { color: #8d5724; }
.site-footer { width: min(1180px, calc(100% - 36px)); margin: 0 auto 42px; padding: 26px 0; border-top: 1px solid var(--line); color: var(--muted); font-family: system-ui, -apple-system, Segoe UI, sans-serif; }
@media (max-width: 860px) {
  .site-header { align-items: flex-start; gap: 14px; flex-direction: column; }
  .top-nav { flex-wrap: wrap; gap: 12px; }
  .hero, .panel-grid, .read-layout { grid-template-columns: 1fr; }
  .hero { min-height: auto; padding-top: 34px; }
  .hero-art { max-width: 420px; margin: 0 auto; }
  .toc { position: static; max-height: none; }
  h1 { font-size: clamp(3.2rem, 18vw, 5.5rem); }
}
@media print {
  body { background: white; color: black; }
  .site-header, .hero, .panel, .note-panel, .toc, .site-footer, .progress { display: none; }
  main, .read-layout, .reader { width: 100%; display: block; box-shadow: none; border: 0; background: white; padding: 0; margin: 0; }
}
