/* =====================================================================
   AnimalSake — SHARED ARTICLE-PAGE CSS TEMPLATE
   ---------------------------------------------------------------------
   Built on the design-system tokens defined in styles.css (link BOTH:
   styles.css first for chrome + tokens, then article.css). All four
   flagship article pages (white-tiger, caterpillar, aussie-animals,
   african-animals) reuse this file verbatim — keep it generic.

   Components: .article-hero · .article-layout · .toc · .fact-cards ·
   .didyouknow · .quick-facts · .related · .worksheet-cta · .newsletter ·
   .glossary-table · .quiz-cta · .game-block · article footer bits.

   Category accent: each page sets --accent (e.g. var(--c-mammals)) on
   the <body> or a wrapper so hero pill / TOC active / table header pick
   up the right colour without editing this file.
   ===================================================================== */

:root {
  /* Fallback accent if a page forgets to set --accent. Mammals-orange. */
  --accent: var(--c-mammals);
  --accent-ink: var(--orange-deep);
  --bubble-bg: #fff7d6;
  --article-body-max: 760px;
  --article-side: 300px;
}

/* ---------- breadcrumb (extends the .crumb in styles.css) ---------- */
.article-wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.article-wrap .crumb { padding: 16px 0 14px; }

/* =====================================================================
   1. HERO  (full-bleed photo, title overlay left, scrim, hero bubble)
   ===================================================================== */
.article-hero {
  position: relative;
  overflow: hidden;
  max-width: var(--maxw);
  margin: 12px auto 0;
  border-radius: var(--radius);
  background-size: cover;
  background-position: center 30%;
  background-color: var(--cream);
  min-height: 460px;
}
.article-hero__scrim {
  position: absolute; inset: 0;
  /* Cream veil on the LEFT only, fading clear over the subject at right. */
  background: linear-gradient(90deg,
    rgba(253,246,233,.92) 0%,
    rgba(253,246,233,.85) 30%,
    rgba(253,246,233,.45) 52%,
    rgba(253,246,233,0)   70%);
}
.article-hero__inner {
  position: relative; z-index: 2;
  max-width: var(--maxw); margin: 0 auto;
  padding: 54px 20px; min-height: 460px;
  display: flex; flex-direction: column; justify-content: center;
}
.article-hero__tag {
  position: absolute; left: 20px; top: 20px; z-index: 3;
  background: var(--accent); color: #fff;
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .05em; padding: 5px 12px; border-radius: 999px;
}
.article-hero__overlay { max-width: 560px; }

/* =====================================================================
   In-content "Related Reading" block (HSN / gardenerdy style)
   Sits near the top of the article body — a bordered card with an
   uppercase heading + divider and a row of three thumb+cat+title cards.
   ===================================================================== */
.related-reading {
  background: var(--cream-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px 26px 24px;
  margin: 4px 0 28px;
}
.related-reading__title {
  font-size: 13px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--accent-ink, var(--orange-deep)); margin: 0 0 14px;
  padding-bottom: 14px; border-bottom: 1px solid var(--line);
}
.related-reading__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px 26px; }
.rr-card { display: flex; gap: 12px; align-items: flex-start; text-decoration: none; }
.rr-card__thumb {
  flex: 0 0 58px; width: 58px; height: 58px; border-radius: 10px;
  background-size: cover; background-position: center; background-color: var(--line);
}
.rr-card__body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.rr-card__cat {
  font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--accent, var(--orange));
}
.rr-card__title {
  font-size: 15px; font-weight: 700; line-height: 1.25; color: var(--ink);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.rr-card:hover .rr-card__title { color: var(--accent-ink, var(--orange-deep)); }
/* Block is embedded inside .article-body: override the body link styling (.article-body a)
   that would otherwise underline + recolor the cards. Higher specificity than `.article-body a`. */
.related-reading .rr-card { color: inherit; font-weight: inherit; text-decoration: none; }
.related-reading .rr-card:hover { text-decoration: none; }
.related-reading .rr-card__cat { text-decoration: none; }
.related-reading .rr-card__title { text-decoration: none; }
/* Heading: .article-body h2 (27px, 38px top-margin, flex + ::before bar) bleeds onto the
   title now the block sits in-body. Re-assert the compact label; scoped so page h2s are untouched. */
.related-reading .related-reading__title {
  display: block; font-size: 13px; line-height: 1.3;
  color: var(--accent-ink, var(--orange-deep)); margin: 0 0 14px; gap: 0;
}
.related-reading .related-reading__title::before { content: none; }
@media (max-width: 760px) { .related-reading__grid { grid-template-columns: 1fr; gap: 16px; } }
.article-hero h1 {
  font-size: 48px; line-height: 1.06; margin: 0 0 14px;
  color: var(--ink); text-shadow: 0 1px 0 rgba(255,255,255,.45);
}
.article-hero .dek {
  font-size: 19px; color: var(--ink-soft); margin: 0 0 18px;
  max-width: 30em; line-height: 1.4;
}
.article-hero .dek__creative { color: var(--accent-ink, var(--orange)); font-weight: 700; }
.article-hero .byline {
  display: flex; flex-wrap: wrap; gap: 8px 18px;
  font-size: 14px; color: var(--ink-soft); font-weight: 600;
}
.article-hero .byline span { display: inline-flex; align-items: center; gap: 6px; }
.article-hero .byline .check { color: var(--green-deep); }

/* Hero Did-You-Know bubble — pinned bottom-right over the photo. */
.article-hero__bubble {
  position: absolute; right: 24px; bottom: 28px; z-index: 3; display: flex; align-items: center; gap: 11px;
  background: #fff; border-radius: 16px; padding: 12px 16px;
  box-shadow: var(--shadow); max-width: 312px; font-size: 14px;
  line-height: 1.4; color: var(--ink);
}
.article-hero__bubble b { color: var(--accent-ink); display: block; margin-bottom: 3px; }
.article-hero__bubble .ahb-fox { height: 62px; width: auto; flex: 0 0 auto; }
.article-hero__bubble .ahb-text { flex: 1 1 auto; min-width: 0; }
.article-hero__bubble::before {
  content: "\2726"; position: absolute; top: -14px; right: -4px;
  color: #f7c948; font-size: 22px; text-shadow: 0 1px 2px rgba(0,0,0,.12);
}

/* =====================================================================
   2. LAYOUT  (body column + sticky sidebar)
   ===================================================================== */
.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--article-side);
  gap: 40px;
  max-width: var(--maxw); margin: 0 auto; padding: 36px 20px 8px;
  align-items: start;
}
.article-main { min-width: 0; }   /* let long words / tables wrap */
.article-side { position: sticky; top: 120px; display: grid; gap: 22px; }

/* ---- restored-body typography (wraps the verbatim Buzzle prose) ---- */
.article-body { font-size: 17.5px; line-height: 1.7; color: var(--ink-soft); }
.article-body > .lead { font-size: 20px; line-height: 1.5; color: var(--ink); margin: 0 0 22px; }
.article-body h2 {
  font-size: 27px; line-height: 1.18; color: var(--ink);
  margin: 38px 0 14px; scroll-margin-top: 92px;
  display: flex; align-items: center; gap: 10px;
}
.article-body h2::before {
  content: ""; flex: 0 0 auto; width: 10px; height: 26px;
  border-radius: 4px; background: var(--accent);
}
.article-body h3 { font-size: 20px; color: var(--ink); margin: 26px 0 10px; }
.article-body p { margin: 0 0 16px; }
.article-body a { color: var(--accent-ink); font-weight: 600; text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 2px; }
.article-body a:hover { color: var(--ink); }

/* ---- Animal cards (image-left list cards; shared so in-.article-body galleries get styled) ---- */
.animal-card { display: grid; grid-template-columns: 200px 1fr; background: var(--cream-card, #fffdf8); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; box-shadow: 0 4px 12px rgba(75, 47, 32, .06); margin: 16px 0; }
.animal-card__img { width: 100%; height: 100%; min-height: 150px; object-fit: cover; background: var(--line); display: block; }
.animal-card__body { padding: 16px 20px 18px; min-width: 0; }
.animal-card__name { margin: 0 0 8px; font-size: 18px; line-height: 1.25; color: var(--ink); }
.animal-card__body p { margin: 0 0 10px; font-size: 15px; line-height: 1.6; color: var(--ink-soft); }
.animal-card__body p:last-child { margin-bottom: 0; }
/* Re-assert the card name over .article-body h3 (26px top-margin / 20px) when the gallery sits in the restored body. */
.article-body .animal-card__name { font-size: 18px; margin: 0 0 8px; }
@media (max-width: 600px) { .animal-card { grid-template-columns: 1fr; } .animal-card__img { height: 200px; min-height: 0; } }
.article-body ul, .article-body ol { margin: 0 0 16px; padding-left: 1.3em; }
.article-body li { margin-bottom: 8px; }
.article-body figure { margin: 22px 0; }
.article-body figure img {
  width: 100%; height: auto; border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
}
.article-body figcaption {
  font-size: 13.5px; color: var(--ink-soft); text-align: center;
  margin-top: 8px; font-style: italic;
}

/* A clean cream block standing in for a not-yet-recovered photo.
   Keeps layout + descriptive alt intent without blocking the build. */
.img-placeholder {
  width: 100%; aspect-ratio: 3 / 2; border-radius: var(--radius-sm);
  background:
    repeating-linear-gradient(135deg, #f7ecd6 0 22px, #fdf6e9 22px 44px);
  border: 1px dashed var(--line);
  display: grid; place-items: center; text-align: center;
  color: rgba(74,53,38,.55); font-size: 13px; font-weight: 700;
  padding: 18px; line-height: 1.4;
}
.img-placeholder span { max-width: 26em; }

/* =====================================================================
   3. FACT CARDS  (3 mini tiles under the lead, before first H2)
   ===================================================================== */
.fact-cards {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px;
  margin: 6px 0 26px;
}
.fact-card {
  background: var(--cream-card); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 16px 16px 18px;
  box-shadow: var(--shadow-sm); text-align: center;
}
.fact-card__ico { font-size: 26px; line-height: 1; margin-bottom: 8px; }
.fact-card__label {
  font-size: 12px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .04em; color: var(--accent-ink); margin-bottom: 4px;
}
.fact-card__value { font-size: 15px; font-weight: 600; color: var(--ink); line-height: 1.3; }

/* =====================================================================
   4. DID-YOU-KNOW bubble  (in-body, column-anchored, never overlaps text)
   In the body column it sits as a right-floated aside on wide screens
   and a full-width card on narrow ones — it never overlaps body text.
   ===================================================================== */
.didyouknow {
  background: var(--bubble-bg); border: 2px dashed var(--accent);
  border-radius: var(--radius-sm); padding: 14px 16px;
  position: relative; font-weight: 600; line-height: 1.4;
  color: var(--ink); box-shadow: var(--shadow-sm);
  margin: 4px 0 20px;
}
.didyouknow b { display: block; color: var(--accent-ink); margin-bottom: 4px; }
.didyouknow::before {
  content: "\2726"; position: absolute; top: -13px; right: -4px;
  color: var(--orange); font-size: 22px; text-shadow: 0 1px 2px rgba(0,0,0,.10);
}
/* Body-floated variant: anchored to the right of a section, clears the
   text, capped width. Falls back to full-width on small screens (below). */
.didyouknow--float {
  float: right; width: 250px; margin: 6px 0 14px 22px;
}

/* =====================================================================
   5. SIDEBAR PANELS  (shared card chrome)
   ===================================================================== */
.side-panel {
  background: var(--cream-card); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-sm);
  padding: 18px;
}
.side-panel__head {
  display: flex; align-items: center; gap: 8px;
  font-size: 17px; font-weight: 800; color: var(--ink);
  margin: 0 0 12px;
}
.side-panel__head .paw { width: 20px; height: 20px; flex-shrink: 0; }
.paw-glyph { fill: var(--accent); }

/* ---- Quick Facts ---- */
.quick-facts .qf-row {
  display: grid; grid-template-columns: 26px 1fr; gap: 10px;
  align-items: start; padding: 10px 0;
  border-top: 1px solid var(--line);
}
.quick-facts .qf-row:first-of-type { border-top: 0; padding-top: 2px; }
.quick-facts .qf-ico { font-size: 18px; line-height: 1.3; text-align: center; }
.quick-facts .qf-label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--ink-soft); }
.quick-facts .qf-value { font-size: 14.5px; color: var(--ink); font-weight: 600; line-height: 1.35; }
.quick-facts .qf-value em { font-style: italic; font-weight: 600; color: var(--ink-soft); }
.quick-facts .qf-value .hot { color: var(--accent-ink); font-weight: 800; }

/* ---- On This Page (TOC) ---- */
.toc ol { list-style: none; margin: 0; padding: 0; }
.toc li { margin: 0; }
.toc a {
  display: flex; align-items: flex-start; gap: 9px;
  padding: 7px 8px; border-radius: 10px;
  font-size: 14.5px; font-weight: 600; color: var(--ink-soft);
  line-height: 1.3;
}
.toc a::before {
  content: ""; flex: 0 0 auto; margin-top: 5px;
  width: 11px; height: 11px;
  background: var(--accent);
  -webkit-mask: var(--paw-mask) center / contain no-repeat;
          mask: var(--paw-mask) center / contain no-repeat;
  opacity: .55;
}
.toc a:hover { background: #fff; color: var(--ink); }
.toc a.is-active { color: var(--accent-ink); background: #fff; }
.toc a.is-active::before { opacity: 1; }

/* ---- Related Articles ---- */
.related .rel-card {
  display: grid; grid-template-columns: 64px 1fr; gap: 12px;
  align-items: center; padding: 10px 0; border-top: 1px solid var(--line);
  color: inherit;
}
.related .rel-card:first-of-type { border-top: 0; padding-top: 2px; }
.related .rel-thumb {
  width: 64px; height: 64px; border-radius: 10px; overflow: hidden;
  background: var(--line); flex-shrink: 0;
}
.related .rel-thumb img { width: 100%; height: 100%; object-fit: cover; }
.related .rel-title { font-size: 14.5px; font-weight: 700; color: var(--ink); line-height: 1.25; }
.related .rel-teaser { font-size: 12.5px; color: var(--ink-soft); line-height: 1.3; margin-top: 2px; }
.related .rel-card:hover .rel-title { color: var(--accent-ink); }

/* ---- Worksheet CTA ---- */
.worksheet-cta { text-align: center; }
.worksheet-cta .ws-thumb {
  width: 100%; aspect-ratio: 2 / 3; border-radius: var(--radius-sm);
  overflow: hidden; background: var(--line); margin-bottom: 12px;
}
.worksheet-cta .ws-thumb img { width: 100%; height: 100%; object-fit: cover; }
.worksheet-cta p { font-size: 13.5px; color: var(--ink-soft); margin: 0 0 12px; }

/* ---- Worksheet CTA — in-content horizontal variant (mid-article) ---- */
.worksheet-inline {
  display: grid; grid-template-columns: 168px 1fr; gap: 26px; align-items: center;
  max-width: 760px; margin: 34px auto; padding: 22px 26px;
  background: var(--cream-card, #fffdf8); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.worksheet-inline .ws-thumb {
  width: 168px; aspect-ratio: 2 / 3; margin: 0;
  border-radius: var(--radius-sm); overflow: hidden; background: var(--line);
}
.worksheet-inline .ws-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.worksheet-inline__body { text-align: left; }
.worksheet-inline__head {
  display: flex; align-items: center; gap: 8px; margin: 0 0 8px;
  font-size: 20px; color: var(--accent-ink, var(--orange-deep));
}
.worksheet-inline__head .paw { width: 20px; height: 20px; flex-shrink: 0; }
.worksheet-inline p { margin: 0 0 16px; font-size: 15px; line-height: 1.55; color: var(--ink-soft); }
@media (max-width: 560px) {
  .worksheet-inline { grid-template-columns: 1fr; text-align: center; justify-items: center; }
  .worksheet-inline .ws-thumb { width: 150px; margin: 0 auto; }
  .worksheet-inline__body { text-align: center; }
  .worksheet-inline__head { justify-content: center; }
}
/* Mid-article embeds inside .article-body: neutralise restored-body typography
   (the .article-body h2 ::before bar + .article-body a underline/recolor) on the
   quiz / worksheet CTAs. Mirrors the .related-reading in-body overrides above. */
.article-body .quiz-cta h2::before,
.article-body .worksheet-inline__head::before { content: none; }
.article-body .worksheet-inline__head {
  display: flex; align-items: center; gap: 8px; margin: 0 0 8px;
  font-size: 20px; color: var(--accent-ink, var(--orange-deep));
}
.article-body .worksheet-inline .btn { color: #fff; text-decoration: none; font-weight: 700; }

/* ---- Newsletter ("Stay Curious!") ---- */
.newsletter { background: #f3e8ff; border-color: #e3d3fb; text-align: center; }
.newsletter .nl-sticker { font-size: 34px; line-height: 1; margin-bottom: 6px; }
.newsletter p { font-size: 13.5px; color: var(--ink-soft); margin: 0 0 12px; }
.newsletter form { display: grid; gap: 8px; }
.newsletter input[type="email"] {
  width: 100%; border: 2px solid #e3d3fb; border-radius: 999px;
  padding: 10px 16px; font-family: var(--font); font-size: 14px;
  background: #fff; color: var(--ink);
}
.newsletter input[type="email"]:focus-visible { outline: 3px solid var(--c-facts); outline-offset: 1px; }
.btn--purple { background: var(--c-facts); color: #fff; box-shadow: var(--shadow-sm); justify-content: center; }
.btn--purple:hover { background: #6f49ad; }

/* =====================================================================
   6. GLOSSARY / COMPARISON TABLE  (full-width, below body)
   ===================================================================== */
.glossary-block { max-width: var(--maxw); margin: 12px auto 0; padding: 0 20px; }
.glossary-block h2 {
  font-size: 27px; color: var(--ink); margin: 18px 0 14px;
  scroll-margin-top: 92px; display: flex; align-items: center; gap: 10px;
}
.glossary-block h2::before {
  content: ""; width: 10px; height: 26px; border-radius: 4px; background: var(--accent);
}
.glossary-table {
  width: 100%; border-collapse: separate; border-spacing: 0;
  background: var(--cream-card); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow-sm); font-size: 15px;
}
.glossary-table thead th {
  background: var(--accent); color: #fff; text-align: left;
  font-size: 14px; font-weight: 800; padding: 13px 16px;
}
.glossary-table thead th:first-child { width: 24%; }
.glossary-table tbody th {
  text-align: left; font-weight: 700; color: var(--ink);
  background: #fbf2e0; padding: 12px 16px; vertical-align: top;
}
.glossary-table tbody th .paw { width: 16px; height: 16px; display: inline-block; vertical-align: -3px; margin-right: 6px; }
.glossary-table td { padding: 12px 16px; vertical-align: top; color: var(--ink-soft); line-height: 1.4; }
.glossary-table tr + tr th, .glossary-table tr + tr td { border-top: 1px solid var(--line); }
.glossary-table strong { color: var(--ink); }
.glossary-table em { font-style: italic; }
.glossary-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* =====================================================================
   7. QUIZ CTA  (full-width card, photo bg, green button)
   ===================================================================== */
.quiz-cta {
  position: relative; max-width: var(--maxw); margin: 32px auto;
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
  color: #fff; isolation: isolate;
}
.quiz-cta__bg { position: absolute; inset: 0; background-size: cover; background-position: center; z-index: -2; }
.quiz-cta::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg, rgba(20,12,6,.82), rgba(20,12,6,.45) 70%, rgba(20,12,6,.25));
}
.quiz-cta__inner { padding: 30px 28px; max-width: 620px; }
.quiz-cta h2 { font-size: 27px; margin: 0 0 6px; color: #fff; text-shadow: 0 1px 6px rgba(0,0,0,.4); }
.quiz-cta p { margin: 0 0 18px; font-size: 16px; opacity: .95; }
.quiz-cta .btn--primary { background: var(--green); }
.quiz-cta .btn--primary:hover { background: var(--green-deep); }

/* Inline quiz (progressive-enhanced; works without JS as a plain list) */
.quiz { margin: 22px auto 0; max-width: var(--maxw); padding: 0 20px; }
.quiz__q { background: var(--cream-card); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 16px 18px; margin: 0 0 14px; box-shadow: var(--shadow-sm); }
.quiz__q > legend, .quiz__q > .q-text { font-weight: 700; color: var(--ink); font-size: 16px; margin: 0 0 10px; padding: 0; }
.quiz__opts { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.quiz__opt label {
  display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px;
  border: 2px solid var(--line); border-radius: 10px; cursor: pointer;
  font-size: 15px; color: var(--ink); background: #fff;
}
.quiz__opt label:hover { border-color: var(--accent); }
.quiz__opt input { margin-top: 3px; accent-color: var(--accent); }
.quiz__opt input:focus-visible + span { text-decoration: underline; }
/* Reveal-answer states toggled by a tiny JS helper; degrade gracefully. */
.quiz.show-answers .quiz__opt.correct label { border-color: var(--green); background: #eef7e8; }
.quiz.show-answers .quiz__opt.correct label::after { content: " ✓"; color: var(--green-deep); font-weight: 800; }
.quiz__check { margin: 4px 0 6px; }

/* =====================================================================
   8. GAME BLOCK  (iframe embed of the standalone game page)
   (canonical CSS from flagship-pages/games/README.md)
   ===================================================================== */
.game-block { background: var(--cream-card); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 22px; margin: 30px auto 0; max-width: var(--maxw); }
.game-block__head h2 { font-size: 28px; margin: 0 0 6px; display: flex;
  align-items: center; gap: 10px; color: var(--ink); }
.game-block__head h2 .accent { color: var(--orange); }
.game-block__head h2 em { font-style: normal; }
.game-block__dek { color: var(--ink-soft); margin: 0 0 16px; font-size: 16px; }
.game-block__frame { position: relative; aspect-ratio: 960/600;
  border-radius: var(--radius-sm); overflow: hidden; background: var(--cream); }
.game-block__frame iframe { width: 100%; height: 100%; display: block; border: 0; }
/* Action games (HUD + on-screen control row) need a taller frame than the bare 960/600
   canvas, so the canvas isn't cramped once HUD + controls take their space in embed mode.
   Desktop only — mobile keeps the portrait 9/16 from the media query below. */
@media (min-width: 721px) {
  #game-joeys-big-hop .game-block__frame,
  #game-stalk-and-sneak .game-block__frame,
  #game-mara-river .game-block__frame { aspect-ratio: 9 / 8; }
}
.game-block__credit { text-align: center; color: var(--ink-soft);
  font-size: 13px; margin: 10px 0 0; }
@media (max-width: 720px) {
  .game-block__frame { aspect-ratio: 9/16; max-height: 80vh; }
}

/* =====================================================================
   9. ARTICLE-LEVEL SPACING + section anchors
   ===================================================================== */
.article-section { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.article-footnote {
  max-width: var(--maxw); margin: 30px auto 0; padding: 18px 20px;
  font-size: 13px; color: var(--ink-soft); border-top: 1px solid var(--line);
}
.article-footnote a { color: var(--accent-ink); }
.spacer-bottom { height: 50px; }

/* =====================================================================
   10. ACCESSIBILITY  — visible focus, contrast, reduced motion
   ===================================================================== */
a:focus-visible, button:focus-visible, input:focus-visible,
.toc a:focus-visible, .rel-card:focus-visible, .quiz__opt label:focus-within {
  outline: 3px solid var(--accent-ink);
  outline-offset: 2px;
  border-radius: 6px;
}
.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 100;
  background: var(--ink); color: #fff; padding: 10px 16px;
  border-radius: 0 0 10px 0; font-weight: 700;
}
.skip-link:focus { left: 0; }
/* Newsletter "Email address" label reuses .skip-link, but inside the positioned sidebar its
   left:-999px lands back on-screen. Hide it robustly without touching the real skip-to-content link. */
.skip-link[for="nl-email"] {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); clip-path: inset(50%);
  white-space: nowrap; border: 0; left: auto; top: auto; background: none;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}

/* =====================================================================
   11. RESPONSIVE
   ===================================================================== */
@media (max-width: 1000px) {
  .article-layout { grid-template-columns: 1fr; gap: 28px; }
  .article-side { position: static; top: auto; order: 2;
    grid-template-columns: repeat(2, 1fr); display: grid; gap: 18px; align-items: start; }
  /* TOC + newsletter span full width; quick-facts + related sit side by side */
  .article-side .toc, .article-side .newsletter { grid-column: 1 / -1; }
  .didyouknow--float { float: none; width: auto; margin: 16px 0; }
}
@media (max-width: 760px) {
  .article-hero { min-height: 360px; }
  .article-hero__inner { padding: 32px 20px; min-height: 360px; }
  .article-hero h1 { font-size: 33px; }
  .article-hero .dek { font-size: 16px; }
  .article-hero__scrim {
    background: linear-gradient(180deg, rgba(253,246,233,.96) 35%, rgba(253,246,233,.55) 70%, rgba(253,246,233,.2) 100%);
  }
  .article-hero__bubble { display: none; }
  .fact-cards { grid-template-columns: 1fr; }
  .article-side { grid-template-columns: 1fr; }
  .article-body { font-size: 16.5px; }
  .article-body h2 { font-size: 23px; }
  .glossary-table { font-size: 14px; }
}

/* ---- Related Topics (compact related-content grid, small hero left, 2x2) ---- */
.related-topics { max-width: 820px; margin: 30px auto; padding: 0 20px; }
.related-topics__head { font-size: 21px; color: var(--ink); margin: 0 0 14px; }
.related-topics__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.rt-card {
  display: grid; grid-template-columns: 96px 1fr; align-items: stretch;
  background: var(--cream-card, #fffdf8); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; text-decoration: none; color: inherit;
  transition: transform .15s ease, box-shadow .15s ease;
}
.rt-card:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,0,0,.09); }
.rt-thumb { width: 96px; min-height: 96px; height: 100%; background: var(--line); overflow: hidden; }
.rt-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rt-body { padding: 10px 13px; align-self: center; }
.rt-title { display: block; font-size: 14px; font-weight: 800; color: var(--ink); line-height: 1.25; }
.rt-card:hover .rt-title { color: var(--accent-ink); }
.rt-desc {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  font-size: 12.5px; color: var(--ink-soft); line-height: 1.4; margin-top: 4px;
}
@media (max-width: 560px) { .related-topics__grid { grid-template-columns: 1fr; } }
/* embedded mid-article: neutralise article-body typography on these sections */
.article-body .related-topics__head::before { content: none; }
.article-body .related-topics { max-width: none; padding-left: 0; padding-right: 0; }
.article-body .faq { max-width: none; }
.article-body .faq__head { font-size: 22px; margin: 18px 0 8px; }
.article-body .faq__head::before { content: ""; width: 9px; height: 23px; border-radius: 4px; background: var(--accent); }
.article-body .related-topics a, .article-body .related-topics a:hover {
  color: inherit; font-weight: inherit; text-decoration: none;
}
.article-body .related-topics .rt-title { color: var(--ink); }
.article-body .related-topics .rt-card:hover .rt-title { color: var(--accent-ink); }
.article-body .faq-a { margin: 0; }

/* ---- FAQ (distinct framed card, matching the glossary) ---- */
.faq {
  max-width: var(--article-body-max, 760px); margin: 30px auto;
  background: var(--cream-card, #fffdf8); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 4px 26px 12px;
}
.faq__head {
  font-size: 22px; color: var(--ink); margin: 18px 0 8px;
  display: flex; align-items: center; gap: 10px;
}
.faq__head::before {
  content: ""; flex: 0 0 auto; width: 9px; height: 23px; border-radius: 4px; background: var(--accent);
}
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item:last-of-type { border-bottom: 0; }
.faq-item > summary {
  cursor: pointer; list-style: none; position: relative; display: block;
  font-size: 15.5px; font-weight: 700; color: var(--ink);
  padding: 15px 44px 15px 0; transition: color .12s ease;
}
.faq-item > summary:hover { color: var(--accent-ink, var(--orange-deep)); }
.faq-item > summary::-webkit-details-marker { display: none; }
.faq-item > summary::after {
  content: "+"; position: absolute; right: 0; top: 50%; transform: translateY(-50%);
  width: 26px; height: 26px; border-radius: 50%; box-sizing: border-box;
  background: var(--bubble-bg, #fff7d6); color: var(--accent-ink, var(--orange-deep));
  font-size: 18px; font-weight: 500; line-height: 25px; text-align: center;
  transition: background .15s ease, color .15s ease;
}
.faq-item[open] > summary { color: var(--accent-ink, var(--orange-deep)); }
.faq-item[open] > summary::after { content: "\2212"; background: var(--accent); color: #fff; }
.faq-a { margin: 0; padding: 0 2px 18px 0; font-size: 14.5px; color: var(--ink-soft); line-height: 1.6; }

/* Scout shares each fun fact — fox in the in-body Did-You-Know callouts */
.didyouknow { display: flex; align-items: center; gap: 16px; }
.didyouknow .dyk-fox { height: 85px; width: auto; flex: 0 0 auto; align-self: center; }
.didyouknow .dyk-text { flex: 1 1 auto; min-width: 0; }
.didyouknow--float { display: block; }
.didyouknow--float .dyk-fox { display: none; }
@media (max-width: 480px) { .didyouknow { gap: 11px; } .didyouknow .dyk-fox { height: 68px; } }
