/* Lovebird Blog — Static page styles (light editorial theme) */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* DESIGN.md — Lovebird editorial */
  --ink:          #2C4834;
  --paper:        #FAF8EE;
  --paper-mid:    #F6F1DF;
  --sage:         #3D5E46;
  --lime:         #D2E292;
  --coral:        #D77A61;
  --sky:          #92B7C8;
  --marigold:     #D8A642;
  --elderberry:   #7C5A88;
  --clay:         #D77A61;
  --mute:         color-mix(in srgb, var(--ink) 62%, var(--paper));
  --mute-light:   color-mix(in srgb, var(--ink) 42%, var(--paper));
  --border:       rgba(44, 72, 52, 0.14);
  --safety:       #92B7C8;
  --intentional:  #7C5A88;
  --grain:        url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
  --font:         'DM Sans Variable', 'DM Sans', system-ui, -apple-system, sans-serif;
  --font-mono:    ui-monospace, 'DM Mono', monospace;
  --serif:        'Lora', 'Playfair Display Variable', 'Playfair Display', Georgia, serif;
  --max-w:        720px;
  --wide-w:       1100px;
}

.editorial-grain {
  position: fixed;
  inset: 0;
  z-index: 200;
  pointer-events: none;
  background-image: var(--grain);
  background-size: 180px 180px;
  background-repeat: repeat;
  opacity: 0.09;
  mix-blend-mode: overlay;
}

html {
  font-size: 17px;
  scroll-behavior: smooth;
  color-scheme: light;
}

body {
  font-family: var(--font);
  font-optical-sizing: auto;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* Scope link color — do not bleed into .site-header (static nav has its own palette) */
main a,
.listing-main a,
.content-page a,
.site-footer a {
  color: var(--sage);
  text-decoration: none;
}
img { max-width: 100%; height: auto; display: block; }

/* ── Listing page ── */
.listing-main { max-width: none; margin: 0; padding: 0; }
.listing-header { padding: clamp(48px, 8vw, 88px) clamp(24px, 6vw, 72px) clamp(40px, 6vw, 64px); border-bottom: 1px solid var(--border); }
.listing-header h1 {
  font-family: var(--serif);
  font-size: clamp(2.75rem, 7vw, 6rem);
  font-weight: 900;
  letter-spacing: -0.038em;
  line-height: 1.0;
  color: var(--ink);
  margin-bottom: 22px;
  max-width: 14ch;
}
.listing-header .subtitle {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--sage);
  margin-bottom: 18px;
}
.listing-header p {
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--mute);
  max-width: 50ch;
}

/* ── Static content pages ── */
.content-main {
  max-width: none;
  margin: 0;
  padding: clamp(40px, 7vw, 88px) clamp(24px, 6vw, 72px) clamp(64px, 10vw, 112px);
}
.content-page {
  max-width: var(--max-w);
  margin: 0 auto;
}
.content-breadcrumb {
  max-width: none;
  margin: 0 0 34px;
  padding: 0;
}
.content-header {
  padding-bottom: clamp(36px, 6vw, 64px);
  border-bottom: 1px solid var(--border);
}
.content-header .subtitle {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--sage);
  margin-bottom: 18px;
}
.content-header h1 {
  font-family: var(--serif);
  font-size: clamp(2.5rem, 6vw, 5.25rem);
  font-weight: 900;
  letter-spacing: -0.035em;
  line-height: 1;
  color: var(--ink);
  margin-bottom: 24px;
}
.content-header p {
  font-size: 1.125rem;
  line-height: 1.65;
  color: var(--mute);
  max-width: 62ch;
}
.content-section {
  padding-top: clamp(34px, 5vw, 56px);
}
.content-section h2 {
  font-family: var(--serif);
  font-size: clamp(1.75rem, 3.2vw, 2.6rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--ink);
  margin-bottom: 18px;
}
.content-section p {
  font-size: 1.03rem;
  line-height: 1.75;
  color: var(--mute);
  margin-top: 18px;
}
.faq-section details {
  border-top: 1px solid var(--border);
  padding: 18px 0;
}
.faq-section details:last-child {
  border-bottom: 1px solid var(--border);
}
.faq-section summary {
  cursor: pointer;
  font-weight: 800;
  color: var(--ink);
}
.faq-section summary::marker {
  color: var(--sage);
}

/* ── Category bar (underline tabs) ── */
.cat-bar {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  min-width: max-content;
}
.cat-bar::-webkit-scrollbar { display: none; }
.cat-btn {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 11px 20px;
  border: none;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--sage);
  cursor: pointer;
  white-space: nowrap;
  transition: color 120ms ease, border-color 120ms ease;
}
.cat-btn:hover { color: var(--ink); }
.cat-btn.is-active {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

/* ── Featured article (typographic) ── */
.featured-article { background: var(--paper-mid); border-bottom: 1px solid var(--border); }
.featured-link {
  display: block;
  padding: clamp(32px, 6vw, 64px) clamp(24px, 6vw, 72px);
  color: var(--ink);
  transition: background 150ms ease;
}
.featured-link:hover { background: var(--paper); text-decoration: none; }
.featured-body { min-width: 0; }
.featured-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
  margin-bottom: 22px;
}
.featured-cat {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--sage);
}
.featured-cat.trends { color: var(--marigold); }
.featured-cat.safety { color: var(--safety); }
.featured-cat.intentional { color: var(--intentional); }
.featured-cat.tips { color: var(--clay); }
.featured-sep { color: var(--border); font-size: 0.65rem; }
.featured-date, .featured-readtime {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.1em;
  color: var(--mute);
}
.featured-title {
  font-family: var(--serif);
  font-size: clamp(1.75rem, 3.8vw, 3.25rem);
  font-weight: 900;
  letter-spacing: -0.028em;
  line-height: 1.08;
  color: var(--ink);
  margin-bottom: 18px;
  max-width: 22ch;
}
.featured-excerpt {
  font-size: 1rem;
  line-height: 1.65;
  color: var(--mute);
  max-width: 58ch;
  margin-bottom: 28px;
}
.featured-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--sage);
}
.featured-cta .arrow { transition: transform 220ms ease; }
.featured-link:hover .featured-cta .arrow { transform: translateX(4px); }

/* ── Article list (editorial rows) ── */
.article-list { padding: 8px clamp(24px, 6vw, 72px) clamp(64px, 10vw, 112px); }
.article-row { border-top: 1px solid var(--border); }
.article-row:first-child { border-top: none; }
.article-row-link {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  gap: 20px;
  padding: 26px 0;
  align-items: start;
  color: var(--ink);
  transition: background 150ms ease;
}
.article-row-link:hover { text-decoration: none; }
.article-num {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--mute-light);
  padding-top: 2px;
  user-select: none;
}
.article-row:hover .article-num { color: var(--sage); }
.article-cat {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.55rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--sage);
  margin-bottom: 7px;
}
.article-cat.trends { color: var(--marigold); }
.article-cat.safety { color: var(--safety); }
.article-cat.intentional { color: var(--intentional); }
.article-cat.tips { color: var(--clay); }
.article-title {
  font-family: var(--serif);
  font-size: clamp(1rem, 1.6vw, 1.3rem);
  font-weight: 700;
  letter-spacing: -0.018em;
  line-height: 1.22;
  color: var(--ink);
  margin-bottom: 8px;
  transition: color 200ms ease;
}
.article-row:hover .article-title { color: var(--sage); }
.article-excerpt {
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--mute);
  max-width: 56ch;
}
.article-readtime {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.08em;
  color: var(--mute-light);
  white-space: nowrap;
  padding-top: 2px;
}
@media (max-width: 639px) {
  .article-readtime { display: none; }
}

/* ── Article list footer ── */
.article-list-footer {
  border-top: 1px solid var(--border);
  padding-top: 40px;
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 0;
}
.footer-line { flex: 1; height: 1px; background: var(--border); }
.footer-text {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--mute-light);
  white-space: nowrap;
}

/* ── Empty state ── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 96px 24px;
}
.empty-label {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--mute-light);
  margin-bottom: 12px;
}
.empty-desc {
  font-size: 0.9375rem;
  color: var(--mute);
  max-width: 32ch;
  line-height: 1.5;
}

/* ── Article layout (post pages) ── */
main { max-width: var(--max-w); margin: 3rem auto; padding: 0 1.5rem; }
.post-header { margin-bottom: 2.5rem; }
.breadcrumb { font-size: 0.78rem; color: var(--mute); margin-bottom: 1rem; }
.breadcrumb ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 0; }
.breadcrumb li { display: flex; align-items: center; }
.breadcrumb li.sep { margin: 0 0.25rem; color: var(--border); }
.breadcrumb a { color: var(--mute); }
.breadcrumb a:hover { color: var(--sage); }
.sep { margin: 0 0.3rem; }
.post-cat {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.55rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--sage);
  margin-bottom: 1rem;
}
.post-cat.safety { color: var(--safety); }
.post-cat.intentional { color: var(--intentional); }
.post-cat.tips { color: var(--clay); }
.post-header h1 {
  font-family: var(--serif);
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  line-height: 1.2;
  font-weight: 800;
  margin-bottom: 1rem;
  color: var(--ink);
}
.post-meta {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--mute);
}

/* ── Table of contents ── */
.toc { background: var(--paper-mid); border: 1px solid var(--border); border-radius: 8px; padding: 1.25rem 1.5rem; margin-bottom: 2.5rem; }
.toc-label {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mute);
  margin-bottom: 0.75rem;
}
.toc ol { padding-left: 1.25rem; display: flex; flex-direction: column; gap: 0.35rem; }
.toc a { color: var(--mute); font-size: 0.9rem; }
.toc a:hover { color: var(--sage); text-decoration: none; }

/* ── Post body ── */
.post-body { font-size: 1.05rem; color: var(--ink); }
.post-body h2 {
  font-family: var(--serif);
  font-size: 1.4rem;
  font-weight: 700;
  margin: 2.5rem 0 0.75rem;
  line-height: 1.25;
  color: var(--ink);
  letter-spacing: -0.025em;
}
.post-body h3 {
  font-family: var(--serif);
  font-size: 1.1rem;
  font-weight: 700;
  margin: 1.75rem 0 0.5rem;
  line-height: 1.3;
  color: var(--ink);
  letter-spacing: -0.015em;
}
.post-body p { margin-bottom: 1.35rem; color: var(--mute); }
.post-body strong { font-weight: 700; color: var(--ink); }
.post-body ul, .post-body ol { margin: 0 0 1.35rem 1.5rem; color: var(--mute); }
.post-body li { margin-bottom: 0.4rem; }
.post-body li::marker { color: var(--sage); }
.post-body a { color: var(--sage); font-style: normal; }
.post-body a:hover { color: var(--sage); text-decoration: underline; }
.post-body hr { border: none; border-top: 1px solid var(--border); margin: 2.5rem 0; }

/* ── Inline CTA ── */
.inline-cta { margin: 2rem 0; text-align: center; }
.inline-cta-btn {
  display: inline-block;
  background: var(--lime);
  color: var(--ink) !important;
  font-weight: 800;
  font-size: 0.95rem;
  padding: 0.75rem 1.75rem;
  border-radius: 9999px;
  text-decoration: none !important;
  transition: transform 0.2s ease, background 0.2s ease;
}
.inline-cta-btn:hover { background: #c5d880; transform: translateY(-1px); }

/* ── Citations ── */
a.citation {
  display: inline-block;
  font-size: 0.62em;
  font-family: var(--font-mono);
  font-weight: 600;
  vertical-align: super;
  line-height: 1;
  color: var(--sage);
  background: color-mix(in srgb, var(--sage) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--sage) 25%, transparent);
  border-radius: 3px;
  padding: 0 3px;
  margin: 0 1px;
  text-decoration: none;
  transition: background 0.15s;
}
a.citation:hover { background: color-mix(in srgb, var(--sage) 20%, transparent); text-decoration: none; }

/* ── Sources section ── */
.sources-section { margin: 3rem 0 2rem; padding-top: 2rem; border-top: 1px solid var(--border); }
.sources-heading {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--mute);
  margin-bottom: 1rem;
}
.sources-list { list-style: decimal; padding-left: 1.25rem; margin: 0; }
.source-item {
  font-size: 0.78rem;
  line-height: 1.6;
  color: var(--mute);
  margin-bottom: 0.5rem;
  scroll-margin-top: 80px;
}
.source-item span { color: var(--mute); }
.source-item a { color: var(--sage); }
.source-item a:hover { text-decoration: underline; }

/* ── CTA ── */
.cta-box { background: var(--paper-mid); border: 1px solid var(--border); border-radius: 12px; padding: 2rem; text-align: center; margin: 2.5rem 0; }
.cta-box p, .cta-box h2 { color: var(--ink); margin-bottom: 1rem; }
.cta-btn { display: inline-block; background: var(--lime); color: var(--ink) !important; font-weight: 800; padding: 0.7rem 1.75rem; border-radius: 100px; font-size: 0.875rem; letter-spacing: 0.01em; transition: transform 0.2s ease, background 0.2s ease; }
.cta-btn:hover { background: #c5d880; transform: translateY(-1px); text-decoration: none; }
.cta-end { margin-top: 3rem; }

/* ── Author ── */
.post-footer { margin: 3rem 0; padding-top: 2rem; border-top: 1px solid var(--border); }
.author-bio { display: flex; gap: 1rem; }
.author-bio strong { display: block; margin-bottom: 0.4rem; color: var(--ink); font-weight: 600; }
.author-bio p { font-size: 0.85rem; color: var(--mute); }

/* ── Related ── */
.related { margin: 3rem 0; }
.related-heading {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
  color: var(--mute);
}
.related-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 1rem; }
.related-card { display: block; background: var(--paper-mid); border: 1px solid var(--border); border-radius: 8px; padding: 1.25rem; color: var(--ink); }
.related-card:hover { border-color: var(--sage); text-decoration: none; }

/* ── Footer ── */
.site-footer { border-top: 1px solid var(--border); padding: 2rem 1.5rem; margin-top: 4rem; display: flex; flex-direction: column; align-items: center; gap: 0.75rem; background: var(--paper-mid); }
.footer-copy { font-size: 0.82rem; color: var(--mute); font-family: var(--font-mono); }
.footer-nav { display: flex; gap: 1.5rem; }
.footer-nav a { font-size: 0.82rem; color: var(--mute); }
.footer-nav a:hover { color: var(--sage); }

/* ── Hero image ── */
.hero-img { margin: 0 0 2.5rem; }
.hero-img img { width: 100%; max-height: 460px; object-fit: cover; border-radius: 8px; }

/* ── Responsive ── */
@media (max-width: 700px) {
  html,
  body {
    overflow-x: hidden;
  }
  .listing-header {
    padding-left: 30px;
    padding-right: 30px;
  }
  .listing-header p {
    max-width: 30ch;
  }
  .cat-filters {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-left: 30px;
    padding-right: 30px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .cat-filters::-webkit-scrollbar {
    display: none;
  }
  .cat-btn {
    flex: 0 0 auto;
    white-space: nowrap;
  }
  .featured-link {
    grid-template-columns: 1fr;
    padding-left: 30px;
    padding-right: 30px;
    overflow: hidden;
  }
  .featured-body,
  .featured-title,
  .featured-excerpt {
    max-width: 100%;
    min-width: 0;
  }
  .featured-body {
    width: min(100%, 330px);
  }
  .featured-title {
    font-size: 1.65rem;
    max-width: 14ch;
    overflow-wrap: break-word;
  }
  .featured-excerpt {
    max-width: 32ch;
  }
  .featured-img-wrap { aspect-ratio: 16/9; }
  .article-row-link { grid-template-columns: 28px 1fr; }
  .article-body {
    width: min(100%, 330px);
  }
  .article-title,
  .article-excerpt {
    max-width: 100%;
    overflow-wrap: break-word;
  }
  .article-thumb { display: none; }
  .article-readtime { display: none; }
  .post-header h1 { font-size: 1.5rem; }
  .related-grid { grid-template-columns: 1fr; }
  .listing-header h1 { font-size: 2rem; }
  .cat-filters { padding-top: 20px; }
}
