:root {
  --max-width: 1180px;
  --color-ink: #2E0F1A;
  --color-ink-soft: #5C2436;
  --color-ink-faint: #8A5568;
  --color-paper: #FBF4E7;
  --color-paper-raised: #FFFFFF;
  --color-paper-sunken: #F3E6D0;
  --color-gold: #E8AE3D;
  --color-gold-dark: #C88A1F;
  --color-brick: #A23B3B;
  --color-brick-dark: #7C2A2A;
  --color-good: #4B7B4E;
  --color-border: #E7D9C4;
  --radius: 16px;
  --radius-sm: 9px;
  --shadow-sm: 0 1px 2px rgba(46, 15, 26, 0.08);
  --shadow-md: 0 10px 28px rgba(46, 15, 26, 0.12);
  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-body: 'Manrope', 'Segoe UI', system-ui, -apple-system, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.7;
  color: var(--color-ink);
  background: var(--color-paper);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  color: var(--color-ink);
  letter-spacing: -0.01em;
  margin: 0 0 0.55em;
}

h1 { font-size: clamp(2rem, 4.4vw, 3rem); font-weight: 600; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.55rem, 3.2vw, 2.15rem); margin-top: 3rem; }
h3 { font-size: 1.25rem; margin-top: 1.6em; font-weight: 600; }
p { margin: 0 0 1.15em; color: var(--color-ink-soft); max-width: 72ch; }
ul, ol { margin: 0 0 1.15em; padding-left: 1.35em; color: var(--color-ink-soft); }
li { margin-bottom: 0.45em; }
a { color: var(--color-brick); text-decoration: underline; text-decoration-color: rgba(162, 59, 59, 0.35); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }
img, svg { max-width: 100%; display: block; }
strong { color: var(--color-ink); }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.icon { flex-shrink: 0; display: inline-block; }

/* Header */
.site-header {
  border-bottom: 1px solid var(--color-border);
  background: var(--color-paper-raised);
  position: sticky;
  top: 0;
  z-index: 50;
}
.site-header__inner { height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.site-logo__img { height: 44px; width: auto; display: block; }
.site-nav { display: none; gap: 1.1rem; align-items: center; }
.site-nav a { color: var(--color-ink); text-decoration: none; font-weight: 600; font-size: 0.88rem; white-space: nowrap; }
.site-nav a:hover, .site-nav a.active { color: var(--color-brick); }
.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 0.4rem;
  color: var(--color-ink);
  cursor: pointer;
}

@media (min-width: 1024px) {
  .site-nav { display: flex; }
  .nav-toggle { display: none; }
}

.site-nav.is-open {
  display: flex;
  flex-direction: column;
  position: absolute;
  top: 72px;
  left: 0;
  right: 0;
  background: var(--color-paper-raised);
  border-bottom: 1px solid var(--color-border);
  padding: 1rem 1.5rem 1.5rem;
  gap: 0.9rem;
  box-shadow: var(--shadow-md);
}

/* Section sub-nav (jump links) */
.section-nav {
  position: sticky;
  top: 72px;
  z-index: 40;
  background: var(--color-ink);
  overflow-x: auto;
  scrollbar-width: none;
}
.section-nav::-webkit-scrollbar { display: none; }
.section-nav__inner {
  display: flex;
  gap: 0.4rem;
  padding: 0.65rem 1.5rem;
  max-width: var(--max-width);
  margin: 0 auto;
  white-space: nowrap;
}
.section-nav a {
  color: rgba(251, 244, 231, 0.75);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  transition: background 0.15s ease, color 0.15s ease;
}
.section-nav a:hover { color: var(--color-paper); background: rgba(251, 244, 231, 0.08); }

/* Footer */
.site-footer { background: var(--color-ink); color: rgba(255, 250, 240, 0.92); margin-top: 4rem; }
.site-footer__inner { padding: 3.2rem 1.5rem 2.2rem; display: grid; gap: 2rem; }
.site-footer__tagline { color: rgba(255, 250, 240, 0.78); font-size: 0.92rem; max-width: 34ch; margin-top: 0.9rem; }
.site-footer__nav { display: flex; flex-wrap: wrap; gap: 1rem 1.6rem; }
.site-footer__nav a { color: rgba(255, 250, 240, 0.9); text-decoration: none; font-size: 0.92rem; font-weight: 600; }
.site-footer__nav a:hover { color: var(--color-gold); }
.site-footer__legal { border-top: 1px solid rgba(255, 250, 240, 0.22); padding-top: 1.5rem; font-size: 0.88rem; }
.site-footer__legal p { margin-bottom: 0.6em; color: rgba(255, 250, 240, 0.92); }
.site-footer__legal a { color: var(--color-gold); text-decoration: underline; text-decoration-color: rgba(232, 174, 61, 0.6); font-weight: 600; }
.site-footer__legal a:hover { text-decoration-color: currentColor; }

@media (min-width: 900px) {
  .site-footer__inner { grid-template-columns: 1.4fr 1fr; }
  .site-footer__legal { grid-column: 1 / -1; }
}

main { display: block; }

.text-page { padding: 3.2rem 0 4.5rem; max-width: 760px; }
.text-page h1 { margin-bottom: 0.4em; }
.updated { color: var(--color-ink-faint); font-size: 0.9rem; margin-bottom: 1.2rem; }
