/* ---------- Calibri (licensed web font) ----------
 * Drop the licensed .ttf files in ../fonts/calibri/ (see that folder's README).
 * Needed for full Lushootseed / Coast Salish glyph coverage (ʔ ə ɬ ƛ š č ł ʷ ᶻ …).
 * local() is tried first so machines with Calibri installed skip the download.
 * Referenced as "Calibri" wherever the Tribal Guide stack already names it. */
@font-face {
  font-family: "Calibri";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src:
    local("Calibri"),
    url("../fonts/calibri/calibri-regular.woff2") format("woff2"),
    url("../fonts/calibri/calibri-regular.woff") format("woff"),
    url("../fonts/calibri/calibri-regular.ttf") format("truetype");
}

@font-face {
  font-family: "Calibri";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src:
    local("Calibri Bold"),
    local("Calibri-Bold"),
    url("../fonts/calibri/calibri-bold.woff2") format("woff2"),
    url("../fonts/calibri/calibri-bold.woff") format("woff"),
    url("../fonts/calibri/calibri-bold.ttf") format("truetype");
}

@font-face {
  font-family: "Calibri";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src:
    local("Calibri Italic"),
    local("Calibri-Italic"),
    url("../fonts/calibri/calibri-italic.woff2") format("woff2"),
    url("../fonts/calibri/calibri-italic.woff") format("woff"),
    url("../fonts/calibri/calibri-italic.ttf") format("truetype");
}

@font-face {
  font-family: "Calibri";
  font-style: italic;
  font-weight: 700;
  font-display: swap;
  src:
    local("Calibri Bold Italic"),
    local("Calibri-BoldItalic"),
    url("../fonts/calibri/calibri-bolditalic.woff2") format("woff2"),
    url("../fonts/calibri/calibri-bolditalic.woff") format("woff"),
    url("../fonts/calibri/calibri-bolditalic.ttf") format("truetype");
}

/* Trailing inline SVGs (footer-clip defs) and a11y-speak live regions get
 * appended to <body> on every WP page and contribute ~23px of trailing flow
 * space below the footer. Take them out of layout flow on Tribal Guide pages
 * only (visibility/accessibility preserved). */
body.page-template-tribal-guide-landing > svg,
body.page-template-tribal-guide-landing-blocks > svg,
body.page-template-tribal-guide-directory > svg,
body.single-tribe > svg,
body.page-template-tribal-guide-landing > .a11y-speak-region,
body.page-template-tribal-guide-landing-blocks > .a11y-speak-region,
body.page-template-tribal-guide-directory > .a11y-speak-region,
body.single-tribe > .a11y-speak-region,
body.page-template-tribal-guide-landing > .a11y-speak-intro-text,
body.page-template-tribal-guide-landing-blocks > .a11y-speak-intro-text,
body.page-template-tribal-guide-directory > .a11y-speak-intro-text,
body.single-tribe > .a11y-speak-intro-text {
  position: absolute !important;
  left: 0;
  bottom: 0;
  width: 0;
  height: 0;
  overflow: hidden;
  pointer-events: none;
}

/* Tribal Guide — scoped styles for /tribal-guide/, /tribal-guide/directory/
 * and single Tribe pages. Loaded by functions.php only on those templates.
 *
 * Buttons use the core .wp-block-button markup so they inherit the global
 * button rules (6px radius, uppercase, bold, maroon). Only Tribal-Guide-
 * specific overrides (min-widths, full-width on mobile) live here.
 *
 * Tokens:
 *   maroon  #7c2529  (Show Up bg, accordion bar bg)
 *   navy    #244c5a  (Project Background bg)
 *   teal    #007598  (section headline accent / per-tribe accent default)
 *   sand    #d6d1c4  (Show Up headline, accordion bar text)
 *   tan card#b6cfd0  (tribe card bg)
 *   body    #222223  (MWNHA black, body copy on white)
 *   wash    #d8d8d8  (hero photo wash)
 */

.tg-landing,
.tg-tribe {
  font-family: "Proxima Nova", "Helvetica Neue", Arial, sans-serif;
  color: #222223;
  line-height: 1.45;
}

/* Neutralize core/group default block-gap so existing tg-* margins control
 * spacing. The legacy template emitted plain divs without the WP layout
 * classes, so we drop the auto-injected margins from wp-block-group-is-layout-flow
 * children when they live inside the Tribal Guide. */
.tg-landing .wp-block-group.is-layout-flow > * + *,
.tg-landing .wp-block-group-is-layout-flow > * + * {
  margin-block-start: 0;
}

/* core/buttons defaults to flex with its own gap; the legacy template just
 * inlined a single wp-block-button. Strip the flex wrapper's gap-driven
 * spacing inside the landing. */
.tg-landing .wp-block-buttons.is-layout-flex {
  gap: 0;
}

.tg-landing,
.tg-landing *,
.tg-tribe,
.tg-tribe * {
  box-sizing: border-box;
}

.tg-landing p,
.tg-tribe p {
  margin: 0 0 1em;
}

.tg-landing p:last-child,
.tg-tribe p:last-child {
  margin-bottom: 0;
}

/* ---------- Buttons: scope-only overrides on top of core block button ----- */
/* Block-button markup inherits 6px radius, uppercase, bold/700, maroon from the
 * global theme. We only set min-width per placement and the mobile full-width. */
.tg-landing .wp-block-button,
.tg-tribe .wp-block-button {
  display: inline-block;
}

.tg-landing .wp-block-button__link,
.tg-tribe .wp-block-button__link {
  min-height: 45px;
  min-width: 200px;
  padding: 10px 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1.2;
}

.tg-button--directory .wp-block-button__link,
.tg-tribe-card__cta .wp-block-button__link {
  min-width: 278px;
}

/* ---------- Hero ---------- */
/* Heroes are the one image without rounded corners (Julia, Jun 9).
 * overflow: hidden must stay — the parallax photo depends on the clipping. */
.tg-hero {
  position: relative;
  width: 100%;
  height: clamp(420px, 41vw, 793px);
  overflow: hidden;
}

.tg-hero__photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  will-change: transform;
}

/* Block-editor equivalent: core/image renders as <figure><img/></figure>.
 * Only the inner <img> is parallax-translated, so keep will-change off the
 * figure — otherwise the figure forms a stacking context that traps the
 * caption's z-index beneath the dark .tg-hero__overlay, dimming the white
 * "Art by …" text to gray. */
.tg-hero figure.tg-hero__photo,
.tg-hero figure.wp-block-image.tg-hero__photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  display: block;
  will-change: auto;
}

.tg-hero figure.tg-hero__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  will-change: transform;
}

.tg-hero figure.tg-hero__badge {
  margin: 0;
}

.tg-hero figure.tg-hero__badge img {
  display: block;
  width: 100%;
  height: auto;
}

.tg-hero__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.42);
}

.tg-hero__badge {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: 592px;
  width: 31%;
  height: auto;
  z-index: 1;
}

/* Optional photo caption, lower-left of any hero (e.g. "Art by Brandy May
 * Bouré" on the landing page). The core image block renders it as a
 * <figcaption> inside the hero figure; lift it above the dark overlay. */
.tg-hero figcaption.wp-element-caption,
.tg-hero .tg-hero__caption {
  position: absolute;
  left: 24px;
  bottom: 24px;
  margin: 0;
  color: #ffffff;
  font-size: 18px;
  line-height: 1.4;
  text-align: left;
  z-index: 2;
}

@media (max-width: 640px) {
  .tg-hero figcaption.wp-element-caption,
  .tg-hero .tg-hero__caption {
    left: 16px;
    bottom: 16px;
    font-size: 15px;
  }
}

/* ---------- Map ---------- */
.tg-map {
  background: #ffffff;
  padding: 0;
  overflow-x: clip;
}

.tg-map__inner {
  display: grid;
  grid-template-columns: minmax(0, 592px) 1fr;
  gap: 36px;
  max-width: 1728px;
  margin: 0 auto;
  padding: 0 0 0 96px;
  align-items: center;
}

.tg-map__intro {
  max-width: 592px;
}

.tg-map__copy {
  font-size: 18px;
  line-height: 1.5;
  color: #222223;
  margin-bottom: 32px;
}

.tg-map__copy p {
  font-size: 18px;
  color: #222223;
  font-weight: 400;
  line-height: 1.5;
  margin: 0 0 1em;
}

.tg-map__copy p:first-child,
.tg-map__copy h2:first-child,
.tg-map__copy h3:first-child {
  font-size: 36px;
  line-height: 1.2;
  color: #007598;
  font-weight: 700;
  margin: 0 0 0.5em;
}

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

.tg-map__copy em,
.tg-map__copy i {
  font-style: italic;
}

/* Double selector: WP's global-styles-inline-css loads after this sheet and
 * zeroes margin-block-end via `:root :where(.is-layout-flow) > *` (0,1,0). */
.tg-map .tg-map__image {
  margin-right: calc(-1 * max(0px, (100vw - 1728px) / 2));
  /* Pull 1px into the red section below so subpixel image-height rounding
   * can't leave a white sliver between the map and .tg-show-up. */
  margin-bottom: -1px;
  line-height: 0;
}

.tg-map__image img {
  display: block;
  width: 100%;
  height: auto;
  max-width: none;
}

/* ---------- Show Up ---------- */
.tg-show-up {
  background: #7c2529;
  color: #ffffff;
  padding: 72px 0;
}

.tg-show-up__inner {
  max-width: 906px;
  margin: 0 auto;
  padding: 0 24px;
}

.tg-show-up__headline {
  font-size: 36px;
  line-height: 1.2;
  color: #d6d1c4;
  font-weight: 700;
  margin: 0 0 24px;
}

.tg-show-up__intro {
  font-size: 18px;
  color: #ffffff;
  margin-bottom: 24px;
}

.tg-show-up__guidelines {
  font-size: 18px;
  color: #ffffff;
  padding-left: 0;
  margin: 0 0 24px;
  list-style: none;
  counter-reset: tg-guideline;
}

.tg-show-up__guidelines li {
  counter-increment: tg-guideline;
  padding-left: 2.5em;
  position: relative;
  margin-bottom: 12px;
  line-height: 1.4;
}

.tg-show-up__guidelines li::before {
  content: counter(tg-guideline) ".";
  position: absolute;
  left: 0;
  top: 0;
  width: 2em;
  font-weight: 700;
}

.tg-show-up__guidelines li strong {
  font-weight: 700;
}

.tg-show-up__outro {
  font-size: 18px;
  color: #ffffff;
}

.tg-show-up__outro a {
  color: #ffffff;
  text-decoration: underline;
}

/* ---------- Tribes ---------- */
.tg-tribes {
  background: #ffffff;
  padding: 80px 0;
  overflow-x: clip;
}

.tg-tribes__inner {
  max-width: 1848px;
  margin: 0 auto;
  padding: 0 0 0 36px;
}

.tg-tribes__intro {
  max-width: 906px;
  margin: 0 auto 48px;
  padding: 0 24px;
}

.tg-tribes__intro h2,
.tg-tribes__intro h3,
.tg-tribes__intro p:first-child {
  font-size: 36px;
  color: #007598;
  font-weight: 700;
  margin: 0 0 0.4em;
  line-height: 1.2;
}

.tg-tribes__intro p {
  font-size: 18px;
  color: #222223;
  font-weight: 400;
  line-height: 1.5;
  margin: 0 0 1em;
}

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

.tg-tribes__list {
  display: flex;
  flex-direction: column;
  gap: 36px;
}

/* ---------- Tribe card ---------- */
.tg-tribe-card {
  display: grid;
  grid-template-columns: minmax(0, 592px) 1fr;
  min-height: 401px;
  background: #ffffff;
  overflow: hidden;
  position: relative;
  margin-right: calc(-1 * max(0px, (100vw - 1848px) / 2));
  border-radius: 6px;
}

/* Left cell: the Tribe page's hero photo with the tribe logo overlaid,
 * centered at half the cell width. */
.tg-tribe-card__media {
  position: relative;
  background: #ffffff;
  overflow: hidden;
}

.tg-tribe-card__media-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Darken the photo so the logo pops (matches the hero overlay). */
.tg-tribe-card__media::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.42);
  z-index: 1;
}

.tg-tribe-card__media-logo {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 50%;
  height: auto;
  display: block;
  z-index: 2;
}

.tg-tribe-card__body {
  background: #b6cfd0;
  position: relative;
  /* Right padding clears the 160px waterline strip plus breathing room so the
   * copy stays on the solid blue at every width (Julia, Jun 10). */
  padding: 79px 192px 79px 97px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.tg-tribe-card__waterline {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 160px;
  overflow: hidden;
  pointer-events: none;
  /* White backing so the (turquoise, alpha-fading) waterline texture dissolves
   * into white at the card's right edge. Its opaque left edge matches the
   * #b6cfd0 body, so the panel-to-strip seam is invisible. */
  background: #ffffff;
}

.tg-tribe-card__waterline img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  max-width: none;
  display: block;
}

.tg-tribe-card__copy {
  max-width: 845px;
  position: relative;
  z-index: 1;
}

.tg-tribe-card__name {
  font-size: 36px;
  line-height: 1.2;
  color: #222223;
  font-weight: 700;
  margin: 0 0 16px;
}

.tg-tribe-card__blurb {
  font-size: 18px;
  line-height: 1.5;
  color: #222223;
  margin: 0 0 32px;
}

/* Native words within tribe-card blurb stay in Calibri so non-Latin glyphs
 * render correctly even though the rest of the page is Proxima Nova. */
.tg-tribe-card__blurb strong,
.tg-tribe-card__blurb em {
  font-family: "Calibri", sans-serif;
  font-weight: 700;
}

/* Pronunciation words inside the card blurb keep body-black text (Julia,
 * Jun 10) — bold Calibri + speaker icon unchanged from the tribe pages. */
.tg-tribe-card__blurb .tg-pronounce-link,
.tg-tribe-card__blurb .tg-inline-audio-link,
.tg-tribe-card__blurb .tg-pronounce-link:hover,
.tg-tribe-card__blurb .tg-inline-audio-link:hover,
.tg-tribe-card__blurb .tg-pronounce-link:focus,
.tg-tribe-card__blurb .tg-inline-audio-link:focus {
  color: #222223;
}

.tg-tribe-card__blurb .tg-inline-audio-link {
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
}

.tg-tribe-card__blurb .tg-inline-audio-link:hover,
.tg-tribe-card__blurb .tg-inline-audio-link:focus {
  text-decoration-thickness: 2px;
}

.tg-tribe-card--placeholder .tg-tribe-card__media {
  background: #ffffff;
}

/* ---------- Project Background ---------- */
.tg-project-background {
  background: #244c5a;
  color: #ffffff;
  padding: 72px 0;
}

.tg-project-background__inner {
  max-width: 906px;
  margin: 0 auto;
  padding: 0 24px;
}

.tg-project-background__copy {
  font-size: 18px;
  line-height: 1.5;
  color: #ffffff;
}

.tg-project-background__copy h2,
.tg-project-background__copy h3 {
  font-size: 36px;
  color: #ffffff;
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 24px;
}

.tg-project-background__copy p {
  font-size: 18px;
  color: #ffffff;
  font-weight: 400;
  line-height: 1.55;
  margin: 0 0 1em;
}

.tg-project-background__copy p:last-child {
  margin-bottom: 0;
}

/* ---------- Acknowledgements ---------- */
.tg-acknowledgements {
  background: #ffffff;
  padding: 72px 0 96px;
}

.tg-acknowledgements__inner {
  max-width: 906px;
  margin: 0 auto;
  padding: 0 24px;
}

.tg-acknowledgements__headline {
  font-size: 36px;
  line-height: 1.2;
  color: #007598;
  font-weight: 700;
  margin: 0 0 16px;
}

.tg-acknowledgements__intro {
  font-size: 18px;
  line-height: 1.5;
  color: #222223;
  margin-bottom: 32px;
}

.tg-acknowledgements__intro p {
  font-size: 18px;
  color: #222223;
  margin: 0 0 1em;
  font-weight: 400;
  line-height: 1.5;
}

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

.tg-acknowledgements__columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px;
}

.tg-acknowledgements__column-heading {
  display: none; /* Editors author per-column headings inside the WYSIWYG body. */
}

.tg-acknowledgements__column-body {
  font-size: 18px;
  line-height: 1.45;
  color: #222223;
}

.tg-acknowledgements__column-body p {
  margin: 0 0 0.35em;
}

.tg-acknowledgements__column-body p:last-child {
  margin-bottom: 0;
}

.tg-acknowledgements__column-body strong {
  font-weight: 700;
  color: #222223;
}

/* ---------- Responsive (landing) ---------- */
@media (max-width: 1024px) {
  .tg-map__inner {
    grid-template-columns: 1fr;
    padding: 0 24px;
    gap: 32px;
  }

  .tg-map__image img {
    margin-left: 0;
  }

  .tg-tribes__intro {
    padding-left: 0;
  }

  .tg-tribe-card {
    grid-template-columns: 1fr;
  }

  /* Stacked cards drop the water texture (Julia, Jun 10) — the card's 6px
   * radius + overflow:hidden then round the bottom corners naturally. */
  .tg-tribe-card__waterline {
    display: none;
  }

  /* Single-column card: the absolutely-filled photo needs an explicit
   * cell height once the body no longer shares its grid row. */
  .tg-tribe-card__media {
    min-height: 320px;
  }

  .tg-tribe-card__body {
    padding: 48px 32px;
  }

  .tg-acknowledgements__columns {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  /* Hero matches the homepage hero's mobile size, with the badge nearly
   * full-width like "Shaped by Sea & Story" there (Julia, Jun 10). */
  .tg-hero {
    height: clamp(240px, 74vw, 480px);
  }

  .tg-hero__badge {
    width: 88%;
  }

  /* Breathing room between the hero photo and the first headline. */
  .tg-map__inner {
    padding-top: 48px;
  }

  /* Full-bleed map, flush against the screen edge like the homepage map. */
  .tg-map .tg-map__image {
    margin-left: -24px;
    margin-right: -24px;
  }

  .tg-show-up,
  .tg-tribes,
  .tg-project-background,
  .tg-acknowledgements {
    padding-left: 0;
    padding-right: 0;
  }

  /* One consistent mobile headline size across the landing sections —
   * "Show Up in a Good Way" (28px) is the reference (Julia, Jun 10). */
  .tg-show-up__headline,
  .tg-tribe-card__name,
  .tg-acknowledgements__headline,
  .tg-map__copy p:first-child,
  .tg-map__copy h2:first-child,
  .tg-map__copy h3:first-child,
  .tg-tribes__intro h2,
  .tg-tribes__intro h3,
  .tg-tribes__intro p:first-child,
  .tg-project-background__copy h2,
  .tg-project-background__copy h3 {
    font-size: 28px;
  }

  /* "This Tribal Guide was made possible thanks to…" — editors can't add
   * spacing around it (the landing strips block gaps), so set it here.
   * .wp-block-group keeps this ahead of the landing's block-gap reset. */
  .tg-landing .wp-block-group.tg-acknowledgements__inner > p {
    margin-top: 40px;
    margin-bottom: 40px;
  }

  .tg-landing .wp-block-button__link,
  .tg-tribe .wp-block-button__link,
  .tg-button--directory .wp-block-button__link,
  .tg-tribe-card__cta .wp-block-button__link {
    min-width: 0;
    width: 100%;
  }
}

/* =====================================================================
 * Single Tribe page (e.g. /tribe/suquamish/)
 * Uses CSS custom properties --tg-accent and --tg-quote-bg set inline
 * on .tg-tribe by the template (defaults: #007598 / #d6d1c4).
 * ===================================================================== */
.tg-tribe {
  --tg-accent: #007598;
  --tg-quote-bg: #d6d1c4;
}

/* ---------- Tribe hero ---------- */
.tg-tribe-hero {
  position: relative;
  width: 100%;
  height: clamp(520px, 41vw, 793px);
  overflow: hidden;
}

.tg-tribe-hero__backlink {
  position: absolute;
  top: 36px;
  left: 57px;
  color: #ffffff;
  font-size: 18px;
  line-height: 1;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  z-index: 3;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.tg-tribe-hero__backlink .tg-arrowhead {
  flex: 0 0 auto;
  width: 10px;
  height: 12px;
}

.tg-tribe-hero__backlink:hover .tg-tribe-hero__backlink-label,
.tg-tribe-hero__backlink:focus .tg-tribe-hero__backlink-label {
  text-decoration: underline;
}

.tg-tribe-hero__backlink:hover,
.tg-tribe-hero__backlink:focus {
  color: #ffffff;
  text-decoration: none;
}

.tg-tribe-hero__stack {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(8px, 1.2vw, 24px);
  z-index: 2;
  padding: clamp(72px, 8vw, 140px) 24px clamp(80px, 9vw, 150px);
}

.tg-tribe-hero__logo {
  width: clamp(280px, 31vw, 592px);
}

.tg-tribe-hero__logo img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 6px;
}

.tg-tribe-hero__title-wrap {
  display: flex;
  justify-content: center;
  padding: 0 24px;
}

.tg-tribe-hero .tg-tribe-hero__title {
  color: #ffffff;
  font-size: clamp(44px, 4.5vw, 80px);
  line-height: 1.1;
  font-weight: 300;
  letter-spacing: 0.005em;
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 16px;
  text-align: center;
}

/* Pronunciation icon button */
.tg-pronounce {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 0;
  padding: 0 4px;
  cursor: pointer;
  vertical-align: middle;
}

.tg-pronounce img {
  width: 22px;
  height: 18px;
  display: block;
}

.tg-pronounce--inline img {
  width: 22px;
  height: 18px;
}

/* Inline pronunciation link */
.tg-pronounce-link {
  display: inline;
  background: transparent;
  border: 0;
  padding: 0;
  margin: 0;
  font: inherit;
  /* Astra's global <button> rules uppercase/space text — keep the word as
   * authored (Lushootseed casing is meaningful). */
  text-transform: none;
  letter-spacing: normal;
  color: var(--tg-accent, #007598);
  cursor: pointer;
  white-space: nowrap;
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
}

.tg-pronounce-link:hover,
.tg-pronounce-link:focus {
  text-decoration-thickness: 2px;
  outline: none;
}

.tg-pronounce-link:focus-visible {
  outline: 2px solid var(--tg-accent, #007598);
  outline-offset: 2px;
}

.tg-pronounce-link__word {
  font-weight: 700;
  font-family: "Calibri", sans-serif;
}

.tg-pronounce-link__icon {
  display: inline-block;
  width: 18px;
  height: 14px;
  margin-left: 4px;
  vertical-align: -2px;
  /* Recolor the blue speaker glyph to black (brightness(0) drives all RGB to
   * 0 while preserving alpha) — no separate black asset needed. */
  filter: brightness(0);
}

/* Inline audio link: any <a> in tribe body content pointing to an audio file
   gets a small speaker icon appended and plays inline via the popup. */
.tg-inline-audio-link {
  cursor: pointer;
  white-space: nowrap;
  font-family: "Calibri";
  font-weight: 700;
}

.tg-inline-audio-link__icon {
  display: inline-block;
  width: 18px;
  height: 14px;
  margin-left: 4px;
  vertical-align: -2px;
  /* Match the pronounce icon: render the speaker glyph black. */
  filter: brightness(0);
}

/* Floating popup containing the audio player */
.tg-pronounce-popup {
  position: absolute;
  z-index: 9999;
  max-width: calc(100vw - 16px);
}

.tg-pronounce-popup__player {
  max-width: min(689px, calc(100vw - 16px));
  border-radius: 6px;
}

.tg-pronounce-popup__close {
  position: absolute;
  top: -10px;
  right: -10px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 0;
  background: #7c2529;
  color: #ffffff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  padding: 0;
}

.tg-pronounce-popup__close:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 2px;
}

@media (max-width: 600px) {
  .tg-pronounce-popup__player {
    height: 56px;
    gap: 10px;
    padding: 0 14px;
  }

  .tg-pronounce-popup__player .tg-audio__time {
    font-size: 14px;
    min-width: 86px;
  }
}

/* ---------- Custom arrowhead glyph (back links, accordions) ---------- */
/* The chevron silhouette comes from the Sketch design (img/tribal-guide/
 * arrow-chevron.svg). We use it as a CSS mask so color follows the parent's
 * text color via `currentColor`.
 * NOTE: the glyph's natural orientation points RIGHT, so the direction
 * modifier names below are visually inverted (--right renders a LEFT-pointing
 * arrow, etc.). All existing markup relies on the rendered result — match the
 * classes used on tribe pages rather than the names' literal meaning. */
.tg-arrowhead {
  display: inline-block;
  width: 12px;
  height: 18px;
  background: currentColor;
  -webkit-mask: url("../img/tribal-guide/arrow-chevron.svg") center/contain
    no-repeat;
  mask: url("../img/tribal-guide/arrow-chevron.svg") center/contain no-repeat;
  vertical-align: middle;
  transition: transform 200ms ease;
}

.tg-arrowhead--lg {
  width: 24px;
  height: 36px;
}

/* Direction modifiers — natural shape points LEFT (← /◀). */
.tg-arrowhead--left {
  transform: rotate(0deg);
}
.tg-arrowhead--right {
  transform: rotate(180deg);
}
.tg-arrowhead--up {
  transform: rotate(90deg);
}
.tg-arrowhead--down {
  transform: rotate(-90deg);
}

/* Legacy classes kept as aliases so .tg-arrowhead--white / --tan markup
 * still picks up size + currentColor. */
.tg-arrowhead--white,
.tg-arrowhead--tan {
  /* color comes from parent — no-op here */
}

/* ---------- Breadcrumbs ---------- */
.tg-breadcrumbs {
  background: #ffffff;
  padding: 32px 0 24px;
  display: flex;
  justify-content: center;
}

.tg-breadcrumbs__link {
  color: var(--tg-accent);
  font-size: 18px;
  line-height: 1;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.tg-breadcrumbs__link:hover .tg-breadcrumbs__label,
.tg-breadcrumbs__link:focus .tg-breadcrumbs__label {
  text-decoration: underline;
}

.tg-breadcrumbs__link:hover,
.tg-breadcrumbs__link:focus {
  color: var(--tg-accent);
  text-decoration: none;
}

.tg-breadcrumbs__arrow {
  display: inline-block;
}

/* Accent-toned arrowhead uses background recoloring via accent variable */
.tg-breadcrumbs--accent .tg-arrowhead {
  width: 10px;
  height: 12px;
}

/* ---------- Accordion (full content area, including former Intro) ---------- */
.tg-accordion {
  background: #ffffff;
}

.tg-accordion__row {
  border: 0;
}

.tg-accordion__row + .tg-accordion__row {
  margin-top: 3px;
}

.tg-accordion__summary {
  background: #7c2529;
  color: var(--tg-quote-bg);
  min-height: 116px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 350px;
  cursor: pointer;
  list-style: none;
  font-weight: 700;
  font-size: 36px;
}

.tg-accordion__summary::-webkit-details-marker {
  display: none;
}

.tg-accordion__heading {
  font-size: 36px;
  line-height: 1.2;
  color: var(--tg-quote-bg);
  font-weight: 700;
}

.tg-accordion__arrow {
  color: var(--tg-quote-bg);
  display: inline-flex;
  align-items: center;
}

/* When accordion is open, flip the down chevron to point up. */
.tg-accordion__row[open] .tg-accordion__arrow .tg-arrowhead {
  transform: rotate(90deg);
}

.tg-accordion__body {
  padding: 48px 350px;
  font-size: 18px;
  line-height: 1.5;
  color: #222223;
  background: #ffffff;
}

.tg-accordion__body p {
  font-size: 18px;
  color: #222223;
  margin: 0 0 1em;
}

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

/* When the accordion body holds the flexible-content blocks, the inner blocks
 * supply their own max-widths / paddings, so reset the outer padding. */
.tg-accordion__body--blocks {
  padding: 80px 48px;
  display: flex;
  flex-direction: column;
  gap: 80px;
}

/* ACF inner-blocks wrapper sits between .tg-accordion__body--blocks and the
 * individual blocks, which collapses the parent's flex `gap`. Re-establish
 * the 80px rhythm on the wrapper itself. */
.tg-accordion__body--blocks > .acf-innerblocks-container {
  display: flex;
  flex-direction: column;
  gap: 80px;
}

/* Inline-video swap state: drop the placeholder play-button overlay so the
 * native <video> controls aren't obscured. */
.tg-tribe
  .wp-block-image.is-style-tg-video-placeholder.is-tg-video-active::after {
  content: none;
}

/* ---------- Pull quote ---------- */
.tg-pull-quote {
  background: #244c5a;
  color: #ffffff;
  margin: 0 auto;
  width: 100%;
  max-width: 1220px;
  padding: 72px 157px;
  position: relative;
  text-align: center;
  border-radius: 6px;
  border-left: 0; /* override any default blockquote border */
  box-sizing: border-box;
}

.tg-pull-quote__mark {
  display: block;
  width: 72px;
  height: auto;
  margin: 0 auto 24px;
  border-radius: 0; /* the speech-mark glyph is not a photo */
}

.tg-pull-quote__text {
  font-size: 36px;
  line-height: 1.3;
  font-weight: 400;
  color: #ffffff;
  margin: 0 0 24px;
  font-style: normal;
  border-left: 0;
  padding-left: 0;
}

.tg-pull-quote__text p {
  margin: 0 0 0.4em;
}

.tg-pull-quote__attribution {
  font-size: 18px;
  color: #ffffff;
  font-style: normal;
}

/* ---------- Two-column text + image ---------- */
.tg-tcti {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 96px;
  align-items: center;
  width: 100%;
  max-width: 1534px;
  margin: 0 auto;
}

.tg-tcti--image-right {
  grid-template-areas: "text image";
}

.tg-tcti--image-left {
  grid-template-areas: "image text";
}

.tg-tcti__text {
  grid-area: text;
  color: #222223;
  font-size: 18px;
  line-height: 1.5;
}

.tg-tcti__heading {
  font-size: 36px;
  line-height: 1.2;
  color: var(--tg-accent);
  font-weight: 700;
  margin: 0 0 16px;
}

.tg-tcti__body {
  font-size: 18px;
  line-height: 1.5;
  color: #222223;
  margin: 0 0 32px;
}

.tg-tcti__body p {
  margin: 0 0 1em;
  color: #222223;
  font-size: 18px;
}

.tg-tcti__image {
  grid-area: image;
  width: 100%;
  max-width: 749px;
  height: 499px;
  background: #d8d8d8;
  overflow: hidden;
  border-radius: 6px;
}

.tg-tcti__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ---------- Video ---------- */
.tg-video {
  width: 100%;
  max-width: 1220px;
  margin: 0 auto;
}

.tg-video__el {
  width: 100%;
  height: auto;
  max-height: 813px;
  background: #000;
  display: block;
  border-radius: 6px;
}

.tg-video__placeholder {
  position: relative;
  width: 100%;
  aspect-ratio: 1220 / 813;
  background: #d8d8d8;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  overflow: hidden;
}

.tg-video__placeholder img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tg-video__play {
  position: relative;
  width: 72px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}

.tg-video__play img {
  width: 72px;
  height: 72px;
  position: static;
  object-fit: contain;
}

/* ---------- Audio block ---------- */
.tg-audio {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 96px;
  align-items: center;
  width: 100%;
  max-width: 1534px;
  margin: 0 auto;
}

.tg-audio__placeholder {
  width: 100%;
  max-width: 748px;
  height: 499px;
  background: #d8d8d8;
  border-radius: 6px;
}

.tg-audio__copy {
  color: #222223;
}

.tg-audio__headline {
  font-size: 36px;
  line-height: 1.2;
  color: var(--tg-accent);
  font-weight: 700;
  margin: 0 0 16px;
}

.tg-audio__paragraph {
  font-size: 18px;
  line-height: 1.5;
  color: #222223;
  margin: 0 0 24px;
}

.tg-audio__paragraph p {
  font-size: 18px;
  color: #222223;
  margin: 0 0 1em;
}

.tg-audio__player {
  background: #7c2529;
  color: #ffffff;
  height: 72px;
  width: 100%;
  max-width: 689px;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 27px 0 18px;
  border-radius: 6px;
}

.tg-audio__playbtn {
  width: 36px;
  height: 36px;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
  flex: 0 0 36px;
  position: relative;
}

.tg-audio__playbtn img {
  width: 100%;
  height: 100%;
  display: block;
}

.tg-audio__player--playing .tg-audio__playbtn img {
  visibility: hidden;
}

.tg-audio__player--playing .tg-audio__playbtn::before,
.tg-audio__player--playing .tg-audio__playbtn::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 7px;
  height: 24px;
  background: #ffffff;
  border-radius: 2px;
  transform: translateY(-50%);
}

.tg-audio__player--playing .tg-audio__playbtn::before {
  left: calc(50% - 9px);
}

.tg-audio__player--playing .tg-audio__playbtn::after {
  left: calc(50% + 2px);
}

.tg-audio__time {
  font-size: 18px;
  color: #ffffff;
  min-width: 106px;
  font-variant-numeric: tabular-nums;
}

.tg-audio__progress {
  flex: 1 1 auto;
  height: 6px;
  background: rgba(255, 255, 255, 0.35);
  position: relative;
  cursor: pointer;
}

.tg-audio__progress-fill {
  display: block;
  height: 100%;
  width: 0;
  background: #ffffff;
  transition: width 100ms linear;
}

.tg-audio__volume {
  flex: 0 0 22px;
  display: inline-flex;
  align-items: center;
}

.tg-audio__volume img {
  width: 22px;
  height: 18px;
  display: block;
}

/* ---------- Two-column intro text ---------- */
.tg-intro-text {
  width: 100%;
  max-width: 1220px;
  margin: 0 auto;
}

.tg-intro-text__body,
.tg-intro-text__body p {
  font-size: 36px;
  line-height: 1.3;
  color: var(--tg-accent);
}

.tg-intro-text__body p {
  margin: 0 0 0.6em;
}

.tg-intro-text__body p:last-child {
  margin-bottom: 0;
}

/* ---------- Single-tribe responsive ---------- */
@media (max-width: 1280px) {
  .tg-accordion__summary {
    padding-left: 96px;
    padding-right: 96px;
  }

  .tg-accordion__body {
    padding-left: 96px;
    padding-right: 96px;
  }

  .tg-accordion__body--blocks {
    padding: 64px 96px;
  }

  .tg-pull-quote {
    padding: 56px 64px;
  }
}

@media (max-width: 1024px) {
  .tg-tcti,
  .tg-audio {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .tg-tcti--image-right,
  .tg-tcti--image-left {
    grid-template-areas: "image" "text";
  }

  .tg-tcti__image,
  .tg-audio__placeholder {
    max-width: none;
    height: auto;
    aspect-ratio: 749 / 499;
  }

  .tg-accordion__summary {
    padding-left: 32px;
    padding-right: 32px;
  }

  .tg-accordion__heading {
    font-size: 28px;
  }

  .tg-accordion__body {
    padding: 32px;
  }

  .tg-accordion__body--blocks {
    padding: 48px 32px;
    gap: 56px;
  }

  .tg-pull-quote {
    padding: 48px 32px;
  }

  .tg-pull-quote__text,
  .tg-tcti__heading,
  .tg-audio__headline,
  .tg-intro-text__body,
  .tg-intro-text__body p {
    font-size: 24px;
  }
}

@media (max-width: 640px) {
  .tg-tribe-hero__backlink {
    left: 24px;
    top: 24px;
    font-size: 14px;
  }

  .tg-tribe-hero .tg-tribe-hero__title {
    font-size: 32px;
  }

  .tg-accordion__summary {
    min-height: 88px;
    padding: 20px 24px;
  }

  /* Match the mobile menu's 18x12 arrows (Julia, Jun 10) — base glyph size
   * renders 18x12 once the --down rotation is applied. */
  .tg-accordion__arrow .tg-arrowhead--lg {
    width: 12px;
    height: 18px;
  }

  .tg-accordion__heading {
    font-size: 22px;
  }

  .tg-accordion__body {
    padding: 24px;
  }

  .tg-pull-quote__text {
    font-size: 22px;
  }

  .tg-audio__player {
    flex-wrap: wrap;
    height: auto;
    padding: 12px 16px;
  }

  .tg-audio__time {
    min-width: 0;
  }
}

/* =========================================================================
   Core block styling inside .tg-tribe (block-editor migration, 2026-05-13)
   These rules map core/pullquote, core/columns, core/video, and core/image
   into the existing Tribal Guide design system.
   ========================================================================= */

/* ---------- Pull quote (core/pullquote with two variants) ---------- */
.wp-block-pullquote.is-style-tg-pull-quote-large,
.wp-block-pullquote.is-style-tg-pull-quote-small {
  background: #244c5a;
  color: #ffffff;
  width: 100%;
  max-width: 1220px;
  margin: 0 auto;
  border: 0;
  border-radius: 6px;
  box-sizing: border-box;
  text-align: center;
  position: relative;
}

.wp-block-pullquote.is-style-tg-pull-quote-large {
  padding: 72px 157px;
  font-size: 36px;
}

.wp-block-pullquote.is-style-tg-pull-quote-small {
  padding: 56px 120px;
  max-width: 1000px;
  font-size: 22px;
}

.wp-block-pullquote.is-style-tg-pull-quote-large::before,
.wp-block-pullquote.is-style-tg-pull-quote-small::before {
  content: "";
  display: block;
  width: 72px;
  height: 56px;
  margin: 0 auto 24px;
  background: url(../img/tribal-guide/quote_blue.png) center / contain no-repeat;
}

.wp-block-pullquote.is-style-tg-pull-quote-small::before {
  width: 48px;
  height: 38px;
  margin-bottom: 16px;
}

/* Suppress WP block-library's default text-glyph quote so only our PNG icon shows. */
.wp-block-pullquote.is-style-tg-pull-quote-large blockquote::before,
.wp-block-pullquote.is-style-tg-pull-quote-large blockquote::after,
.wp-block-pullquote.is-style-tg-pull-quote-small blockquote::before,
.wp-block-pullquote.is-style-tg-pull-quote-small blockquote::after {
  content: none;
}

.wp-block-pullquote.is-style-tg-pull-quote-large blockquote,
.wp-block-pullquote.is-style-tg-pull-quote-small blockquote {
  border-left: 0;
  padding-left: 0;
  margin: 0;
  color: #ffffff;
}

.wp-block-pullquote.is-style-tg-pull-quote-large blockquote p,
.wp-block-pullquote.is-style-tg-pull-quote-small blockquote p {
  font-size: inherit;
  line-height: 1.3;
  color: #ffffff;
  margin: 0 0 24px;
  font-weight: 400;
  font-style: normal;
}

.wp-block-pullquote.is-style-tg-pull-quote-small blockquote p {
  line-height: 1.4;
}

.wp-block-pullquote.is-style-tg-pull-quote-large blockquote cite,
.wp-block-pullquote.is-style-tg-pull-quote-small blockquote cite {
  font-size: 0.5em;
  color: #ffffff;
  font-style: normal;
  display: block;
}

/* Larger speaker name under the big quote (still below the 36px quote text). */
.wp-block-pullquote.is-style-tg-pull-quote-large blockquote cite {
  font-size: 24px;
}

/* ---------- Two-column Text + Image (core/columns variant) ---------- */
.tg-tribe .wp-block-columns.is-style-tg-tcti {
  width: 100%;
  max-width: 1534px;
  margin: 0 auto;
  gap: 96px;
  align-items: center;
}

.tg-tribe .wp-block-columns.is-style-tg-tcti .wp-block-column {
  flex-basis: 0;
  flex-grow: 1;
}

/*
.tg-tribe .wp-block-columns.is-style-tg-tcti .tg-tcti__heading,
.tg-tribe .wp-block-columns.is-style-tg-tcti h3.wp-block-heading {
	font-size: 36px;
	line-height: 1.2;
	color: var(--tg-accent);
	font-weight: 700;
	margin: 0 0 16px;
}
*/

.tg-tribe .wp-block-columns.is-style-tg-tcti .tg-tcti__body {
  margin: 0 0 32px;
}

.tg-tribe .wp-block-columns.is-style-tg-tcti .tg-tcti__body p {
  font-size: 18px;
  line-height: 1.5;
  color: #222223;
  margin: 0 0 1em;
}

.tg-tribe .wp-block-columns.is-style-tg-tcti .tg-tcti__body p:last-child {
  margin-bottom: 0;
}

.tg-tribe .wp-block-columns.is-style-tg-tcti .wp-block-image,
.tg-tribe .wp-block-columns.is-style-tg-tcti .tg-tcti__image-placeholder {
  width: 100%;
  border-radius: 6px;
  overflow: hidden;
  margin: 0;
}

.tg-tribe .wp-block-columns.is-style-tg-tcti .wp-block-image img {
  width: 100%;
  height: auto;
  display: block;
}

.tg-tribe .wp-block-columns.is-style-tg-tcti .wp-block-buttons {
  margin-top: 0;
}

/* ---------- Video (core/video or placeholder image) ---------- */
.tg-tribe .wp-block-video {
  width: 100%;
  max-width: 1220px;
  margin: 0 auto;
}

.tg-tribe .wp-block-video.is-style-tg-video {
  position: relative;
}

/* Gray scrim over the video until the viewer hits play (matches Sketch). */
.tg-tribe .wp-block-video.is-style-tg-video::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.35);
  border-radius: 6px;
  z-index: 1;
  transition: opacity 0.2s ease;
}

.tg-tribe .wp-block-video.is-style-tg-video.is-tg-playing::before {
  opacity: 0;
  pointer-events: none;
}

/* Big centered play button over the video (matches Sketch). */
.tg-tribe .wp-block-video.is-style-tg-video .tg-video-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 72px;
  height: 72px;
  min-width: 0;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  cursor: pointer;
  z-index: 2;
  transition: opacity 0.2s ease;
}

.tg-tribe .wp-block-video.is-style-tg-video .tg-video-overlay img {
  width: 72px;
  height: 72px;
  display: block;
}

/* Hide the overlay once the video is playing. */
.tg-tribe .wp-block-video.is-style-tg-video.is-tg-playing .tg-video-overlay {
  opacity: 0;
  pointer-events: none;
}

.tg-tribe .wp-block-video.is-style-tg-video video,
.tg-tribe .wp-block-video video {
  width: 100%;
  height: auto;
  max-height: 813px;
  background: #000;
  border-radius: 6px;
  display: block;
}

.tg-tribe .wp-block-image.is-style-tg-video-placeholder {
  width: 100%;
  max-width: 1220px;
  margin: 0 auto;
  position: relative;
}

.tg-tribe .wp-block-image.is-style-tg-video-placeholder img {
  width: 100%;
  height: auto;
  max-height: 813px;
  border-radius: 6px;
  display: block;
  object-fit: cover;
}

.tg-tribe .wp-block-image.is-style-tg-video-placeholder::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 96px;
  height: 96px;
  background: url(../img/tribal-guide/play-button.png) center / contain
    no-repeat;
  pointer-events: none;
}

/* ---------- Button (core/button) inside two-col body ---------- */
.tg-tribe
  .wp-block-columns.is-style-tg-tcti
  .wp-block-button
  .wp-block-button__link {
  margin-top: 8px;
}

/* ---------- Default border-radius for body-content images ---------- */
.tg-tribe .wp-block-image img {
  border-radius: 6px;
}

/* =========================================================================
   Responsive overrides for block-editor components (appended last so they
   win the cascade against the desktop core-block rules above).
   These rules target shared classes only, so every tribe inherits them.
   ========================================================================= */

@media (max-width: 1280px) {
  .wp-block-pullquote.is-style-tg-pull-quote-large {
    padding: 56px 80px;
    font-size: 30px;
  }

  .wp-block-pullquote.is-style-tg-pull-quote-small {
    padding: 48px 64px;
  }
}

@media (max-width: 1024px) {
  .tg-tribe .wp-block-columns.is-style-tg-tcti {
    gap: 32px;
  }

  .tg-accordion__body--blocks > .acf-innerblocks-container {
    gap: 56px;
  }

  .wp-block-pullquote.is-style-tg-pull-quote-large {
    padding: 48px;
    font-size: 26px;
  }

  .wp-block-pullquote.is-style-tg-pull-quote-small {
    padding: 40px;
    font-size: 20px;
  }
}

@media (max-width: 640px) {
  .tg-breadcrumbs {
    padding-left: 24px;
    padding-right: 24px;
  }

  .tg-breadcrumbs__link {
    font-size: 14px;
    gap: 8px;
    line-height: 1.2;
    text-align: left;
  }

  .tg-accordion__summary {
    gap: 16px;
  }

  .tg-accordion__heading {
    line-height: 1.25;
  }

  .tg-accordion__body--blocks {
    padding: 32px 24px;
    gap: 40px;
  }

  .tg-accordion__body--blocks > .acf-innerblocks-container {
    gap: 40px;
  }

  .tg-pull-quote {
    padding: 32px 24px;
  }

  .wp-block-pullquote.is-style-tg-pull-quote-large {
    padding: 32px 24px;
    font-size: 22px;
    max-width: none;
  }

  .wp-block-pullquote.is-style-tg-pull-quote-small {
    padding: 28px 24px;
    font-size: 18px;
    max-width: none;
  }

  .wp-block-pullquote.is-style-tg-pull-quote-large::before {
    width: 56px;
    height: 44px;
    margin-bottom: 16px;
  }

  .wp-block-pullquote.is-style-tg-pull-quote-small::before {
    width: 40px;
    height: 32px;
    margin-bottom: 12px;
  }

  .tg-tribe .wp-block-columns.is-style-tg-tcti {
    gap: 24px;
  }

  .tg-tcti__heading,
  .tg-audio__headline,
  .tg-intro-text__body,
  .tg-intro-text__body p {
    font-size: 22px;
    line-height: 1.3;
  }

  .tg-audio__player {
    gap: 12px;
  }

  .tg-audio__progress {
    flex-basis: 100%;
    order: 3;
  }
}

/* =========================================================================
   Tribal Guide block patterns (registered in inc/tribal-guide-patterns.php).
   Appended last so they win the cascade over earlier rules.
   ========================================================================= */

/* ---------- Pull quote: cite at 24px (client-confirmed Jun 9) ----------
 * Bigger than body copy (18px), smaller than the quote (36px). */
.wp-block-pullquote.is-style-tg-pull-quote-large blockquote cite,
.wp-block-pullquote.is-style-tg-pull-quote-small blockquote cite {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.4;
}

/* Hold the quote at 36px through small desktop instead of shrinking at 1280. */
@media (min-width: 1024px) {
  .wp-block-pullquote.is-style-tg-pull-quote-large {
    font-size: 36px;
  }
}

/* Clamp quote on smaller viewports so it scales smoothly down to mobile. */
@media (max-width: 1023px) {
  .wp-block-pullquote.is-style-tg-pull-quote-large {
    font-size: clamp(22px, 3vw + 0.75rem, 32px);
    padding: clamp(32px, 5vw, 48px);
  }
}

/* ---------- One-column text (skinnier 906px container) ---------- */
.tg-tribe .wp-block-group.is-style-tg-one-col-text {
  width: 100%;
  max-width: 906px;
  margin-left: auto;
  margin-right: auto;
}

/* ---------- One-column image ---------- */
.tg-tribe .wp-block-image.is-style-tg-one-col-image {
  width: 100%;
  max-width: 1220px;
  margin: 0 auto;
}

.tg-tribe .wp-block-image.is-style-tg-one-col-image img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 6px;
}

/* ---------- Headshot (circle) used in the audio module ---------- */
.tg-tribe .wp-block-image.is-style-tg-headshot {
  margin: 0 0 24px;
}

.tg-tribe .wp-block-image.is-style-tg-headshot img {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 50%;
  display: block;
  background: #d8d8d8;
}

/* ---------- Audio module row (Jun 9 mockup) ----------
 * Small circle headshot on the left; intro paragraph + audio player on the
 * right. The headline stays above the row. Stacks below 640px. */
.tg-tribe .tg-audio-row {
  display: flex;
  align-items: flex-start;
  gap: 24px;
}

.tg-tribe .tg-audio-row > .wp-block-image.is-style-tg-headshot {
  flex: 0 0 100px;
  width: 100px;
  margin: 0;
}

/* !important beats editor-set inline width/height (e.g. legacy 215px). */
.tg-tribe .tg-audio-row > .wp-block-image.is-style-tg-headshot img {
  width: 100px !important;
  height: 100px !important;
}

.tg-tribe .tg-audio-row__content {
  flex: 1;
  min-width: 0;
}

.tg-tribe .wp-block-columns.is-style-tg-tcti .tg-audio-row .tg-tcti__body {
  margin-bottom: 16px;
}

@media (max-width: 640px) {
  .tg-tribe .tg-audio-row {
    flex-direction: column;
    gap: 16px;
  }
}

/* ---------- Two-column text-only variant (no image gutter math) ---------- */
.tg-tribe .wp-block-columns.is-style-tg-tcti.tg-tcti--text-only {
  gap: 64px;
}

/* ---------- Three-column cards variant ---------- */
.tg-tribe .wp-block-columns.is-style-tg-tcti.tg-tcti--three-col {
  gap: 36px;
  align-items: stretch;
}

.tg-tribe
  .wp-block-columns.is-style-tg-tcti.tg-tcti--three-col
  > .wp-block-column {
  display: flex;
  flex-direction: column;
}

.tg-tribe
  .wp-block-columns.is-style-tg-tcti.tg-tcti--three-col
  .wp-block-buttons {
  margin-top: auto;
}

/* ---------- Divider ---------- */
.tg-tribe .wp-block-separator.is-style-tg-divider {
  border: 0;
  width: 100%;
  max-width: 1530px;
  height: 1px;
  background: #244c5a;
  margin: 8px auto 24px;
  opacity: 1;
}

/* ---------- Audio: transcript button (three dots) ---------- */
.tg-audio__transcript-btn {
  flex: 0 0 22px;
  width: 22px;
  height: 36px;
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  margin-left: -4px;
}

.tg-audio__transcript-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #ffffff;
  display: block;
}

.tg-audio__transcript-btn:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------- Audio: volume button + slider popover ---------- */
.tg-audio__volume {
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
  position: relative;
  flex: 0 0 22px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.tg-audio__volume:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 2px;
  border-radius: 4px;
}

.tg-audio__volume-popover {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: #244c5a;
  border-radius: 6px;
  padding: 12px 10px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
  display: none;
  z-index: 60;
}

.tg-audio__volume-popover[data-open="true"] {
  display: block;
}

.tg-audio__volume-popover input[type="range"] {
  -webkit-appearance: slider-vertical;
  appearance: slider-vertical;
  writing-mode: vertical-lr;
  direction: rtl;
  width: 24px;
  height: 96px;
  accent-color: #ffffff;
  background: transparent;
  cursor: pointer;
}

/* ---------- Audio: transcript modal ---------- */
.tg-transcript-modal {
  border: 0;
  padding: 0;
  background: transparent;
  max-width: min(620px, 92vw);
  width: 100%;
}

.tg-transcript-modal::backdrop {
  background: rgba(0, 0, 0, 0.55);
}

.tg-transcript-modal__card {
  background: #e7f1f5;
  color: #222223;
  border-radius: 8px;
  padding: 40px 40px 32px;
  position: relative;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
}

.tg-transcript-modal__close,
body .tg-transcript-modal .tg-transcript-modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px !important;
  min-width: 0 !important;
  height: 36px !important;
  min-height: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  font-size: 28px;
  line-height: 1;
  color: #244c5a !important;
  cursor: pointer;
  border-radius: 50%;
  box-shadow: none !important;
}

.tg-transcript-modal__close:hover,
.tg-transcript-modal__close:focus-visible {
  background: rgba(36, 76, 90, 0.1);
  outline: 0;
}

.tg-transcript-modal__title {
  font-size: 20px;
  font-weight: 700;
  color: #244c5a;
  margin: 0 0 12px;
}

.tg-transcript-modal__body {
  font-size: 16px;
  line-height: 1.6;
  max-height: 60vh;
  overflow-y: auto;
}

.tg-transcript-modal__body p {
  margin: 0 0 1em;
}

.tg-transcript-modal__body p:last-child {
  margin-bottom: 0;
}

@media (max-width: 640px) {
  .tg-transcript-modal__card {
    padding: 32px 24px 24px;
  }
}

/* ---------- Carousel ---------- */
.tg-carousel {
  position: relative;
  width: 100%;
  max-width: 1534px;
  margin: 0 auto;
  /* visible so the nav arrows can sit in the page gutter just outside the
   * cards on wide screens; the track does its own horizontal clipping. */
  overflow: visible;
}

.tg-carousel__track {
  display: flex;
  flex-wrap: nowrap;
  gap: 37px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  margin: 0;
  padding: 4px 0;
  scrollbar-width: none;
  -ms-overflow-style: none;
  /* The carousel group uses layout:constrained, which would otherwise cap the
   * track at the theme content-size (~1200px) and center it. Let the track
   * fill the full carousel width so the 3 cards match the three-column row
   * below it. */
  max-width: none;
  width: 100%;
}

.tg-carousel__track::-webkit-scrollbar {
  display: none;
}

.tg-carousel__track > .tg-carousel__card {
  flex: 0 0 calc((100% - 74px) / 3);
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  min-width: 0;
  /* The track is a flow-layout group, so WP's block-gap rule adds a
   * margin-block-start to every card except the first (`* + *`). In a flex
   * row that margin pushes cards 2+ down, leaving the first card sitting
   * ~24px higher. Zero it so all cards top-align. */
  margin-block-start: 0;
  margin-top: 0;
}

.tg-carousel__track > .tg-carousel__card .wp-block-buttons {
  margin-top: auto;
}

.tg-carousel__track > .tg-carousel__card .wp-block-image img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 6px;
}

/* Editors detach the carousel pattern and rebuild the track as core columns
 * (wp:columns / wp:column — e.g. to duplicate cards). Core's column CSS then
 * breaks the carousel: `.wp-block-columns > .wp-block-column` (0,3,0) beats
 * the 3-up flex-basis above, and below 782px core forces
 * `flex-wrap: wrap !important` + `flex-basis: 100% !important` (stacking).
 * Mirror the track/card rules at higher specificity with !important so a
 * columns-based track behaves identically to the canonical group markup. */
.tg-carousel .wp-block-columns.tg-carousel__track {
  display: flex;
  flex-wrap: nowrap !important;
  gap: 37px;
}

.tg-carousel .wp-block-columns.tg-carousel__track > .wp-block-column {
  flex-grow: 0 !important;
  flex-shrink: 0 !important;
  flex-basis: calc((100% - 74px) / 3) !important;
  margin: 0;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

@media (max-width: 1024px) {
  .tg-carousel .wp-block-columns.tg-carousel__track {
    gap: 24px;
  }
  .tg-carousel .wp-block-columns.tg-carousel__track > .wp-block-column {
    flex-basis: calc((100% - 24px) / 2) !important;
  }
}

@media (max-width: 640px) {
  .tg-carousel .wp-block-columns.tg-carousel__track > .wp-block-column {
    flex-basis: 85% !important;
  }
}

.tg-carousel__fade {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 120px;
  pointer-events: none;
  z-index: 2;
  opacity: 0;
  transition: opacity 150ms linear;
}

.tg-carousel__fade--left {
  left: 0;
  background: linear-gradient(to right, #ffffff 20%, rgba(255, 255, 255, 0));
}

.tg-carousel__fade--right {
  right: 0;
  background: linear-gradient(to left, #ffffff 20%, rgba(255, 255, 255, 0));
}

.tg-carousel[data-can-prev="true"] .tg-carousel__fade--left,
.tg-carousel[data-can-next="true"] .tg-carousel__fade--right {
  opacity: 1;
}

.tg-carousel__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  background: transparent;
  border: 0;
  box-shadow: none;
  color: var(--tg-accent);
  cursor: pointer;
  z-index: 3;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: opacity 150ms ease;
}

/* Keep the accent color on hover (overrides the global button hover red);
 * just dim slightly for feedback. The arrows are bare <button>s, so Astra's
 * global button:hover background/border must be explicitly neutralized. */
.tg-carousel__arrow:hover,
.tg-carousel__arrow:focus {
  color: var(--tg-accent);
  opacity: 0.7;
  background: transparent;
  border: 0;
  box-shadow: none;
  outline: none;
}

/* Chevron drawn as a currentColor mask (same glyph as .tg-arrowhead) so it
 * takes the accent color; the source <img> is hidden. */
.tg-carousel__arrow img {
  display: none;
}

.tg-carousel__arrow::before {
  content: "";
  width: 18px;
  height: 24px;
  background: currentColor;
  -webkit-mask: url("../img/tribal-guide/arrow-chevron.svg") center/contain
    no-repeat;
  mask: url("../img/tribal-guide/arrow-chevron.svg") center/contain no-repeat;
}

/* Default: tuck the arrows against the outer edges of the cards. The cards
 * now fill the full container, so there is no in-row margin to sit in until
 * the viewport is wide enough to expose a page gutter (handled below). */
.tg-carousel__arrow--prev {
  left: 8px;
}

.tg-carousel__arrow--prev::before {
  transform: rotate(180deg);
}

.tg-carousel__arrow--next {
  right: 8px;
}

/* On wide screens there is room in the page gutter, so move the arrows fully
 * outside the cards (matching the request). The 1660px floor guarantees at
 * least ~60px of gutter beside the 1534px-max carousel, so the arrows never
 * spill past the viewport. */
@media (min-width: 1660px) {
  .tg-carousel__arrow--prev {
    left: -64px;
  }
  .tg-carousel__arrow--next {
    right: -64px;
  }
}

.tg-carousel[data-can-prev="true"] .tg-carousel__arrow--prev,
.tg-carousel[data-can-next="true"] .tg-carousel__arrow--next {
  display: inline-flex;
}

.tg-carousel__arrow:focus-visible {
  outline: 2px solid #244c5a;
  outline-offset: 2px;
}

@media (max-width: 1024px) {
  .tg-carousel__track > .tg-carousel__card {
    flex-basis: calc((100% - 37px) / 2);
  }
  .tg-carousel__track {
    gap: 24px;
  }
  .tg-carousel__track > .tg-carousel__card {
    flex-basis: calc((100% - 24px) / 2);
  }
}

@media (max-width: 640px) {
  .tg-carousel__track > .tg-carousel__card {
    flex-basis: 85%;
  }
  .tg-carousel__fade {
    width: 48px;
  }
  .tg-carousel__arrow {
    width: 40px;
    height: 40px;
  }
}

/* =====================================================================
 * Tribal Directory page (/tribal-guide/directory/)
 * Static index of the 21 Tribal nations. Design: "Tribal Directory" page.
 * ===================================================================== */
.tg-directory {
  --tg-accent: #007598;
  background: #ffffff;
}

/* Slim photo bar at the top, hosting the same back-link component as the
 * tribe hero (.tg-tribe-hero__backlink) so the button looks and behaves
 * identically across pages. */
.tg-directory__backbar {
  position: relative;
  min-height: 96px;
  overflow: hidden;
}

.tg-directory__backbar-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
}

.tg-directory__backbar-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.42);
}

/* Vertically center the backlink in the slim bar (the component positions
 * itself at top: 36px for the full-height tribe hero). */
.tg-directory__backbar .tg-tribe-hero__backlink {
  top: 50%;
  transform: translateY(-50%);
}

.tg-directory__inner {
  max-width: 906px;
  margin: 0 auto;
  padding: 72px 24px 0;
}

.tg-directory__title {
  /* Match the site's page titles (e.g. "Itineraries"): navy, light weight
   * (Julia, Jun 10). */
  font-size: clamp(40px, 5vw, 64px);
  line-height: 1.1;
  color: #244c5a;
  font-weight: 300;
  margin: 0 0 40px;
}

.tg-directory__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.tg-directory__item {
  margin: 0 0 28px;
}

.tg-directory__name {
  display: block;
  font-size: 24px;
  line-height: 1.25;
  font-weight: 700;
  color: var(--tg-accent);
  text-decoration: none;
}

a.tg-directory__name:hover,
a.tg-directory__name:focus {
  text-decoration: underline;
}

.tg-directory__address {
  display: block;
  font-size: 16px;
  line-height: 1.5;
  color: #555558;
  margin-top: 2px;
}

.tg-directory__rule {
  border: 0;
  border-top: 1px solid #244c5a;
  margin: 48px 0 0;
}

@media (max-width: 640px) {
  .tg-directory__inner {
    padding-top: 48px;
  }
  .tg-directory__title {
    margin-bottom: 28px;
  }
  /* The breadcrumb already sits inside the padded __inner — its own mobile
   * padding doubles up here and wraps the label to two lines. Drop it so
   * the back button stays on one line like the Tribe pages. */
  .tg-directory__inner .tg-breadcrumbs {
    padding-left: 0;
    padding-right: 0;
  }
}
