/* ─── shared base styles ─────────────────────────────
   Colors come from the theme CSS file loaded after this.
   Layouts add their own structural CSS on top. */

* { box-sizing: border-box; }

html { font-size: 17px; }

body {
  margin: 0;
  font-family: var(--font-body, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
}

a { color: inherit; }

/* ─── layout shell ──────────────────────────────── */
.site-header,
.site-footer {
  max-width: var(--maxw, 720px);
  margin: 0 auto;
  padding: 1.25rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-header { border-bottom: 1px solid var(--line); }

.site-footer {
  border-top: 1px solid var(--line);
  margin-top: 4rem;
  color: var(--muted);
  font-size: 0.875rem;
}

.brand {
  font-family: var(--font-display, Georgia, "Times New Roman", serif);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.01em;
}

.site-header nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
}

.page {
  max-width: var(--maxw, 720px);
  margin: 0 auto;
  padding: 2rem 1.25rem 3rem;
}

/* ─── shared typography ─────────────────────────── */
h1, h2, h3 { font-family: var(--font-display, Georgia, "Times New Roman", serif); }

h1 {
  font-size: 2rem;
  line-height: 1.2;
  font-weight: 700;
  margin: 0 0 1rem;
  letter-spacing: -0.02em;
}

h2 {
  font-size: 1.4rem;
  font-weight: 700;
  margin: 2.5rem 0 1rem;
  letter-spacing: -0.01em;
}

.intro {
  font-size: 1.05rem;
  color: var(--muted);
  margin: 0 0 2rem;
}

/* ─── hero image ─────────────────────────────────── */
.hero {
  margin: 0 0 2rem;
  border-radius: var(--radius, 10px);
  overflow: hidden;
  background: var(--line);
  aspect-ratio: 1200 / 630;
}

.hero img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ─── FAQ + related (shared across layouts) ─────── */
.faq details {
  border: 1px solid var(--line);
  border-radius: var(--radius, 10px);
  margin-bottom: 0.5rem;
  background: var(--surface);
}
.faq summary {
  padding: 0.875rem 1rem;
  cursor: pointer;
  font-weight: 600;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  float: right;
  color: var(--accent);
  font-weight: 400;
}
.faq details[open] summary::after { content: "−"; }
.faq details p {
  padding: 0 1rem 1rem;
  margin: 0;
  color: var(--muted);
}

.related ul {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.related a {
  display: inline-block;
  padding: 0.5rem 0.875rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  text-decoration: none;
  font-size: 0.875rem;
}
.related a:hover {
  background: var(--accent);
  color: var(--accent-on);
  border-color: var(--accent);
}

/* Image safety net — prevent any image from overflowing its container */
img {
  max-width: 100%;
  height: auto;
  display: block;
  margin-left: auto;
  margin-right: auto;
}
