/* =============================================================================
   blog.css — shared layout for the Wildlife Alert blog (/blog and /blog/*)
   -----------------------------------------------------------------------------
   Loaded AFTER brand.css and site.css by blog.html and every blog-<slug>.html
   post. Kept in one shared file rather than duplicated into a page-local <style>
   block on each post, because every post uses the identical layout — a new
   article should be prose plus metadata, nothing else.

   Every color, type, spacing, radius, and shadow value references a brand.css
   custom property via var(--token). There is NOT ONE literal color value in this
   file, so it passes scripts/brand_lint.py.

   Widths are max-width / ch / % only — no fixed px width — so the pages reflow
   cleanly from 320px to 1920px.
   ============================================================================= */

/* ---- Shared page wrapper -------------------------------------------------- */
.blog {
  padding-top: var(--space-5);
  padding-bottom: var(--space-6);
}

/* ---- Breadcrumbs (mirrors the BreadcrumbList JSON-LD on each page) -------- */
.breadcrumbs {
  margin: 0 0 var(--space-4) 0;
  font-size: var(--text-sm);
  color: var(--muted);
}

.breadcrumbs__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
}

.breadcrumbs__item + .breadcrumbs__item::before {
  content: "/";
  margin-right: var(--space-2);
  color: var(--border);
}

.breadcrumbs__item[aria-current="page"] {
  color: var(--ink);
  font-weight: var(--weight-medium);
}

/* =============================================================================
   Blog index (/blog)
   ============================================================================= */

.blog__head {
  max-width: 60ch;
  margin-bottom: var(--space-6);
}

.blog__title {
  margin-bottom: var(--space-3);
}

.blog__lead {
  margin: 0;
  color: var(--muted);
  font-size: var(--text-lg);
  line-height: var(--leading-relaxed);
}

/* Card grid: one column on phones, two from 48em, three from 68em. */
.blog-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-5);
}

@media (min-width: 48em) {
  .blog-list {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 68em) {
  .blog-list {
    grid-template-columns: repeat(3, 1fr);
  }
}

.blog-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  height: 100%;
  background-color: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.blog-card:hover,
.blog-card:focus-within {
  border-color: var(--ring-blue);
  box-shadow: var(--shadow-md);
}

/* The topic pill. Uses the alert-level soft tints so a "dangerous wildlife"
   topic reads as urgent and a general-guidance topic reads as neutral. */
.blog-card__tag {
  align-self: flex-start;
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-pill);
  background-color: var(--surface);
  color: var(--muted);
}

.blog-card__tag--critical {
  background-color: var(--crit-soft);
  color: var(--crit);
}

.blog-card__tag--safety {
  background-color: var(--warn-soft);
  color: var(--warn);
}

.blog-card__title {
  margin: 0;
  font-size: var(--text-xl);
  line-height: var(--leading-tight);
}

.blog-card__title a {
  color: var(--ink);
  text-decoration: none;
}

.blog-card__title a:hover,
.blog-card__title a:focus {
  color: var(--ring-blue-dark);
  text-decoration: underline;
}

.blog-card__excerpt {
  margin: 0;
  color: var(--muted);
  line-height: var(--leading-relaxed);
}

.blog-card__meta {
  margin: 0;
  margin-top: auto;
  padding-top: var(--space-3);
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: var(--text-sm);
}

/* =============================================================================
   Article (/blog/<slug>)
   ============================================================================= */

/* ~68ch keeps line length in the comfortable reading range at every width. */
.post {
  max-width: 68ch;
  margin: 0 auto;
}

.post__eyebrow {
  margin: 0 0 var(--space-2) 0;
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ring-blue);
}

.post__title {
  margin-bottom: var(--space-3);
}

.post__lead {
  margin: 0 0 var(--space-4) 0;
  color: var(--muted);
  font-size: var(--text-lg);
  line-height: var(--leading-relaxed);
}

.post__meta {
  margin: 0 0 var(--space-6) 0;
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  font-size: var(--text-sm);
}

/* ---- "Key points" summary box --------------------------------------------
   Deliberately the first thing after the intro: it gives a skimming reader (and
   an AI answer engine) the whole answer up front, before the supporting detail. */
.post__key {
  margin: 0 0 var(--space-6) 0;
  padding: var(--space-5);
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--ring-blue);
  border-radius: var(--radius-lg);
}

.post__key h2 {
  margin: 0 0 var(--space-3) 0;
  font-size: var(--text-lg);
}

.post__key ul {
  margin: 0;
  padding-left: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.post__key li {
  line-height: var(--leading-relaxed);
}

/* ---- Article body prose --------------------------------------------------- */
.post__body > h2 {
  margin-top: var(--space-6);
  padding-bottom: var(--space-2);
  border-bottom: 1px solid var(--border);
}

.post__body > h3 {
  margin-top: var(--space-5);
  font-size: var(--text-lg);
}

.post__body p {
  line-height: var(--leading-relaxed);
  margin: 0 0 var(--space-4) 0;
}

.post__body ul,
.post__body ol {
  margin: 0 0 var(--space-4) 0;
  padding-left: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.post__body li {
  line-height: var(--leading-relaxed);
}

.post__body figure {
  margin: 0 0 var(--space-5) 0;
}

.post__body img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}

.post__body figcaption {
  margin-top: var(--space-2);
  color: var(--muted);
  font-size: var(--text-sm);
}

/* ---- Callouts ------------------------------------------------------------- */
.post__callout {
  margin: 0 0 var(--space-5) 0;
  padding: var(--space-4) var(--space-5);
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--muted);
  border-radius: var(--radius-lg);
}

.post__callout p:last-child {
  margin-bottom: 0;
}

.post__callout--warn {
  background-color: var(--warn-soft);
  border-color: var(--warn);
  border-left-color: var(--warn);
}

.post__callout--critical {
  background-color: var(--crit-soft);
  border-color: var(--crit);
  border-left-color: var(--crit);
}

.post__callout__title {
  margin: 0 0 var(--space-2) 0;
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
}

/* ---- Step lists (encounter guidance) -------------------------------------- */
.post__steps {
  list-style: none;
  margin: 0 0 var(--space-5) 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.post__step {
  display: flex;
  gap: var(--space-4);
  padding: var(--space-4);
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.post__step__num {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: var(--radius-pill);
  background-color: var(--ring-blue);
  color: var(--on-accent);
  font-weight: var(--weight-bold);
  font-size: var(--text-sm);
}

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

.post__step__title {
  margin: 0 0 var(--space-2) 0;
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
}

/* ---- Comparison / reference table ---------------------------------------- */
.post__table-wrap {
  /* Horizontal scroll only for the table itself, so a wide reference table
     never forces the whole page to scroll sideways on a phone. */
  overflow-x: auto;
  margin: 0 0 var(--space-5) 0;
}

.post__table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
}

.post__table caption {
  text-align: left;
  color: var(--muted);
  font-size: var(--text-sm);
  margin-bottom: var(--space-2);
}

.post__table th,
.post__table td {
  text-align: left;
  padding: var(--space-3);
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.post__table thead th {
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  font-weight: var(--weight-semibold);
}

/* ---- Sources list --------------------------------------------------------- */
.post__sources {
  margin-top: var(--space-6);
  padding-top: var(--space-5);
  border-top: 1px solid var(--border);
}

.post__sources h2 {
  font-size: var(--text-lg);
}

.post__sources ol {
  margin: 0;
  padding-left: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  color: var(--muted);
  font-size: var(--text-sm);
}

.post__sources li {
  line-height: var(--leading-relaxed);
}

/* ---- Product CTA band at the foot of each article ------------------------ */
.post__cta {
  margin-top: var(--space-6);
  padding: var(--space-5);
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.post__cta h2 {
  margin-top: 0;
  font-size: var(--text-xl);
}

.post__cta p {
  line-height: var(--leading-relaxed);
}

.post__cta__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-4);
}

.post__cta__note {
  margin: var(--space-3) 0 0 0;
  color: var(--muted);
  font-size: var(--text-sm);
}

/* ---- "More articles" list at the foot of an article ---------------------- */
.post__related {
  margin-top: var(--space-6);
  padding-top: var(--space-5);
  border-top: 1px solid var(--border);
}

.post__related h2 {
  font-size: var(--text-lg);
}

.post__related ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.post__related a {
  font-weight: var(--weight-medium);
}
