:root {
  --bg: #110e0c;
  --bg-2: #1a1512;
  --bg-3: #241c17;
  --line: rgba(224, 196, 164, 0.16);
  --text: #f6efe6;
  --muted: #b7aa9b;
  --soft: #8f8276;
  --accent: #e4b583;
  --accent-2: #c46a45;
  --card: #1c1714;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
  --serif: "Newsreader", "Iowan Old Style", Palatino, Georgia, serif;
  --sans: "Outfit", "Segoe UI", sans-serif;
  --measure: 42rem;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background:
    radial-gradient(1200px 500px at 80% -10%, rgba(196, 106, 69, 0.16), transparent 55%),
    radial-gradient(900px 420px at -10% 20%, rgba(228, 181, 131, 0.08), transparent 50%),
    var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
}
img { max-width: 100%; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: #f3d7b4; }
.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: var(--accent);
  color: #1a120c;
  padding: 0.5rem 0.8rem;
  z-index: 20;
}
.skip:focus { top: 1rem; }

.agebar {
  background: #2a1712;
  color: #f0d2c4;
  text-align: center;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  padding: 0.45rem 1rem;
  border-bottom: 1px solid rgba(228, 181, 131, 0.15);
}

.wrap { width: min(1120px, calc(100% - 2rem)); margin: 0 auto; }
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(17, 14, 12, 0.9);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 1rem; min-height: 4.2rem; }
.logo {
  font-family: var(--serif);
  font-size: 1.55rem;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.03em;
}
.logo span { color: var(--accent); }
.nav { display: flex; gap: 1.15rem; margin-left: auto; }
.nav a { color: var(--muted); text-decoration: none; font-size: 0.95rem; }
.nav a[aria-current="page"], .nav a:hover { color: var(--text); }
.nav-toggle {
  display: none;
  margin-left: auto;
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.4rem 0.8rem;
  font: inherit;
}

.hero { padding: 4.2rem 0 2.2rem; }
.kicker {
  margin: 0 0 0.7rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.75rem;
}
h1, h2, h3 { font-family: var(--serif); font-weight: 560; letter-spacing: -0.03em; line-height: 1.12; }
h1 { font-size: clamp(2.5rem, 6vw, 4.6rem); margin: 0 0 1rem; max-width: 16ch; }
.lead { font-family: var(--serif); font-size: 1.35rem; line-height: 1.45; color: #efe4d6; max-width: 40rem; }
.byline { color: var(--soft); font-size: 0.92rem; }

.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.card {
  display: block;
  background: linear-gradient(180deg, rgba(255,255,255,0.025), transparent 40%), var(--card);
  border: 1px solid var(--line);
  border-radius: 1.1rem;
  padding: 1.15rem 1.15rem 1.2rem;
  color: inherit;
  text-decoration: none;
  min-height: 100%;
  box-shadow: var(--shadow);
}
.card:hover { border-color: rgba(228, 181, 131, 0.45); color: inherit; }
.card small { color: var(--accent); letter-spacing: 0.08em; text-transform: uppercase; font-size: 0.72rem; }
.card h2, .card h3 { margin: 0.45rem 0; font-size: 1.45rem; color: var(--text); }
.card p { margin: 0; color: var(--muted); }

.section { padding: 2.2rem 0; }
.section h2 { font-size: clamp(1.8rem, 3vw, 2.5rem); margin: 0 0 0.8rem; }

.article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 16rem; gap: 2rem 3rem; padding: 2.2rem 0 4rem; align-items: start; }
.article-hero, .prose { max-width: 46rem; }
.article-layout > article { grid-column: 1; min-width: 0; }
.article-layout > .toc { grid-column: 2; grid-row: 1; }
.crumbs { color: var(--soft); font-size: 0.88rem; margin-bottom: 1rem; }
.crumbs a { color: var(--muted); text-decoration: none; }
.article-hero h1 { font-size: clamp(2.2rem, 5vw, 3.7rem); max-width: 18ch; }
.toc {
  position: sticky;
  top: 5.4rem;
  align-self: start;
  border-left: 1px solid var(--line);
  padding-left: 1rem;
}
.toc p { margin: 0 0 0.5rem; color: var(--soft); font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase; }
.toc a { display: block; color: var(--muted); text-decoration: none; font-size: 0.92rem; margin: 0.35rem 0; }
.toc a:hover { color: var(--text); }

.prose p, .prose li { color: #efe6dc; }
.prose p { margin: 0 0 1rem; }
.prose h2 { font-size: 2rem; margin: 2.1rem 0 0.7rem; }
.prose h3 { font-size: 1.35rem; margin: 1.5rem 0 0.45rem; }
.prose ul, .prose ol { margin: 0 0 1rem; padding-left: 1.2rem; }
.prose li { margin: 0.3rem 0; }
.prose strong { color: white; font-weight: 600; }
.note, .pull {
  border: 1px solid var(--line);
  background: var(--bg-2);
  border-radius: 1rem;
  padding: 1rem 1.1rem;
  margin: 1.3rem 0;
}
.pull { font-family: var(--serif); font-size: 1.35rem; line-height: 1.35; color: #f3e6d4; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; margin: 1rem 0 1.4rem; font-size: 0.95rem; }
th, td { text-align: left; padding: 0.7rem 0.55rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--accent); font-weight: 500; }
.faq details { border-bottom: 1px solid var(--line); padding: 0.8rem 0; }
.faq summary { cursor: pointer; font-weight: 600; }
.faq p { margin: 0.6rem 0 0.2rem; color: var(--muted); }
.related { margin-top: 2.4rem; }
.related h2 { font-size: 1.6rem; }

.site-footer { border-top: 1px solid var(--line); padding: 2.4rem 0 1.4rem; background: #0d0b0a; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 1.5rem; }
.site-footer h2 { font-family: var(--sans); font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--soft); margin: 0 0 0.7rem; }
.site-footer a { display: block; color: var(--muted); text-decoration: none; margin: 0.28rem 0; }
.site-footer a:hover { color: var(--text); }
.site-footer p { color: var(--muted); }
.legal { margin-top: 1.6rem; color: var(--soft); font-size: 0.82rem; }
.legal p { margin: 0; }

.home-links { margin-top: 1rem; }
@media (max-width: 900px) {
  .grid, .footer-grid { grid-template-columns: 1fr 1fr; }
  .article-layout { grid-template-columns: 1fr; }
  .article-layout > article, .article-layout > .toc { grid-column: 1; }
  .article-layout > .toc { grid-row: 1; position: static; border-left: 0; border-top: 1px solid var(--line); padding: 0.8rem 0 0; }
  .article-layout > article { grid-row: 2; }
  .nav-toggle { display: inline-flex; }
  .nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: #16120f; border-bottom: 1px solid var(--line); padding: 0.6rem 1rem 1rem; flex-direction: column; }
  .nav.is-open { display: flex; }
  .header-inner { position: relative; }
}
@media (max-width: 640px) {
  .grid, .footer-grid { grid-template-columns: 1fr; }
  body { font-size: 16.5px; }
}
