/* ==========================================================================
   Web Analytics Driven — Shared Stylesheet
   Used across the homepage and all /blog/ pages.
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --ink: #0e0e0e; --ink-muted: #555; --ink-faint: #999;
  --paper: #f9f8f5; --paper-2: #f2f0eb;
  --accent: #1a5c3e; --accent-light: #e6f0eb;
  --rule: rgba(0,0,0,0.1);
  --serif: 'DM Serif Display', Georgia, serif;
  --sans: 'DM Sans', system-ui, sans-serif;
}
body { font-family: var(--sans); background: var(--paper); color: var(--ink); line-height: 1.6; font-size: 16px; }

/* NAV */
nav.site-nav { display: flex; align-items: center; justify-content: space-between; padding: 1.1rem 1.25rem; border-bottom: 1px solid var(--rule); background: var(--paper); position: sticky; top: 0; z-index: 10; }
.nav-logo { font-family: var(--serif); font-size: 1.05rem; letter-spacing: -0.02em; color: var(--ink); text-decoration: none; }
.nav-links { display: none; }
.nav-cta { font-size: 0.8rem; font-weight: 500; background: var(--accent); color: #fff; border: none; padding: 0.45rem 1rem; border-radius: 4px; cursor: pointer; text-decoration: none; display: inline-block; }
@media (min-width: 640px) {
  nav.site-nav { padding: 1.25rem 2.5rem; }
  .nav-logo { font-size: 1.15rem; }
  .nav-links { display: flex; gap: 2rem; list-style: none; align-items: center; }
  .nav-links a { font-size: 0.875rem; color: var(--ink-muted); text-decoration: none; }
  .nav-links a:hover { color: var(--ink); }
  .nav-cta { font-size: 0.875rem; padding: 0.5rem 1.25rem; }
}

/* DROPDOWN (desktop) */
.nav-dropdown { position: relative; }
.nav-dropdown-toggle { font-size: 0.875rem; color: var(--ink-muted); background: none; border: none; cursor: pointer; font-family: var(--sans); padding: 0; display: flex; align-items: center; gap: 0.25rem; }
.nav-dropdown-toggle:hover { color: var(--ink); }
.nav-dropdown-toggle .chevron { font-size: 0.65rem; transition: transform 0.2s; }
.nav-dropdown.open .chevron { transform: rotate(180deg); }
.nav-dropdown-menu { display: none; position: absolute; top: calc(100% + 0.75rem); left: 50%; transform: translateX(-50%); background: #fff; border: 1px solid var(--rule); border-radius: 8px; box-shadow: 0 4px 20px rgba(0,0,0,0.08); min-width: 320px; max-width: 360px; padding: 0.5rem; z-index: 20; max-height: 75vh; overflow-y: auto; }
.nav-dropdown.open .nav-dropdown-menu { display: block; }
.nav-dropdown-group { padding: 0.4rem 0.6rem 0.2rem; }
.nav-dropdown-group-label { font-size: 0.65rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
.nav-dropdown-menu a.nav-dropdown-link { display: block; padding: 0.55rem 0.6rem; font-size: 0.825rem; color: var(--ink-muted); text-decoration: none; border-radius: 5px; line-height: 1.4; }
.nav-dropdown-menu a.nav-dropdown-link:hover { background: var(--accent-light); color: var(--accent); }
.nav-dropdown-divider { border: none; border-top: 1px solid var(--rule); margin: 0.4rem 0.2rem; }
.nav-dropdown-viewall { display: flex; align-items: center; justify-content: space-between; padding: 0.6rem 0.6rem; font-size: 0.8rem; font-weight: 500; color: var(--accent); text-decoration: none; border-radius: 5px; }
.nav-dropdown-viewall:hover { background: var(--accent-light); }

/* MOBILE MENU TOGGLE */
.menu-toggle { display: flex; align-items: center; justify-content: center; background: none; border: none; cursor: pointer; font-size: 1.5rem; line-height: 1; color: var(--ink); padding: 0.25rem; margin-left: 0.75rem; }
@media (min-width: 640px) { .menu-toggle { display: none; } }

/* MOBILE MENU PANEL */
.mobile-menu { display: none; }
.mobile-menu.open { display: block; position: fixed; inset: 0; background: var(--paper); z-index: 50; overflow-y: auto; padding: 1.25rem 1.25rem 2.5rem; }
@media (min-width: 640px) { .mobile-menu.open { display: none; } }
.mobile-menu-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.5rem; }
.mobile-menu-close { background: none; border: none; font-size: 1.5rem; line-height: 1; color: var(--ink); cursor: pointer; padding: 0.25rem; }
.mobile-menu-links { list-style: none; display: flex; flex-direction: column; }
.mobile-menu-links > li { border-bottom: 1px solid var(--rule); }
.mobile-menu-links > li > a { display: block; padding: 1rem 0.125rem; font-size: 1.05rem; color: var(--ink); text-decoration: none; }
.mobile-blog-toggle { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 1rem 0.125rem; font-size: 1.05rem; font-family: var(--sans); color: var(--ink); background: none; border: none; cursor: pointer; text-align: left; }
.mobile-blog-toggle .chevron { font-size: 0.8rem; color: var(--ink-faint); transition: transform 0.2s; }
.mobile-blog-toggle.open .chevron { transform: rotate(180deg); }
.mobile-blog-list { display: none; list-style: none; padding: 0 0 0.75rem 0.5rem; }
.mobile-blog-list.open { display: block; }
.mobile-blog-group-label { font-size: 0.68rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); padding: 0.75rem 0 0.3rem; }
.mobile-blog-list li { padding: 0.65rem 0; border-bottom: 1px solid rgba(0,0,0,0.05); }
.mobile-blog-list li.mobile-blog-group-item { padding: 0; border-bottom: none; }
.mobile-blog-list li:last-child { border-bottom: none; }
.mobile-blog-list a { display: block; font-size: 0.875rem; color: var(--ink-muted); text-decoration: none; line-height: 1.4; }
.mobile-blog-list a span { display: block; font-size: 0.72rem; color: var(--ink-faint); margin-top: 2px; }
.mobile-blog-viewall { display: block; margin-top: 0.5rem; font-size: 0.85rem; font-weight: 500; color: var(--accent); text-decoration: none; padding: 0.5rem 0; }
.mobile-menu-cta { width: 100%; margin-top: 1.5rem; padding: 0.85rem; font-size: 0.95rem; }

/* HERO */
.hero { padding: 3rem 1.25rem 2.5rem; }
@media (min-width: 640px) { .hero { padding: 4rem 2.5rem 3rem; } }
@media (min-width: 900px) { .hero { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; padding: 5rem 2.5rem 4rem; max-width: 1100px; margin: 0 auto; } }
.hero-eyebrow { font-size: 0.7rem; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); margin-bottom: 1rem; }
.hero-headline { font-family: var(--serif); font-size: clamp(2.2rem, 7vw, 3.75rem); line-height: 1.1; letter-spacing: -0.03em; margin-bottom: 1.25rem; }
.hero-headline em { font-style: italic; color: var(--accent); }
.hero-sub { font-size: 1rem; font-weight: 300; color: var(--ink-muted); line-height: 1.75; margin-bottom: 2rem; }
@media (min-width: 900px) { .hero-sub { max-width: 440px; margin-bottom: 2.5rem; } }
.hero-actions { display: flex; flex-direction: column; gap: 0.75rem; }
@media (min-width: 480px) { .hero-actions { flex-direction: row; align-items: center; } }
.btn-primary { background: var(--accent); color: #fff; padding: 0.75rem 1.75rem; border: none; border-radius: 4px; font-family: var(--sans); font-size: 0.9rem; font-weight: 500; cursor: pointer; text-align: center; text-decoration: none; display: inline-block; }
.btn-ghost { background: transparent; color: var(--ink-muted); padding: 0.75rem 1.5rem; border: 1px solid var(--rule); border-radius: 4px; font-family: var(--sans); font-size: 0.9rem; cursor: pointer; text-decoration: none; display: inline-block; }
.tool-badges { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 2rem; }
.badge { font-size: 0.7rem; font-weight: 500; letter-spacing: 0.04em; padding: 4px 10px; border-radius: 20px; background: var(--accent-light); color: var(--accent); }

/* DASHBOARD MOCKUP */
.hero-visual { margin-top: 2.5rem; background: #fff; border: 1px solid var(--rule); border-radius: 10px; padding: 1.25rem; box-shadow: 0 2px 32px rgba(0,0,0,0.06); overflow: hidden; }
@media (min-width: 900px) { .hero-visual { margin-top: 0; } }
.dash-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; padding-bottom: 0.75rem; border-bottom: 1px solid var(--rule); }
.dash-title { font-size: 0.75rem; font-weight: 500; }
.dash-range { font-size: 0.65rem; color: var(--ink-faint); background: var(--paper-2); padding: 3px 8px; border-radius: 4px; }
.dash-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem; margin-bottom: 1rem; }
.dash-metric { background: var(--paper); border-radius: 6px; padding: 0.6rem 0.75rem; }
.dash-metric-label { font-size: 0.6rem; color: var(--ink-faint); margin-bottom: 2px; letter-spacing: 0.04em; text-transform: uppercase; }
.dash-metric-value { font-size: 1rem; font-weight: 500; line-height: 1.2; }
.dash-metric-delta { font-size: 0.6rem; color: var(--accent); }
.chart-area { height: 72px; margin-bottom: 0.75rem; }
.chart-area svg { width: 100%; height: 100%; }
.dash-table { width: 100%; border-collapse: collapse; font-size: 0.68rem; }
.dash-table th { color: var(--ink-faint); font-weight: 400; text-align: left; padding: 4px 0; border-bottom: 1px solid var(--rule); }
.dash-table td { padding: 5px 0; color: var(--ink-muted); border-bottom: 1px solid rgba(0,0,0,0.04); }
.dash-table td:last-child { color: var(--accent); text-align: right; }

/* SHARED */
.section-divider { border: none; border-top: 1px solid var(--rule); margin: 0 1.25rem; }
@media (min-width: 640px) { .section-divider { margin: 0 2.5rem; } }
.section-label { font-size: 0.7rem; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 0.75rem; }
.section-heading { font-family: var(--serif); font-size: clamp(1.6rem, 4vw, 2.5rem); line-height: 1.2; letter-spacing: -0.025em; margin-bottom: 2.5rem; }
@media (min-width: 640px) { .section-heading { max-width: 480px; margin-bottom: 3.5rem; } }

/* RETAINER BANNER */
.retainer-banner { background: var(--accent-light); border-top: 1px solid rgba(26,92,62,0.15); border-bottom: 1px solid rgba(26,92,62,0.15); padding: 1rem 1.25rem; display: flex; align-items: center; justify-content: center; gap: 0.75rem; flex-wrap: wrap; text-align: center; }
@media (min-width: 640px) { .retainer-banner { padding: 1rem 2.5rem; gap: 1.25rem; } }
.retainer-banner-icon { color: var(--accent); font-size: 1rem; flex-shrink: 0; }
.retainer-banner p { font-size: 0.825rem; color: #1a3d2b; line-height: 1.5; }
.retainer-banner strong { font-weight: 500; color: var(--accent); }
.retainer-banner-pill { font-size: 0.72rem; font-weight: 500; letter-spacing: 0.05em; background: var(--accent); color: #fff; padding: 3px 10px; border-radius: 20px; white-space: nowrap; }

/* FEATURES */
.features { padding: 3.5rem 1.25rem; }
@media (min-width: 640px) { .features { padding: 5rem 2.5rem; max-width: 1100px; margin: 0 auto; } }
.features-grid { display: grid; grid-template-columns: 1fr; gap: 1px; background: var(--rule); border: 1px solid var(--rule); border-radius: 8px; overflow: hidden; }
@media (min-width: 640px) { .features-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .features-grid { grid-template-columns: repeat(4, 1fr); } }
.feature-card { background: #fff; padding: 1.75rem 1.5rem; }
.feature-icon { font-size: 1.5rem; color: var(--accent); margin-bottom: 1rem; }
.feature-title { font-size: 0.95rem; font-weight: 500; letter-spacing: -0.01em; margin-bottom: 0.5rem; }
.feature-desc { font-size: 0.825rem; font-weight: 300; color: var(--ink-muted); line-height: 1.7; }
.feature-tool { display: inline-block; margin-top: 1rem; font-size: 0.65rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); font-weight: 500; }

/* STATS */
.stats-band { background: var(--accent); padding: 3rem 1.25rem; display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
@media (min-width: 640px) { .stats-band { display: flex; justify-content: center; gap: 5rem; padding: 3.5rem 2.5rem; } }
.stat-item { text-align: center; }
.stat-value { font-family: var(--serif); font-size: clamp(2rem, 5vw, 2.75rem); color: #fff; line-height: 1; margin-bottom: 0.375rem; letter-spacing: -0.03em; }
.stat-label { font-size: 0.75rem; font-weight: 300; color: rgba(255,255,255,0.7); letter-spacing: 0.04em; }

/* CASE STUDIES */
.case-studies { padding: 3.5rem 1.25rem; }
@media (min-width: 640px) { .case-studies { padding: 5rem 2.5rem; max-width: 1100px; margin: 0 auto; } }
.cs-grid { display: grid; grid-template-columns: 1fr; gap: 1.25rem; }
@media (min-width: 640px) { .cs-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .cs-grid { grid-template-columns: repeat(3, 1fr); } }
.cs-card { background: #fff; border: 1px solid var(--rule); border-radius: 10px; overflow: hidden; display: flex; flex-direction: column; }
.cs-card-top { padding: 1.5rem 1.5rem 1.25rem; flex: 1; }
.cs-industry { font-size: 0.65rem; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); margin-bottom: 0.75rem; }
.cs-title { font-family: var(--serif); font-size: 1.15rem; line-height: 1.3; letter-spacing: -0.02em; margin-bottom: 0.75rem; }
.cs-desc { font-size: 0.825rem; font-weight: 300; color: var(--ink-muted); line-height: 1.7; }
.cs-card-bottom { border-top: 1px solid var(--rule); padding: 1rem 1.5rem; display: flex; gap: 1.5rem; }
.cs-stat-value { font-size: 1.25rem; font-weight: 500; color: var(--accent); line-height: 1.1; font-family: var(--serif); }
.cs-stat-label { font-size: 0.65rem; color: var(--ink-faint); letter-spacing: 0.04em; text-transform: uppercase; margin-top: 2px; }
.cs-tools { display: flex; flex-wrap: wrap; gap: 0.35rem; padding: 0 1.5rem 1.25rem; }
.cs-tool-tag { font-size: 0.62rem; padding: 3px 8px; border-radius: 20px; background: var(--accent-light); color: var(--accent); font-weight: 500; }

/* RETAINER SECTION */
.retainer-section { padding: 3.5rem 1.25rem; }
@media (min-width: 640px) { .retainer-section { padding: 5rem 2.5rem; max-width: 1100px; margin: 0 auto; } }
.retainer-card { background: #fff; border: 1px solid var(--rule); border-radius: 12px; overflow: hidden; display: grid; grid-template-columns: 1fr; }
@media (min-width: 760px) { .retainer-card { grid-template-columns: 1fr 1fr; } }
.retainer-card-left { padding: 2.5rem; border-bottom: 1px solid var(--rule); }
@media (min-width: 760px) { .retainer-card-left { border-bottom: none; border-right: 1px solid var(--rule); } }
.retainer-card-left .section-label { margin-bottom: 0.6rem; }
.retainer-card-left h3 { font-family: var(--serif); font-size: clamp(1.4rem, 3vw, 1.9rem); line-height: 1.2; letter-spacing: -0.025em; margin-bottom: 1rem; }
.retainer-card-left p { font-size: 0.9rem; font-weight: 300; color: var(--ink-muted); line-height: 1.75; }
.retainer-card-right { padding: 2.5rem; background: var(--paper); display: flex; flex-direction: column; gap: 1.25rem; justify-content: center; }
.retainer-price { display: flex; align-items: baseline; gap: 0.4rem; margin-bottom: 0.25rem; }
.retainer-price-value { font-family: var(--serif); font-size: 2.75rem; line-height: 1; letter-spacing: -0.04em; color: var(--accent); }
.retainer-price-unit { font-size: 0.85rem; color: var(--ink-faint); font-weight: 300; }
.retainer-price-note { font-size: 0.75rem; color: var(--ink-faint); }
.retainer-features { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 0.6rem; }
.retainer-features li { font-size: 0.85rem; color: var(--ink-muted); display: flex; align-items: flex-start; gap: 0.6rem; line-height: 1.5; }
.retainer-features li i { color: var(--accent); font-size: 1rem; flex-shrink: 0; margin-top: 1px; }
.retainer-cta { margin-top: 0.5rem; }
.retainer-cta .btn-primary { width: 100%; padding: 0.75rem; font-size: 0.875rem; }

/* CONTACT */
.contact-section { padding: 3.5rem 1.25rem; }
@media (min-width: 640px) { .contact-section { padding: 5rem 2.5rem; max-width: 1100px; margin: 0 auto; } }
.contact-inner { display: grid; grid-template-columns: 1fr; gap: 3rem; }
@media (min-width: 760px) { .contact-inner { grid-template-columns: 1fr 1fr; align-items: start; } }
.contact-left p { font-size: 0.95rem; font-weight: 300; color: var(--ink-muted); line-height: 1.75; margin-bottom: 1.5rem; }
.contact-detail { display: flex; align-items: center; gap: 0.6rem; font-size: 0.875rem; color: var(--ink-muted); margin-bottom: 0.75rem; }
.contact-detail a { color: var(--accent); text-decoration: none; }
.contact-detail a:hover { text-decoration: underline; }
.contact-form { background: #fff; border: 1px solid var(--rule); border-radius: 10px; padding: 2rem; }
.form-row { margin-bottom: 1.1rem; }
.form-row label { display: block; font-size: 0.75rem; font-weight: 500; color: var(--ink-muted); margin-bottom: 0.4rem; letter-spacing: 0.03em; }
.form-row input, .form-row textarea, .form-row select { width: 100%; font-family: var(--sans); font-size: 0.9rem; padding: 0.65rem 0.875rem; border: 1px solid var(--rule); border-radius: 6px; background: var(--paper); color: var(--ink); outline: none; }
.form-row input:focus, .form-row textarea:focus, .form-row select:focus { border-color: var(--accent); background: #fff; }
.form-row textarea { resize: vertical; min-height: 110px; }
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.form-submit { width: 100%; margin-top: 0.5rem; padding: 0.8rem; font-size: 0.9rem; }
.form-note { font-size: 0.72rem; color: var(--ink-faint); margin-top: 0.75rem; text-align: center; }
.form-success, .form-error { display: none; text-align: center; padding: 1.5rem; border-radius: 8px; margin-top: 0.75rem; font-size: 0.875rem; }
.form-success { background: var(--accent-light); color: var(--accent); }
.form-error { background: #fef2f2; color: #b91c1c; }

/* FOOTER */
footer { border-top: 1px solid var(--rule); padding: 1.5rem 1.25rem; display: flex; flex-direction: column; gap: 0.5rem; }
@media (min-width: 640px) { footer { flex-direction: row; justify-content: space-between; align-items: center; padding: 1.75rem 2.5rem; } }
.footer-logo { font-family: var(--serif); font-size: 0.95rem; }
.footer-note { font-size: 0.75rem; color: var(--ink-faint); }

/* ==========================================================================
   BLOG HUB PAGE
   ========================================================================== */

.blog-hero { padding: 3rem 1.25rem 2rem; }
@media (min-width: 640px) { .blog-hero { padding: 4rem 2.5rem 2.5rem; max-width: 1100px; margin: 0 auto; } }
.blog-hero .section-label { margin-bottom: 0.75rem; }
.blog-hero h1 { font-family: var(--serif); font-size: clamp(2rem, 6vw, 3rem); line-height: 1.1; letter-spacing: -0.03em; margin-bottom: 1rem; }
.blog-hero p { font-size: 1rem; font-weight: 300; color: var(--ink-muted); line-height: 1.7; max-width: 580px; }

.blog-filters { display: flex; flex-wrap: wrap; gap: 0.6rem; padding: 0 1.25rem 2.5rem; }
@media (min-width: 640px) { .blog-filters { padding: 0 2.5rem 3rem; max-width: 1100px; margin: 0 auto; } }
.blog-filter-btn { font-family: var(--sans); font-size: 0.8rem; font-weight: 500; color: var(--ink-muted); background: #fff; border: 1px solid var(--rule); padding: 0.5rem 1.1rem; border-radius: 20px; cursor: pointer; transition: all 0.15s; }
.blog-filter-btn:hover { border-color: var(--accent); color: var(--accent); }
.blog-filter-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }

.blog-category-section { padding: 0 1.25rem 3rem; }
@media (min-width: 640px) { .blog-category-section { padding: 0 2.5rem 4rem; max-width: 1100px; margin: 0 auto; } }
.blog-category-header { display: flex; align-items: baseline; gap: 0.75rem; margin-bottom: 1.5rem; padding-bottom: 0.75rem; border-bottom: 1px solid var(--rule); }
.blog-category-header h2 { font-family: var(--serif); font-size: clamp(1.3rem, 3vw, 1.6rem); letter-spacing: -0.02em; }
.blog-category-count { font-size: 0.75rem; color: var(--ink-faint); }

.blog-post-grid { display: grid; grid-template-columns: 1fr; gap: 1.1rem; }
@media (min-width: 640px) { .blog-post-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .blog-post-grid { grid-template-columns: repeat(3, 1fr); } }

.blog-post-card { background: #fff; border: 1px solid var(--rule); border-radius: 10px; padding: 1.5rem; text-decoration: none; display: flex; flex-direction: column; gap: 0.75rem; transition: box-shadow 0.15s, transform 0.15s; }
.blog-post-card:hover { box-shadow: 0 8px 24px rgba(0,0,0,0.06); transform: translateY(-2px); }
.blog-post-tag { font-size: 0.62rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent); background: var(--accent-light); padding: 3px 9px; border-radius: 20px; align-self: flex-start; }
.blog-post-card h3 { font-family: var(--serif); font-size: 1.1rem; line-height: 1.35; letter-spacing: -0.015em; color: var(--ink); }
.blog-post-readmore { font-size: 0.78rem; font-weight: 500; color: var(--accent); margin-top: auto; display: flex; align-items: center; gap: 0.3rem; }

/* ==========================================================================
   INDIVIDUAL BLOG POST PAGE
   ========================================================================== */

.post-hero { padding: 3rem 1.25rem 2rem; }
@media (min-width: 640px) { .post-hero { padding: 4rem 2.5rem 2.5rem; max-width: 760px; margin: 0 auto; } }
.post-breadcrumb { font-size: 0.8rem; color: var(--ink-faint); margin-bottom: 1.5rem; }
.post-breadcrumb a { color: var(--ink-faint); text-decoration: none; }
.post-breadcrumb a:hover { color: var(--accent); }
.post-hero .blog-post-tag { margin-bottom: 1rem; }
.post-hero h1 { font-family: var(--serif); font-size: clamp(1.9rem, 5vw, 2.75rem); line-height: 1.15; letter-spacing: -0.03em; margin-bottom: 1rem; }
.post-meta { font-size: 0.8rem; color: var(--ink-faint); }

.post-body { padding: 0 1.25rem 4rem; }
@media (min-width: 640px) { .post-body { padding: 0 2.5rem 5rem; max-width: 760px; margin: 0 auto; } }
.post-body p { font-size: 0.95rem; font-weight: 300; color: var(--ink-muted); line-height: 1.8; margin-bottom: 1.25rem; }
.post-body h2 { font-family: var(--serif); font-size: 1.5rem; letter-spacing: -0.02em; margin: 2.5rem 0 1rem; }
.post-body h3 { font-size: 1.05rem; font-weight: 500; margin: 2rem 0 0.75rem; }
.post-body ul, .post-body ol { color: var(--ink-muted); font-weight: 300; line-height: 1.8; margin: 0 0 1.25rem 1.25rem; }
.post-body code { background: var(--paper-2); padding: 2px 6px; border-radius: 4px; font-size: 0.85em; }
.post-body pre { background: #1a1a1a; color: #f2f0eb; padding: 1.25rem; border-radius: 8px; overflow-x: auto; margin-bottom: 1.25rem; font-size: 0.82rem; }

/* ==========================================================================
   LONG-FORM BLOG POST TEMPLATE
   (Article layout w/ TOC sidebar, callouts, code blocks, step lists, etc.)
   Extra tokens used only on post pages — does not override the base palette.
   ========================================================================== */

:root {
  --paper-3: #eae8e3;
  --accent-mid: #2d7a54;
  --warn: #7c3d0e; --warn-bg: #fef3e2;
  --info: #0c3b6e; --info-bg: #e8f1fb;
  --mono: 'JetBrains Mono', 'Courier New', monospace;
  --content-width: 720px;
  --sidebar-width: 240px;
}

#progress-bar { position: fixed; top: 0; left: 0; height: 2px; background: var(--accent); width: 0%; z-index: 100; transition: width 0.1s; }

.page-wrap { max-width: calc(var(--content-width) + var(--sidebar-width) + 5rem); margin: 0 auto; padding: 0 1.25rem; }
@media (min-width: 640px) { .page-wrap { padding: 0 2.5rem; } }
.article-layout { display: grid; grid-template-columns: 1fr; gap: 0; }
.article-layout > * { min-width: 0; }
@media (min-width: 1040px) { .article-layout { grid-template-columns: 1fr var(--sidebar-width); gap: 4rem; align-items: start; } }

.breadcrumb { padding: 1.25rem 0 0; font-size: 0.78rem; color: var(--ink-faint); display: flex; align-items: center; gap: 0.4rem; }
.breadcrumb a { color: var(--ink-faint); text-decoration: none; }
.breadcrumb a:hover { color: var(--accent); }

.article-header { padding: 2rem 0 2.5rem; border-bottom: 1px solid var(--rule); margin-bottom: 2.5rem; }
.article-tag { display: inline-block; font-size: 0.68rem; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); background: var(--accent-light); padding: 3px 10px; border-radius: 20px; margin-bottom: 1rem; }
.article-title { font-family: var(--serif); font-size: clamp(1.9rem, 5vw, 2.8rem); line-height: 1.15; letter-spacing: -0.03em; margin-bottom: 1rem; }
.article-intro { font-size: 1.05rem; font-weight: 300; color: var(--ink-muted); line-height: 1.75; margin-bottom: 1.5rem; max-width: 600px; }
.article-meta { display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; font-size: 0.8rem; color: var(--ink-faint); }
.article-meta span { display: flex; align-items: center; gap: 0.35rem; }

.article-body { font-size: 1rem; line-height: 1.8; color: var(--ink); }
.article-body h2 { font-family: var(--serif); font-size: 1.6rem; letter-spacing: -0.025em; line-height: 1.25; margin: 2.5rem 0 1rem; }
.article-body h3 { font-size: 1.05rem; font-weight: 500; letter-spacing: -0.01em; margin: 2rem 0 0.75rem; }
.article-body p { margin-bottom: 1.25rem; }
.article-body ul, .article-body ol { margin: 0 0 1.25rem 1.5rem; }
.article-body li { margin-bottom: 0.5rem; line-height: 1.7; }
.article-body a { color: var(--accent); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; }
.article-body strong { font-weight: 500; }
.article-body hr { border: none; border-top: 1px solid var(--rule); margin: 2.5rem 0; }

.article-body code { font-family: var(--mono); font-size: 0.82em; background: var(--paper-3); padding: 2px 6px; border-radius: 3px; color: var(--accent); }
.article-body pre { background: #0e1a15; border-radius: 8px; padding: 1.25rem 1.5rem; overflow-x: auto; margin: 1.5rem 0; border: 1px solid rgba(26,92,62,0.2); }
.article-body pre code { background: none; padding: 0; font-size: 0.85rem; color: #a8d5be; line-height: 1.7; }
.code-label { font-size: 0.68rem; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 0.4rem; }

.callout { border-radius: 8px; padding: 1.1rem 1.25rem; margin: 1.75rem 0; display: flex; gap: 0.75rem; align-items: flex-start; font-size: 0.9rem; line-height: 1.7; }
.callout-icon { font-size: 1.1rem; flex-shrink: 0; margin-top: 2px; }
.callout-body p { margin: 0; }
.callout-body p + p { margin-top: 0.5rem; }
.callout-body strong { font-weight: 500; }
.callout.warn { background: var(--warn-bg); color: var(--warn); border-left: 3px solid #d97706; }
.callout.info { background: var(--info-bg); color: var(--info); border-left: 3px solid #3b82f6; }
.callout.tip { background: var(--accent-light); color: #1a3d2b; border-left: 3px solid var(--accent); }

.limit-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 1.5rem 0 2rem; }
@media (max-width: 580px) { .limit-grid { grid-template-columns: 1fr; } }
.limit-card { background: #fff; border: 1px solid var(--rule); border-radius: 8px; padding: 1.1rem 1.25rem; }
.limit-num { font-size: 0.65rem; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 0.4rem; }
.limit-card h4 { font-size: 0.9rem; font-weight: 500; margin-bottom: 0.4rem; }
.limit-card p { font-size: 0.825rem; color: var(--ink-muted); line-height: 1.55; margin: 0; }

.schema-table-wrap { background: #fff; border: 1px solid var(--rule); border-radius: 8px; overflow: hidden; margin: 1.5rem 0; overflow-x: auto; }
.schema-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.schema-table thead tr { background: var(--paper-3); }
.schema-table th { text-align: left; padding: 0.6rem 0.875rem; font-weight: 500; font-size: 0.78rem; letter-spacing: 0.03em; color: var(--ink-muted); border-bottom: 1px solid var(--rule); }
.schema-table td { padding: 0.75rem 0.875rem; border-bottom: 1px solid var(--rule); color: var(--ink-muted); line-height: 1.55; vertical-align: top; }
.schema-table td:first-child { font-weight: 500; color: var(--ink); font-family: var(--mono); font-size: 0.8rem; }
.schema-table tr:last-child td { border-bottom: none; }

.step-list { list-style: none; margin: 1.5rem 0 1.75rem; padding: 0; }
.step-list li { display: flex; gap: 1rem; align-items: flex-start; padding: 1rem 0; border-bottom: 1px solid var(--rule); }
.step-list li:last-child { border-bottom: none; }
.step-num { flex-shrink: 0; width: 28px; height: 28px; background: var(--accent); color: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.75rem; font-weight: 500; margin-top: 1px; }
.step-content strong { display: block; font-weight: 500; font-size: 0.95rem; margin-bottom: 0.25rem; }
.step-content span { font-size: 0.875rem; color: var(--ink-muted); line-height: 1.65; }

.sidebar { display: none; }
@media (min-width: 1040px) {
  .sidebar { display: block; position: sticky; top: 5rem; padding-top: 1rem; }
  .toc-box { background: #fff; border: 1px solid var(--rule); border-radius: 8px; padding: 1.25rem; }
  .toc-label { font-size: 0.68rem; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 0.9rem; }
  .toc-list { list-style: none; padding: 0; }
  .toc-list li { margin-bottom: 0.1rem; }
  .toc-list a { font-size: 0.8rem; color: var(--ink-muted); text-decoration: none; padding: 0.3rem 0.5rem; border-radius: 4px; display: block; line-height: 1.4; transition: background 0.15s, color 0.15s; }
  .toc-list a:hover, .toc-list a.active { background: var(--accent-light); color: var(--accent); }
  .toc-cta { margin-top: 1.5rem; background: var(--accent); color: #fff; border: none; border-radius: 6px; padding: 0.7rem 1rem; width: 100%; font-family: var(--sans); font-size: 0.8rem; font-weight: 500; cursor: pointer; text-align: center; }
  .toc-cta-label { font-size: 0.7rem; color: var(--ink-faint); text-align: center; margin-top: 0.6rem; }
}

.article-cta { background: var(--accent); border-radius: 10px; padding: 2rem; margin: 3rem 0 2rem; color: #fff; }
.article-cta h3 { font-family: var(--serif); font-size: 1.4rem; margin-bottom: 0.75rem; letter-spacing: -0.02em; }
.article-cta p { font-size: 0.9rem; font-weight: 300; opacity: 0.85; line-height: 1.7; margin-bottom: 1.25rem; }
.article-cta button { background: #fff; color: var(--accent); border: none; border-radius: 4px; padding: 0.65rem 1.4rem; font-family: var(--sans); font-size: 0.875rem; font-weight: 500; cursor: pointer; }

.related { padding: 2.5rem 0; border-top: 1px solid var(--rule); margin-top: 1rem; }
.related-label { font-size: 0.7rem; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 1.25rem; }
.related-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; }
@media (min-width: 600px) { .related-grid { grid-template-columns: repeat(2, 1fr); } }
.related-card { background: #fff; border: 1px solid var(--rule); border-radius: 8px; padding: 1.25rem; cursor: pointer; transition: border-color 0.15s; text-decoration: none; display: block; }
.related-card:hover { border-color: var(--accent); }
.related-card-tag { font-size: 0.65rem; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); margin-bottom: 0.5rem; }
.related-card h4 { font-family: var(--serif); font-size: 1rem; line-height: 1.35; letter-spacing: -0.01em; color: var(--ink); }

/* Syntax highlighting tokens used inside <pre><code> blocks */
.kw  { color: #7dd3a8; }
.fn  { color: #86d9c9; }
.str { color: #fca5a5; }
.cm  { color: #4a7a60; font-style: italic; }
.nm  { color: #fde68a; }
.fd  { color: #c4b5fd; }
.tg  { color: #93c5fd; }
.at  { color: #fde68a; }