/* Mediocratopia — style.css
   Generated by generate_site.py. Safe to re-run.
   ──────────────────────────────────────────────── */

:root {
  --bg:           #fdf8f2;
  --fg:           #3a2a1a;
  --accent:       #8b5a2b;
  --accent-soft:  #f0dfc8;
  --accent-mid:   #a87040;
  --border-soft:  #d4c0a8;

  /* book-nav.css overrides — warm brown palette */
  --nav-bg:           var(--accent-soft);
  --nav-border:       var(--border-soft);
  --nav-fg:           var(--accent);
  --nav-label:        var(--fg);
  --nav-arrow:        var(--accent-mid);
  --nav-hover:        #5c3a10;
  --nav-outer-offset: 400px;
  --nav-max-width:    760px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  padding: 0;
  font-family: Georgia, "Times New Roman", serif;
  background: var(--bg);
  color: var(--fg);
  line-height: 1.75;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Site header / footer ──────────────────────────────────────── */

.site-header,
.site-footer {
  max-width: 760px;
  margin: 0 auto;
  padding: 1.5rem 1rem 0.5rem;
}

.site-header h1 {
  font-size: 1.5rem;
  margin: 0;
  letter-spacing: 0.02em;
  color: var(--accent);
  font-family: system-ui, -apple-system, sans-serif;
}

.site-header h1 a { color: inherit; text-decoration: none; }
.site-header h1 a:hover { text-decoration: underline; }

.site-header .subtitle {
  font-size: 0.9rem;
  color: #7a5a3a;
  margin-top: 0.2rem;
  font-family: system-ui, -apple-system, sans-serif;
  font-style: italic;
}

.site-footer {
  font-size: 0.8rem;
  color: #8a6a4a;
  padding-bottom: 2.5rem;
}

.site-footer a { color: inherit; text-decoration: underline; }

/* ── Main content wrapper ──────────────────────────────────────── */

.main-wrapper {
  max-width: 760px;
  margin: 0 auto;
  padding: 1rem 1.25rem 3rem;
  background: rgba(255, 251, 245, 0.97);
  border-radius: 12px 12px 0 0;
  border: 1px solid var(--border-soft);
  border-top: none;
}

main { margin-top: 0.25rem; }

/* ── Typography ────────────────────────────────────────────────── */

h1, h2, h3, h4 {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 700;
  line-height: 1.3;
  color: var(--fg);
}

.chapter-title {
  font-size: 1.9rem;
  margin-top: 0.25rem;
  margin-bottom: 0.5rem;
  color: var(--fg);
}

.chapter-meta {
  font-size: 0.85rem;
  color: #8a6a4a;
  font-style: italic;
  margin-bottom: 1.5rem;
  font-family: system-ui, -apple-system, sans-serif;
}

p { font-size: 1.02rem; margin: 0 0 1.1rem; }

blockquote {
  border-left: 3px solid var(--accent-soft);
  margin: 1.25rem 0;
  padding: 0.5rem 1rem;
  color: #5a3a1a;
  font-style: italic;
}

hr {
  border: none;
  border-top: 1px solid var(--border-soft);
  margin: 2rem 0;
}

/* ── TOC pages ─────────────────────────────────────────────────── */

.toc-intro {
  font-size: 0.97rem;
  color: #7a5a3a;
  margin-bottom: 1.5rem;
  font-style: italic;
}

ol.toc {
  margin: 0.5rem 0 2rem;
  padding-left: 1.6rem;
}

ol.toc li { margin: 0.45rem 0; font-size: 1rem; }
ol.toc a { color: var(--accent); }
ol.toc a:hover { text-decoration: underline; }

/* ── Cover page ────────────────────────────────────────────────── */

.cover-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 2rem 1rem 3rem;
}

.cover-image {
  max-width: 220px;
  width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 12px 30px rgba(92, 58, 16, 0.25);
  margin-bottom: 1.75rem;
}

.cover-title {
  font-size: 2rem;
  font-weight: 700;
  margin: 0 0 0.35rem;
  color: var(--fg);
  font-family: system-ui, -apple-system, sans-serif;
}

.cover-subtitle {
  font-size: 1.1rem;
  color: #7a5a3a;
  margin: 0 0 0.5rem;
  font-style: italic;
}

.cover-byline {
  font-size: 0.95rem;
  color: #8a6a4a;
  margin: 0 0 2rem;
}

.cover-read {
  display: inline-block;
  background: var(--accent);
  color: #fff8f0;
  padding: 0.65rem 1.75rem;
  border-radius: 6px;
  font-family: system-ui, -apple-system, sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: background 0.15s;
}

.cover-read:hover { background: #5c3a10; text-decoration: none; }

/* ── Images ────────────────────────────────────────────────────── */

img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
}

figure {
  margin: 1.5rem 0;
  text-align: center;
}

figure img { border-radius: 6px; box-shadow: 0 4px 14px rgba(60, 30, 0, 0.1); }

figcaption {
  font-size: 0.85rem;
  color: #8a6a4a;
  margin-top: 0.4rem;
  font-style: italic;
}

/* WordPress image alignment helpers */
.aligncenter { display: block; margin: 1.25rem auto; }
.alignleft   { float: left; margin: 0 1.25rem 1rem 0; max-width: 50%; }
.alignright  { float: right; margin: 0 0 1rem 1.25rem; max-width: 50%; }

/* ── Responsive ────────────────────────────────────────────────── */

@media (max-width: 600px) {
  html, body { overflow-x: hidden; }

  .site-header, .site-footer { padding: 1rem 0.75rem 0.25rem; }
  .site-header h1 { font-size: 1.25rem; }

  .main-wrapper {
    padding: 0.75rem 0.9rem 2rem;
    border-radius: 8px 8px 0 0;
  }

  .chapter-title { font-size: 1.5rem; }
  p { font-size: 0.98rem; }
  .cover-title { font-size: 1.6rem; }
  .cover-image { max-width: 160px; }

  .alignleft, .alignright {
    float: none;
    display: block;
    margin: 1rem auto;
    max-width: 100%;
  }
}
