/* Core app: home feed, +, directory, mappa page */

/* Compact navigation for small desktops; the brand has its own centered row. */
@media (min-width: 850px) and (max-width: 1000px) {
  html body #header #masthead #tbp-desktop-nav { gap: 4px !important; padding: 2px !important; }
  html body #header #masthead #tbp-desktop-nav .tbp-desktop-nav__item { min-width: 52px !important; width: 52px; padding: 2px 3px 4px !important; }
  html body #header #masthead #tbp-desktop-nav .tbp-desktop-nav__item--colombo { width: 64px; }
  html body #header #masthead #tbp-desktop-nav .tbp-desktop-nav__item--migliora { width: 88px; }
  html body #header #masthead #tbp-desktop-nav .tbp-desktop-nav__label { font-size: 11px !important; line-height: 1.2 !important; margin-top: 4px !important; text-align: center; }
  html body #header #masthead #tbp-desktop-nav .tbp-lava-icon { width: 40px !important; height: 40px !important; min-width: 40px !important; min-height: 40px !important; max-width: 40px !important; max-height: 40px !important; margin: 0 !important; }
}

/* Phone-only guard is driven by physical orientation in core-app.js. */
html.tbp-phone-landscape,
html.tbp-phone-landscape body {
  overflow: hidden !important;
  overscroll-behavior: none;
}

#tbp-portrait-guard:not([open]) { display: none; }
#tbp-portrait-guard[open] {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  box-sizing: border-box;
  margin: 0;
  padding: max(20px, env(safe-area-inset-top)) max(24px, env(safe-area-inset-right)) max(20px, env(safe-area-inset-bottom)) max(24px, env(safe-area-inset-left));
  border: 0;
  border-radius: 0;
  background: #fff;
  color: #084828;
  display: grid;
  place-items: center;
  overflow-y: auto;
  text-align: center;
}
#tbp-portrait-guard::backdrop { background: #fff; }
.tbp-portrait-guard__content { max-width: 480px; }
#tbp-portrait-guard h2 {
  margin: 14px 0 8px;
  color: #084828;
  font-size: clamp(20px, 4vw, 28px);
  line-height: 1.2;
}
#tbp-portrait-guard p {
  margin: 0;
  color: #4B5563;
  font-size: 15px;
  line-height: 1.5;
}

html {
  scroll-behavior: auto !important;
}

.jet-engine-query-edit-modal {
  display: none !important;
}

.tbp-dir-page,
.tbp-info-page,
.tbp-mestieri-page,
.tbp-404 {
  width: min(1280px, calc(100% - 24px));
  margin: 0 auto;
  padding: 16px 0 calc(var(--tbp-app-bar-h, 88px) + 36px);
  color: #084828;
}

.tbp-cerca-page {
  margin: 0 auto;
  padding-bottom: calc(var(--tbp-app-bar-h, 88px) + 36px);
  color: #084828;
}

.tbp-home-feed {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 8px 0 calc(var(--tbp-app-bar-h, 88px) + 16px);
  color: #084828;
}

@media (max-width: 849px) {
  .tbp-home-feed {
    padding-top: 8px;
  }
}

.tbp-dir-page__head h1,
.tbp-info-page__head h1,
.tbp-mestieri-page__head h1 {
  margin: 0 0 6px;
  font-size: 1.7rem;
  font-weight: 750;
  letter-spacing: -0.04em;
  line-height: 1.15;
}

.tbp-info-page .container {
  width: min(720px, 100%);
  margin: 0 auto;
}

.tbp-info-page p,
.tbp-info-page li {
  color: rgba(8, 72, 40, 0.82);
  font-size: 1rem;
  line-height: 1.5;
}

.tbp-info-page a {
  color: #084828;
  font-weight: 650;
}

body.page-template-page-info .page-title,
body.page-template-page-il-progetto .page-title {
  display: none !important;
}

.tbp-dir-page__head p,
.tbp-info-page__head + p,
.tbp-mestieri-page__lead {
  margin: 0 0 16px;
  color: rgba(8, 72, 40, 0.72);
  font-size: 0.95rem;
  line-height: 1.4;
}

/* Informational guides only: one compact header, then at most three blocks. */
.tbp-info-page--guide > .container {
  padding-inline: 0;
}

@media (min-width: 850px) {
  .tbp-info-page--guide {
    padding-bottom: 16px;
  }
}

body.faq .tbp-info-page.tbp-info-page--guide {
  width: min(1280px, calc(100% - 24px));
}

body.faq .tbp-info-page.tbp-info-page--guide > .container {
  width: min(720px, 100%);
}

.tbp-info-page--guide .tbp-info-page__head {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

.tbp-info-page--guide .tbp-info-page__head :is(h1, p) {
  margin: 0;
}

.tbp-info-page--guide .tbp-info-page__intro {
  color: var(--tbp-ink, #123326);
  line-height: 1.5;
}

.tbp-info-page--guide .tbp-guide {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.tbp-info-page--guide .tbp-guide :is(section, details) {
  min-width: 0;
  margin: 0;
  padding: 12px;
  border: 1px solid var(--tbp-line, #E6EDE8);
  border-radius: 16px;
  background: var(--tbp-night-surface, var(--tbp-white, #FFFFFF));
}

.tbp-info-page--guide .tbp-guide :is(h2, p) {
  margin: 0;
  overflow-wrap: anywhere;
}

.tbp-info-page--guide .tbp-guide h2 {
  margin-bottom: 8px;
  color: var(--tbp-green, #084828);
  font-size: 1.125rem;
  line-height: 1.3;
}

.tbp-info-page--guide .tbp-guide p {
  color: var(--tbp-ink, #123326);
}

.tbp-info-page--guide .tbp-guide p + p {
  margin-top: 8px;
}

.tbp-info-page--guide .tbp-guide p a:not(.tbp-dir-card__cta) {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.tbp-info-page--guide .tbp-guide details {
  padding: 0;
}

.tbp-info-page--guide .tbp-guide summary {
  min-height: 44px;
  padding: 12px;
  border-radius: 16px;
  color: var(--tbp-green, #084828);
  font-weight: 700;
  line-height: 1.4;
  overflow-wrap: anywhere;
  cursor: pointer;
}

.tbp-info-page--guide .tbp-guide details[open] > summary {
  background: var(--tbp-sage, #F4F7F5);
}

.tbp-info-page--guide .tbp-guide__answer {
  padding: 8px 12px 12px;
}

.tbp-info-page--guide .tbp-guide__action .tbp-dir-card__cta {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  width: fit-content;
  margin: 0;
  padding: 12px 16px;
  border: 0;
  color: var(--tbp-white, #FFFFFF);
  white-space: normal;
  text-align: center;
  line-height: 1.4;
}

.tbp-home-feed__more {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 20px 0 8px;
}

.tbp-home-feed__sentinel {
  width: 100%;
  height: 1px;
  pointer-events: none;
}

.tbp-home-feed__btn--fallback[hidden] {
  display: none !important;
}

.tbp-home-feed__btn,
.tbp-plus-sheet__btn,
.tbp-dir-card__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border-radius: var(--radius-md, 16px);
  border: 1px solid var(--tbp-green, #084828);
  background: var(--tbp-green, #084828);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

/* Directory CTAs keep their action contrast, not generic editorial link colors. */
body:not(.login):not(.registrazione) a.tbp-dir-card__cta,
body:not(.login):not(.registrazione) a.tbp-dir-card__cta:is(:hover, :focus-visible) {
  color: var(--tbp-white, #FFFFFF);
}

body:not(.login):not(.registrazione) a.tbp-dir-card__cta:not(:is([disabled], [aria-disabled="true"], [aria-busy="true"], .disabled, .is-disabled, .loading, .is-loading, .processing)):not(:where(fieldset[disabled] *, [aria-disabled="true"] *, [aria-busy="true"] *, .loading *, .is-loading *, form.processing *)):is(:hover, :focus-visible) {
  background: var(--tbp-green-dark, #06381F);
  border-color: var(--tbp-green-dark, #06381F);
}

.tbp-plus-sheet__btn.tbp-btn--premium {
  background: var(--tbp-cta-gold, var(--tbp-gold, #C9A227)) !important;
  border: 0 !important;
  color: var(--tbp-gold-label, #fff) !important;
  text-shadow: var(--tbp-gold-label-shadow, none) !important;
}

.tbp-plus-sheet__btn.tbp-btn--secondary {
  background: #fff;
  border-color: var(--tbp-line, rgba(8, 72, 40, .14));
  color: var(--tbp-green, #084828);
}

.tbp-home-feed__btn[disabled] {
  opacity: 0.55;
  cursor: wait;
}

.tbp-home-feed__done,
.tbp-home-feed__empty,
.tbp-dir-empty,
.tbp-home-feed__live {
  margin: 0;
  text-align: center;
  color: rgba(8, 72, 40, 0.7);
}

#tbp-plus-sheet {
  position: fixed;
  inset: 0;
  z-index: 100020;
}

#tbp-plus-sheet[hidden] {
  display: none !important;
}

.tbp-plus-sheet__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 72, 40, 0.28);
}

.tbp-plus-sheet__panel {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(var(--tbp-app-bar-h, 72px) + env(safe-area-inset-bottom, 0px));
  background: #fff;
  border-radius: 24px 24px 0 0;
  padding: 12px 20px 24px;
  color: #084828;
}

.tbp-plus-sheet__handle {
  width: 40px;
  height: 4px;
  margin: 4px auto 12px;
  border-radius: 99px;
  background: rgba(8, 72, 40, 0.2);
}

.tbp-plus-sheet__close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: #084828;
  font-size: 1.6rem;
  cursor: pointer;
}

.tbp-plus-sheet__actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
}

.tbp-dir-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
}

.tbp-dir-card {
  background: #fff;
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.tbp-dir-card__media {
  aspect-ratio: 1;
  background: #F4F7F5;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tbp-dir-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Senza foto, il simbolo del ruolo non deve occupare una cornice fotografica vuota. */
.tbp-dir-card__media--placeholder {
  --tbp-icon: 80px;
  aspect-ratio: auto;
  flex: 0 0 112px;
  height: 112px;
  background: transparent;
}

.tbp-dir-card__media--logo img {
  object-fit: contain;
  padding: 16px;
}

.tbp-dir-card__body {
  padding: 12px 14px 16px;
}

.tbp-dir-card__body h2 {
  margin: 0 0 4px;
  font-size: 1.05rem;
}

.tbp-dir-card__badge.is-verified {
  color: #3A7A9A;
  font-weight: 700;
}

.tbp-dir-card__cta {
  margin-top: 10px;
  width: 100%;
}

.tbp-mestieri-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.tbp-mestieri-card {
  background: #fff;
  border-radius: 18px;
  padding: 4px 10px 12px;
  text-decoration: none;
  color: #084828;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  text-align: center;
}

.tbp-mestieri-card img {
  width: 80px;
  height: 80px;
  margin: 0;
  object-fit: contain;
  filter: none;
}

.tbp-mestieri-card strong {
  margin: -10px 0 0;
  font-size: 0.92rem;
  line-height: 1.15;
}

.tbp-mestieri-card span {
  margin: 2px 0 0;
  color: rgba(8, 72, 40, 0.68);
  font-size: 0.78rem;
  line-height: 1.2;
}

body.tbp-core-mappa .tbp-map-page {
  width: 100%;
  max-width: none;
  padding: 0;
}

body.tbp-core-mappa .tbp-map-page__intro {
  padding: 12px 16px 8px;
}

body.tbp-core-mappa .tbp-map-wrapper--page,
body.tbp-core-mappa #tbp-map-esperienze {
  width: 100% !important;
}

body.tbp-core-mappa #tbp-map-esperienze .leaflet-container,
body.tbp-core-mappa #tbp-map-esperienze.leaflet-container {
  width: 100% !important;
  height: 100% !important;
}

@media (max-width: 849px) {
  html body.tbp-core-mappa #footer,
  html body.tbp-core-mappa .footer-wrapper,
  html body.page-template-page-mappa #footer,
  html body.page-template-page-mappa .footer-wrapper {
    display: none !important;
  }

  html body.tbp-core-mappa {
    overflow: hidden !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  html body.tbp-core-mappa .tbp-map-page {
    position: fixed !important;
    top: var(--tbp-header-h, 88px) !important;
    bottom: calc(var(--tbp-app-bar-h, 118px) + var(--tbp-app-bar-inset, 12px) + env(safe-area-inset-bottom, 0px)) !important;
    left: 0 !important;
    right: 0 !important;
    display: grid !important;
    grid-template-rows: auto minmax(0, 1fr) !important;
    min-height: 0 !important;
    height: auto !important;
    overflow: hidden !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  html body.tbp-core-mappa .tbp-map-page__intro {
    display: block !important;
    margin: 0 !important;
    padding: 8px 12px !important;
    min-width: 0;
    max-width: none;
    background: #fff;
  }

  html body.tbp-core-mappa .tbp-map-page__intro h1 {
    margin: 0 0 2px;
    font-size: 1.25rem;
    line-height: 1.2;
  }

  html body.tbp-core-mappa .tbp-map-page__lede {
    margin: 0;
    font-size: .8125rem;
    line-height: 1.4;
    color: #5D786B;
  }

  html body.tbp-core-mappa #tbp-map-wrapper.tbp-map-wrapper--page,
  html body.tbp-core-mappa #tbp-map-wrapper.tbp-map-wrapper--page .tbp-map-frame,
  html body.tbp-core-mappa #tbp-map-wrapper.tbp-map-wrapper--page #tbp-map-esperienze {
    position: relative !important;
    width: 100% !important;
    max-width: none !important;
    height: 100% !important;
    min-height: 0 !important;
    margin: 0 !important;
    border-radius: 0 !important;
    touch-action: none !important;
  }

  html body.tbp-core-mappa #tbp-map-wrapper.tbp-map-wrapper--page .tbp-map-head {
    display: none !important;
  }

  html body.tbp-core-mappa #tbp-map-wrapper.tbp-map-wrapper--page #tbp-map-esperienze {
    position: absolute !important;
    inset: 0 !important;
  }

  body.tbp-core-mappa #tbp-map-esperienze.tbp-map-two-finger::after {
    display: none !important;
  }
}

html body #tbp-map-sheet,
html body #tbp-map-sheet.is-open {
  display: none !important;
}

@media (max-width: 849px) {
  html body.tbp-core-mappa .tbp-map-area-actions {
    position: absolute !important;
    top: 10px !important;
    right: 12px !important;
    left: auto !important;
    z-index: 100020 !important;
    pointer-events: none;
  }

  html body.tbp-core-mappa .tbp-map-area-actions .tbp-map-search-area-btn {
    pointer-events: auto;
  }
}

#tbp-map-esperienze.tbp-map-two-finger::after {
  content: "Usa due dita per spostare la mappa";
  position: absolute;
  left: 12px;
  bottom: 12px;
  z-index: 4;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #084828;
  font-size: 0.75rem;
  font-weight: 650;
  pointer-events: none;
}

@media (min-width: 600px) {
  .tbp-dir-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 768px) {
  .tbp-mestieri-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .tbp-dir-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.tbp-desktop-nav,
.tbp-header-desktop-slot {
  display: none;
}

@media (max-width: 849px) {
  html body #masthead .tbp-header-inner {
    display: flex !important;
    justify-content: flex-end !important;
    align-items: center !important;
    width: 100% !important;
    max-width: none !important;
  }

  html body #masthead .tbp-header-desktop-slot,
  html body #tbp-desktop-nav {
    display: none !important;
  }
}

@media (min-width: 850px) {
  html body #header,
  html body #masthead,
  html body .header-wrapper {
    position: sticky;
    top: 0;
    min-height: 112px;
    overflow: visible !important;
  }

  html body #masthead .tbp-header-inner,
  html body #masthead .header-inner {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    height: auto !important;
    gap: 0;
    width: 100% !important;
    max-width: none !important;
    padding-left: clamp(12px, 2vw, 32px) !important;
    padding-right: clamp(12px, 2vw, 32px) !important;
  }

  html body #masthead #logo,
  html body #logo {
    --tbp-header-brand-mark: 80px;
    --tbp-header-wordmark-size: 32px;
    order: 0 !important;
    flex: 0 0 auto !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    text-align: center !important;
  }

  html body #masthead .tbp-header-desktop-slot {
    justify-content: center;
    max-width: 100%;
    margin-inline: auto;
  }

  html body #masthead .tbp-header-mobile-left,
  html body #masthead .tbp-header-mobile-right,
  html body #masthead .show-for-medium {
    display: none !important;
  }

  html body #masthead .tbp-header-desktop-slot,
  html body #tbp-desktop-nav,
  .tbp-desktop-nav {
    display: flex !important;
    position: static;
    align-items: center;
    gap: 6px;
    margin: 0 auto;
    padding: 4px;
    border-radius: 22px;
    /* La barra resta senza lastra: il fondo bianco ce l'ha ogni voce, e due
       fondi annidati sarebbero di nuovo un alone (Elind, 13/9). */
    background: transparent;
    z-index: 2;
    transform: none;
  }

  .tbp-desktop-nav__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 72px;
    padding: 2px 8px 8px;
    border: 0;
    background: transparent;
    color: #084828;
    text-decoration: none;
    font: inherit;
    cursor: pointer;
    border-radius: 18px;
  }

  /* Sopra la mappa le voci erano testo nudo su strade e nomi di paesi, e non
     si leggevano: Elind ha chiesto di rimettere i campi bianchi dietro le
     icone (13/9). Non torna pero' la lastra di prima. Quella era una sola,
     larga e semitrasparente — un alone. Questa e' una pastiglia per voce,
     piena e stretta attorno all'icona: fa da fondo al testo senza velare la
     mappa fra una voce e l'altra.

     Sparisce anche la trasparenza che teneva le voci inattive al 82%: su un
     fondo pieno smorzava la pastiglia insieme alla scritta. La voce attiva si
     riconosce dalla riga d'oro qui sotto, che basta e non aggiunge superficie. */
  .tbp-desktop-nav__item {
    background: #FFFFFF;
    box-shadow: 0 2px 10px rgba(8, 72, 40, 0.16);
  }

  .tbp-desktop-nav__item.is-active,
  .tbp-desktop-nav__item:hover {
    background: #FFFFFF;
    box-shadow: 0 3px 14px rgba(8, 72, 40, 0.22);
  }

  .tbp-desktop-nav__item {
    position: relative;
  }

  .tbp-desktop-nav__item.is-active::after,
  .tbp-desktop-nav__item:hover::after {
    content: "";
    position: absolute;
    left: 18%;
    right: 18%;
    bottom: 4px;
    height: 2px;
    border-radius: 2px;
    background: #C9A227;
  }

  .tbp-desktop-nav__item:hover::after {
    opacity: .55;
  }

  .tbp-desktop-nav__item.is-active::after {
    opacity: 1;
  }

  .tbp-desktop-nav__item span,
  .tbp-desktop-nav__label {
    font-size: 0.68rem;
    font-weight: 650;
    letter-spacing: -0.03em;
    margin-top: -8px;
  }

  .tbp-desktop-nav__item img.tbp-lava-icon,
  .tbp-desktop-nav__item .tbp-lava-icon {
    width: 80px;
    height: 80px;
    object-fit: contain;
    filter: none;
  }

  .tbp-desktop-nav__item--colombo {
    min-width: 72px;
  }

  .tbp-desktop-nav__item--colombo img.tbp-lava-icon,
  .tbp-desktop-nav__item--colombo .tbp-lava-icon {
    width: 60px;
    height: 60px;
    min-width: 60px;
    min-height: 60px;
    max-width: 60px;
    max-height: 60px;
    margin-top: 10px;
    margin-bottom: 10px;
  }

  .tbp-desktop-nav__item--colombo .tbp-desktop-nav__label {
    margin-top: -8px;
    max-width: 5.8rem;
    line-height: 1.15;
    text-align: center;
  }

  html body.tbp-has-app-bar {
    padding-bottom: 24px !important;
  }
}

body.error404 #main,
html body.error404 #main {
  min-height: 0 !important;
  background: #F4F7F5 !important;
  color: #084828 !important;
}

.tbp-404 {
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  gap: 10px;
  padding: 16px 0 24px;
}

.tbp-404__code {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #D0161A;
}

.tbp-404 h1 {
  margin: 0;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  letter-spacing: -0.04em;
}

.tbp-404__lede {
  margin: 0 0 8px;
  color: rgba(8, 72, 40, 0.72);
  max-width: 36rem;
}

.tbp-404__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tbp-404__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border-radius: 16px;
  background: #084828;
  color: #fff !important;
  font-weight: 700;
  text-decoration: none;
}

.tbp-404__cta--ghost {
  background: #fff;
  color: #084828 !important;
  border: 1px solid rgba(8, 72, 40, 0.16);
}


/* Intercom su mobile ignora vertical_padding: il launcher sale sopra l'app bar. */
@media (max-width: 849px) {
  html body .intercom-lightweight-app-launcher,
  html body iframe[name="intercom-launcher-frame"],
  html body .intercom-launcher-frame,
  html body .intercom-dfosxs {
    bottom: 112px !important;
  }
}

/* === «Il progetto»: le due schede «Impara / Insegna un mestiere» (29/9) ===
   Commento 10 di Alessia. Da computer il titolo era 2,9 volte il testo della
   scheda (Flatsome, «.banner h2»): 61 px in un riquadro largo 190 px, cosi'
   «mestiere» usciva dalla scheda e veniva tagliato. Sul retro, al passaggio
   del mouse, le sue tre righe finivano sopra il testo. Ora il titolo ha una
   misura che segue lo schermo ma non supera 44 px, il suo riquadro prende quasi
   tutta la scheda e va a capo in due righe pari: sta sempre intero e finisce
   prima del testo del retro. Solo da 850 px (computer): su telefono e tablet
   il titolo stava gia' intero e non cambia. */
@media (min-width: 850px) {
  body.page-template-page-il-progetto #tbp-il-progetto .card .banner .text-box:has(> .text-box-content h2) {
    width: 88% !important;
  }
  body.page-template-page-il-progetto #tbp-il-progetto .card .banner .text-box-content h2 {
    font-size: clamp(1.75rem, 2.9vw, 2.5rem) !important;
    line-height: 1.05 !important;
    letter-spacing: -0.01em;
    text-wrap: balance;
    overflow-wrap: break-word;
    margin-bottom: 0 !important;
  }
}
/* === fine «Il progetto» 29/9 === */

/* «Registra il tuo Comune o ente» (29/9): le due righe sotto il titolo. */
body.registrazione-comune .tbp-ente-intro {
  max-width: 34em;
  margin: 4px auto 18px !important;
  color: rgba(8, 72, 40, 0.82);
  font-size: 1rem;
  line-height: 1.5;
  text-align: center;
}
html[data-tbp-theme="dark"] body.registrazione-comune .tbp-ente-intro {
  color: #DCE7E0;
}
