/* CivicSmart blog — long-form reading layout.
   Loaded only on /blog/* pages. */
.blog-shell {
  max-width: 760px;
  margin: 0 auto;
  padding: 3rem 1.25rem 4rem;
  font-size: 1.075rem;
  line-height: 1.75;
  color: var(--ink);
}
.blog-shell .eyebrow {
  font-family: var(--font-mono);
  font-size: .76rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--orange-600);
  font-weight: 600;
  margin-bottom: .5rem;
}
.blog-shell h1 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3vw + .5rem, 2.4rem);
  line-height: 1.2;
  margin: 0 0 1.25rem;
  letter-spacing: -.02em;
}
.blog-shell .lede {
  font-size: 1.18rem;
  line-height: 1.6;
  color: var(--muted);
  margin: 0 0 2rem;
  font-style: italic;
  border-left: 4px solid var(--orange-100);
  padding-left: 1rem;
}
.blog-shell h2 {
  font-family: var(--font-display);
  font-size: 1.55rem;
  line-height: 1.25;
  margin: 3rem 0 .8rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--line);
  letter-spacing: -.01em;
  scroll-margin-top: calc(var(--header-h, 64px) + 24px);
}
.blog-shell h2:first-child { padding-top: 0; border-top: 0; margin-top: 0; }
.blog-shell h3 {
  font-family: var(--font-display);
  font-size: 1.18rem;
  line-height: 1.3;
  margin: 2rem 0 .5rem;
  color: var(--ink);
}
.blog-shell p { margin: 0 0 1.15rem; }
.blog-shell ul, .blog-shell ol { padding-left: 1.4rem; margin: 0 0 1.25rem; }
.blog-shell li { margin: .4rem 0; }
.blog-shell blockquote {
  border-left: 4px solid var(--orange);
  background: var(--bg-tint);
  margin: 1.5rem 0;
  padding: 1rem 1.25rem;
  font-style: italic;
  color: var(--ink);
  border-radius: 0 8px 8px 0;
}
.blog-shell blockquote p { margin: 0; }
.blog-shell em, .blog-shell i { font-style: italic; }
.blog-shell strong { font-weight: 600; }
.blog-shell hr { border: 0; border-top: 1px solid var(--line); margin: 3rem 0; }
.blog-shell a { color: var(--orange-600); text-decoration: underline; text-underline-offset: 2px; }
.blog-shell a:hover { color: var(--orange); }
.blog-shell table { width: 100%; margin: 1.5rem 0; border-collapse: collapse; }
.blog-shell th, .blog-shell td { padding: .6rem .8rem; text-align: left; border-bottom: 1px solid var(--line); font-size: .95rem; vertical-align: top; }
.blog-shell th { background: var(--bg-alt); font-weight: 700; }
.blog-shell code { background: #F1F3F6; padding: .12rem .4rem; border-radius: 4px; font-size: .92em; font-family: var(--font-mono); }

/* "In this series" anchor nav */
.blog-toc {
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  margin: 2rem 0 2.5rem;
}
.blog-toc__title {
  font-family: var(--font-mono);
  font-size: .76rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
  margin: 0 0 .85rem;
}
.blog-toc ol {
  margin: 0;
  padding-left: 1.25rem;
  list-style: decimal;
  display: grid;
  grid-template-columns: 1fr;
  gap: .35rem;
}
.blog-toc li { margin: 0; font-size: .95rem; line-height: 1.45; }
.blog-toc a { color: var(--ink); text-decoration: none; }
.blog-toc a:hover { color: var(--orange-600); text-decoration: underline; }
@media (min-width: 720px) {
  .blog-toc ol { grid-template-columns: 1fr 1fr; gap: .35rem 1.5rem; }
}

/* "Back to blog" header bar */
.blog-back {
  max-width: 760px;
  margin: 0 auto;
  padding: 1rem 1.25rem 0;
  font-size: .9rem;
}
.blog-back a {
  color: var(--muted);
  text-decoration: none;
  font-family: var(--font-mono);
  letter-spacing: .04em;
}
.blog-back a:hover { color: var(--orange-600); }
.blog-back a::before { content: "← "; margin-right: .25rem; }

/* Series meta block (audience / cadence / read time) */
.blog-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 1rem 1.25rem;
  margin: 1.5rem 0 2.5rem;
  font-size: .9rem;
}
.blog-meta dt {
  font-family: var(--font-mono);
  font-size: .68rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
  margin: 0 0 .15rem;
}
.blog-meta dd { margin: 0; color: var(--ink); font-weight: 500; }

/* Blog landing-page cards */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}
.blog-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem 1.6rem;
  display: flex;
  flex-direction: column;
  transition: transform .15s, box-shadow .15s, border-color .15s;
  text-decoration: none;
  color: inherit;
}
.blog-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--orange-100);
}
.blog-card__tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: .68rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--orange-600);
  font-weight: 700;
  margin-bottom: .6rem;
}
.blog-card h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  line-height: 1.25;
  margin: 0 0 .55rem;
  color: var(--ink);
}
.blog-card p {
  font-size: .95rem;
  line-height: 1.55;
  color: var(--muted);
  margin: 0 0 1rem;
  flex: 1;
}
.blog-card__meta {
  font-family: var(--font-mono);
  font-size: .76rem;
  color: var(--muted);
  letter-spacing: .04em;
}
.blog-card--feature {
  grid-column: span 2;
  background: linear-gradient(135deg, var(--bg-tint), #fff);
  border-color: var(--orange-100);
}
@media (max-width: 640px) {
  .blog-card--feature { grid-column: span 1; }
}

/* ============================================================
   Blog lead gate — fires on scroll-depth on /blog/* pages.
   ============================================================ */
.blog-gate-modal {
  position: fixed; inset: 0;
  z-index: 1000;
  display: none;
  align-items: center; justify-content: center;
  padding: 1rem;
}
.blog-gate-modal.is-visible { display: flex; }
.blog-gate-modal__backdrop {
  position: absolute; inset: 0;
  background: rgba(15,33,56,.78);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.blog-gate-modal__card {
  position: relative;
  background: #fff;
  border-radius: 14px;
  padding: 2rem 2rem 1.75rem;
  max-width: 460px;
  width: 100%;
  box-shadow: 0 24px 48px rgba(0,0,0,.35);
}
.blog-gate-modal__eyebrow {
  font-family: var(--font-mono);
  font-size: .76rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--orange-600);
  font-weight: 600;
  margin: 0 0 .5rem;
}
.blog-gate-modal__card h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  line-height: 1.2;
  margin: 0 0 .75rem;
  color: var(--ink);
  border: 0; padding: 0;
}
.blog-gate-modal__card p { font-size: .98rem; line-height: 1.55; color: var(--muted); margin: 0 0 1.25rem; }
.blog-gate-modal__card form { display: flex; flex-direction: column; gap: .9rem; margin: 0; }
.blog-gate-modal__card label { display: block; font-weight: 500; font-size: .9rem; color: var(--ink); }
.blog-gate-modal__card input[type="text"],
.blog-gate-modal__card input[type="email"] {
  display: block; width: 100%;
  margin-top: .3rem;
  padding: .65rem .8rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font: inherit; font-size: 1rem;
  background: #fff;
}
.blog-gate-modal__card input:focus { outline: 2px solid var(--orange); outline-offset: 1px; border-color: var(--orange); }
.blog-gate-modal__card button { margin-top: .4rem; }
.blog-gate-modal__fine {
  font-size: .78rem !important;
  color: var(--muted);
  margin: 1rem 0 0 !important;
  line-height: 1.5;
}
.blog-gate-modal__fine a { color: var(--orange-600); }
body.blog-gate-open { overflow: hidden; }

@media (max-width: 480px) {
  .blog-gate-modal__card { padding: 1.5rem 1.25rem 1.25rem; max-width: 100%; }
  .blog-gate-modal__card h2 { font-size: 1.25rem; }
}
