/* TempoLegal | Cristian + Anthony integration | 2026-11-27.
   Scope: 18 service landings, both ES and EN, plus safe-area for shared floating button.
   No content, slugs, navigation, SEO titles, or language strings are changed here. */
:root { --tl-action-radius: 999px; }
body.tl-code-page[data-service-page] {
  overflow-x: clip;
}
body.tl-code-page[data-service-page] main,
body.tl-code-page[data-service-page] main :is(section, article, aside, .container, .wrap, .tl-container) {
  min-width: 0;
}
/* C1: never let a feature panel enlarge the hero's grid track. */
body.tl-code-page[data-service-page] :is(.service-hero-grid,.hero-grid,.hero-grid-own,.monthly-grid,.tl-approved-card-grid,.operations-grid) > * {
  min-width: 0;
  max-width: 100%;
}
body.tl-code-page[data-service-page] :is(.service-overview,.agenda,.change-preview,.hero-routes,.tl-approved-card,.service-hero-copy) {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  overflow-wrap: anywhere;
}
body.tl-code-page[data-service-page] :is(.service-overview,.agenda,.change-preview,.hero-routes) :is(p,li,span,a,strong) {
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
}
body.tl-code-page[data-service-page] :is(.service-overview,.agenda,.change-preview,.hero-routes) :is(a,button) {
  white-space: normal;
}
/* C3: one clear shape, accessible focus and predictable arrow alignment across services.
   Keep the site's primary/secondary color hierarchy. */
body.tl-code-page[data-service-page] main :is(.service-actions,.actions,.tl-approved-actions) {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 12px;
  min-width: 0;
}
body.tl-code-page[data-service-page] main :is(.service-actions,.actions,.tl-approved-actions) > a,
body.tl-code-page[data-service-page] main :is(a.button, a.text-link, a[class*="cta"]) {
  border-radius: var(--tl-action-radius);
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  max-width: 100%;
  min-width: 0;
  min-height: 48px;
  overflow-wrap: anywhere;
  text-align: center;
  line-height: 1.35;
  text-decoration: none;
}
body.tl-code-page[data-service-page] main :is(.service-actions,.actions,.tl-approved-actions) a > :is(span,svg),
body.tl-code-page[data-service-page] main :is(a.button, a.text-link) > :is(span,svg) {
  flex-shrink: 0;
}
body.tl-code-page[data-service-page] main a:is(.button,.text-link):focus-visible,
body.tl-code-page[data-service-page] main :is(.service-actions,.actions,.tl-approved-actions) a:focus-visible {
  outline: 3px solid #e4ad35;
  outline-offset: 3px;
}
@media (hover:hover) and (prefers-reduced-motion:no-preference) {
  body.tl-code-page[data-service-page] main :is(.service-actions,.actions,.tl-approved-actions) > a:hover,
  body.tl-code-page[data-service-page] main a:is(.button,.text-link):hover {
    transform: translateY(-2px);
  }
}
/* C1: SAS, Holdings: the 436px desktop side panel previously held too-wide content. */
body.tl-code-page:is([data-service-page="sas-incorporation"],[data-service-page="holding-structures"]) .service-hero-grid {
  display: grid;
  grid-template-columns: minmax(0,1.15fr) minmax(0,.85fr);
  align-items: start;
  gap: clamp(20px,3vw,48px);
}
body.tl-code-page:is([data-service-page="sas-incorporation"],[data-service-page="holding-structures"]) .service-overview {
  width: 100%;
  padding: clamp(18px,2.1vw,30px);
  overflow-x: clip;
}
body.tl-code-page:is([data-service-page="sas-incorporation"],[data-service-page="holding-structures"]) .service-overview :is(p,a) {
  width: auto;
  max-width: 100%;
  overflow-wrap: anywhere;
}
/* C2: Contracts: a compact first screen and CTA with no orphaned arrow. */
body.tl-code-page[data-service-page="contratos-empresariales"] .tl-approved-hero {
  padding-block: clamp(32px,4vw,56px) clamp(28px,3vw,44px);
}
body.tl-code-page[data-service-page="contratos-empresariales"] .tl-approved-hero .tl-container {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: clamp(10px,1.4vw,18px);
  min-width: 0;
}
body.tl-code-page[data-service-page="contratos-empresariales"] .tl-approved-hero h1 {
  font-size: clamp(2.45rem,4.1vw,4.1rem);
  line-height: 1.07;
  max-width: 23ch;
  margin: 0;
  text-wrap: balance;
}
body.tl-code-page[data-service-page="contratos-empresariales"] .tl-approved-hero .tl-approved-lead {
  max-width: 68ch;
  margin: 0;
}
body.tl-code-page[data-service-page="contratos-empresariales"] .tl-approved-hero .tl-approved-actions {
  margin-top: 4px;
  grid-column: auto;
  width: 100%;
}
body.tl-code-page[data-service-page="contratos-empresariales"] .tl-approved-hero .tl-approved-actions::after {
  content: none !important;
  display: none !important;
}
body.tl-code-page[data-service-page="contratos-empresariales"] .tl-approved-hero .tl-approved-actions a {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  white-space: normal;
  max-width: 100%;
  overflow-wrap: normal;
  word-break: normal;
  padding-inline: clamp(16px,2vw,25px);
  text-align: center;
  text-wrap: pretty;
}
/* C4: the shared widget may not block links at the bottom, including Reglamento interno. */
@media (max-width:767px) {
  body.tl-code-page[data-service-page] {
    scroll-padding-top: 90px;
  }
  body.tl-code-page[data-service-page] main {
    padding-bottom: max(98px,calc(75px + env(safe-area-inset-bottom,0px)));
  }
  body.tl-code-page[data-service-page] main [id] {
    scroll-margin-top: 90px;
  }
  body.tl-code-page[data-service-page] .whatsapp-float {
    right: max(12px,env(safe-area-inset-right,0px));
    bottom: max(14px,env(safe-area-inset-bottom,0px));
    z-index: 35;
  }
  body.tl-code-page[data-service-page] .whatsapp-float .whatsapp-caption {
    display: none !important;
  }
  body.tl-code-page[data-service-page] :is(.service-hero-grid,.hero-grid,.hero-grid-own,.monthly-grid) {
    display: grid;
    grid-template-columns: minmax(0,1fr);
  }
  body.tl-code-page[data-service-page] main :is(.service-actions,.actions,.tl-approved-actions) > a {
    max-width: 100%;
    min-width: 0;
  }
  body.tl-code-page[data-service-page="contratos-empresariales"] .tl-approved-hero h1 {
    font-size: clamp(2.15rem,8.5vw,3rem);
    max-width: 100%;
  }
  body.tl-code-page[data-service-page="contratos-empresariales"] .tl-approved-hero .tl-approved-actions a {
    width: 100%;
    min-height: 52px;
  }
}
@media (max-width:390px) {
  body.tl-code-page[data-service-page] main :is(.service-actions,.actions,.tl-approved-actions) > a {
    width: 100%;
    padding-inline: 14px;
  }
  body.tl-code-page[data-service-page] :is(.service-overview,.agenda,.change-preview) {
    padding: 18px;
  }
}
@media print {
  body.tl-code-page[data-service-page] .whatsapp-float {display:none !important;}
}
