/* Pérez & Burgos — franja lingüística y composiciones proporcionadas.
   Solo selectores de idioma autónomos inventariados y componentes de área específicos.
   Mantiene las rutas, los menús, los contenidos jurídicos y la jerarquía tipográfica general. */
@media screen {
  /* Top-level wrappers contain exactly one language navigation; no other content. */
  html:root body > .wrap:has(> .i18n-languages:only-child),
  html:root body > .i18n-languages,
  html:root body main > .i18n-languages {
    box-sizing: border-box;
    width: 100% !important;
    max-width: none !important;
    min-width: 0;
    margin: 0 !important;
    padding-inline: max(14px, calc((100% - 1180px) / 2)) !important;
    border-radius: 0 !important;
  }
  html:root body > .wrap:has(> .i18n-languages:only-child) { padding-block: 0 !important; }
  html:root body .i18n-languages {
    box-sizing: border-box;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center !important;
    gap: 5px 10px !important;
    padding-block: 8px !important;
    margin-block: 0 !important;
    text-align: center;
    min-width: 0;
  }
  html:root body > .wrap:has(> .i18n-languages:only-child) > .i18n-languages {
    width: 100%; max-width: 1180px; margin-inline: auto;
  }
  html:root body .i18n-languages > :is(a,[aria-current="page"]) {
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px !important;
    min-block-size: 34px !important;
    max-width: 100%;
    min-width: 0;
    padding: 5px 11px !important;
    margin: 0 !important;
    font-size: .85rem !important;
    line-height: 1.4 !important;
    font-weight: 650 !important;
    border: 1px solid transparent;
    border-radius: 8px !important;
    white-space: normal;
    text-align: center;
    overflow-wrap: anywhere;
    text-underline-offset: 3px;
  }
  html:root body .i18n-languages > .i18n-language-label {
    margin: 0 !important;
    padding: 5px 5px !important;
    font-size: .82rem !important;
    font-weight: 600;
    line-height: 1.4;
  }
  html:root body .i18n-languages > .i18n-language-service {
    max-width: 80ch;
    text-align: center !important;
    margin: 0 auto;
    padding: 2px 6px 6px;
    font-size: .8rem;
    line-height: 1.5;
  }
  /* The dark strip is contiguous with the header or a preceding/following hero. */
  html:root body main > .i18n-languages + :is(.areas-hero,.seo-page-hero,.guide-hero,.i18n-hero),
  html:root body > .i18n-languages + main > :is(.areas-hero,.seo-page-hero,.guide-hero,.i18n-hero):first-child,
  html:root body > .wrap:has(> .i18n-languages:only-child) + main > :is(.areas-hero,.seo-page-hero,.guide-hero,.i18n-hero):first-child {
    border-start-start-radius: 0 !important;
    border-start-end-radius: 0 !important;
  }
  html:root body main > :is(.areas-hero,.seo-page-hero,.guide-hero,.i18n-hero):has(+ .i18n-languages) {
    border-end-start-radius: 0 !important;
    border-end-end-radius: 0 !important;
  }
  @media (max-width: 680px) {
    html:root body .i18n-languages {gap: 4px 5px !important; padding-block: 7px !important;}
    html:root body .i18n-languages > :is(a,[aria-current="page"]) {min-height: 40px !important;min-block-size:40px !important;padding:6px 9px !important;font-size:.84rem !important;}
    html:root body .i18n-languages > .i18n-language-label {flex-basis:100%;padding-block:0 !important;}
  }

  /* Full-width title, comparable cards, useful actions and no vertical centering of short text. */
  html:root body main .pb-intro-equilibrada {
    box-sizing: border-box;
    display: grid !important;
    gap: clamp(16px, 2.2vw, 26px);
    padding: clamp(21px, 3.25vw, 44px);
    border: 1px solid var(--line,#cdd6d1);
    border-radius: 14px;
    background-color: var(--paper,#faf7ef);
    background-image: var(--pb-mat-paper,none);
    background-size: auto,var(--pb-mat-ivory-tile,520px 520px);
    box-shadow: var(--pb-mat-card-shadow,0 8px 26px rgba(13,44,48,.08));
    min-width: 0;
  }
  html:root body main .pb-intro-equilibrada .pb-intro-titulo {margin:0;min-width:0;}
  html:root body main[data-pb-area-review] .pb-intro-equilibrada h2,
  html:root body main .pb-intro-equilibrada h2 {
    margin: .25rem 0 0;
    max-width: 100%;
    font-size: clamp(1.62rem,2.1vw,2.15rem) !important;
    line-height: 1.18 !important;
    text-wrap: pretty;
    letter-spacing: -.012em;
  }
  html:root body main .pb-intro-equilibrada .pb-intro-titulo .eyebrow {margin:0;color:#866341;}
  html:root body main .pb-intro-columnas {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:clamp(12px,1.8vw,22px);align-items:stretch;min-width:0;}
  html:root body main .pb-intro-tarjeta {
    box-sizing:border-box;min-width:0;display:flex;flex-direction:column;justify-content:flex-start;
    border:1px solid #d5dad3;border-radius:12px;padding:clamp(16px,2vw,25px);
    background-color:#fdfbf7;background-image:none;
  }
  html:root body main .pb-intro-equilibrada h3 {
    margin:0 0 .65rem;
    font-size:clamp(1.12rem,1.55vw,1.32rem) !important;
    font-weight:650;
    line-height:1.28 !important;
    letter-spacing:0;
    text-wrap:pretty;
  }
  html:root body main .pb-intro-equilibrada :is(p:not(.eyebrow),li) {
    font-size:clamp(.94rem,1.08vw,1rem) !important;
    line-height:1.62 !important;
    color:#36525b;
    text-align:start !important;
    word-spacing:normal;
  }
  html:root body main .pb-intro-equilibrada p {margin:0;max-width:none;}
  html:root body main .pb-intro-equilibrada p+p {margin-block-start:.7rem;}
  html:root body main .pb-intro-equilibrada ul {margin:0 0 .7rem;padding-inline-start:1.12rem;}
  html:root body main .pb-intro-equilibrada li+li {margin-block-start:.38rem;}
  html:root body main .pb-intro-equilibrada a:not(.pb-intro-accion) {color:#265d52 !important;text-decoration:underline;text-underline-offset:3px;}
  html:root body main .pb-intro-nota {padding:0 1px;max-width:88ch;}
  html:root body main .pb-intro-nota strong {color:#183e44;}
  html:root body main .pb-intro-recursos {display:grid;gap:12px;min-width:0;padding-block-start:clamp(13px,1.6vw,19px);border-block-start:1px solid #d5dad3;}
  html:root body main .pb-intro-recursos h3 {margin:0 0 .2rem;}
  html:root body main .pb-intro-acciones {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;align-items:stretch;}
  html:root body main .pb-intro-acciones .pb-intro-accion {
    display:flex;align-items:center;justify-content:center;text-align:center;min-height:44px;
    box-sizing:border-box;min-width:0;padding:10px 12px;border:1px solid #c7d7d0;border-radius:9px;
    background:#e8f0eb;color:#17474a !important;font-size:.89rem;font-weight:650;line-height:1.35;
    text-decoration:none !important;overflow-wrap:anywhere;
  }
  html:root body main .pb-intro-accion:hover {background:#dce9e2;text-decoration:underline !important;}
  html:root body main .pb-intro-accion:focus-visible {outline:2px solid #1a5351;outline-offset:3px;}
  @media (max-width: 780px) {
    html:root body main .pb-intro-equilibrada {padding:clamp(15px,4.6vw,24px);gap:15px;}
    html:root body main .pb-intro-columnas,html:root body main .pb-intro-acciones {grid-template-columns:minmax(0,1fr);}
    html:root body main .pb-intro-tarjeta {padding:17px 15px;}
  }
  /* The section-heading variants below are marked only after a real height imbalance. */
  html:root body main .pb-encabezado-proporcionado {display:block !important;max-width:100%;}
  html:root body main .pb-encabezado-proporcionado > div {max-width:85ch;}
  html:root body main .pb-encabezado-proporcionado > div > :is(h2,h3) {max-width:100%;}
  html:root body main .pb-encabezado-proporcionado > p {max-width:85ch;margin-block:12px 0;}
  html:root body main .pb-encabezado-proporcionado p {font-size:clamp(.94rem,1.08vw,1rem);line-height:1.62;text-align:start!important;}
  html:root body main .pb-encabezado-proporcionado > div > p:not(.eyebrow) {margin-block:10px 0;}
  /* Process step titles were 27.2 px on mobile in narrow cards; keep the distinction from body text. */
  html:root body main .process-band .process-grid > article > h3 {font-size:clamp(1.22rem,1.5vw,1.6rem) !important;line-height:1.22 !important;text-wrap:pretty;}
  html:root body main .guide-next-v222 h2 {font-size:clamp(1.7rem,2.55vw,2.42rem) !important;line-height:1.17 !important;text-wrap:pretty;}
}
@media screen and (forced-colors:none) {
  html:root body > .wrap:has(> .i18n-languages:only-child),
  html:root body > .i18n-languages,
  html:root body main > .i18n-languages {
    background-color: #081f28 !important;
    background-image: linear-gradient(180deg,rgba(8,31,40,.94),rgba(9,43,48,.72)),var(--pb-global-nav-stone,url('/assets/pb-pizarra-continua-ligera-1111197ff591d2ef.webp')) !important;
    background-size:100% 100%,cover !important;
    background-position:center center !important;
    background-repeat:no-repeat !important;
    border-block-start:1px solid rgba(236,212,176,.14) !important;
    border-block-end:1px solid rgba(236,212,176,.16) !important;
    box-shadow:none !important;
  }
  html:root body > .wrap:has(> .i18n-languages:only-child) > .i18n-languages {background:none !important;border:0 !important;}
  html:root body .i18n-languages {color:#e4eeeb !important;}
  html:root body .i18n-languages > a:not([aria-current="page"]) {color:#f3f5ef !important;background:transparent !important;text-decoration:none !important;}
  html:root body .i18n-languages > a:not([aria-current="page"]):hover {color:#fffdf6 !important;background:#20464c !important;border-color:#516b6a;text-decoration:underline !important;}
  html:root body .i18n-languages > [aria-current="page"] {color:#13343b !important;background:#ebd6b8 !important;border-color:#f1ddc2 !important;font-weight:800 !important;text-decoration:none !important;}
  html:root body .i18n-languages :is(.i18n-language-label,.i18n-language-service) {color:#d2e0db !important;}
  html:root body .i18n-languages > a:focus-visible {outline:2px solid #efc999 !important;outline-offset:2px !important;}
}

/* Secondary headings and long explanations: only verified components/fields. */
@media screen {
  html:root body main .pb-detalle-proporcionado {display:grid !important;grid-template-columns:minmax(0,1fr) !important;gap:clamp(16px,2.4vw,27px);align-items:start;}
  html:root body main .pb-detalle-proporcionado > div:first-child {max-width:85ch;}
  html:root body main .pb-detalle-proporcionado h2 {max-width:100%;margin-block:0 .55rem;}
  html:root body main .pb-detalle-proporcionado > .seo-faq {min-width:0;width:100%;}
  html:root body main .pb-tipografia-tarjeta h3 {font-size:clamp(1.18rem,1.55vw,1.45rem) !important;line-height:1.25 !important;text-wrap:pretty;}
  @media (max-width:680px) {html:root body main h3[data-pb-titulo-proporcional] {font-size:clamp(1.18rem,1.6vw,1.43rem) !important;line-height:1.25 !important;text-wrap:pretty;}}
  @media (max-width:430px) {
    html:root body main h1[data-pb-titulo-movil-compacto] {font-size:clamp(1.5rem,6.45vw,1.68rem) !important;line-height:1.21 !important;letter-spacing:-.012em;}
    html:root body main :is([data-pb-readability-floor="mobile"],[data-pb-readability-floor="both"]) {font-size:.84rem !important;line-height:1.56 !important;text-align:start;}
    html:root body main :is([data-pb-readability-floor="mobile"],[data-pb-readability-floor="both"]).eyebrow {letter-spacing:0;text-transform:none;}
    html:root body main[data-pb-visual-tool-help] .nlt-hint {font-size:.84rem !important;line-height:1.56 !important;}
    html:root body main[data-pb-visual-tool-help] #free-contact-help {font-size:.84rem!important;line-height:1.56!important;}
  }
  @media (min-width:1024px) {
    html:root body main :is([data-pb-readability-floor="desktop"],[data-pb-readability-floor="both"]) {font-size:.84rem !important;line-height:1.56 !important;}
    html:root body main :is([data-pb-readability-floor="desktop"],[data-pb-readability-floor="both"]).eyebrow {letter-spacing:0;text-transform:none;}
    html:root body main[data-pb-visual-tool-help] :is(#it-period-note,#calc-pay-structure-help,.calculator-inline-note,.calculator-privacy,#free-contact-help,.nlt-hint),
    html:root body main[data-pb-visual-tool-help] [data-pb-mobile-primer] .result-empty p {font-size:.84rem !important;line-height:1.56 !important;}
  }
}

/* R2: specific secondary panels, useful catalog descriptions and fiscal explanatory text. */
@media screen {
  html:root body main .pb-detalle-proporcionado {border-radius:14px!important;gap:clamp(12px,1.4vw,20px)!important;}
  html:root body main .pb-detalle-proporcionado > .seo-faq {margin-block-start:0!important;padding-block-start:0!important;}
  html:root body main #herramientas .tool-group-head > p,
  html:root body main #formularios-y-documentos .model-official-grid > .model-resource-card > p {font-size:.875rem!important;line-height:1.55!important;}
  @media(max-width:430px) {
    html:root body main .fiscal-services-overview .fiscal-services-grid > article > p,
    html:root body main .process-band .section-heading > p {font-size:.84rem!important;line-height:1.55!important;}
  }
}

@media screen and (max-width:430px) {html:root body main section.model-boundary .wrap > div > p {font-size:.84rem!important;line-height:1.55!important;}}
