/* KeepItDirect builder-owned fixes (Oct 19 2026). Loaded after the Down Yonder master CSS on every built site.
   Keep this small and scoped: it only fixes layout problems and styles builder-only sections. */

/* Long contact emails wrap inside their card instead of running past the edge (no ellipsis). */
.footer-grid > .footer-card { min-width: 0; }
.footer-card a.contact-line,
.book-meta a[href^="mailto:"] { overflow-wrap: anywhere; word-break: normal; }
/* Long emails (builder adds .has-long-email when the address is > 30 chars): give the contact card enough width for the
   address on one line. The column never shrinks below the email's one-line width; the after-@ wrap above stays as the
   phone fallback (single-column layout below 760px). */
@media (min-width: 760px) and (max-width: 1023px) {
  .footer-grid.has-long-email { grid-template-columns: minmax(0, 1fr) minmax(max-content, 1.2fr); }
  .footer-grid.has-long-email > .footer-card.listed-card { grid-column: 1 / -1; }
}
@media (min-width: 1024px) {   /* small laptops: the short "Also listed on" card gives up width so the intro card isn't cramped */
  .footer-grid.has-long-email { grid-template-columns: minmax(0, 1.3fr) minmax(max-content, 1.3fr) minmax(0, .8fr); }
}
@media (min-width: 1280px) {
  .footer-grid.has-long-email { grid-template-columns: minmax(0, 1fr) minmax(max-content, 1.3fr) minmax(0, 1fr); }
}
@media (min-width: 760px) {
  .footer-grid.has-long-email .footer-card a.contact-line { white-space: nowrap; }
}

/* "Also listed on" buttons: on phones the Host Portal kit's flex-basis (8.5rem) turned each pill into a 136px-tall blob
   inside the master's column layout. Keep them normal-height pills below 640px. */
@media (max-width: 639px) {
  .footer-card .listed-btns .listed-btn { flex: 0 0 auto; }
}

/* ---------- Host local guide (only present when site.json has local_guide) ---------- */
.lg { margin-top: 1.25rem; }
.lg-head { padding: 1.4rem 1.5rem; margin-bottom: 1rem; border: 1px solid var(--line); border-radius: 1rem; }
.lg-head h3 { font-weight: 700; font-size: 1.25rem; color: var(--ink); margin-bottom: .35rem; }
.lg-head p { color: var(--muted); }
.lg-groups { display: grid; gap: 1rem; }
@media (min-width: 900px) {
  .lg-groups { grid-template-columns: 1.15fr .85fr; align-items: start; }
}
.lg-side { display: grid; gap: 1rem; min-width: 0; }
.lg-group { padding: 1.4rem 1.4rem .6rem; min-width: 0; }
.lg-group-title { display: flex; align-items: center; gap: .65rem; font-weight: 700; font-size: 1.15rem; color: var(--ink); margin-bottom: .5rem; }
.lg-icon { flex: none; width: 2.2rem; height: 2.2rem; display: grid; place-items: center; border-radius: .65rem; background: var(--rose-soft); color: var(--rose); }
.lg-icon svg { width: 1.15rem; height: 1.15rem; }
.lg-list { list-style: none; display: grid; }
.lg-item + .lg-item { border-top: 1px solid var(--line); }
.lg-link { display: flex; align-items: center; justify-content: space-between; gap: .9rem; padding: .85rem .5rem; margin: 0 -.5rem; border-radius: .7rem; color: inherit; text-decoration: none; transition: background .15s ease; }
.lg-link:hover { background: var(--wash); }
.lg-link:focus-visible { outline: 2px solid var(--rose); outline-offset: 2px; }
.lg-main { display: grid; gap: .15rem; min-width: 0; }
.lg-name { font-weight: 700; color: var(--ink); font-size: 1rem; }
.lg-note { color: var(--muted); font-size: .92rem; line-height: 1.45; }
.lg-addr { display: flex; align-items: flex-start; gap: .3rem; color: var(--ink); font-size: .86rem; font-weight: 500; margin-top: .15rem; }
.lg-addr svg { flex: none; width: .9rem; height: .9rem; margin-top: .15rem; color: var(--muted); }
.lg-dir { flex: none; display: inline-flex; align-items: center; gap: .35rem; padding: .45rem .8rem; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); color: var(--rose); font-weight: 600; font-size: .85rem; white-space: nowrap; }
.lg-dir svg { width: .95rem; height: .95rem; }
.lg-link:hover .lg-dir { border-color: var(--rose); }
.lg-foot { margin-top: .9rem; color: var(--muted); font-size: .85rem; }
@media (max-width: 560px) {
  .lg-side { display: grid; gap: 1rem; min-width: 0; }
.lg-group { padding: 1.15rem 1.1rem .4rem; }
  .lg-link { flex-direction: column; align-items: stretch; gap: .6rem; }
  .lg-dir { align-self: flex-start; }
}

/* ---------- Headings: no lone orphan word (Oct 19 2026) ---------- */
h1, h2, h3, h4, .section-head h2, .hero h1 { text-wrap: balance; }
.section-head p, .hero .lede, .area-copy p, .lg-head p { text-wrap: pretty; }
/* Desktop: let section headings use a little more width so short titles stay on one line; intro text keeps its old measure. */
@media (min-width: 1024px) {
  .section-head { max-width: 50rem; }
  .section-head p { max-width: 40rem; margin-left: auto; margin-right: auto; }
}

/* ---------- Hero: optional "good to know" line + opt-in high-contrast intro (Oct 29 2026) ---------- */
.hero .hero-note { max-width: 38rem; margin-top: .8rem; font-size: .98rem; font-weight: 500; color: #fff; }
.hero--contrast .hero-veil {
  background:
    linear-gradient(to top, rgba(20, 20, 20, .9) 0%, rgba(20, 20, 20, .72) 45%, rgba(20, 20, 20, .38) 75%, rgba(20, 20, 20, .2) 100%),
    linear-gradient(to right, rgba(20, 20, 20, .5), transparent 65%);
}
.hero--contrast h1, .hero--contrast .place, .hero--contrast .lede, .hero--contrast .hero-note { text-shadow: 0 1px 2px rgba(0, 0, 0, .65), 0 2px 14px rgba(0, 0, 0, .45); }
.hero--contrast .lede { color: #fff; }
@media (max-width: 640px) {
  .hero--contrast .hero-veil { background: linear-gradient(to top, rgba(20, 20, 20, .92) 0%, rgba(20, 20, 20, .78) 60%, rgba(20, 20, 20, .45) 100%); }
}

/* ---------- Hero: opt-in compact hero (title + short line + buttons) with an About block below (Oct 29 2026) ---------- */
.hero--compact .place { margin-bottom: 1.5rem; }
.hero--contrast.hero--compact .hero-veil {
  background:
    linear-gradient(to top, rgba(20, 20, 20, .85) 0%, rgba(20, 20, 20, .55) 30%, rgba(20, 20, 20, .12) 62%, rgba(20, 20, 20, 0) 100%),
    linear-gradient(to right, rgba(20, 20, 20, .35), transparent 60%);
}
.hero-about { background: var(--paper); padding: 2.4rem 0 1.4rem; border-bottom: 1px solid var(--line); }
.hero-about-inner { width: min(72rem, calc(100% - 2rem)); margin: 0 auto; }
.hero-about .lede { max-width: 44rem; margin: 0; font-size: 1.08rem; line-height: 1.65; color: var(--ink); text-shadow: none; }
.hero-about .hero-note { max-width: 44rem; margin: 1rem 0 0; padding: .75rem 1rem; border-left: 3px solid var(--rose); background: var(--wash); border-radius: .5rem; color: var(--ink); font-size: .98rem; font-weight: 500; text-shadow: none; }
.hero-about .hero-stats { margin: 1.4rem 0 0; max-width: 48rem; }
.hero-about .stat { color: var(--muted); }
.hero-about .stat strong { color: var(--ink); }
.hero-about .stat:not(:last-child)::after { color: var(--line); }
@media (max-width: 640px) {
  .hero--contrast.hero--compact .hero-veil { background: linear-gradient(to top, rgba(20, 20, 20, .85) 0%, rgba(20, 20, 20, .5) 32%, rgba(20, 20, 20, .08) 60%, rgba(20, 20, 20, 0) 100%); }
  .hero-about { padding: 1.8rem 0 1.2rem; }
}

/* ---------- About block: optional stat tiles + amenity chips (about_stats / about_chips, Oct 29 2026) ---------- */
.about-stats { list-style: none; margin: 1.4rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; max-width: 56rem; }
.about-stat { display: flex; align-items: flex-start; gap: .7rem; padding: .85rem .9rem; border: 1px solid var(--line); border-radius: .9rem; background: var(--paper); min-width: 0; }
.about-stat-icon { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 2.2rem; height: 2.2rem; border-radius: .65rem; background: var(--rose-soft, #FDE8EE); color: var(--rose); }
.about-stat-icon svg { width: 1.2rem; height: 1.2rem; }
.about-stat-text { display: grid; gap: .1rem; min-width: 0; line-height: 1.3; }
.about-stat-text strong { font-weight: 700; color: var(--ink); font-size: 1rem; }
.about-stat-text span { color: var(--muted); font-size: .86rem; }
.about-chips { list-style: none; margin: .8rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.about-chip { display: inline-flex; align-items: center; gap: .4rem; padding: .4rem .8rem; border-radius: 999px; background: var(--wash); border: 1px solid var(--line); color: var(--ink); font-size: .88rem; font-weight: 500; }
.about-chip svg { width: .95rem; height: .95rem; color: var(--rose); }
@media (min-width: 900px) { .about-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 380px) { .about-stat { padding: .75rem .7rem; gap: .55rem; } .about-stat-icon { width: 2rem; height: 2rem; } }
