:root {
  --primary: #7c2d12;
  --secondary: #431407;
  --accent: #fbbf24;
  --bg: #ffffff;
  --surface: #fef3c7;
  --surface-alt: #fde68a;
  --text: #431407;
  --muted: #5d6a76;
  --border: #fcd34d;
  --row-alt: #fef3c7;
  --radius: 6px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  font-size: 17px;
}

a { color: var(--primary); text-decoration: underline; text-underline-offset: 3px; }
a:hover { color: var(--secondary); }

img, svg { max-width: 100%; height: auto; display: block; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  border-bottom: 3px solid var(--accent);
  box-shadow: 0 2px 12px rgba(67, 20, 7, 0.15);
}
.header-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0.9rem 1.1rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.8rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.brand img { width: 40px; height: 40px; }
.brand span { font-size: 1.1rem; }

.main-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 0.35rem;
  margin-left: auto;
}
.main-nav a {
  color: #fef3c7;
  text-decoration: none;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  font-size: 0.94rem;
  font-weight: 600;
  transition: background 0.15s;
}
.main-nav a:hover, .main-nav a[aria-current="page"] {
  background: rgba(251, 191, 36, 0.25);
  color: #fff;
}

/* Hero */
.hero {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  padding: 3.2rem 1.1rem 3.4rem;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  top: -50px; right: -50px;
  width: 260px; height: 260px;
  background: radial-gradient(circle, rgba(251, 191, 36, 0.35), transparent 65%);
  pointer-events: none;
}
.hero-inner { max-width: 1120px; margin: 0 auto; position: relative; }
.hero h1 {
  margin: 0 0 0.6rem;
  font-size: 2rem;
  line-height: 1.2;
  font-weight: 800;
}
.byline {
  color: var(--surface);
  font-size: 0.95rem;
  margin: 0 0 1.1rem;
}
.byline strong { color: #fff; }
.intro { max-width: 780px; font-size: 1.08rem; margin: 0 0 1.5rem; color: #fef3c7; }
.intro p { margin: 0 0 0.55rem; }

.cta-row { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.cta {
  display: inline-block;
  padding: 0.85rem 1.6rem;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s;
  border: 2px solid transparent;
}
.cta-primary {
  background: var(--accent);
  color: var(--secondary);
  box-shadow: 0 4px 14px rgba(0,0,0,0.18);
}
.cta-primary:hover { transform: translateY(-1px); color: var(--secondary); }
.cta-secondary {
  background: transparent;
  border-color: var(--accent);
  color: #fff;
}
.cta-secondary:hover { background: rgba(251, 191, 36, 0.15); color: #fff; }

/* Main content */
main {
  max-width: 860px;
  margin: 0 auto;
  padding: 2.2rem 1.1rem 3rem;
}

article > p, article > .table-wrap, article > ul, article > ol { margin: 0 0 1rem; }

h2 {
  font-size: 1.5rem;
  line-height: 1.3;
  margin: 2.4rem 0 1rem;
  padding: 0.65rem 0.9rem;
  border-left: 6px solid var(--accent);
  background: var(--surface);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--secondary);
}

h3 {
  font-size: 1.15rem;
  margin: 1.6rem 0 0.6rem;
  color: var(--secondary);
}

/* Table of contents */
.toc {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin: 1.4rem 0 1.8rem;
}
.toc-title {
  font-weight: 700;
  color: var(--secondary);
  margin-bottom: 0.5rem;
  font-size: 1rem;
}
.toc ol { margin: 0; padding-left: 1.3rem; columns: 2; column-gap: 1.4rem; }
.toc li { margin: 0.2rem 0; break-inside: avoid; }
.toc a { color: var(--secondary); text-decoration: none; font-size: 0.94rem; }
.toc a:hover { text-decoration: underline; }

/* Lists */
article ul {
  list-style: none;
  padding: 0;
  margin: 0 0 1.2rem;
}
article ul li {
  padding-left: 1.6rem;
  position: relative;
  margin: 0.4rem 0;
}
article ul li::before {
  content: "\27A4";
  color: var(--primary);
  position: absolute;
  left: 0;
  top: 0;
  font-weight: 700;
}

article ol {
  list-style: none;
  counter-reset: numlist;
  padding: 0;
  margin: 0 0 1.4rem;
}
article ol > li {
  counter-increment: numlist;
  padding: 0.55rem 0 0.55rem 3rem;
  position: relative;
  margin: 0.35rem 0;
}
article ol > li::before {
  content: counter(numlist);
  position: absolute;
  left: 0;
  top: 0.35rem;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: var(--accent);
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.95rem;
}

/* Tables */
.table-wrap {
  overflow-x: auto;
  margin: 1.2rem 0 1.6rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
table {
  width: 100%;
  border-collapse: collapse;
  min-width: 480px;
  font-size: 0.95rem;
}
thead {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: var(--accent);
}
th, td {
  padding: 0.7rem 0.9rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}
th { font-weight: 700; }
tbody tr:nth-child(even) { background: var(--row-alt); }
tbody tr:last-child td { border-bottom: none; }

/* FAQ accordion */
details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin: 0.6rem 0;
  padding: 0.8rem 1rem;
  transition: background 0.15s;
}
details[open] { background: var(--surface-alt); }
details summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--secondary);
  list-style: none;
  position: relative;
  padding-right: 2rem;
}
details summary::-webkit-details-marker { display: none; }
details summary::after {
  content: "\25BC";
  position: absolute;
  right: 0.2rem;
  top: 0.05rem;
  transition: transform 0.2s;
  color: var(--primary);
  font-size: 0.9rem;
}
details[open] summary::after { transform: rotate(180deg); }
details p { margin: 0.7rem 0 0; }

/* Author box */
.author-box {
  margin: 2.6rem 0 1.2rem;
  padding: 1.2rem 1.3rem;
  background: linear-gradient(135deg, var(--surface), var(--surface-alt));
  border: 2px solid var(--accent);
  border-radius: var(--radius);
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}
.author-box img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 3px solid var(--primary);
  flex-shrink: 0;
}
.author-name { margin: 0; font-weight: 800; color: var(--secondary); font-size: 1.05rem; }
.author-role { margin: 0.1rem 0 0.5rem; color: var(--primary); font-weight: 600; font-size: 0.94rem; }
.author-bio { margin: 0; font-size: 0.95rem; }

/* Callouts */
.callout {
  background: var(--surface);
  border-left: 5px solid var(--primary);
  padding: 0.85rem 1rem;
  margin: 1.2rem 0;
  border-radius: 0 var(--radius) var(--radius) 0;
}

/* Illustrations */
.illus {
  width: 100%;
  max-width: 640px;
  margin: 1.5rem auto;
  display: block;
}

/* Footer */
.site-footer {
  background: var(--secondary);
  color: var(--surface);
  padding: 2rem 1.1rem 1.4rem;
  margin-top: 3rem;
}
.footer-inner { max-width: 1120px; margin: 0 auto; }
.footer-cols {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.3rem;
  margin-bottom: 1.4rem;
}
.footer-cols h3 { color: var(--accent); margin: 0 0 0.4rem; font-size: 1rem; }
.footer-cols ul { list-style: none; padding: 0; margin: 0; }
.footer-cols ul li { margin: 0.25rem 0; padding: 0; }
.footer-cols ul li::before { content: none; }
.footer-cols a { color: var(--surface); text-decoration: none; font-size: 0.94rem; }
.footer-cols a:hover { color: var(--accent); text-decoration: underline; }
.footer-bottom {
  border-top: 1px solid rgba(251, 191, 36, 0.3);
  padding-top: 1rem;
  font-size: 0.88rem;
  color: var(--surface-alt);
}

@media (min-width: 700px) {
  .hero h1 { font-size: 2.6rem; }
  .footer-cols { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 980px) {
  .hero { padding: 4.2rem 1.5rem 4.6rem; }
  .hero h1 { font-size: 3rem; }
  main { padding: 2.8rem 1.5rem 3.5rem; }
  h2 { font-size: 1.7rem; }
}

/* a11y additions */
.skip-link{position:absolute;left:-9999px;top:0;background:var(--primary);color:#fff;padding:10px 16px;border-radius:4px;z-index:1000;text-decoration:none;font-weight:700}
.skip-link:focus{left:12px;top:12px}
a:focus-visible,button:focus-visible,summary:focus-visible{outline:3px solid var(--accent);outline-offset:2px}
@media (prefers-reduced-motion: reduce){*,*::before,*::after{transition-duration:.01ms !important;animation-duration:.01ms !important}}
