:root {
  --bg: #050505;
  --panel: #0a0d0a;
  --border: #1c3d1c;
  --fg: #c9d6c2;
  --fg-dim: #7a9473;
  --muted: #4d6b4a;
  --white: #ffffff;
  --red: #f43f4f;
  --blue-light: #75aadb;
  --blue: #3a75c4;
  --teal: #33a6a0;
  --gold: #c9a24d;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--fg);
  font-family: "Times New Roman", Cambria, Georgia, serif;
  padding: clamp(16px, 5vw, 40px) clamp(12px, 4vw, 24px) 70px;
  overflow-x: hidden;
}

.page {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
}

.topbar {
  color: var(--teal);
  font-weight: 700;
  text-align: center;
  font-size: clamp(0.65rem, 2.6vw, 0.85rem);
  letter-spacing: 0.04em;
  padding: 8px 4px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: clamp(20px, 5vw, 32px);
  word-break: break-word;
  text-transform: lowercase;
}

header.site-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 14px;
  text-align: center;
  margin-bottom: 24px;
}

.logo-plaque {
  position: relative;
  display: inline-block;
  padding: 9px 14px;
  border-radius: 3px;
  text-decoration: none;
  background-image:
    linear-gradient(135deg, #3a3a3a, #141414),
    radial-gradient(circle at 7px 7px, #999 0%, #555 55%, transparent 70%),
    radial-gradient(circle at calc(100% - 7px) 7px, #999 0%, #555 55%, transparent 70%),
    radial-gradient(circle at 7px calc(100% - 7px), #999 0%, #555 55%, transparent 70%),
    radial-gradient(circle at calc(100% - 7px) calc(100% - 7px), #999 0%, #555 55%, transparent 70%);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.12),
    inset 0 -2px 4px rgba(0, 0, 0, 0.7),
    0 2px 6px rgba(0, 0, 0, 0.6);
}

.logo-plaque img { display: block; height: 34px; width: auto; }

.site-title {
  font-size: clamp(1rem, 4vw, 1.3rem);
  letter-spacing: 0.02em;
  color: var(--fg-dim);
}

.site-title strong { color: var(--white); font-weight: 700; }

h1.work-title {
  text-align: center;
  font-size: clamp(1.4rem, 6vw, 2.1rem);
  line-height: 1.35;
  color: var(--gold);
  font-weight: 700;
  letter-spacing: 0.01em;
  margin: 8px 0 4px;
}

.work-subtitle {
  text-align: center;
  color: var(--muted);
  font-style: italic;
  font-size: 0.9rem;
  margin: 0 0 28px;
}

nav.crumbs {
  text-align: center;
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 24px;
}

nav.crumbs a { color: var(--teal); text-decoration: none; }
nav.crumbs a:hover { color: var(--red); }

.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  padding: clamp(18px, 4vw, 32px);
  margin-bottom: 22px;
}

h2.chapter-num {
  color: var(--red);
  text-align: center;
  font-size: clamp(1.1rem, 4vw, 1.4rem);
  letter-spacing: 0.03em;
  margin: 0 0 6px;
}

p.chapter-desc {
  text-align: center;
  font-style: italic;
  color: var(--fg-dim);
  font-size: 0.92rem;
  line-height: 1.6;
  margin: 0 0 26px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}

.content p { line-height: 1.75; margin: 0 0 1em; text-align: justify; }
.content h3 {
  color: var(--teal);
  font-size: 1rem;
  font-style: italic;
  text-align: center;
  margin: 2em 0 1em;
  font-weight: 700;
}

.content h4 {
  color: var(--fg);
  font-size: 0.95rem;
  margin: 1.6em 0 0.8em;
  font-weight: 700;
}

.poem {
  text-align: center;
  font-style: italic;
  color: var(--fg-dim);
  line-height: 1.8;
  margin: 1.6em 0;
}

.poem p { text-align: center; margin: 0 0 0.2em; }

.signature {
  text-align: right;
  font-weight: 700;
  color: var(--blue-light);
  margin: -0.4em 0 1.6em;
  font-style: italic;
}

.letter {
  border-left: 2px solid var(--border);
  padding-left: 1.2em;
  margin: 1.6em 0;
}

.dropcap:first-letter {
  font-size: 2.4em;
  float: left;
  line-height: 0.8;
  padding: 0.05em 0.08em 0 0;
  color: var(--gold);
  font-weight: 700;
}

.note {
  font-size: 0.82rem;
  color: var(--muted);
  font-style: italic;
  line-height: 1.6;
  margin: 1.4em 0;
  border-top: 1px dotted var(--border);
  padding-top: 0.8em;
}

.divider {
  text-align: center;
  color: var(--muted);
  margin: 1.8em 0;
}

.small-caps { font-variant: small-caps; }

.chapter-nav {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 30px;
  font-size: 0.85rem;
}

.chapter-nav a {
  color: var(--teal);
  text-decoration: none;
  flex: 1;
}

.chapter-nav a.next { text-align: right; }
.chapter-nav a:hover { color: var(--red); }

.toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: chap;
}

.toc-list li {
  border-bottom: 1px solid var(--border);
}

.toc-list a {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 4px;
  color: var(--fg);
  text-decoration: none;
  font-size: 0.95rem;
}

.toc-list a:hover { color: var(--gold); }
.toc-list .toc-num { color: var(--red); font-weight: 700; min-width: 2.2em; }
.toc-list .toc-title { flex: 1; }

footer.site-foot {
  text-align: center;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.7;
  font-family: ui-monospace, "Consolas", monospace;
}

footer.site-foot .about { font-style: italic; }
footer.site-foot a { color: var(--blue-light); text-decoration: none; }
footer.site-foot a:hover { color: var(--red); }

@media (max-width: 380px) {
  .logo-plaque img { height: 28px; }
}
