:root {
  color-scheme: dark;
  --bg: #151310;
  --surface: #211e19;
  --surface-2: #2a251e;
  --text: #f1eadc;
  --muted: #c4b9a5;
  --bronze: #d29a52;
  --bronze-dark: #9b672f;
  --line: #4a4033;
  --max: 72rem;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 15% 0%, #2c271f 0, transparent 28rem),
    linear-gradient(180deg, #181611, var(--bg));
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.08rem;
  line-height: 1.72;
}

a {
  color: #efb76f;
  text-underline-offset: .18em;
}

a:hover { color: #ffd49c; }
a:focus-visible, button:focus-visible {
  outline: 3px solid #ffd49c;
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  z-index: 10;
  top: .5rem;
  left: .5rem;
  padding: .65rem 1rem;
  color: #16120d;
  background: #ffd49c;
  transform: translateY(-150%);
}

.skip-link:focus { transform: translateY(0); }

.site-header {
  border-bottom: 1px solid var(--line);
  background: rgba(21, 19, 16, .94);
}

.nav {
  width: min(calc(100% - 2rem), var(--max));
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .9rem 0;
}

.brand {
  color: var(--text);
  font-weight: 700;
  font-size: 1.2rem;
  text-decoration: none;
  letter-spacing: .03em;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
}

.nav-links a[aria-current="page"], .nav-links a:hover { color: var(--bronze); }

main {
  width: min(calc(100% - 2rem), 50rem);
  margin: auto;
  padding: clamp(2.5rem, 6vw, 5rem) 0;
}

.wide { width: min(calc(100% - 2rem), var(--max)); }

.eyebrow {
  margin: 0 0 .45rem;
  color: var(--bronze);
  font-family: system-ui, sans-serif;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
}

h1, h2, h3 {
  line-height: 1.18;
  text-wrap: balance;
}

h1 {
  max-width: 17ch;
  margin: 0 0 1rem;
  font-size: clamp(2.35rem, 7vw, 4.5rem);
}

h2 {
  margin-top: 2.8rem;
  font-size: clamp(1.65rem, 4vw, 2.35rem);
}

h3 { margin-top: 1.6rem; font-size: 1.32rem; }

.lead {
  max-width: 46rem;
  color: var(--muted);
  font-size: clamp(1.15rem, 2.5vw, 1.35rem);
}

.breadcrumbs {
  margin-bottom: 1.8rem;
  color: var(--muted);
  font-family: system-ui, sans-serif;
  font-size: .9rem;
}

.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.breadcrumbs li + li::before {
  content: "›";
  margin-right: .35rem;
  color: #827664;
}

.toc, .note, .card, details {
  border: 1px solid var(--line);
  border-radius: .65rem;
  background: linear-gradient(145deg, var(--surface), #1b1915);
}

.toc, .note { padding: 1.2rem 1.4rem; }
.toc ul { columns: 2; margin-bottom: 0; }
.note { border-left: 4px solid var(--bronze-dark); }

.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin: 2rem 0;
}

.card { padding: 1.35rem; }
.card h2, .card h3 { margin-top: 0; }
.card p { color: var(--muted); }
.card a::after { content: " →"; }

details { margin: 1rem 0; padding: 1rem 1.2rem; }
summary { cursor: pointer; font-weight: 700; font-size: 1.15rem; }
details p:last-child { margin-bottom: 0; }

.article-meta {
  color: var(--muted);
  font-family: system-ui, sans-serif;
  font-size: .9rem;
}

.cta {
  margin-top: 3.5rem;
  padding: clamp(1.4rem, 5vw, 2.5rem);
  border: 1px solid #70502d;
  border-radius: .75rem;
  text-align: center;
  background: linear-gradient(135deg, #30261b, #211d17);
}

.cta h2 { margin-top: 0; }
.button {
  display: inline-block;
  padding: .75rem 1.2rem;
  border: 1px solid #f2bd78;
  border-radius: .35rem;
  color: #18120b;
  background: var(--bronze);
  font-family: system-ui, sans-serif;
  font-weight: 800;
  text-decoration: none;
}

.button:hover { color: #18120b; background: #f0ba75; }

.site-footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-family: system-ui, sans-serif;
  font-size: .9rem;
}

.footer-inner {
  width: min(calc(100% - 2rem), var(--max));
  margin: auto;
  padding: 1.7rem 0;
}

@media (max-width: 44rem) {
  .nav { align-items: flex-start; flex-direction: column; }
  .cards { grid-template-columns: 1fr; }
  .toc ul { columns: 1; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
