/* The Lighter Footprint — clean modern editorial blog theme
   Mobile-first, no frameworks, single accent color. */

:root {
  --accent: #2e7d4a;          /* leaf green */
  --accent-dark: #215c36;
  --ink: #22301f;
  --ink-soft: #4a5a45;
  --muted: #6b7a66;
  --paper: #ffffff;
  --wash: #f4f7f2;
  --line: #e2e8de;
  --radius: 12px;
  --maxw: 72rem;
  --measure: 44rem;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
          Arial, "Noto Sans", system-ui, sans-serif;
  --font-display: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia,
          "Times New Roman", serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.7;
  font-size: 1.0625rem;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; height: auto; }
a { color: var(--accent-dark); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent); }
a:focus-visible, button:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.25; color: var(--ink); text-wrap: balance; }
h1 { font-size: clamp(1.9rem, 4.5vw, 2.75rem); margin: 0.4em 0 0.3em; letter-spacing: -0.01em; }
h2 { font-size: clamp(1.4rem, 3vw, 1.8rem); margin: 2.2em 0 0.6em; padding-top: 0.2em; }
h3 { font-size: 1.22rem; margin: 1.8em 0 0.4em; }
p { margin: 0 0 1.1em; }
ul, ol { margin: 0 0 1.2em; padding-left: 1.4em; }
li { margin-bottom: 0.45em; }
li::marker { color: var(--accent); }
blockquote {
  margin: 1.6em 0; padding: 0.9em 1.2em;
  border-left: 4px solid var(--accent);
  background: var(--wash); border-radius: 0 var(--radius) var(--radius) 0;
}
code { background: var(--wash); padding: 0.15em 0.4em; border-radius: 6px; font-size: 0.92em; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 1.25rem; }

/* ---- Header / nav ---- */
.site-header {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 50;
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  max-width: var(--maxw); margin: 0 auto; padding: 0.7rem 1.25rem;
}
.brand { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; color: var(--ink); }
.brand-mark { width: 36px; height: 36px; flex: none; }
.brand-name { font-family: var(--font-display); font-size: 1.25rem; font-weight: 700; line-height: 1.15; }
.brand-tag { display: block; font-family: var(--font); font-size: 0.72rem; color: var(--muted); font-weight: 400; }
.site-nav ul { display: flex; gap: 1.4rem; list-style: none; margin: 0; padding: 0; }
.site-nav a { text-decoration: none; color: var(--ink); font-weight: 600; font-size: 0.95rem; }
.site-nav a:hover { color: var(--accent); }
.nav-toggle {
  display: none; background: none; border: 1px solid var(--line);
  border-radius: 8px; padding: 0.45rem 0.6rem; cursor: pointer; color: var(--ink);
}
.nav-toggle svg { display: block; width: 22px; height: 22px; }

/* ---- Hero ---- */
.hero {
  background:
    radial-gradient(60rem 22rem at 85% -4rem, #dcefdf 0%, transparent 60%),
    linear-gradient(180deg, var(--wash) 0%, var(--paper) 100%);
  background-color: var(--wash);
  border-bottom: 1px solid var(--line);
  padding: 3.5rem 0 3rem;
  text-align: center;
}
.hero .eyebrow {
  display: inline-block; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--accent-dark);
  background: #e4efe6; border-radius: 999px; padding: 0.3rem 0.9rem; margin-bottom: 1rem;
}
.hero h1 { margin-top: 0; }
.hero .tagline { font-family: var(--font-display); font-size: 1.3rem; color: var(--accent-dark); margin: 0 0 0.8rem; }
.hero .pitch { max-width: var(--measure); margin: 0 auto; color: var(--ink-soft); }

/* ---- Cards / grids ---- */
.section { padding: 2.75rem 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; row-gap: 0.4rem; gap: 1rem; margin-bottom: 1.25rem; }
.section-head h2 { margin: 0; }
.section-head a { font-size: 0.92rem; font-weight: 600; white-space: nowrap; }

.card-grid { display: grid; grid-template-columns: 1fr; gap: 1.25rem; list-style: none; margin: 0; padding: 0; }
.card {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--paper); padding: 1.4rem 1.4rem 1.2rem;
  display: flex; flex-direction: column; gap: 0.5rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 10px 28px rgba(46, 125, 74, 0.10); }
.card .kicker { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent-dark); }
.card h3 { margin: 0; font-size: 1.15rem; }
.card h3 a { color: var(--ink); text-decoration: none; }
.card h3 a:hover { color: var(--accent); }
.card p { margin: 0; color: var(--ink-soft); font-size: 0.97rem; flex: 1; }
.card .card-link { font-weight: 700; font-size: 0.92rem; }

.featured {
  border: 2px solid var(--accent); border-radius: var(--radius);
  background: linear-gradient(135deg, #f2f8f3 0%, var(--paper) 70%);
  padding: 1.75rem; margin-bottom: 2rem;
  display: grid; gap: 0.7rem;
}
.featured .kicker { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent-dark); }
.featured h2 { margin: 0; font-size: clamp(1.5rem, 3.4vw, 2rem); }
.featured h2 a { color: var(--ink); text-decoration: none; }
.featured h2 a:hover { color: var(--accent); }
.featured p { margin: 0; color: var(--ink-soft); }
.stat-row { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 0.4rem; }
.stat {
  background: var(--paper); border: 1px solid var(--line); border-radius: 999px;
  font-size: 0.85rem; font-weight: 600; padding: 0.25rem 0.8rem; color: var(--ink-soft);
}
.stat strong { color: var(--accent-dark); }

/* ---- About / newsletter band ---- */
.band { background: var(--wash); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.about p { max-width: var(--measure); color: var(--ink-soft); }
.newsletter-card {
  background: var(--ink); color: #eef4ec; border-radius: var(--radius);
  padding: 2rem; max-width: 34rem; margin: 0 auto; text-align: center;
}
.newsletter-card h2 { color: #ffffff; margin: 0 0 0.5rem; }
.newsletter-card p { color: #c9d8c9; margin: 0; }
.newsletter-card svg { margin-bottom: 0.6rem; }

/* ---- Article pages ---- */
.article-page .wrap-narrow { max-width: var(--measure); margin: 0 auto; padding: 0 1.25rem; }
.breadcrumb { font-size: 0.88rem; margin: 1.5rem 0 0.5rem; color: var(--muted); }
.breadcrumb a { text-decoration: none; font-weight: 600; }
.article-head { border-bottom: 1px solid var(--line); padding-bottom: 1.25rem; margin-bottom: 0.5rem; }
.byline { display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; align-items: center; color: var(--muted); font-size: 0.92rem; margin: 0.9rem 0 0; }
.byline .author { font-weight: 700; color: var(--ink); }
.disclosure-notice {
  background: #fdf8ec; border: 1px solid #ead9a8; border-radius: var(--radius);
  padding: 0.85rem 1.1rem; font-size: 0.9rem; color: #5c4a1e; margin: 1.25rem 0;
}
.disclosure-notice a { color: #7a5f1c; font-weight: 700; }
.lede { font-size: 1.15rem; color: var(--ink-soft); }
.faq { background: var(--wash); border-radius: var(--radius); padding: 1.5rem; margin: 2.5rem 0; }
.faq h2 { margin-top: 0; }
.faq dt { font-weight: 700; margin-top: 1.1rem; }
.faq dd { margin: 0.25rem 0 0; color: var(--ink-soft); }
.recipe-card {
  background: var(--paper); border: 1px solid var(--line); border-left: 4px solid var(--accent);
  border-radius: var(--radius); padding: 1.25rem 1.4rem; margin: 1.4rem 0;
}
.recipe-card h3 { margin-top: 0; }
.keep-reading { border-top: 2px solid var(--accent); margin: 3rem 0 0; padding-top: 1.5rem; }
.keep-reading h2 { margin-top: 0; }
.keep-reading ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.7rem; }
.keep-reading li { margin: 0; }
.keep-reading a { font-weight: 600; text-decoration: none; }
.keep-reading a:hover { text-decoration: underline; }

/* ---- Footer ---- */
.site-footer { background: var(--ink); color: #cdd8cb; margin-top: 3rem; }
.footer-inner { max-width: var(--maxw); margin: 0 auto; padding: 2.5rem 1.25rem 1.5rem; }
.footer-grid { display: grid; gap: 1.5rem; grid-template-columns: 1fr; margin-bottom: 1.75rem; }
.footer-brand { font-family: var(--font-display); font-size: 1.2rem; color: #fff; font-weight: 700; }
.footer-tag { font-size: 0.92rem; color: #a9bba7; margin: 0.4rem 0 0; }
.footer-nav h3, .footer-note h3 { color: #fff; font-size: 0.95rem; font-family: var(--font); margin: 0 0 0.6rem; letter-spacing: 0.04em; text-transform: uppercase; }
.footer-nav ul { list-style: none; margin: 0; padding: 0; }
.footer-nav li { margin-bottom: 0.4rem; }
.footer-nav a { color: #cdd8cb; text-decoration: none; font-size: 0.95rem; }
.footer-nav a:hover { color: #fff; text-decoration: underline; }
.footer-note p { font-size: 0.88rem; color: #a9bba7; margin: 0 0 0.8rem; }
.footer-note-link { color: #fff; font-weight: 700; }
.footer-bottom { border-top: 1px solid #3a4a38; padding-top: 1.25rem; font-size: 0.85rem; color: #8fa08d; display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; justify-content: space-between; }
.footer-bottom a { color: #cdd8cb; }

/* ---- Decorative SVG dividers ---- */
.leaf-divider { display: flex; justify-content: center; margin: 2.5rem 0; color: var(--accent); opacity: 0.7; }

/* ---- Responsive ---- */
@media (min-width: 560px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1.2fr 1fr 1fr; }
}
@media (min-width: 900px) {
  .card-grid { grid-template-columns: repeat(3, 1fr); }
}

/* Hamburger nav under ~720px */
@media (max-width: 719px) {
  .nav-toggle { display: block; }
  .site-nav { display: none; width: 100%; }
  .header-inner { flex-wrap: wrap; }
  .site-nav.open { display: block; }
  .site-nav ul { flex-direction: column; gap: 0; padding: 0.75rem 0 0.25rem; }
  .site-nav li { border-top: 1px solid var(--line); }
  .site-nav a { display: block; padding: 0.7rem 0.2rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .card:hover { transform: none; }
}

/* ---- Interactive features (assets/site.js) ---- */
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Search in header */
.header-actions { display: flex; align-items: center; gap: 0.6rem; }
.site-search { position: relative; }
.site-search-input {
  border: 1px solid var(--line); border-radius: 999px;
  padding: 0.45rem 0.95rem; font-size: 0.9rem; font-family: var(--font);
  width: 11rem; background: var(--wash); color: var(--ink);
  transition: width 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.site-search-input::placeholder { color: var(--muted); }
.site-search-input:focus {
  width: 15rem; background: var(--paper); border-color: var(--accent); outline: none;
  box-shadow: 0 0 0 3px rgba(46, 125, 74, 0.15);
}
.site-search-results {
  position: absolute; top: calc(100% + 0.45rem); right: 0;
  width: min(22rem, 82vw); max-height: 24rem; overflow: auto;
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: 0 14px 36px rgba(20, 35, 22, 0.16);
  z-index: 60; text-align: left;
}
.site-search-results a {
  display: block; padding: 0.7rem 1rem; text-decoration: none;
  border-bottom: 1px solid var(--line);
}
.site-search-results a:last-child { border-bottom: 0; }
.site-search-results a:hover, .site-search-results a:focus-visible { background: var(--wash); }
.site-search-results .sr-title { display: block; font-weight: 700; color: var(--ink); font-size: 0.95rem; line-height: 1.35; }
.site-search-results .sr-excerpt { display: block; font-size: 0.84rem; color: var(--muted); margin-top: 0.2rem; line-height: 1.45; }
.site-search-empty { padding: 0.85rem 1rem; font-size: 0.9rem; color: var(--muted); margin: 0; }

/* Dark mode toggle */
.theme-toggle {
  background: var(--wash); border: 1px solid var(--line); border-radius: 999px;
  width: 2.4rem; height: 2.4rem; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--ink);
}
.theme-toggle:hover { border-color: var(--accent); color: var(--accent); }
.theme-toggle svg { width: 1.15rem; height: 1.15rem; }
.theme-toggle .icon-sun { display: none; }
html[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
html[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

/* Table of contents */
.toc {
  background: var(--wash); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.1rem 1.25rem; margin: 1.6rem 0;
}
.toc-title {
  font-weight: 700; font-size: 0.82rem; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--accent-dark); margin: 0 0 0.55rem;
}
.toc ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.1rem; }
.toc li { margin: 0; }
.toc a {
  display: block; padding: 0.32rem 0.7rem; border-radius: 6px;
  text-decoration: none; color: var(--ink-soft); font-size: 0.94rem;
  border-left: 2px solid transparent; line-height: 1.4;
}
.toc a:hover { background: var(--paper); color: var(--accent-dark); }
.toc a.active {
  border-left-color: var(--accent); color: var(--accent-dark);
  font-weight: 700; background: var(--paper);
}
.toc .toc-sub a { padding-left: 1.5rem; font-size: 0.87rem; }
article h2, article h3 { scroll-margin-top: 5.5rem; }

/* Reading progress bar */
.reading-progress {
  position: fixed; top: 0; left: 0; right: 0; height: 3px;
  z-index: 70; pointer-events: none; background: transparent;
}
.reading-progress span { display: block; height: 100%; width: 0; background: var(--accent); }

/* FAQ accordions (progressive enhancement over the plain <dl>) */
.faq dl { margin: 0; }
.faq .faq-q {
  display: flex; width: 100%; align-items: center; justify-content: space-between;
  gap: 1rem; background: none; border: 0; padding: 0.55rem 0;
  font: inherit; font-weight: 700; color: var(--ink);
  text-align: left; cursor: pointer;
}
.faq .faq-q:hover { color: var(--accent-dark); }
.faq .faq-q::after {
  content: "+"; flex: none; font-size: 1.35rem; font-weight: 400;
  color: var(--accent); line-height: 1;
}
.faq .faq-q[aria-expanded="true"]::after { content: "–"; }
.faq dd { margin: 0 0 0.9rem; color: var(--ink-soft); }
.faq dd:last-child { margin-bottom: 0; }

/* Back to top */
.back-to-top {
  position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 60;
  width: 2.75rem; height: 2.75rem; border-radius: 50%;
  border: 1px solid var(--line); background: var(--paper);
  color: var(--accent-dark); cursor: pointer;
  box-shadow: 0 6px 20px rgba(20, 35, 22, 0.18);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
}
.back-to-top.show { opacity: 1; visibility: visible; transform: none; }
.back-to-top:hover { border-color: var(--accent); color: var(--accent); }
.back-to-top svg { width: 1.2rem; height: 1.2rem; }

/* Dark theme */
html[data-theme="dark"] {
  --accent: #7cc496;
  --accent-dark: #a6d9b8;
  --ink: #e9f0e7;
  --ink-soft: #c2d1bf;
  --muted: #93a691;
  --paper: #10160f;
  --wash: #18211a;
  --line: #2a382c;
}
html[data-theme="dark"] .hero {
  background:
    radial-gradient(60rem 22rem at 85% -4rem, #1e2e22 0%, transparent 60%),
    linear-gradient(180deg, var(--wash) 0%, var(--paper) 100%);
  background-color: var(--wash);
}
html[data-theme="dark"] .hero .eyebrow { background: #223626; }
html[data-theme="dark"] .featured {
  background: linear-gradient(135deg, #16211a 0%, var(--paper) 70%);
}
html[data-theme="dark"] .disclosure-notice {
  background: #26200f; border-color: #5a4a22; color: #e3d3a3;
}
html[data-theme="dark"] .disclosure-notice a { color: #f0d98c; }
html[data-theme="dark"] .site-footer { background: #0b100c; }
html[data-theme="dark"] .footer-bottom { border-top-color: #243024; }
html[data-theme="dark"] .card:hover { box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35); }
html[data-theme="dark"] .site-search-results { box-shadow: 0 14px 36px rgba(0, 0, 0, 0.5); }

/* Header actions on small screens */
@media (max-width: 719px) {
  .header-actions { width: 100%; margin-top: 0.6rem; }
  .site-search { flex: 1; }
  .site-search-input, .site-search-input:focus { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .back-to-top { transition: none; }
  .site-search-input { transition: none; }
}
