/* V79 · legibilidad, regreso y ajuste seguro de titulares */
:root {
  --v79-forest: #063c33;
  --v79-ink: #0b1512;
  --v79-copper: #d36a3f;
  --v79-lime: #d7ff63;
}

.story-signal,
.archive-story--night,
.village-atlas,
.mining-night,
.dark-card {
  color: #fff;
}

.story-signal p,
.story-signal li,
.story-signal small,
.story-signal .source-chip {
  color: #fff;
}

.story-signal .story-signal__eyebrow {
  color: #ffdd87;
}

.v79-anchor-marker {
  display: block;
  position: relative;
  top: -7rem;
  visibility: hidden;
}

.v79-return-to-cards {
  position: fixed;
  z-index: 490;
  left: max(1rem, env(safe-area-inset-left));
  bottom: max(1rem, env(safe-area-inset-bottom));
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  max-width: min(29rem, calc(100vw - 2rem));
  min-height: 3.25rem;
  padding: .72rem 1rem;
  border: 2px solid #fff;
  border-radius: 999px;
  background: var(--v79-ink);
  color: #fff;
  box-shadow: 0 10px 28px rgba(0, 0, 0, .28);
  font-weight: 900;
  line-height: 1.15;
  text-decoration: none;
  transition: transform .2s ease, background .2s ease, box-shadow .2s ease;
}

.v79-return-to-cards:hover,
.v79-return-to-cards:focus-visible {
  transform: translateY(-3px);
  background: var(--v79-forest);
  box-shadow: 0 14px 34px rgba(0, 0, 0, .34);
}

.v79-return-to-cards > span:first-child {
  display: grid;
  width: 1.8rem;
  height: 1.8rem;
  flex: 0 0 1.8rem;
  place-items: center;
  border-radius: 50%;
  background: var(--v79-lime);
  color: var(--v79-ink);
}

.v79-return-to-cards--other-page {
  border-color: var(--v79-lime);
}

body.village-alive:not(.home) .page-hero h1,
body.village-alive:not(.home) .section-hero h1,
.page-hero h1,
.section-hero h1 {
  max-width: min(100%, 13ch);
  overflow: visible;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: auto;
  text-wrap: balance;
}

[class*="card"],
[class*="Card"],
.adaptive-page-summary__highlights li,
.story-scrap,
.service-entry {
  min-width: 0;
}

[class*="card"] h2,
[class*="card"] h3,
[class*="card"] strong,
.adaptive-page-summary__highlights strong,
.story-scrap h2,
.switch-card strong {
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: normal;
  text-wrap: balance;
}

.adaptive-page-summary__highlights li {
  grid-template-rows: auto auto 1fr;
}

.adaptive-page-summary__highlights li > span {
  overflow: visible;
}

.contribute-board h2 {
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: normal;
  text-wrap: balance;
}

.v79-evidence-story {
  margin: 2rem 0;
  padding: clamp(1.1rem, 3vw, 1.75rem);
  border: 1px solid rgba(11, 21, 18, .14);
  border-radius: 1.5rem;
  background: linear-gradient(145deg, #f4f7f4, #fff);
  box-shadow: 0 18px 40px rgba(11, 21, 18, .08);
}

.v79-evidence-story__eyebrow {
  margin: 0 0 .4rem;
  color: #08705e;
  font-size: .7rem;
  font-weight: 950;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.v79-evidence-story h2,
.v79-evidence-story h3 {
  margin: .2rem 0 .6rem;
  color: var(--v79-ink);
  letter-spacing: -.04em;
}

.v79-evidence-story__lead {
  max-width: 72ch;
  color: #3d4f48;
  font-size: 1.05rem;
  line-height: 1.65;
}

.v79-evidence-grid,
.v79-stay-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .8rem;
  margin-top: 1rem;
}

.v79-evidence-grid article,
.v79-stay-card {
  min-width: 0;
  padding: 1rem;
  border: 1px solid rgba(11, 21, 18, .13);
  border-radius: 1rem;
  background: #fff;
}

.v79-evidence-grid span,
.v79-stay-card > span {
  display: block;
  margin-bottom: .35rem;
  color: #08705e;
  font-size: .68rem;
  font-weight: 950;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.v79-evidence-grid strong,
.v79-stay-card strong {
  display: block;
  color: var(--v79-ink);
  font-size: 1.05rem;
}

.v79-evidence-grid p,
.v79-stay-card p {
  margin: .4rem 0 0;
  color: #4d5d56;
  font-size: .88rem;
  line-height: 1.52;
}

.v79-source-row {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
  margin-top: 1rem;
}

.v79-source-row a,
.v79-stay-card a {
  display: inline-flex;
  margin-top: .7rem;
  color: #075f51;
  font-weight: 900;
  text-underline-offset: 3px;
}

.v79-practical-alert {
  margin: 1.5rem 0;
  padding: 1.1rem 1.2rem;
  border-left: 6px solid var(--v79-copper);
  border-radius: .5rem 1.2rem 1.2rem .5rem;
  background: #fff2ea;
}

.v79-practical-alert strong {
  display: block;
  color: #6d2d18;
}

.v79-practical-alert p {
  margin: .4rem 0 0;
  color: #533b33;
}

@media (max-width: 820px) {
  body.village-alive:not(.home) .page-hero h1,
  body.village-alive:not(.home) .section-hero h1,
  .page-hero h1,
  .section-hero h1 {
    max-width: 100%;
    font-size: clamp(2.65rem, 11.5vw, 5.2rem);
    line-height: .84;
    letter-spacing: -.06em;
  }

  .contribute-board h2 {
    font-size: clamp(2.9rem, 11vw, 5rem);
    line-height: .86;
    letter-spacing: -.055em;
  }

  .v79-return-to-cards {
    bottom: max(5.7rem, calc(4.8rem + env(safe-area-inset-bottom)));
    font-size: .86rem;
  }
}

@media (max-width: 680px) {
  .v79-evidence-grid,
  .v79-stay-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 420px) {
  body.village-alive:not(.home) .page-hero h1,
  body.village-alive:not(.home) .section-hero h1,
  .page-hero h1,
  .section-hero h1 {
    font-size: clamp(2.4rem, 11vw, 3.65rem);
  }

  .contribute-board h2 {
    font-size: clamp(2.45rem, 10.5vw, 3.5rem);
  }

  .v79-return-to-cards {
    right: max(.7rem, env(safe-area-inset-right));
    left: max(.7rem, env(safe-area-inset-left));
    justify-content: center;
    max-width: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .v79-return-to-cards {
    transition: none;
  }
}
