/* Zelda Central content blocks – profile cards and screenshot panels.
   Loaded on the front end and in the block editor. Covers both the dynamic
   zelda-central/character-profile block and the legacy group/columns patterns
   (160+ pages) that share the .zc-profile-* class vocabulary. */

/* =========================================================================
   Profile card  (.zc-profile-block)
   ======================================================================= */
.zc-profile-block {
  --zc-accent: var(--green-raised, #143c2c);
  /* Grid: image | content on the first row; anything else an editor adds
     after the pair (screenshot, gallery, extra paragraphs) spans the full
     width underneath. */
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  align-items: start;
  gap: 18px 22px;
  margin: 28px 0;
  padding: 20px 22px;
  background: #e9ddb633;
  border: 1px solid var(--rule, #bba16b66);
  border-left: 4px solid var(--zc-accent);
  max-width: none !important;
}
.zc-profile-block + .zc-profile-block {
  margin-top: 20px;
}
.zc-profile-enemy {
  --zc-accent: #8b3a2f;
}
.zc-profile-boss {
  --zc-accent: var(--gold, #b18c43);
}
.zc-profile-item {
  --zc-accent: #3f6d8b;
}

/* Legacy pattern: group > columns > column.zc-profile-image + column.zc-profile-content.
   Flatten the core columns wrapper so it behaves like the block's flex row. */
.zc-profile-block > .wp-block-columns {
  display: contents;
}
.zc-profile-block .wp-block-column.zc-profile-image {
  flex: none !important;
  width: 120px;
  margin: 0 !important;
  grid-column: 1;
}
.zc-profile-block .wp-block-column.zc-profile-content {
  flex: none !important;
  min-width: 0;
  margin: 0 !important;
  grid-column: 2;
}
/* Everything after the image/content pair: full width below */
.zc-profile-block > :not(.wp-block-columns):not(.zc-profile-image):not(.zc-profile-content) {
  grid-column: 1 / -1;
  margin: 0;
  max-width: none;
}
.zc-profile-block > figure.wp-block-image,
.zc-profile-block > .wp-block-gallery {
  margin-top: 4px;
}
.zc-profile-block > figure.wp-block-image img {
  max-width: 100%;
  max-height: 480px;
  border: 1px solid #6b613e;
  box-shadow: 0 6px 14px #37291424;
}
.zc-profile-block > p {
  font-size: 0.98rem;
  line-height: 1.55;
}

/* Image – always centred inside its 120px column, whatever WP alignment
   class the editor picked (aligncenter/alignleft/none) */
.zc-profile-image {
  flex: 0 0 120px;
  width: 120px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
}
.zc-profile-image figure,
.zc-profile-image .wp-block-image,
.zc-profile-image .wp-block-image.aligncenter,
.zc-profile-image .wp-block-image.alignleft,
.zc-profile-image .wp-block-image.alignright {
  display: block !important;
  float: none !important;
  width: 100%;
  margin: 0 !important;
}
.zc-profile-image a,
.zc-profile-image .zc-profile-image-link {
  display: block;
  width: 120px;
  margin: 0 auto;
}
.zc-profile-image img {
  display: block;
  width: 120px;
  height: 120px;
  object-fit: contain;
  object-position: center;
  margin: 0 auto;
  padding: 6px;
  background: #e5d4a7;
  border: 1px solid #6b613e;
  box-shadow: 0 6px 14px #37291424;
  max-height: none;
  transition: transform 0.2s ease;
}
.zc-profile-image a:hover img {
  transform: translateY(-2px);
}
.guide-article .zc-profile-image figure img {
  max-height: none;
  background: #e5d4a7;
}

/* Content */
.zc-profile-content {
  flex: 1 1 auto;
  min-width: 0;
}
.zc-profile-content > * {
  max-width: none;
}
.zc-profile-title,
.guide-article .zc-profile-block :is(h2, h3, h4).zc-profile-title {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 12px;
  margin: 0 0 10px;
  padding: 0 0 8px;
  border: 0;
  border-bottom: 1px solid var(--rule, #bba16b66);
  font-family: "Crimson Pro", Georgia, serif;
  font-weight: 600;
  font-size: 1.75rem;
  line-height: 1.15;
  color: var(--green, #09291f);
}
.zc-profile-title a {
  text-decoration: none;
}
.zc-profile-type {
  display: inline-block;
  font-family: "Lora", Georgia, serif;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1;
  padding: 4px 7px;
  color: #fff4dc;
  background: var(--zc-accent);
}
.zc-profile-description,
.zc-profile-content p {
  font-size: 1rem;
  line-height: 1.5;
  margin: 0 0 0.6em;
}
.zc-profile-content > :last-child {
  margin-bottom: 0;
}
.zc-profile-content ul,
.zc-profile-content ol {
  margin: 0.4em 0 0.8em;
  padding-left: 1.3em;
}
.zc-profile-content ul {
  list-style: disc;
}

/* Attribute grid / health bar (legacy shortcode & pattern extras) */
.zc-profile-attributes {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 8px 16px;
  margin-top: 12px;
  font-size: 0.95rem;
}
.zc-profile-attribute-label {
  font-weight: 700;
  color: var(--green, #09291f);
  margin-right: 6px;
}
.zc-health-bar {
  height: 10px;
  background: #d9cba6;
  border: 1px solid var(--rule, #bba16b66);
  overflow: hidden;
  margin-top: 4px;
}
.zc-health-fill {
  height: 100%;
  background: linear-gradient(to right, #b8452f, #8b3a2f);
}

/* Mobile: image beside the title, text below (grid) */
@media (max-width: 640px) {
  .zc-profile-block {
    grid-template-columns: 84px minmax(0, 1fr);
    gap: 12px 16px;
    padding: 16px;
  }
  .zc-profile-image,
  .zc-profile-block .wp-block-column.zc-profile-image {
    width: 84px;
    grid-column: 1;
    grid-row: 1;
  }
  .zc-profile-image a,
  .zc-profile-image .zc-profile-image-link,
  .zc-profile-image img {
    width: 84px;
  }
  .zc-profile-image img {
    height: 84px;
    padding: 4px;
  }
  /* Content column dissolves: title sits beside the image, the rest spans */
  .zc-profile-content {
    display: contents;
  }
  .zc-profile-content > .zc-profile-title {
    grid-column: 2;
    grid-row: 1;
    align-self: center;
    margin: 0;
    padding: 0;
    border-bottom: 0;
    font-size: 1.45rem;
  }
  .zc-profile-content > :not(.zc-profile-title) {
    grid-column: 1 / -1;
    width: 100%;
  }
}
/* =========================================================================
   Screenshot with text  (.zc-screenshot-text-block)
   ======================================================================= */
.zc-screenshot-text-block {
  margin: 28px 0;
  padding: 22px;
  background: #e9ddb633;
  border: 1px solid var(--rule, #bba16b66);
  max-width: none !important;
}
.zc-screenshot-text-block .wp-block-columns {
  gap: 28px;
  margin: 0;
}
.zc-screenshot-container,
.zc-screenshot-text {
  margin: 0;
}
.zc-screenshot-image,
.guide-article .zc-screenshot-image {
  margin: 0 !important;
  background: #e5d4a7;
  border: 1px solid #6b613e;
  box-shadow: 0 9px 18px #37291424;
  padding: 6px;
}
.zc-screenshot-image img,
.guide-article .zc-screenshot-image img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  background: #0b0b0b;
  max-height: none;
}
.zc-screenshot-image figcaption {
  font-size: 0.9rem;
  color: var(--muted, #55523e);
  text-align: center;
  margin: 8px 0 0;
}
.zc-screenshot-title,
.guide-article .zc-screenshot-text-block :is(h2, h3, h4).zc-screenshot-title {
  margin: 0 0 10px;
  padding: 0 0 8px;
  border: 0;
  border-bottom: 1px solid var(--rule, #bba16b66);
  font-family: "Crimson Pro", Georgia, serif;
  font-weight: 600;
  font-size: 1.75rem;
  line-height: 1.15;
  color: var(--green, #09291f);
}
.zc-screenshot-description {
  font-size: 1rem;
  line-height: 1.5;
  margin: 0 0 0.8em;
}
/* Tip/location note: an editorial footnote – hairline above, small gold Triforce
   mark, label in Crimson Pro. Deliberately not a boxed/left-bar callout. */
.zc-screenshot-tip {
  position: relative;
  margin: 14px 0 0;
  padding: 12px 0 0 26px;
  border-top: 1px solid var(--rule, #bba16b66);
  font-size: 0.95rem;
  line-height: 1.5;
  color: #3f3a2a;
}
.zc-screenshot-tip::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 16px;
  width: 15px;
  height: 14px;
  background: var(--gold, #b18c43);
  -webkit-mask: url("../images/triforce.svg") center / contain no-repeat;
  mask: url("../images/triforce.svg") center / contain no-repeat;
}
.zc-screenshot-tip strong {
  font-family: "Crimson Pro", Georgia, serif;
  font-weight: 600;
  font-size: 1.1rem;
  letter-spacing: 0.01em;
  color: var(--green, #09291f);
  margin-right: 2px;
}
@media (max-width: 781px) {
  .zc-screenshot-text-block {
    padding: 16px;
  }
  .zc-screenshot-text-block .wp-block-columns {
    gap: 16px;
  }
}

/* =========================================================================
   Rank Math Table of Contents – parchment index, nested levels collapsed
   (behaviour in assets/js/toc.js)
   ======================================================================= */
.wp-block-rank-math-toc-block {
  margin: 0 0 32px;
  padding: 0;
  background: #e9ddb633;
  border: 1px solid var(--rule, #bba16b66);
  max-width: none !important;
  font-size: 1rem;
}
.guide-article .wp-block-rank-math-toc-block h2,
.wp-block-rank-math-toc-block h2 {
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 1.35rem;
}
.toc-title-toggle {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px;
  font: inherit;
  font-family: "Crimson Pro", Georgia, serif;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--green, #09291f);
  border-bottom: 1px solid var(--rule, #bba16b66);
  cursor: pointer;
  text-align: left;
}
.toc-title-toggle .icon {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  transition: transform 0.15s ease;
}
.toc-title-toggle[aria-expanded="false"] .icon {
  transform: rotate(-90deg);
}
.wp-block-rank-math-toc-block.is-collapsed .toc-title-toggle {
  border-bottom: 0;
}
.wp-block-rank-math-toc-block nav {
  padding: 6px 20px 8px;
}
.wp-block-rank-math-toc-block nav ul,
.wp-block-rank-math-toc-block nav ol {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: toc;
}
.wp-block-rank-math-toc-block nav > ul,
.wp-block-rank-math-toc-block nav > ol {
  columns: 2;
  column-gap: 26px;
}
.wp-block-rank-math-toc-block nav li {
  position: relative;
  margin: 0;
  break-inside: avoid;
  border-bottom: 1px solid var(--rule, #bba16b66);
  counter-increment: toc;
}
.wp-block-rank-math-toc-block nav li:last-child {
  border-bottom: 0;
}
.wp-block-rank-math-toc-block nav > ul > li:has(+ li:last-child):nth-child(odd),
.wp-block-rank-math-toc-block nav > ol > li:has(+ li:last-child):nth-child(odd) {
  border-bottom: 1px solid var(--rule, #bba16b66);
}
.wp-block-rank-math-toc-block nav a {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 11px 36px 11px 0;
  line-height: 1.3;
  color: var(--ink, #17221b);
  text-decoration: none;
}
/* A TOC placed in a Columns block (TOC column + content column) would be
   squeezed to that column's width. Stack such layouts so the TOC spans the
   full reading width above the content; the Columns wrapper also escapes the
   article's 72ch cap. */
.wp-block-columns:has(> .wp-block-column > .wp-block-rank-math-toc-block:only-child) {
  flex-direction: column;
  flex-wrap: nowrap;
  gap: 0;
}
.wp-block-column:has(> .wp-block-rank-math-toc-block:only-child) {
  flex-basis: 100% !important;
  width: 100%;
  max-width: none;
}
.wp-block-columns:has(> .wp-block-column > .wp-block-rank-math-toc-block:only-child) > .wp-block-column {
  flex-basis: auto !important;
  width: 100%;
}
.entry-content > .wp-block-columns:has(.wp-block-rank-math-toc-block),
.oracle-section > .wp-block-columns:has(.wp-block-rank-math-toc-block) {
  max-width: none;
}
/* Direct child of the article: never narrower than the reading column */
.entry-content > .wp-block-rank-math-toc-block,
.oracle-section > .wp-block-rank-math-toc-block,
.wp-block-column > .wp-block-rank-math-toc-block {
  width: 100%;
  box-sizing: border-box;
}

/* Rank Math's toc_list_style.css (ol mode) adds its own counters() on li::before –
   suppress it so the theme's numbering below is the only one. */
.wp-block-rank-math-toc-block nav ol li::before,
.wp-block-rank-math-toc-block nav ol li:before {
  content: none !important;
  counter-increment: none;
}
.wp-block-rank-math-toc-block nav a::before {
  content: counters(toc, ".");
  flex: 0 0 23px;
  color: #78643a;
  font-variant-numeric: tabular-nums;
}
.wp-block-rank-math-toc-block nav a:hover {
  color: #775c15;
  text-decoration: underline;
  text-decoration-color: var(--gold, #b18c43);
}
/* Level 2+ : hidden until toggled */
.wp-block-rank-math-toc-block nav li ul,
.wp-block-rank-math-toc-block nav li ol {
  margin: 0 0 6px 23px;
  padding-left: 12px;
  border-left: 1px solid var(--rule, #bba16b66);
  counter-reset: toc;
}
.wp-block-rank-math-toc-block nav li li {
  border-bottom: 0;
}
.wp-block-rank-math-toc-block nav li li a {
  padding: 6px 0;
  font-size: 0.95rem;
}
.wp-block-rank-math-toc-block nav li li a::before {
  content: none;
}
.toc-sub-toggle {
  position: absolute;
  right: 0;
  top: 5px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  padding: 0;
  color: var(--gold, #b18c43);
  border: 1px solid var(--rule, #bba16b66);
  cursor: pointer;
  transition: transform 0.15s ease, background-color 0.15s ease;
}
.toc-sub-toggle .icon {
  width: 16px;
  height: 16px;
}
.toc-sub-toggle:hover,
.toc-sub-toggle:focus-visible {
  background: #bc9b3f1e;
  color: var(--green, #09291f);
}
.toc-sub-toggle[aria-expanded="true"] {
  transform: rotate(180deg);
  color: var(--green, #09291f);
}
.toc-expand-all {
  display: inline-flex;
  margin: 6px 0 4px;
  padding: 0;
  font: inherit;
  font-size: 0.9rem;
  color: var(--muted, #55523e);
  text-decoration: underline;
  text-decoration-color: var(--gold, #b18c43);
  cursor: pointer;
  column-span: all;
}
@media (max-width: 800px) {
  .wp-block-rank-math-toc-block nav > ul,
  .wp-block-rank-math-toc-block nav > ol {
    columns: 1;
  }
  .wp-block-rank-math-toc-block nav > ul > li:nth-child(odd),
  .wp-block-rank-math-toc-block nav > ol > li:nth-child(odd) {
    border-bottom: 1px solid var(--rule, #bba16b66);
  }
  .wp-block-rank-math-toc-block nav > ul > li:last-child,
  .wp-block-rank-math-toc-block nav > ol > li:last-child {
    border-bottom: 0;
  }
}
/* No-JS: show everything */
html:not(.js-enabled) .wp-block-rank-math-toc-block nav li ul,
html:not(.js-enabled) .wp-block-rank-math-toc-block nav li ol {
  display: block;
}

/* =========================================================================
   Core gallery – desktop framing + mobile scroll-snap carousel
   Core bumps its selector specificity with :not(#individual-image), so the
   mobile overrides below use !important deliberately.
   ======================================================================= */
.entry-content .wp-block-gallery,
.oracle-main .wp-block-gallery {
  margin: 24px 0 30px;
}
.wp-block-gallery.has-nested-images figure.wp-block-image img {
  border: 1px solid #6b613e;
  box-shadow: 0 6px 14px #37291424;
  background: #e5d4a7;
}
.wp-block-gallery.has-nested-images figure.wp-block-image figcaption {
  font-family: "Lora", Georgia, serif;
  font-size: 0.85rem;
}

@media (max-width: 800px) {
  .wp-block-gallery.has-nested-images {
    position: relative;
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 12px !important;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-padding: 0 6%;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    padding: 0 6% 4px;
    margin-left: -12px;
    margin-right: -12px;
    /* Reserve a stable height so the counter/arrows never jump */
    align-items: stretch !important;
  }
  .wp-block-gallery.has-nested-images::-webkit-scrollbar {
    display: none;
  }
  .wp-block-gallery.has-nested-images figure.wp-block-image {
    flex: 0 0 88% !important;
    width: 88% !important;
    max-width: 88% !important;
    margin: 0 !important;
    scroll-snap-align: center;
    scroll-snap-stop: always;
  }
  /* A lone image: keep it full width, stacked – a carousel is overkill. */
  .wp-block-gallery.has-nested-images:not(:has(> figure:nth-child(2))) {
    display: grid !important;
    grid-template-columns: 1fr;
    gap: 14px !important;
    overflow: visible;
    padding: 0;
    margin-left: 0;
    margin-right: 0;
  }
  .wp-block-gallery.has-nested-images:not(:has(> figure:nth-child(2))) figure.wp-block-image {
    flex: none !important;
    width: 100% !important;
    max-width: 100% !important;
  }
  /* Never crop screenshots on phones: letterbox to 16:9 instead. */
  .wp-block-gallery.has-nested-images.is-cropped figure.wp-block-image a,
  .wp-block-gallery.has-nested-images.is-cropped figure.wp-block-image img {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 16 / 9;
    object-fit: contain !important;
    background: #0b0b0b;
    flex: none !important;
  }
  .wp-block-gallery.has-nested-images figure.wp-block-image figcaption {
    position: static !important;
    background: none !important;
    color: var(--muted, #55523e) !important;
    padding: 6px 2px 0 !important;
    text-shadow: none !important;
    -webkit-mask-image: none !important;
    mask-image: none !important;
  }
  /* Counter + arrows injected by gallery.js */
  .zc-gallery-ui {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 6px 0 26px;
    font-size: 0.9rem;
    color: var(--muted, #55523e);
    font-variant-numeric: tabular-nums;
  }
  .zc-gallery-ui button {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    padding: 0;
    color: var(--gold, #b18c43);
    border: 1px solid var(--rule, #bba16b66);
  }
  .zc-gallery-ui button:disabled {
    opacity: 0.35;
    cursor: default;
  }
  .zc-gallery-ui .icon {
    width: 18px;
    height: 18px;
  }
  .zc-gallery-ui .zc-gallery-prev .icon {
    transform: scaleX(-1);
  }
  .zc-gallery-dots {
    display: flex;
    gap: 6px;
  }
  .zc-gallery-dots i {
    width: 7px;
    height: 7px;
    border: 1px solid var(--gold, #b18c43);
    transform: rotate(45deg);
  }
  .zc-gallery-dots i.is-active {
    background: var(--gold, #b18c43);
  }
}
@media (min-width: 801px) {
  .zc-gallery-ui {
    display: none;
  }
}
@media (prefers-reduced-motion: no-preference) {
  .wp-block-gallery.has-nested-images {
    scroll-behavior: smooth;
  }
}

/* =========================================================================
   Video walkthrough – article-context overrides (block owns its own CSS)
   ======================================================================= */
.entry-content > .zc-vw {
  max-width: none;
  margin: 28px 0;
}
.guide-article .zc-vw :is(h2, h3, h4).zc-vw-title {
  margin: 0;
  padding: 0;
  border: 0;
}

/* =========================================================================
   Editor canvas parity
   ======================================================================= */
.editor-styles-wrapper .zc-profile-block,
.editor-styles-wrapper .zc-screenshot-text-block {
  color: var(--ink, #17221b);
}

/* =========================================================================
   Category Articles block – news cards, heading lives in a Heading block
   ======================================================================= */
.zc-category-articles {
  margin: 32px 0;
  max-width: none !important;
}
.zc-category-articles__more {
  margin-top: 18px;
  padding-top: 12px;
  border-top: 1px solid var(--rule, #bba16b66);
  text-align: right;
}
.zc-category-articles__more a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
  color: var(--muted, #55523e);
  text-decoration: underline;
  text-decoration-color: var(--gold, #b18c43);
}
.zc-category-articles__more .icon {
  width: 18px;
  height: 18px;
}
/* Reset anything the homepage feed styles might contribute */
.zc-category-articles__list {
  margin: 0;
  padding: 0;
  border: 0;
}
.zc-category-articles .news-story {
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
}
/* List layout: thumbnail left, copy right (default) */
.zc-category-articles--list .zc-category-articles__list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
}
.zc-category-articles--list .news-story {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--rule, #bba16b66);
}
.zc-category-articles--list .story-copy {
  min-width: 0;
}
.zc-category-articles--list .news-story:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}
.zc-category-articles--list .news-story:not(:has(.story-image)) {
  grid-template-columns: 1fr;
}
/* Grid layout: card columns like the homepage "More news" */
.zc-category-articles--grid .zc-category-articles__list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 26px 22px;
}
.zc-category-articles .news-story .story-image img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border: 1px solid #6b613e;
  box-shadow: 0 6px 14px #37291424;
  background: #e5d4a7;
}
.zc-category-articles .story-date {
  margin: 0 0 4px;
  font-size: 0.85rem;
  color: var(--muted, #55523e);
}
.guide-article .zc-category-articles .news-story h3,
.zc-category-articles .news-story h3 {
  margin: 0 0 6px;
  padding: 0;
  border: 0;
  font-size: 1.35rem;
  line-height: 1.2;
}
.zc-category-articles .news-story h3 a {
  text-decoration: none;
}
.zc-category-articles .news-story h3 a:hover {
  text-decoration: underline;
  text-decoration-color: var(--gold, #b18c43);
}
.zc-category-articles .story-copy > p:last-child {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.5;
  max-width: none;
}
.zc-category-articles .news-story.no-excerpt .story-copy > p:last-child {
  display: none;
}
.zc-category-articles--empty {
  padding: 14px 18px;
  border: 1px dashed var(--gold, #b18c43);
  color: var(--muted, #55523e);
}
@media (max-width: 900px) {
  .zc-category-articles--grid .zc-category-articles__list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 640px) {
  .zc-category-articles--list .news-story {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .zc-category-articles--grid .zc-category-articles__list {
    grid-template-columns: 1fr;
  }
}

/* =========================================================================
   Rank Math FAQ block – parchment accordion (faq.js adds the buttons)
   ======================================================================= */
.rank-math-block {
  margin: 30px 0;
  max-width: 72ch;
}
.rank-math-block .rank-math-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--rule, #bba16b66);
}
.rank-math-block .rank-math-list-item {
  margin: 0;
  padding: 0;
  border-bottom: 1px solid var(--rule, #bba16b66);
  background: transparent;
}
.rank-math-block .rank-math-list-item.is-open {
  background: #e9ddb633;
}
.guide-article .rank-math-block .rank-math-question,
.rank-math-block .rank-math-question {
  margin: 0;
  padding: 0;
  border: 0;
  font-family: "Crimson Pro", Georgia, serif;
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--green, #09291f);
}
/* No-JS: plain heading + visible answer */
.rank-math-block:not(.is-enhanced) .rank-math-question {
  padding: 14px 0 6px;
}
.rank-math-block:not(.is-enhanced) .rank-math-answer {
  padding: 0 0 16px;
}
/* Enhanced: the whole heading is a button */
.zc-faq-toggle {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  padding: 14px 12px 14px 0;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
  border: 0;
  background: transparent;
}
.rank-math-block .rank-math-list-item.is-open .zc-faq-toggle {
  padding-left: 14px;
}
.zc-faq-toggle:hover {
  color: #775c15;
}
.zc-faq-toggle:focus-visible {
  outline: 2px solid var(--gold-light, #edcf81);
  outline-offset: -2px;
}
/* Plus / minus mark in gold */
.zc-faq-icon {
  position: relative;
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  margin-top: 2px;
  border: 1px solid var(--gold, #b18c43);
}
.zc-faq-icon::before,
.zc-faq-icon::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 10px;
  height: 2px;
  background: var(--gold, #b18c43);
  transform: translate(-50%, -50%);
  transition: transform 0.2s ease;
}
.zc-faq-icon::after {
  transform: translate(-50%, -50%) rotate(90deg);
}
.zc-faq-toggle[aria-expanded="true"] .zc-faq-icon::after {
  transform: translate(-50%, -50%) rotate(0deg);
}
.zc-faq-toggle[aria-expanded="true"] .zc-faq-icon {
  background: var(--gold, #b18c43);
}
.zc-faq-toggle[aria-expanded="true"] .zc-faq-icon::before,
.zc-faq-toggle[aria-expanded="true"] .zc-faq-icon::after {
  background: #fff1cb;
}
/* Answer: grid-rows animation */
.is-enhanced .rank-math-answer {
  display: grid;
  grid-template-rows: 1fr;
  transition: grid-template-rows 0.3s ease, opacity 0.25s ease;
  opacity: 1;
}
.is-enhanced .rank-math-answer[hidden] {
  display: none;
}
.is-enhanced .rank-math-answer.is-opening,
.is-enhanced .rank-math-answer.is-closing {
  grid-template-rows: 0fr;
  opacity: 0;
}
.is-enhanced .rank-math-answer > * {
  overflow: hidden;
}
.is-enhanced .rank-math-answer {
  padding: 0 14px 16px;
}
.rank-math-block .rank-math-answer p {
  margin: 0 0 0.7em;
  font-size: 1rem;
  line-height: 1.6;
  max-width: none;
}
.rank-math-block .rank-math-answer p:last-child {
  margin-bottom: 0;
}
.rank-math-block .rank-math-answer strong {
  color: var(--green-raised, #143c2c);
}
.rank-math-block .rank-math-answer a {
  text-decoration: underline;
  text-decoration-color: var(--gold, #b18c43);
}
.rank-math-block .rank-math-answer img {
  max-width: 100%;
  height: auto;
  border: 1px solid #6b613e;
  margin: 10px 0;
}
.rank-math-block .rank-math-answer :is(ul, ol) {
  padding-left: 1.3em;
  margin: 0 0 0.8em;
}
@media (max-width: 600px) {
  .rank-math-block .rank-math-question {
    font-size: 1.1rem;
  }
}
@media (prefers-reduced-motion: reduce) {
  .is-enhanced .rank-math-answer,
  .zc-faq-icon::before,
  .zc-faq-icon::after {
    transition: none;
  }
}

/* =========================================================================
   Walkthrough chapter navigator (core Details block → zc_render_details_chapter_nav)
   Numbered rows in the hub's chapter-list language; current chapter marked.
   ======================================================================= */
.entry-content .wp-block-details,
.oracle-section .wp-block-details {
  margin: 24px 0 30px;
  padding: 0;
  border: 1px solid var(--rule, #bba16b66);
  background: #e9ddb633;
}
.entry-content .wp-block-details > summary,
.oracle-section .wp-block-details > summary {
  padding: 12px 16px;
  font-family: "Crimson Pro", Georgia, serif;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--green, #09291f);
  cursor: pointer;
  list-style: none;
}
.wp-block-details > summary::-webkit-details-marker {
  display: none;
}
.entry-content .wp-block-details > :not(summary),
.oracle-section .wp-block-details > :not(summary) {
  margin-left: 16px;
  margin-right: 16px;
}
.entry-content .wp-block-details > :last-child:not(summary) {
  margin-bottom: 16px;
}

/* Chapter navigator variant */
.zc-chapter-nav {
  max-width: none;
  background: #e9ddb633;
  border: 1px solid var(--rule, #bba16b66);
  border-top: 2px solid var(--gold, #b18c43);
}
.entry-content .zc-chapter-nav > summary,
.oracle-section .zc-chapter-nav > summary,
.zc-chapter-nav > summary {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 14px 16px;
  margin: 0;
  font-family: "Crimson Pro", Georgia, serif;
  font-size: 1.45rem;
  font-weight: 600;
  line-height: 1.15;
  color: var(--green, #09291f);
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.zc-chapter-nav > summary:hover {
  background: #bc9b3f1e;
}
.zc-chapter-nav > summary:focus-visible {
  outline: 2px solid var(--gold-light, #edcf81);
  outline-offset: -2px;
}
.zc-chapter-nav__title {
  flex: 1 1 auto;
}
.zc-chapter-nav__count {
  font-family: "Lora", Georgia, serif;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted, #55523e);
  white-space: nowrap;
}
.zc-chapter-nav > summary > .icon {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  align-self: center;
  color: var(--gold, #b18c43);
  transition: transform 0.2s ease;
}
.zc-chapter-nav[open] > summary > .icon {
  transform: rotate(180deg);
}
.zc-chapter-nav__header {
  display: flex;
  justify-content: flex-end;
  padding: 0 16px 8px;
  margin: 0 !important;
  font-size: 0.9rem;
  border-bottom: 1px solid var(--rule, #bba16b66);
}
.zc-chapter-nav__header a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted, #55523e);
  text-decoration: underline;
  text-decoration-color: var(--gold, #b18c43);
}
.zc-chapter-nav__header .icon {
  width: 16px;
  height: 16px;
}
/* Numbered rows */
.entry-content .zc-chapter-nav ul,
.oracle-section .zc-chapter-nav ul,
.zc-chapter-nav ul {
  list-style: none;
  margin: 0 !important;
  padding: 0 !important;
  counter-reset: chapter;
  columns: 2;
  column-gap: 0;
  max-width: none;
}
.entry-content .zc-chapter-nav li,
.zc-chapter-nav li {
  position: relative;
  display: grid;
  grid-template-columns: 2.4rem minmax(0, 1fr);
  gap: 2px 0;
  margin: 0;
  padding: 10px 16px 10px 0;
  break-inside: avoid;
  border-bottom: 1px solid var(--rule, #bba16b66);
  counter-increment: chapter;
  line-height: 1.35;
}
.zc-chapter-nav li:last-child {
  border-bottom: 0;
}
.entry-content .zc-chapter-nav li::before,
.zc-chapter-nav li::before {
  content: counter(chapter, decimal-leading-zero);
  position: static;
  grid-row: 1 / span 2;
  width: auto;
  height: auto;
  background: none;
  transform: none;
  padding-left: 16px;
  font-family: "Crimson Pro", Georgia, serif;
  font-size: 1rem;
  font-weight: 600;
  color: #78643a;
  font-variant-numeric: tabular-nums;
}
.zc-chapter-nav .zc-chapter-title {
  font-family: "Crimson Pro", Georgia, serif;
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.2;
}
.zc-chapter-nav .zc-chapter-title strong {
  font-weight: inherit;
}
.zc-chapter-nav .zc-chapter-title a {
  color: var(--green, #09291f);
  text-decoration: none;
}
.zc-chapter-nav .zc-chapter-title a:hover {
  text-decoration: underline;
  text-decoration-color: var(--gold, #b18c43);
}
.zc-chapter-nav .zc-chapter-blurb {
  font-size: 0.9rem;
  color: var(--muted, #55523e);
}
.zc-chapter-nav .zc-chapter-blurb strong {
  font-weight: 400;
}
/* Current chapter */
.zc-chapter-nav li.is-current {
  background: #bc9b3f1e;
  box-shadow: inset 3px 0 0 var(--gold, #b18c43);
}
.zc-chapter-nav li.is-current::before {
  color: var(--green, #09291f);
}
.zc-chapter-nav li.is-current .zc-chapter-title a {
  pointer-events: none;
}
@media (max-width: 900px) {
  .entry-content .zc-chapter-nav ul,
  .zc-chapter-nav ul {
    columns: 1;
  }
}
@media (max-width: 600px) {
  .zc-chapter-nav > summary {
    font-size: 1.2rem;
    padding: 12px 14px;
  }
  .zc-chapter-nav__count {
    display: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .zc-chapter-nav > summary > .icon {
    transition: none;
  }
}
