/* Blog — hub + article styles. Self-contained (loaded standalone, like legal.css).
   Editorial look that matches the site: brand blues (#2563eb / #1e3a8a), a serif
   reading column for long-form, system sans for UI/headings. Root-absolute asset
   paths are used in the HTML so references resolve at both /blog and /blog/<slug>. */

*, *::before, *::after { box-sizing: border-box; }

:root {
  --brand: #2563eb;
  --brand-ink: #1e3a8a;
  --ink: #111827;
  --muted: #6b7280;
  --faint: #9ca3af;
  --line: #e5e7eb;
  --bg: #f9fafb;
  --card: #ffffff;
  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --serif: Georgia, 'Times New Roman', serif;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--brand); }

/* ---------- Top bar ---------------------------------------------------------- */
.blog-topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 24px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.blog-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--brand);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.2px;
}
.blog-brand img { width: 28px; height: 28px; }
.blog-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--brand);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  padding: 9px 18px;
  border-radius: 9px;
  transition: background 0.15s, transform 0.15s;
  white-space: nowrap;
}
.blog-cta-btn:hover { background: #1d4ed8; transform: translateY(-1px); }

/* ---------- Shared layout ---------------------------------------------------- */
.blog-wrap { max-width: 1080px; margin: 0 auto; padding: 40px 24px 72px; }
.article-wrap { max-width: 720px; margin: 0 auto; padding: 28px 24px 72px; }

.blog-crumbs {
  font-size: 13px;
  color: var(--faint);
  margin-bottom: 22px;
}
.blog-crumbs a { color: var(--muted); text-decoration: none; }
.blog-crumbs a:hover { text-decoration: underline; }
.blog-crumbs span { margin: 0 6px; }

/* ---------- Hub -------------------------------------------------------------- */
.blog-hero { margin-bottom: 40px; max-width: 640px; }
.blog-hero h1 {
  font-size: 2.6rem;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 12px;
  color: var(--ink);
}
.blog-hero p { font-size: 1.15rem; color: var(--muted); margin: 0; }

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}
.blog-card {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform 0.18s, box-shadow 0.18s, border-color 0.18s;
}
.blog-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(17, 24, 39, 0.09);
  border-color: #d1d5db;
}
.blog-card__thumb { aspect-ratio: 16 / 9; width: 100%; object-fit: cover; background: #eef2ff; display: block; }
.blog-card__body { padding: 18px 20px 22px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.blog-card__tag {
  align-self: flex-start;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--brand);
  background: #eff6ff;
  padding: 4px 9px;
  border-radius: 999px;
}
.blog-card__title { font-size: 1.2rem; font-weight: 700; line-height: 1.3; margin: 0; color: var(--ink); }
.blog-card__excerpt { font-size: 0.95rem; color: var(--muted); margin: 0; flex: 1; }
.blog-card__meta { font-size: 12px; color: var(--faint); margin-top: 4px; }

/* ---------- Article --------------------------------------------------------- */
.article-eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--brand);
  margin-bottom: 14px;
}
.article-title {
  font-size: 2.4rem;
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 0 0 14px;
  color: var(--ink);
}
.article-meta { font-size: 13px; color: var(--faint); margin-bottom: 28px; }
.article-meta strong { color: var(--muted); font-weight: 600; }

.article-figure { margin: 0 0 30px; }
.article-figure .ba {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  border-radius: 12px;
  overflow: hidden;
}
.article-figure img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; display: block; border-radius: 12px; }
.article-figure figcaption { font-size: 12px; color: var(--faint); margin-top: 8px; text-align: center; }

.article-body { font-family: var(--serif); font-size: 1.075rem; line-height: 1.78; color: #1f2937; }
.article-body .lead { font-size: 1.2rem; color: #374151; line-height: 1.7; }
.article-body h2 {
  font-family: var(--sans);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--ink);
  margin: 2.4rem 0 0.8rem;
  line-height: 1.25;
}
.article-body h3 {
  font-family: var(--sans);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--ink);
  margin: 1.8rem 0 0.5rem;
}
.article-body p { margin: 0 0 1.1rem; }
.article-body ul, .article-body ol { margin: 0 0 1.1rem; padding-left: 1.4rem; }
.article-body li { margin-bottom: 0.5rem; }
.article-body a { color: var(--brand); text-decoration: underline; text-underline-offset: 2px; }
.article-body strong { color: var(--ink); }

.article-callout {
  font-family: var(--sans);
  font-size: 1rem;
  background: #eff6ff;
  border-left: 4px solid var(--brand);
  border-radius: 0 10px 10px 0;
  padding: 16px 20px;
  margin: 1.6rem 0;
  color: var(--brand-ink);
}
.article-callout strong { color: var(--brand-ink); }

.article-cta {
  margin: 40px 0 8px;
  padding: 28px 26px;
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
  border-radius: 16px;
  color: #fff;
  text-align: center;
}
.article-cta h2 { font-family: var(--sans); font-size: 1.4rem; font-weight: 800; margin: 0 0 8px; color: #fff; }
.article-cta p { font-size: 1rem; margin: 0 0 18px; color: rgba(255, 255, 255, 0.9); }
.article-cta a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  color: var(--brand-ink);
  text-decoration: none;
  font-weight: 700;
  font-size: 1rem;
  padding: 12px 26px;
  border-radius: 10px;
  transition: transform 0.15s;
}
.article-cta a:hover { transform: translateY(-2px); }

.article-disclaimer {
  font-family: var(--sans);
  font-size: 12.5px;
  color: var(--faint);
  line-height: 1.6;
  margin-top: 34px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

/* ---------- Footer ---------------------------------------------------------- */
.blog-footer {
  border-top: 1px solid var(--line);
  padding: 26px 24px 34px;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}
.blog-footer a { color: var(--brand); text-decoration: none; margin: 0 8px; }
.blog-footer a:hover { text-decoration: underline; }
.blog-footer .row { margin-bottom: 8px; }

/* ---------- Responsive ------------------------------------------------------- */
@media (max-width: 640px) {
  .blog-hero h1 { font-size: 2rem; }
  .article-title { font-size: 1.85rem; }
  .blog-topbar { padding: 10px 16px; }
  .article-figure .ba { grid-template-columns: 1fr; }
}
