/* Shared styles for every page except the generator, which keeps its CSS
   inline so the landing page renders without a second round trip. */

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

:root {
  --bg: #f4f7ee;
  --surface: #ffffff;
  --surface2: #eaf0de;
  --border: #cfdbbf;
  --accent: #6ab804;
  --accent2: #0099cc;
  --text: #1a1f14;
  --muted: #5a6650;
  --radius: 12px;
}

body {
  font-family: "DM Sans", "Segoe UI", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

:focus-visible {
  outline: 3px solid var(--accent2);
  outline-offset: 2px;
}

/* ---------- HEADER + NAV ---------- */
.site-header {
  text-align: center;
  padding: 32px 24px 24px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.site-header .brand {
  display: inline-block;
  text-decoration: none;
  color: var(--accent);
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.site-nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin-top: 16px;
}

.site-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 4px 2px;
  border-bottom: 2px solid transparent;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.site-nav a[aria-current="page"] {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* ---------- LAYOUT ---------- */
main {
  width: 100%;
  max-width: 820px;
  margin: 0 auto;
  padding: 40px 20px 72px;
  flex: 1;
}

.breadcrumb {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 20px;
}

.breadcrumb a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px 40px 40px;
}

/* ---------- PROSE ---------- */
.prose h1 {
  font-size: clamp(1.7rem, 4vw, 2.3rem);
  color: var(--accent);
  line-height: 1.25;
  margin-bottom: 8px;
  letter-spacing: -0.5px;
}

.prose h2 {
  font-size: 1.35rem;
  color: var(--accent2);
  margin: 36px 0 12px;
}

.prose h3 {
  font-size: 1.08rem;
  color: var(--text);
  margin: 24px 0 8px;
}

.prose p,
.prose ul,
.prose ol {
  margin-bottom: 18px;
}

.prose ul,
.prose ol {
  padding-left: 22px;
}

.prose li {
  margin-bottom: 8px;
}

.prose a {
  color: var(--accent2);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.prose strong {
  font-weight: 700;
}

.article-meta {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.key-points {
  background: var(--surface2);
  border-left: 4px solid var(--accent);
  border-radius: 0 8px 8px 0;
  padding: 18px 22px 4px;
  margin: 0 0 28px;
}

.key-points p {
  font-weight: 700;
  margin-bottom: 10px;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--muted);
}

.callout {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 18px 22px;
  margin: 28px 0;
  font-size: 0.95rem;
}

.callout p:last-child {
  margin-bottom: 0;
}

.sources {
  margin-top: 40px;
  padding-top: 22px;
  border-top: 1px dashed var(--border);
  font-size: 0.88rem;
  color: var(--muted);
}

.sources h2 {
  font-size: 1rem;
  color: var(--muted);
  margin: 0 0 10px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.sources ol {
  padding-left: 20px;
}

.sources a {
  color: var(--muted);
}

.related {
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.related h2 {
  font-size: 1.1rem;
  color: var(--accent);
  margin: 0 0 12px;
}

.related ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.related li {
  margin-bottom: 8px;
}

.related a {
  color: var(--accent2);
  text-decoration: none;
  font-weight: 600;
}

.related a:hover {
  text-decoration: underline;
}

.cta-generator {
  display: inline-block;
  margin-top: 8px;
  padding: 13px 26px;
  border-radius: 100px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}

.cta-generator:hover {
  filter: brightness(1.07);
}

/* Optional manual ad placements. Auto ads handles the rest; a container with
   no unit inside collapses so the page never shows an empty framed box. */
.ad-slot {
  display: block;
  width: 100%;
  max-width: 760px;
  margin: 32px auto;
}

.ad-slot:empty {
  display: none;
}

.ad-slot ins.adsbygoogle {
  display: block;
  width: 100%;
}

/* ---------- FOOTER ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 28px 20px 36px;
  text-align: center;
  font-size: 0.85rem;
  color: var(--muted);
}

.site-footer .disclaimer {
  max-width: 720px;
  margin: 0 auto 16px;
  line-height: 1.55;
}

.footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin-bottom: 12px;
}

.footer-links a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.footer-links a:hover {
  text-decoration: underline;
}

@media (max-width: 600px) {
  main {
    padding: 24px 14px 56px;
  }
  .card {
    padding: 24px 20px 28px;
  }
  .prose h2 {
    margin-top: 28px;
  }
}
