/* =====================================================================
   PULZ8: blog and legal pages
   Layered on top of styles.css. Reuses the same tokens (Pulse magenta +
   ink neutrals for chrome; the HR-zone spectrum ONLY for zone tags) and
   the same layout: .page-head, then .page-main with the landing's hairline
   and, for articles and legal pages, its pinned 4/8 grid.
   ===================================================================== */

/* ---- Blog index ----------------------------------------------------- */

/* Same card as the landing (pricing, device check): radius, border,
   surface and padding. */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
}

.blog-card {
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-md);
  transition:
    box-shadow var(--dur-enter) var(--ease-out),
    transform var(--dur-enter) var(--ease-out);
}

.blog-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.blog-card:active {
  transform: scale(0.98);
}

.blog-card__link {
  display: grid;
  height: 100%;
  align-content: start;
  gap: var(--space-2);
  padding: var(--space-4);
  border-radius: inherit;
}

.blog-card__link h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.blog-card__link p {
  margin: 0;
  color: var(--fg-2);
  line-height: 1.6;
}

.blog-card__meta {
  display: inline-flex;
  flex-wrap: wrap;
  gap: var(--space-1);
  color: var(--fg-3);
  font-size: 0.85rem;
  font-weight: 500;
}

/* ---- Zone tags (the ONLY place the zone spectrum appears in chrome) -- */
.zone-tag {
  justify-self: start;
  padding: 0 12px;
  border-radius: var(--r-full);
  font-family: var(--font-display);
  line-height: 24px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.zone-tag--pulse { background: var(--tint-pulse); color: var(--pulse-400); }
.zone-tag--z1 { background: var(--zone-1); color: var(--on-zone-1); }
.zone-tag--z2 { background: var(--zone-2); color: var(--on-zone-2); }
.zone-tag--z3 { background: var(--zone-3); color: var(--on-zone-3); }
.zone-tag--z4 { background: var(--zone-4); color: var(--on-zone-4); }
.zone-tag--z5 { background: var(--zone-5); color: var(--on-zone-5); }

/* ---- Articles and legal pages -------------------------------------- */

/* Date, reading time and author (or "last updated") sit in the pinned
   column: stacked beside the text on desktop, one line when stacked. */
.post__meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1) var(--space-2);
  margin: 0;
  color: var(--fg-3);
  font-size: 0.88rem;
  font-weight: 500;
  line-height: 1.6;
}

@media (min-width: 1081px) {
  .post .pinned__head .post__meta {
    flex-direction: column;
    gap: var(--space-1);
  }
}

/* Body and call to action share one column; the divider before the call
   to action uses the content step (32px each side), not the section step. */
.post .pinned__body {
  gap: 0;
}

/* Long-form reading column. Body and call to action share one measure in
   rem (not ch, which follows each block's font size), so their dividers
   end at the same point. */
.post {
  --measure: 44rem;
}

.post__body {
  max-width: var(--measure);
  color: var(--fg-1);
  font-size: 1.08rem;
  line-height: 1.7;
}

.post__body > :first-child {
  margin-top: 0;
}

.post__body > :last-child {
  margin-bottom: 0;
}

/* In-page links (legal pages) land below the sticky header. */
.post__body [id] {
  scroll-margin-top: var(--header-offset);
}

.post__body h2 {
  margin: var(--space-6) 0 var(--space-2);
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: var(--tracking-display);
}

.post__body h3 {
  margin: var(--space-3) 0 var(--space-1);
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
}

.post__body p {
  margin: 0 0 var(--space-2);
  color: var(--fg-2);
}

.post__body strong {
  color: var(--fg-1);
  font-weight: 600;
}

.post__body a {
  color: var(--pulse-500);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.post__body ul,
.post__body ol {
  margin: 0 0 var(--space-2);
  padding-left: var(--space-3);
  color: var(--fg-2);
}

.post__body li {
  margin-bottom: var(--space-1);
  line-height: 1.65;
}

.post__body li strong {
  color: var(--fg-1);
}

.post__body blockquote {
  margin: var(--space-3) 0;
  padding: var(--space-1) 0 var(--space-1) var(--space-2);
  border-left: 3px solid var(--pulse-500);
  color: var(--fg-1);
  font-style: italic;
}

.post__body hr {
  margin: var(--space-4) 0;
  border: none;
  border-top: 1px solid var(--hairline);
}

.post__body em {
  color: var(--fg-3);
}

/* footnote / disclaimer paragraph after the final <hr> */
.post__body hr + p {
  color: var(--fg-3);
  font-size: 0.92rem;
}

/* End-of-post CTA */
.post__cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  max-width: var(--measure);
  margin-top: var(--space-4);
  padding-top: var(--space-4);
  border-top: 1px solid var(--hairline);
}

.post__cta-text {
  flex: 1 1 100%;
  margin: 0;
  color: var(--fg-1);
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
}

/* ---- Responsive ----------------------------------------------------- */
@media (max-width: 840px) {
  .blog-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .blog-card__link {
    padding: var(--space-3);
  }

  .post__cta .button {
    width: 100%;
  }
}
