:root {
  --bg: #fdf6ec;
  --surface: #fff8f0;
  --text: #1a1209;
  --text2: #6b5535;
  --accent: #c5892a;
  --accent-light: #fff3dc;
  --border: #e8d5b7;
}
[data-theme="dark"] {
  --bg: #120e08;
  --surface: #1e1710;
  --text: #f0e2c8;
  --text2: #b89060;
  --accent: #d4a050;
  --accent-light: #271e10;
  --border: #3a2e1c;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: Georgia, 'Times New Roman', serif; background: var(--bg); color: var(--text); min-height: 100vh; transition: background .3s, color .3s; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; }

/* ── SITE HEADER ── */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .9rem 1.4rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 200;
}
.header-left { display: flex; align-items: center; gap: .6rem; }
.site-logo { font-size: 1.2rem; font-weight: bold; color: var(--accent); letter-spacing: .04em; }
.icon-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: .38rem .75rem;
  font-size: .95rem;
  color: var(--text);
  transition: background .15s;
}
.icon-btn:hover { background: var(--accent-light); }

/* ── HOME ── */
.home-wrap { max-width: 680px; margin: 0 auto; padding: .9rem 1.4rem 5rem; }
.series-banner {
  text-align: center;
  font-size: 1rem;
  font-style: italic;
  color: var(--text2);
  letter-spacing: .08em;
  margin-bottom: 1.8rem;
  line-height: 1.6;
}
.stories-grid { display: flex; flex-direction: column; gap: 1.1rem; }
.story-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 1.5rem 1.4rem 1.2rem;
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.story-card:hover { transform: translateY(-4px); box-shadow: 0 10px 28px rgba(0,0,0,.14); border-color: var(--accent); }
.card-top { display: flex; align-items: center; gap: .5rem; margin-bottom: .7rem; }
.card-num { display: inline-flex; align-items: center; justify-content: center; font-size: .72rem; font-weight: bold; color: #fff; background: var(--accent); border-radius: 999px; width: 1.6rem; height: 1.6rem; flex-shrink: 0; }
.card-cat { display: inline-block; font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); border: 1px solid var(--accent); border-radius: 999px; padding: .12rem .55rem; width: fit-content; }
.card-title { font-size: 1.08rem; font-weight: bold; color: var(--text); line-height: 1.35; margin-bottom: .5rem; }
.card-teaser { font-size: .82rem; color: var(--text2); line-height: 1.55; }

/* ── ARTICLE HEADER ── */
.reader-header {
  display: flex;
  align-items: center;
  gap: .8rem;
  padding: .7rem 1.2rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 200;
}
.reader-title { flex: 1; font-size: .92rem; font-weight: bold; color: var(--accent); text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── STORY NAV (prev/next arrows) ── */
.story-nav { display: flex; align-items: center; justify-content: space-between; padding: .5rem 0; }
.nav-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.4rem;
  height: 2.4rem;
  border: 1px solid var(--border);
  border-radius: 50%;
  font-size: 1.2rem;
  color: var(--accent);
  background: var(--surface);
  transition: background .15s, border-color .15s;
  flex-shrink: 0;
}
.nav-arrow:hover { background: var(--accent-light); border-color: var(--accent); }
.nav-arrow.disabled { color: var(--border); pointer-events: none; }
.nav-count { font-size: .8rem; color: var(--text2); letter-spacing: .04em; }
.story-nav.top { margin-bottom: 1.4rem; }
.story-nav.bottom { margin-top: 2.2rem; }

/* ── ARTICLE BODY ── */
.article-wrap { max-width: 680px; margin: 0 auto; padding: 1.2rem 1.2rem 6rem; }
.article-meta { display: flex; align-items: center; gap: .55rem; margin-bottom: 1rem; }
.article-num { display: inline-flex; align-items: center; justify-content: center; font-size: .78rem; font-weight: bold; color: #fff; background: var(--accent); border-radius: 999px; width: 1.75rem; height: 1.75rem; flex-shrink: 0; }
.article-cat { display: inline-block; font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); border: 1px solid var(--accent); border-radius: 999px; padding: .15rem .6rem; }
.article-wrap h1 { font-size: 1.7rem; font-weight: bold; line-height: 1.32; margin-bottom: .5rem; color: var(--text); }
.article-teaser { font-size: .95rem; font-style: italic; color: var(--text2); margin-bottom: 2.2rem; line-height: 1.65; }
.article-wrap p { margin: 0 0 1.1em; line-height: 1.92; font-size: 1.02rem; text-align: justify; color: var(--text); text-indent: 1.4em; }
.article-wrap hr { border: none; border-top: 1px solid var(--border); margin: 2.4rem 0 1.6rem; }

/* ── SOURCES ── */
.sources-box { margin-top: 2.6rem; padding: 1.1rem 1.3rem; background: var(--accent-light); border-left: 3px solid var(--accent); border-radius: 0 10px 10px 0; }
.sources-box h3 { font-size: .8rem; font-weight: bold; letter-spacing: .08em; text-transform: uppercase; color: var(--text2); margin-bottom: .7rem; }
.sources-box ol { padding-left: 1.2rem; }
.sources-box li { font-size: .85rem; line-height: 1.6; margin-bottom: .4rem; color: var(--text2); }
.sources-box a { color: var(--accent); text-decoration: underline; text-decoration-color: rgba(197,137,42,.35); word-break: break-word; }
.sources-box a:hover { text-decoration-color: var(--accent); }

@media (max-width: 480px) {
  .article-wrap h1 { font-size: 1.4rem; }
}
