/* ============================================================
   PlanRight — Blog
   Article + index styles. Reuses the design tokens defined in
   styles.css (:root), which must load first.
   ============================================================ */

/* ---------- Shared sub-page header tweaks ---------- */
.nav-links a[aria-current="page"] { color: var(--blue); }

/* ---------- Blog index ---------- */
.blog-hero {
  padding: 64px 0 8px;
}
.blog-hero h1 {
  font-family: var(--serif);
  font-size: clamp(32px, 4.6vw, 48px);
  font-weight: 600;
  margin: 14px 0 16px;
}
.blog-hero .lead {
  font-size: 19px;
  color: var(--slate-500);
  max-width: 640px;
}

.blog-index { padding: 40px 0 96px; }

.cat-section { margin-top: 56px; }
.cat-section:first-child { margin-top: 8px; }
.cat-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 22px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--slate-200);
}
.cat-head h2 {
  font-family: var(--serif);
  font-size: 25px;
  font-weight: 600;
}
.cat-head .count {
  font-size: 13px;
  font-weight: 600;
  color: var(--slate-400);
  letter-spacing: .04em;
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 20px;
}

.post-card {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-lg);
  padding: 26px 26px 22px;
  box-shadow: var(--shadow-sm);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.post-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--slate-300);
}
.post-card .tag {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 12px;
}
.post-card h3 {
  font-size: 19px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -.01em;
  margin-bottom: 10px;
}
.post-card h3 a { color: var(--ink); }
.post-card h3 a:hover { color: var(--blue); }
.post-card p {
  font-size: 14.5px;
  color: var(--slate-500);
  line-height: 1.6;
  flex: 1;
}
.post-card .pmeta {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 16px;
  font-size: 12.5px;
  color: var(--slate-400);
}
.post-card .pmeta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--slate-300); }

/* ---------- Article ---------- */
.article { padding: 36px 0 88px; }
.article-wrap { max-width: 760px; margin: 0 auto; padding: 0 24px; }

.breadcrumb {
  font-size: 13px;
  color: var(--slate-400);
  margin-bottom: 30px;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
}
.breadcrumb a { color: var(--slate-500); }
.breadcrumb a:hover { color: var(--blue); }
.breadcrumb .sep { color: var(--slate-300); }
.breadcrumb .here { color: var(--slate-500); }

.article-head { margin-bottom: 36px; }
.article-head .eyebrow { margin-bottom: 16px; }
.article-head h1 {
  font-family: var(--serif);
  font-size: clamp(30px, 4.2vw, 44px);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -.01em;
}
.article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  margin-top: 18px;
  font-size: 14px;
  color: var(--slate-500);
}
.article-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--slate-300); }

/* ---------- Prose ---------- */
.prose { font-size: 18px; line-height: 1.78; color: var(--slate-700); }
.prose > * + * { margin-top: 1.3em; }

.prose h2 {
  font-family: var(--serif);
  font-size: clamp(23px, 3vw, 30px);
  font-weight: 600;
  color: var(--ink);
  line-height: 1.22;
  margin-top: 1.9em;
  margin-bottom: .1em;
}
.prose h3 {
  font-size: 20px;
  font-weight: 700;
  color: var(--ink);
  margin-top: 1.6em;
  margin-bottom: .1em;
}
.prose p { margin-top: 1.15em; }
.prose strong { font-weight: 700; color: var(--ink); }
.prose em { font-style: italic; }

.prose a {
  color: var(--blue);
  text-decoration: underline;
  text-decoration-color: var(--slate-300);
  text-underline-offset: 2px;
  transition: text-decoration-color .15s ease, color .15s ease;
}
.prose a:hover { color: var(--blue-600); text-decoration-color: var(--blue); }

.prose ul, .prose ol { padding-left: 1.4em; margin-top: 1.15em; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li { margin-top: .5em; padding-left: .2em; }
.prose li::marker { color: var(--slate-400); }

.prose code {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: .88em;
  background: var(--slate-100);
  color: var(--blue-600);
  padding: .12em .42em;
  border-radius: 5px;
  border: 1px solid var(--slate-200);
}
.prose pre {
  background: var(--navy-900);
  color: var(--slate-200);
  padding: 18px 20px;
  border-radius: var(--radius);
  overflow-x: auto;
  font-size: 14.5px;
  line-height: 1.6;
}
.prose pre code { background: none; border: 0; color: inherit; padding: 0; }

.prose blockquote {
  border-left: 3px solid var(--amber);
  padding: 2px 0 2px 20px;
  color: var(--slate-700);
  font-style: italic;
}

.prose hr {
  border: 0;
  border-top: 1px solid var(--slate-200);
  margin: 2.6em 0;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15.5px;
  margin-top: 1.4em;
}
.prose thead { background: var(--paper); }
.prose th, .prose td {
  text-align: left;
  padding: 11px 14px;
  border-bottom: 1px solid var(--slate-200);
  vertical-align: top;
}
.prose th { font-weight: 700; color: var(--ink); }

/* ---------- Article CTA + footer ---------- */
.article-cta {
  margin-top: 56px;
  background: var(--navy-900);
  color: var(--slate-200);
  border-radius: var(--radius-lg);
  padding: 38px 36px;
  text-align: center;
}
.article-cta h2 {
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 10px;
}
.article-cta p { color: var(--slate-400); max-width: 460px; margin: 0 auto 22px; font-size: 16px; }

.article-foot {
  margin-top: 44px;
  padding-top: 24px;
  border-top: 1px solid var(--slate-200);
}
.article-foot a { color: var(--blue); font-weight: 600; font-size: 15px; }
.article-foot a:hover { color: var(--blue-600); }

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
  .prose { font-size: 17px; }
  .article-cta { padding: 30px 22px; }
  .post-grid { grid-template-columns: 1fr; }
}
