:root {
  --maroon: #6E1B33;
  --maroon-deep: #4A1122;
  --gold: #C9A96E;
  --gold-deep: #A07840;
  --ink: #241318;
  --bg: #FBF6EF;
  --card: #FFFFFF;
  --border: #E8DCC8;
  --text: #2A2020;
  --text-sec: #6B5D54;
}
* , *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: Georgia, 'Times New Roman', serif;
  line-height: 1.65;
}
a { color: var(--maroon); }
.nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 32px; background: var(--ink); flex-wrap: wrap; gap: 12px;
}
.nav-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.nav-logo {
  width: 34px; height: 34px; border-radius: 8px; background: linear-gradient(135deg, var(--maroon), var(--maroon-deep));
  color: var(--gold); display: flex; align-items: center; justify-content: center;
  font-family: Georgia, serif; font-weight: 700; font-size: 14px; letter-spacing: 1px;
}
.nav-name { color: #F5EFE4; font-weight: 700; font-size: 16px; letter-spacing: 0.5px; }
.nav-links { display: flex; gap: 24px; flex-wrap: wrap; }
.nav-links a { color: #D8C9B0; text-decoration: none; font-size: 14px; font-family: -apple-system, sans-serif; }
.nav-links a:hover, .nav-links a.active { color: var(--gold); }

.hero {
  background: linear-gradient(160deg, var(--maroon) 0%, var(--maroon-deep) 100%);
  color: #fff; padding: 70px 24px; text-align: center; position: relative; overflow: hidden;
}
.hero-badge {
  display: inline-block; border: 1px solid var(--gold); color: var(--gold);
  font-family: -apple-system, sans-serif; font-size: 11px; letter-spacing: 2px;
  text-transform: uppercase; padding: 5px 16px; border-radius: 999px; margin-bottom: 18px;
}
.hero-kicker { color: var(--gold); letter-spacing: 4px; font-size: 13px; text-transform: uppercase; margin-bottom: 10px; }
.hero h1 { font-size: 40px; margin-bottom: 14px; }
.hero-sub { max-width: 560px; margin: 0 auto; color: #EADFCF; font-size: 17px; font-style: italic; }
.hero-meta { margin-top: 20px; color: #C9B79A; font-family: -apple-system, sans-serif; font-size: 13px; }

.wrap { max-width: 880px; margin: 0 auto; padding: 0 24px; }
.toc {
  /* position: relative is required here, not cosmetic — .hero above uses
     position: relative too, and CSS stacking rules paint ANY positioned
     element above static ones regardless of DOM order. Without this,
     .hero renders on top of this box's negative-margin overlap instead
     of the other way around, visibly cutting off "TABLE OF CONTENTS". */
  position: relative;
  background: var(--card); border: 1px solid var(--border); border-radius: 16px;
  padding: 28px 32px; margin: -40px auto 40px; box-shadow: 0 12px 30px rgba(74,17,34,0.08);
}
.toc h2 { font-size: 13px; letter-spacing: 2px; text-transform: uppercase; color: var(--gold-deep); margin-bottom: 16px; }
.toc ol { columns: 2; column-gap: 32px; list-style: none; counter-reset: item; }
.toc li { margin-bottom: 10px; break-inside: avoid; font-family: -apple-system, sans-serif; font-size: 14px; }
.toc a { text-decoration: none; color: var(--text); }
.toc a:hover { color: var(--maroon); text-decoration: underline; }

.doc { padding: 10px 0 80px; }
.doc section { margin-bottom: 40px; scroll-margin-top: 20px; }
.doc h2 {
  font-size: 22px; color: var(--maroon); border-bottom: 2px solid var(--gold);
  padding-bottom: 10px; margin-bottom: 16px;
}
.doc h2 .num { color: var(--gold-deep); margin-right: 8px; }
.doc p, .doc li { color: var(--text); font-size: 16px; margin-bottom: 12px; }
.doc ul, .doc ol.plain { padding-left: 24px; margin-bottom: 12px; }
.doc strong { color: var(--maroon-deep); }

.footer {
  background: var(--ink); color: #B8A98F; text-align: center; padding: 32px 24px;
  font-family: -apple-system, sans-serif; font-size: 13px;
}
.footer a { color: var(--gold); text-decoration: none; }
.footer-links { margin-bottom: 10px; }
.footer-links a { margin: 0 10px; }

@media (max-width: 600px) {
  .hero { padding: 50px 20px; }
  .hero h1 { font-size: 30px; }
  .toc { margin: -30px 12px 32px; padding: 22px; }
  .toc ol { columns: 1; }
  .nav { padding: 14px 18px; }
  .nav-links { gap: 16px; width: 100%; justify-content: center; }
}
