/* Blog shared styles — linked from all blog pages */
:root {
  --ink: #E4EAC8;
  --paper: #295D32;
  --paper-2: #284B2F;
  --line: rgba(228,234,200,0.15);
  --muted: #989E7B;
  --accent: #D1DBB9;
  --warn: #c4622d;
  --card: rgba(84,137,93,0.24);
  --display: 'Space Grotesk', system-ui, sans-serif;
  --body: 'Inter', system-ui, sans-serif;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { background: var(--paper); color: var(--ink); font-family: var(--body); line-height: 1.6; -webkit-font-smoothing: antialiased; }
.grain-bg { position: fixed; inset: 0; pointer-events: none; z-index: 0; background-image: url("/grain.png"); background-position: 50%; background-size: contain; background-attachment: fixed; background-repeat: repeat; filter: contrast(200%); }
.wrap { max-width: 1100px; margin: 0 auto; padding: 0 24px; }

/* Nav */
nav .wrap, footer .wrap { max-width: none; padding-left: 56px; padding-right: 56px; }
@media (max-width: 720px) { nav .wrap, footer .wrap { padding-left: 24px; padding-right: 24px; } }
nav { position: sticky; top: 0; z-index: 50; background: rgba(41,93,50,0.92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { font-family: var(--display); font-weight: 700; font-size: 1.1rem; letter-spacing: -0.02em; text-decoration: none; color: var(--ink); }
.brand span { color: var(--accent); }
.nav-links { display: flex; gap: 30px; }
.nav-links a { font-size: 0.92rem; font-weight: 500; color: var(--ink); text-decoration: none; transition: color 0.2s; position: relative; }
.nav-links a::after { content: ''; position: absolute; left: 0; bottom: -3px; width: 100%; height: 1px; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform 0.28s cubic-bezier(0.16,1,0.3,1); }
.nav-links a:hover, .nav-links a.active { color: var(--accent); }
.nav-links a:hover::after, .nav-links a.active::after { transform: scaleX(1); }
.nav-cta { font-family: var(--body); font-weight: 600; font-size: 0.75rem; color: var(--ink); border: 1px solid var(--accent); padding: 9px 18px; border-radius: 4px; text-decoration: none; transition: background 0.2s, color 0.2s, border-color 0.2s; text-transform: uppercase; letter-spacing: 0.08em; }
.nav-cta:hover { background: var(--warn); color: var(--ink); border-color: var(--warn); }
@media (max-width: 720px) { .nav-links { display: none; } }

/* Footer */
footer { padding: 40px 0; position: relative; z-index: 1; }
.foot-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; }
.foot-inner p { font-size: 0.88rem; color: var(--muted); }
.foot-links { display: flex; gap: 20px; }
.foot-links a { font-size: 0.82rem; color: var(--muted); text-decoration: none; transition: color 0.2s; }
.foot-links a:hover { color: var(--accent); }

/* Category pill */
.cat-pill { display: inline-block; font-family: var(--display); font-size: 0.68rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink); background: var(--warn); border: 1px solid var(--warn); border-radius: 999px; padding: 3px 10px; text-decoration: none; white-space: nowrap; }
.cat-pill:hover { opacity: 0.85; }

/* Blog index */
.blog-head { padding: 72px 0 56px; border-bottom: 1px solid var(--line); }
.blog-head h1 { font-family: var(--display); font-weight: 500; font-size: clamp(2.4rem, 5vw, 3.6rem); letter-spacing: -0.04em; line-height: 1.05; margin-bottom: 18px; }
.blog-head p { color: var(--muted); font-size: 1.05rem; max-width: 52ch; }

/* Category filter */
.filter-row { display: flex; flex-wrap: wrap; gap: 8px; padding: 28px 0; }
.filter-btn { font-family: var(--display); font-size: 0.72rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; background: transparent; border: 1px solid var(--line); color: var(--muted); border-radius: 999px; padding: 6px 14px; cursor: pointer; transition: all 0.15s; }
.filter-btn:hover { border-color: var(--accent); color: var(--ink); }
.filter-btn.active { background: var(--warn); border-color: var(--warn); color: var(--ink); }

/* Post grid */
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border-top: 1px solid var(--line); }
.post-card { background: var(--paper); padding: 32px 28px; display: flex; flex-direction: column; gap: 14px; transition: background 0.15s; }
.post-card:hover { background: var(--paper-2); }
.post-card.hidden { display: none; }
.post-card-meta { display: flex; align-items: center; gap: 10px; }
.post-date { font-size: 0.75rem; color: var(--ink); }
.post-title { font-family: var(--display); font-size: 1.12rem; font-weight: 500; letter-spacing: -0.02em; line-height: 1.3; color: var(--ink); text-decoration: none; }
.post-title:hover { color: var(--accent); }
.post-desc { font-size: 0.9rem; color: var(--muted); line-height: 1.6; flex: 1; }
.post-link { font-family: var(--display); font-size: 0.8rem; font-weight: 600; color: var(--ink); text-decoration: none; letter-spacing: 0.04em; margin-top: auto; }
.post-link:hover { text-decoration: underline; }
.read-time { font-size: 0.75rem; color: var(--muted); }
@media (max-width: 860px) { .post-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .post-grid { grid-template-columns: 1fr; } }

/* Individual post */
.post-head { padding: 72px 0 56px; border-bottom: 1px solid var(--line); max-width: 760px; }
.post-eyebrow { display: flex; align-items: center; gap: 14px; margin-bottom: 24px; }
.post-meta { font-size: 0.8rem; color: var(--muted); }
.post-head h1 { font-family: var(--display); font-weight: 500; font-size: clamp(1.9rem, 4vw, 2.8rem); line-height: 1.08; letter-spacing: -0.03em; margin-bottom: 20px; }
.post-head .intro { color: var(--muted); font-size: 1.05rem; max-width: 58ch; line-height: 1.7; }

/* TL;DR box */
.tldr { background: rgba(228,234,200,0.06); border: 1px solid var(--line); border-left: 3px solid var(--warn); border-radius: 4px; padding: 24px 28px; margin: 40px 0; max-width: 720px; }
.tldr-label { font-family: var(--display); font-size: 0.68rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink); margin-bottom: 12px; }
.tldr ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.tldr ul li { font-size: 0.95rem; color: var(--ink); padding-left: 16px; position: relative; line-height: 1.5; }
.tldr ul li::before { content: '→'; position: absolute; left: 0; color: var(--warn); font-size: 0.8rem; top: 2px; }

/* Post content */
.post-body { max-width: 720px; padding: 48px 0 80px; }
.post-body h2 { font-family: var(--display); font-weight: 500; font-size: 1.45rem; letter-spacing: -0.025em; color: var(--ink); margin: 48px 0 16px; line-height: 1.2; }
.post-body h3 { font-family: var(--display); font-weight: 500; font-size: 1.1rem; letter-spacing: -0.015em; color: var(--ink); margin: -2px 0 12px !important; }
.post-body p { color: var(--muted); font-size: 0.98rem; line-height: 1.8; margin-bottom: 18px; }
.post-body p:last-child { margin-bottom: 0; }
.post-body strong { color: var(--accent); font-weight: 500; }
.post-body a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; transition: opacity 0.15s; }
.post-body a:hover { opacity: 0.75; }
.post-body ul, .post-body ol { color: var(--muted); font-size: 0.98rem; line-height: 1.8; padding-left: 1.5em; margin-bottom: 18px; }
.post-body ul li, .post-body ol li { margin-bottom: 8px; }
.post-body ul li::marker { color: var(--warn); }
.post-body ol li::marker { color: var(--warn); }
.post-body code { background: rgba(228,234,200,0.08); border: 1px solid var(--line); border-radius: 3px; padding: 1px 6px; font-size: 0.88em; color: var(--accent); font-family: 'SF Mono', 'Fira Code', monospace; }
.post-body hr { border: none; border-top: 1px solid var(--line); margin: 40px 0; }

/* CTA box */
.post-cta { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 40px 48px; margin-top: 64px; max-width: 720px; }
.post-cta h3 { font-family: var(--display); font-weight: 500; font-size: 1.5rem; letter-spacing: -0.02em; color: var(--ink); margin-bottom: 10px; }
.post-cta p { color: var(--muted); font-size: 0.95rem; margin-bottom: 24px; line-height: 1.6; }
.post-cta a { display: inline-block; font-family: var(--display); font-size: 0.88rem; font-weight: 700; letter-spacing: 0.01em; background: var(--accent); color: var(--paper); border-radius: 6px; padding: 14px 28px; text-decoration: none; transition: opacity 0.15s; white-space: nowrap; }
.post-cta a:hover { background: var(--warn); color: var(--ink); opacity: 1; }

/* CookieYes overrides */
.cky-consent-container, .cky-modal { background: var(--ink) !important; border-color: rgba(41,93,50,0.22) !important; }
.cky-consent-bar { background: var(--ink) !important; border-top: 1px solid rgba(41,93,50,0.18) !important; box-shadow: -4px -4px 24px rgba(0,0,0,0.1) !important; }
.cky-title h2, .cky-title { color: var(--paper) !important; font-family: 'Space Grotesk', sans-serif !important; }
.cky-notice-des, .cky-notice-des p { color: rgba(41,93,50,0.75) !important; font-family: 'Inter', sans-serif !important; }
.cky-notice-des a, .cky-policy-btn { color: var(--warn) !important; }
.cky-btn-accept { background: var(--warn) !important; border-color: var(--warn) !important; color: var(--ink) !important; border-radius: 4px !important; font-family: 'Space Grotesk', sans-serif !important; font-weight: 600 !important; }
.cky-btn-reject, .cky-btn-customize { background: transparent !important; border: 1.5px solid rgba(41,93,50,0.35) !important; color: var(--paper) !important; border-radius: 4px !important; font-family: 'Space Grotesk', sans-serif !important; }
.cky-btn-accept:hover { opacity: 0.85 !important; }
.cky-btn-reject:hover, .cky-btn-customize:hover { border-color: var(--paper) !important; }
.cky-close-btn svg path { stroke: rgba(41,93,50,0.5) !important; }
.cky-revisit-btn, [data-cky-tag="revisit-consent"], .cky-btn-revisit { background: #c4622d !important; background-color: #c4622d !important; border-color: #c4622d !important; box-shadow: 0 2px 16px rgba(196,98,45,0.35) !important; }


/* Mobile nav drawer */
.nav-burger { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 4px; z-index: 51; }
.nav-burger span { display: block; width: 22px; height: 2px; background: var(--ink); transition: all 0.25s; border-radius: 1px; }
.nav-drawer { position: fixed; top: 0; right: -100%; width: min(320px, 85vw); height: 100vh; height: 100dvh; background: var(--paper); z-index: 200; transition: right 0.32s cubic-bezier(0.16,1,0.3,1); padding: 80px 40px 40px; display: flex; flex-direction: column; gap: 0; border-left: 1px solid var(--line); overflow-y: auto; }
.nav-drawer.open { right: 0; }
.nav-drawer a { font-family: var(--display); font-size: 1.2rem; font-weight: 500; color: var(--ink); text-decoration: none; padding: 14px 0; border-bottom: 1px solid var(--line); transition: color 0.2s; }
.nav-drawer a:hover { color: var(--accent); }
.nav-drawer .drawer-cta { margin-top: 24px; background: var(--warn); color: var(--ink) !important; border-radius: 4px; padding: 14px 20px; text-align: center; font-size: 0.82rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; border-bottom: none !important; }
.nav-drawer .drawer-cta:hover { opacity: 0.85; }
.drawer-close { position: absolute; top: 22px; right: 24px; background: none; border: none; color: var(--ink); font-size: 1.4rem; cursor: pointer; padding: 4px; line-height: 1; opacity: 0.65; }
.drawer-close:hover { opacity: 1; }
.nav-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.55); z-index: 150; opacity: 0; pointer-events: none; transition: opacity 0.3s; }
.nav-overlay.open { opacity: 1; pointer-events: all; }
@media (max-width: 720px) { .nav-burger { display: flex; } .nav-cta { display: none; } }

/* Related posts */
.related-posts { margin-top: 48px; padding-top: 32px; border-top: 1px solid var(--line); max-width: 720px; }
.related-posts-label { font-family: var(--display); font-size: 0.65rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin-bottom: 16px; }
.related-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.related-item { background: var(--card); border-radius: 8px; padding: 16px; text-decoration: none; color: var(--ink); transition: background 0.15s; display: block; }
.related-item:hover { background: rgba(84,137,93,0.38); }
.related-item-title { font-family: var(--display); font-size: 0.85rem; font-weight: 500; line-height: 1.35; color: var(--ink); display: block; }
@media (max-width: 600px) { .related-list { grid-template-columns: 1fr; } }
