/* The Muddy Child: shared styles. Forest green, amber and cream; Fraunces headings, Outfit body. */
:root {
  --forest: #1a3c2a;
  --forest-mid: #2d5a3f;
  --forest-light: #e8f0eb;
  --moss: #4a7c59;
  --amber: #d4872c;
  --amber-dark: #a8651a;
  --amber-light: #faf0e4;
  --cream: #f8f5f0;
  --cream-dark: #f0ebe3;
  --white: #ffffff;
  --text: #1a1a1a;
  --text-light: #5e564e;
  --border: #e2dcd4;
  --radius: 8px;
  --radius-lg: 14px;
  --max: 1160px;
  --prose: 720px;
  --font-heading: 'Fraunces', Georgia, serif;
  --font-body: 'Outfit', -apple-system, 'Segoe UI', sans-serif;
}
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: var(--font-body); color: var(--text); background: var(--cream); line-height: 1.65; font-size: 17px; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--forest-mid); }
a:hover { color: var(--amber-dark); }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--forest); color: #fff; padding: 8px 14px; border-radius: var(--radius); z-index: 200; }
.skip-link:focus { left: 8px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 100; background: rgba(248,245,240,0.94); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); }
.site-header-inner { max-width: var(--max); margin: 0 auto; padding: 0 20px; min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.logo { font-family: var(--font-heading); font-size: 1.45rem; font-weight: 700; color: var(--forest); text-decoration: none; letter-spacing: -0.02em; display: inline-flex; align-items: center; gap: 10px; }
.logo span { color: var(--text-light); font-weight: 400; }
.logo svg { width: 30px; height: 30px; color: var(--amber); }
.main-nav { display: flex; gap: 4px 18px; flex-wrap: wrap; font-size: 0.93rem; font-weight: 500; padding: 8px 0; }
.main-nav a { color: var(--text); text-decoration: none; padding: 4px 0; border-bottom: 2px solid transparent; }
.main-nav a:hover, .main-nav a[aria-current="page"] { border-bottom-color: var(--amber); color: var(--forest); }

/* Breadcrumb */
.crumbs { max-width: var(--max); margin: 0 auto; padding: 18px 20px 0; font-size: 0.85rem; color: var(--text-light); }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.crumbs li + li::before { content: '/'; margin-right: 6px; color: var(--border); }
.crumbs a { color: var(--text-light); }

/* Article */
.article-head { max-width: var(--max); margin: 0 auto; padding: 18px 20px 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; }
.eyebrow { font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--moss); margin-bottom: 10px; }
.article-head h1, .hub-head h1 { font-family: var(--font-heading); font-weight: 800; font-size: clamp(2rem, 4.6vw, 3.1rem); line-height: 1.1; letter-spacing: -0.025em; color: var(--forest); max-width: 860px; }
p.answer { font-size: 1.2rem; line-height: 1.6; max-width: var(--prose); margin: 18px 0 0; padding: 16px 20px; background: var(--white); border-left: 5px solid var(--amber); border-radius: 0 var(--radius) var(--radius) 0; box-shadow: 0 1px 3px rgba(26,60,42,0.06); }
.byline { font-size: 0.88rem; color: var(--text-light); margin-top: 14px; max-width: var(--prose); }
.hero { max-width: var(--max); margin: 24px auto 0; padding: 0 20px; }
.hero img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius-lg); background: var(--cream-dark); }
.hero figcaption, figure.graphic figcaption { font-size: 0.82rem; color: var(--text-light); margin-top: 8px; }

.prose { max-width: var(--prose); margin: 0 auto; padding: 28px 20px 40px; }
.prose > * + * { margin-top: 1rem; }
.prose h2 { font-family: var(--font-heading); font-size: clamp(1.45rem, 2.6vw, 1.85rem); line-height: 1.2; letter-spacing: -0.015em; color: var(--forest); margin-top: 2.4rem; scroll-margin-top: 84px; }
.prose h3 { font-family: var(--font-heading); font-size: 1.2rem; color: var(--forest-mid); margin-top: 1.6rem; }
.prose ul, .prose ol { padding-left: 1.3rem; }
.prose li + li { margin-top: 0.35rem; }
.prose strong { color: var(--forest); }
.prose .note { font-size: 0.92rem; color: var(--text-light); }
.callout { background: var(--forest-light); border-radius: var(--radius); padding: 16px 18px; }
.callout.amber { background: var(--amber-light); }
.toc { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 18px; font-size: 0.95rem; }
.toc p { font-weight: 600; margin-bottom: 6px; }

/* Tables */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--border); border-radius: var(--radius); background: var(--white); }
table { border-collapse: collapse; width: 100%; font-size: 0.93rem; }
caption { text-align: left; font-weight: 600; padding: 10px 12px; color: var(--forest); background: var(--cream-dark); }
th, td { text-align: left; vertical-align: top; padding: 9px 12px; border-top: 1px solid var(--border); }
thead th { background: var(--forest); color: #fff; border-top: 0; font-weight: 600; }
tbody tr:nth-child(even) { background: #fbf9f6; }
td.opt { color: var(--text-light); font-style: italic; }

/* Kit checklist */
.kit-group { margin-top: 1.6rem; }
.kit-list { list-style: none; padding: 0 !important; display: grid; gap: 6px; }
.kit-list li { display: flex; gap: 10px; align-items: flex-start; background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 9px 12px; margin: 0 !important; }
.kit-list .box { flex: 0 0 18px; height: 18px; border: 2px solid var(--moss); border-radius: 4px; margin-top: 4px; }
.kit-list .qty { color: var(--text-light); font-size: 0.88rem; }
.kit-list .tip { display: block; color: var(--text-light); font-size: 0.86rem; }
.kit-list .optional { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--amber-dark); margin-left: 6px; }
.download { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; background: var(--forest); color: #fff; border-radius: var(--radius-lg); padding: 18px 20px; }
.download p { margin: 0; flex: 1 1 260px; }
.prose .download strong { color: #fff; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 11px 20px; border-radius: var(--radius); font-weight: 600; text-decoration: none; border: 0; cursor: pointer; font: inherit; font-weight: 600; }
.btn-amber { background: var(--amber); color: #1a1a1a; }
.btn-amber:hover { background: #e69a3a; color: #1a1a1a; }
.btn-ghost { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,0.5); }
figure.graphic { margin-top: 1.4rem; }
figure.graphic img { border: 1px solid var(--border); border-radius: var(--radius); background: #fff; }

/* Related */
.related { max-width: var(--prose); margin: 0 auto; padding: 0 20px 48px; }
.related h2 { font-family: var(--font-heading); font-size: 1.35rem; color: var(--forest); margin-bottom: 12px; }
.related ul { list-style: none; display: grid; gap: 10px; }
.related a { display: block; background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; text-decoration: none; color: var(--text); }
.related a:hover { border-color: var(--moss); }
.related strong { color: var(--forest); display: block; }
.related span { font-size: 0.9rem; color: var(--text-light); }
.sources { max-width: var(--prose); margin: 0 auto; padding: 0 20px 48px; font-size: 0.9rem; color: var(--text-light); }
.sources h2 { font-family: var(--font-heading); font-size: 1.15rem; color: var(--forest); margin-bottom: 8px; }
.sources ul { padding-left: 1.2rem; }

/* Home and hubs */
.home-hero { position: relative; overflow: hidden; color: #fff; }
.home-hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: brightness(0.55) saturate(1.05); }
.home-hero-inner { position: relative; max-width: var(--max); margin: 0 auto; padding: 88px 20px 72px; }
.home-hero .eyebrow { color: #f3c98e; }
.home-hero h1 { font-family: var(--font-heading); font-size: clamp(2.3rem, 5.6vw, 3.8rem); line-height: 1.08; letter-spacing: -0.03em; max-width: 760px; }
.home-hero h1 em { color: #f0a54a; }
.home-hero p.answer { color: var(--text); }
.stats { display: flex; flex-wrap: wrap; gap: 18px 36px; margin-top: 28px; }
.stat b { display: block; font-family: var(--font-heading); font-size: 1.8rem; color: #f0a54a; line-height: 1.1; }
.stat span { font-size: 0.86rem; opacity: 0.85; }
.stat-source { font-size: 0.8rem; opacity: 0.8; margin-top: 14px; }
.stat-source a { color: inherit; }
.hub-head { max-width: var(--max); margin: 0 auto; padding: 18px 20px 0; }
.section { max-width: var(--max); margin: 0 auto; padding: 48px 20px; }
.section > h2 { font-family: var(--font-heading); font-size: clamp(1.5rem, 3vw, 2.1rem); color: var(--forest); letter-spacing: -0.02em; }
.section > p.lead { color: var(--text-light); max-width: 680px; margin-top: 6px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; margin-top: 22px; }
.card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; display: flex; flex-direction: column; text-decoration: none; color: var(--text); transition: transform .2s, box-shadow .2s; }
.card:hover { transform: translateY(-3px); box-shadow: 0 8px 26px rgba(26,60,42,0.12); color: var(--text); }
.card img { aspect-ratio: 16 / 9; object-fit: cover; width: 100%; }
.card-body { padding: 14px 16px 18px; }
.card-tag { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--moss); }
.card h3 { font-family: var(--font-heading); font-size: 1.15rem; line-height: 1.25; color: var(--forest); margin: 4px 0 6px; }
.card p { font-size: 0.92rem; color: var(--text-light); }
.band { background: var(--white); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.ages { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin-top: 20px; }
.age { border-radius: var(--radius-lg); padding: 20px; background: var(--cream); border-top: 4px solid var(--moss); }
.age:nth-child(2) { border-top-color: var(--amber); }
.age:nth-child(3) { border-top-color: var(--forest); }
.age h3 { font-family: var(--font-heading); color: var(--forest); font-size: 1.15rem; }
.age p { font-size: 0.93rem; color: var(--text-light); margin-top: 6px; }
.age a { font-weight: 600; font-size: 0.93rem; }

/* Signup */
.signup { background: var(--forest); color: #fff; border-radius: var(--radius-lg); padding: 28px 24px; }
.signup h2 { font-family: var(--font-heading); font-size: 1.5rem; }
.signup p { opacity: 0.9; margin-top: 6px; }
.signup-form { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.signup-form input[type=email] { flex: 1 1 240px; padding: 12px 14px; border-radius: var(--radius); border: 0; font: inherit; }
.signup-form button { background: var(--amber); color: #1a1a1a; border: 0; border-radius: var(--radius); padding: 12px 20px; font: inherit; font-weight: 600; cursor: pointer; }
.signup-interest { flex-basis: 100%; font-size: 0.9rem; }
.signup-thanks, .signup-error { margin-top: 8px; }

/* Footer */
.site-footer { background: #142e20; color: rgba(255,255,255,0.8); font-size: 0.92rem; }
.site-footer-inner { max-width: var(--max); margin: 0 auto; padding: 40px 20px 20px; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 24px; }
.site-footer .logo { color: #fff; }
.site-footer .logo span { color: rgba(255,255,255,0.65); }
.site-footer h2 { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.1em; color: #f3c98e; margin-bottom: 8px; font-weight: 700; }
.site-footer ul { list-style: none; display: grid; gap: 5px; }
.site-footer a { color: rgba(255,255,255,0.85); }
.site-footer a:hover { color: #fff; }
.footer-note { max-width: var(--max); margin: 0 auto; padding: 14px 20px 28px; border-top: 1px solid rgba(255,255,255,0.12); font-size: 0.82rem; color: rgba(255,255,255,0.6); }

@media (max-width: 640px) {
  body { font-size: 16px; }
  p.answer { font-size: 1.08rem; }
  .home-hero-inner { padding: 64px 16px 52px; }
  .stat b { font-size: 1.4rem; }
}
@media print {
  .site-header, .site-footer, .footer-note, .crumbs, .hero, .related, .download, .signup, .toc, .no-print { display: none !important; }
  body { background: #fff; font-size: 11pt; }
  .prose { max-width: none; padding: 0; }
  .kit-list li { border: 0; border-bottom: 1px solid #ccc; border-radius: 0; padding: 3px 0; break-inside: avoid; }
  p.answer { box-shadow: none; border-left-width: 3px; }
  a { color: inherit; text-decoration: none; }
}
