@font-face {
  font-family: "Inter";
  src: url("./fonts/Inter-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --rb-primary: #c8102e;
  --rb-primary-700: #a50d26;
  --rb-accent: #057784;
  /* Fondo blanco, como el portal de bizkaia.eus donde se integrará el sitio. */
  --rb-bg: #ffffff;
  --rb-band: #f5f5f5;
  --rb-surface: #ffffff;
  --rb-ink: #17181d;
  --rb-muted: #475569;
  --rb-border: rgba(15, 23, 42, 0.08);
  --rb-success: #1f7a3a;
  --rb-warn: #b8770a;
  --rb-shadow-soft: 0 1px 2px rgba(15, 23, 42, 0.05), 0 4px 16px rgba(15, 23, 42, 0.07);
  --rb-shadow-hover: 0 2px 4px rgba(15, 23, 42, 0.06), 0 10px 28px rgba(15, 23, 42, 0.11);
}

html { scroll-behavior: smooth; }

[x-cloak] { display: none !important; }

body {
  background: var(--rb-bg);
  /* Las bandas a ancho completo miden 100vw (incluye la barra de scroll):
     se recorta el sobrante sin crear un contenedor de scroll (sticky sigue funcionando). */
  overflow-x: clip;
  color: var(--rb-ink);
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

site-header,
site-footer {
  display: block;
}

/* Cabecera fija (sticky) y sub-navegación de Renta pegada justo debajo. */
site-header {
  position: sticky;
  top: 0;
  z-index: 50;
}

html {
  scroll-padding-top: calc(var(--rb-header-h, 78px) + 1rem);
}

::selection {
  background: rgba(200, 16, 46, 0.18);
}

.rb-card {
  background: var(--rb-surface);
  border: 1px solid var(--rb-border);
  border-radius: 1rem;
  box-shadow: var(--rb-shadow-soft);
}

/* Tarjeta enlazable sobre fondo blanco o banda gris (patrón de bizkaia.eus). */
.rb-tile {
  display: block;
  height: 100%;
  background: var(--rb-surface);
  border: 1px solid var(--rb-border);
  border-radius: .75rem;
  box-shadow: var(--rb-shadow-soft);
  padding: 1.25rem;
  transition: box-shadow .15s ease, transform .15s ease, border-color .15s ease;
}
a.rb-tile:hover {
  box-shadow: var(--rb-shadow-hover);
  border-color: rgba(15, 23, 42, .14);
  transform: translateY(-2px);
}

/* Banda gris a ancho completo dentro del contenedor centrado, sin provocar
   scroll horizontal (la sombra extiende el color hasta los bordes). */
.rb-band {
  background: var(--rb-band);
  box-shadow: 0 0 0 100vmax var(--rb-band);
  clip-path: inset(0 -100vmax);
  padding-top: 2.5rem;
  padding-bottom: 2.5rem;
}
@media (min-width: 768px) {
  .rb-band { padding-top: 3.5rem; padding-bottom: 3.5rem; }
}

/* Banda roja de cabecera de las páginas interiores (patrón de bizkaia.eus):
   miga de pan + título con filete blanco + entradilla. Va como primer hijo de
   <main> (main lleva py-6 = 1.5rem) y sube por detrás de las esquinas
   redondeadas de la cabecera. El contenido queda alineado con el de la página. */
.rb-hero {
  --rb-hero-overlap: 32px;
  position: relative;
  margin-inline: calc(50% - 50vw);
  padding-inline: calc(50vw - 50%);
  margin-top: calc(-1.5rem - var(--rb-hero-overlap));
  padding-top: calc(var(--rb-hero-overlap) + 1.5rem);
  padding-bottom: 2.25rem;
  background: linear-gradient(100deg, #c8102e 0%, #a30c24 45%, #5a0812 100%);
  color: #fff;
}
/* Portada: banda roja a ancho completo bajo la cabecera (mismo degradado que las
   páginas interiores) que sube por detrás de sus esquinas redondeadas. El texto va
   en blanco; logos y tarjeta lateral, en blanco encima. */
.rb-home-hero {
  --rb-hero-overlap: 32px;
  position: relative;
  margin-inline: calc(50% - 50vw);
  padding-inline: calc(50vw - 50%);
  margin-top: calc(-1.5rem - var(--rb-hero-overlap));
  padding-top: calc(var(--rb-hero-overlap) + 1.75rem);
  padding-bottom: 2.25rem;
  background: linear-gradient(100deg, #c8102e 0%, #a30c24 45%, #5a0812 100%);
}
@media (min-width: 768px) {
  .rb-home-hero { padding-top: calc(var(--rb-hero-overlap) + 3rem); padding-bottom: 3.5rem; }
}
.rb-home-hero h1 { letter-spacing: -.01em; }
.rb-home-hero__text { color: #fff; }
.rb-home-hero__text p { color: rgba(255, 255, 255, .94) !important; }
.rb-home-hero .rb-home-hero__text .rb-tag { background: rgba(255, 255, 255, .16); color: #fff; }
.rb-home-hero__actions { display: flex; flex-wrap: wrap; gap: .75rem; padding-top: .25rem; }
/* Botones sobre rojo: principal blanco con letra roja, secundario con borde blanco. */
.rb-home-hero__actions .rb-btn-primary { background: #fff; color: var(--rb-primary-700); font-weight: 700; }
.rb-home-hero__actions .rb-btn-primary:hover { background: #fff1f4; }
.rb-home-hero__actions .rb-btn-secondary { background: transparent; color: #fff; border: 1.5px solid rgba(255, 255, 255, .75); font-weight: 600; }
.rb-home-hero__actions .rb-btn-secondary:hover { background: rgba(255, 255, 255, .12); }
.rb-home-hero a:focus-visible { box-shadow: 0 0 0 3px #ffbf47; }
.rb-home-hero__logos {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  border-radius: 1rem;
  background: #fff;
  padding: .6rem 1rem;
  box-shadow: var(--rb-shadow-soft);
}
.rb-home-hero__logos img { height: 2rem; width: auto; max-width: 9rem; object-fit: contain; }

@media (max-width: 767px) {
  /* Móvil: titular con más presencia, botones a todo el ancho y la tarjeta
     lateral compactada en tres datos en fila. */
  .rb-home-hero h1 { font-size: 1.95rem; line-height: 1.15; }
  .rb-home-hero h1::before {
    content: "";
    display: block;
    width: 2.75rem;
    height: 4px;
    margin-bottom: .9rem;
    border-radius: 999px;
    background: #fff;
  }
  .rb-home-hero__actions { flex-direction: column; }
  .rb-home-hero__actions a { width: 100%; min-height: 3rem; font-size: 1rem; font-weight: 600; }
  .rb-home-hero__logos { padding: .5rem .85rem; }
  .rb-home-hero__logos img { height: 1.6rem; }
  .rb-hero-card { padding: 1rem; }
  .rb-hero-card > h2 { font-size: .95rem; }
  .rb-hero-card ul {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(5.5rem, 1fr));
    gap: .5rem;
    margin-top: .85rem;
  }
  .rb-hero-card ul > li { margin-top: 0 !important; } /* anula el space-y-4 de Tailwind */
  .rb-hero-card li {
    flex-direction: column;
    align-items: center;
    gap: .45rem;
    border-radius: .75rem;
    background: #f8fafc;
    padding: .75rem .4rem;
    text-align: center;
  }
  .rb-hero-card li p.text-sm { display: none; }
  .rb-hero-card li p,
  .rb-hero-card li a { font-size: .82rem; line-height: 1.3; }
}

/* Dentro de un bloque anidado de main (ficha): main py-6 + space-y-6. */
.rb-hero--nested { margin-top: calc(-3rem - var(--rb-hero-overlap)); }
@media (min-width: 768px) {
  .rb-hero { padding-top: calc(var(--rb-hero-overlap) + 2rem); padding-bottom: 3rem; }
}

.rb-breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .25rem .6rem;
  font-size: .875rem;
}
.rb-breadcrumb li {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
}
.rb-breadcrumb li + li::before {
  content: "";
  width: .4rem;
  height: .4rem;
  border-top: 1.5px solid currentColor;
  border-right: 1.5px solid currentColor;
  transform: rotate(45deg);
  opacity: .85;
}
.rb-breadcrumb a {
  /* Zona táctil de 44px sin cambiar la altura de la línea. */
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  margin-block: -.7rem;
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.rb-breadcrumb [aria-current] { font-weight: 600; }

.rb-hero__title {
  margin-top: 1.25rem;
  padding-left: 1rem;
  border-left: 4px solid #fff;
  font-size: clamp(1.6rem, 1.15rem + 1.8vw, 2.35rem);
  font-weight: 700;
  line-height: 1.15;
}
.rb-hero__lead {
  margin-top: 1rem;
  max-width: 48rem;
  color: rgba(255, 255, 255, .94);
  font-size: 1.05rem;
  line-height: 1.6;
}
@media (min-width: 768px) {
  .rb-hero__lead { font-size: 1.125rem; }
}
.rb-hero__note {
  margin-top: .85rem;
  max-width: 48rem;
  font-size: .875rem;
  color: rgba(255, 255, 255, .9);
}
.rb-hero__lead a,
.rb-hero__note a {
  color: #fff;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.rb-hero .rb-tag {
  background: rgba(255, 255, 255, .16);
  color: #fff;
}
.rb-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin-top: 1.5rem;
}
.rb-hero-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: .55rem 1.15rem;
  border: 1.5px solid #fff;
  border-radius: 999px;
  background: #fff;
  color: var(--rb-primary-700);
  font-size: .9rem;
  font-weight: 700;
  transition: background-color .15s ease;
}
.rb-hero-btn:hover { background: #fff1f4; }
.rb-hero-btn--ghost {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, .75);
}
.rb-hero-btn--ghost:hover { background: rgba(255, 255, 255, .12); }
.rb-hero a:focus-visible,
.rb-hero button:focus-visible {
  box-shadow: 0 0 0 3px #ffbf47;
}

/* =====================================================================
   PATRONES DE CONTENIDO (páginas interiores)
   Variedad de formatos al estilo de bizkaia.eus para no repetir siempre la
   misma tarjeta. Clases propias: no requieren recompilar Tailwind.
   ===================================================================== */

/* Reparto equilibrado de líneas en titulares y entradillas */
.rb-balance { text-wrap: balance; }
.rb-pretty { text-wrap: pretty; }

/* Título de sección */
.rb-h2 {
  font-size: clamp(1.4rem, 1.1rem + 1vw, 1.9rem);
  font-weight: 700;
  line-height: 1.2;
  color: var(--rb-ink);
}
.rb-section-lead {
  margin-top: .6rem;
  max-width: 48rem;
  color: var(--rb-muted);
  line-height: 1.6;
}

/* 1. Navegación de anclas en píldora: centrada, monta sobre el borde inferior de la
      banda roja y se queda fija bajo la cabecera al hacer scroll.
      Uso: <nav class="rb-pagenav"> justo después del </header> de la banda (hijo de <main>). */
.rb-pagenav {
  position: sticky;
  top: calc(var(--rb-header-h, 78px) + .6rem);
  z-index: 40;
  display: flex;
  gap: .25rem;
  width: fit-content;
  max-width: 100%;
  margin-inline: auto;
  /* Sube media píldora sobre la banda (anula el space-y de <main>). */
  margin-top: -1.65rem !important;
  padding: .35rem;
  overflow-x: auto;
  scrollbar-width: none;
  border-radius: 999px;
  background: #fff;
  box-shadow: var(--rb-shadow-soft);
  border: 1px solid var(--rb-border);
}
.rb-pagenav::-webkit-scrollbar { display: none; }
.rb-pagenav a {
  flex: none;
  white-space: nowrap;
  border-radius: 999px;
  padding: .6rem 1rem;
  font-size: .875rem;
  font-weight: 600;
  color: var(--rb-ink);
  transition: background-color .15s ease, color .15s ease;
}
.rb-pagenav a:hover { background: #f1f5f9; }
.rb-pagenav a[aria-current="true"] { background: var(--rb-accent); color: #fff; }
/* Al saltar a un ancla, deja sitio para la cabecera + la píldora fija. */
html:has(.rb-pagenav) { scroll-padding-top: calc(var(--rb-header-h, 78px) + 5rem); }

/* 2. Accesos compactos: icono + texto + flecha (como "Teléfonos de atención >") */
.rb-quicklinks {
  display: grid;
  gap: .85rem;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
}
.rb-quicklink {
  display: flex;
  align-items: center;
  gap: .85rem;
  min-height: 4.5rem;
  padding: .9rem 1rem;
  border: 1px solid var(--rb-border);
  border-radius: .85rem;
  background: #fff;
  box-shadow: var(--rb-shadow-soft);
  font-weight: 600;
  line-height: 1.25;
  transition: box-shadow .15s ease, transform .15s ease;
}
.rb-quicklink:hover { box-shadow: var(--rb-shadow-hover); transform: translateY(-2px); }
.rb-quicklink__icon { flex: none; color: var(--rb-accent); }
.rb-quicklink__label { flex: 1; min-width: 0; }
.rb-quicklink__label small { display: block; margin-top: .15rem; font-size: .8rem; font-weight: 400; color: var(--rb-muted); }
.rb-quicklink__arrow { flex: none; color: var(--rb-primary); }

/* 3. Tarjeta con acento lateral e icono (como "Trámites más solicitados") */
.rb-accent-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 1.25rem;
  border: 1px solid var(--rb-border);
  border-left: 4px solid var(--rb-accent);
  border-radius: .85rem;
  background: #fff;
  box-shadow: var(--rb-shadow-soft);
  transition: box-shadow .15s ease, transform .15s ease;
}
a.rb-accent-card:hover { box-shadow: var(--rb-shadow-hover); transform: translateY(-2px); }
.rb-accent-card__icon {
  display: inline-grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border-radius: .75rem;
  background: #e0f2f4;
  color: var(--rb-accent);
}
.rb-accent-card h3 { margin-top: 1rem; font-weight: 700; font-size: 1.05rem; }
.rb-accent-card p { margin-top: .4rem; font-size: .9rem; color: var(--rb-muted); line-height: 1.55; }
.rb-accent-card--ok { border-left-color: var(--rb-success); }
.rb-accent-card--ok .rb-accent-card__icon { background: #e6f4ec; color: var(--rb-success); }
.rb-accent-card--warn { border-left-color: var(--rb-warn); }
.rb-accent-card--warn .rb-accent-card__icon { background: #fff4e5; color: #9a5b00; }
.rb-accent-card--red { border-left-color: var(--rb-primary); }
.rb-accent-card--red .rb-accent-card__icon { background: #fde8ec; color: var(--rb-primary-700); }
.rb-accent-card__more { margin-top: auto; padding-top: 1rem; color: var(--rb-accent); font-weight: 700; font-size: .9rem; }

/* 3b. Filas a todo el ancho: icono + título + texto (para textos largos que en
       columnas quedarían estrechos) */
.rb-rows {
  overflow: hidden;
  border: 1px solid var(--rb-border);
  border-radius: 1.25rem;
  background: #fff;
  box-shadow: var(--rb-shadow-soft);
}
.rb-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: .35rem 1rem;
  align-items: start;
  padding: 1.25rem;
}
.rb-row + .rb-row { border-top: 1px solid #eef2f6; }
.rb-row__icon {
  grid-row: span 2;
  display: inline-grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: .8rem;
  background: #e0f2f4;
  color: var(--rb-accent);
}
.rb-row__title { font-size: 1.05rem; font-weight: 700; line-height: 1.35; padding-top: .55rem; }
.rb-row__text { color: #334155; line-height: 1.65; max-width: 46rem; }
.rb-row__link { display: inline-block; margin-top: .35rem; color: var(--rb-accent); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
@media (min-width: 768px) {
  .rb-row { grid-template-columns: auto minmax(11rem, 16rem) minmax(0, 1fr); gap: 1.5rem; padding: 1.5rem 1.75rem; align-items: center; }
  .rb-row__icon { grid-row: auto; }
  .rb-row__title { padding-top: 0; }
}

/* 4. Panel gris redondeado con lista de puntos con icono (como "Antes de venir a la oficina") */
.rb-panel {
  border-radius: 1.5rem;
  background: var(--rb-band);
  padding: 1.5rem;
}
@media (min-width: 768px) { .rb-panel { padding: 2rem; } }
.rb-panel--white { background: #fff; border: 1px solid var(--rb-border); box-shadow: var(--rb-shadow-soft); }
.rb-iconlist { display: grid; gap: 1.5rem; }
.rb-iconlist li { display: grid; grid-template-columns: auto 1fr; gap: .25rem .85rem; }
.rb-iconlist svg { grid-row: span 2; margin-top: .1rem; color: var(--rb-ink); }
.rb-iconlist strong { font-size: 1.05rem; }
.rb-iconlist p { font-size: .9rem; color: var(--rb-muted); line-height: 1.55; }

/* 5. Tarjeta de llamada a la acción en rojo oscuro (como "Solicitar cita previa") */
.rb-cta-card {
  border-radius: 1.25rem;
  background: linear-gradient(135deg, #a50d26 0%, #7d0a1c 100%);
  color: #fff;
  padding: 1.5rem;
  box-shadow: var(--rb-shadow-soft);
}
@media (min-width: 768px) { .rb-cta-card { padding: 2rem; } }
.rb-cta-card h2, .rb-cta-card h3 { font-size: 1.2rem; font-weight: 700; }
.rb-cta-card p { margin-top: .6rem; color: rgba(255, 255, 255, .92); line-height: 1.6; }
.rb-cta-card a:not(.rb-hero-btn) { color: #fff; text-decoration: underline; }
.rb-cta-card a:focus-visible { box-shadow: 0 0 0 3px #ffbf47; }

/* 6. Columna de introducción + tarjetas (como "Cómo comprobar tu ticket o factura") */
.rb-intro-grid { display: grid; gap: 1.5rem; }
@media (min-width: 1024px) {
  .rb-intro-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 2.4fr); gap: 2.5rem; align-items: start; }
}

/* 7. Aviso partido: franja tintada con icono + contenido (como "Comunicación de incidencias") */
.rb-callout {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--rb-border);
  border-left: 4px solid var(--rb-callout-color, #1d5fa8);
  border-radius: 1rem;
  background: #fff;
  box-shadow: var(--rb-shadow-soft);
}
@media (min-width: 768px) { .rb-callout { grid-template-columns: minmax(12rem, .32fr) 1fr; } }
.rb-callout__side {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  padding: 1.25rem;
  background: var(--rb-callout-tint, #eaf2fb);
  color: var(--rb-callout-color, #1d5fa8);
  font-weight: 700;
  text-align: center;
}
.rb-callout__body { padding: 1.5rem; }
@media (min-width: 768px) { .rb-callout__body { padding: 1.75rem 2rem; } }
.rb-callout__body h2, .rb-callout__body h3 { font-size: clamp(1.15rem, 1rem + .6vw, 1.45rem); font-weight: 700; line-height: 1.3; }
.rb-callout__body p { margin-top: .6rem; color: #334155; line-height: 1.6; }
.rb-callout--warn { --rb-callout-color: #9a5b00; --rb-callout-tint: #fff4e0; }
.rb-callout--teal { --rb-callout-color: var(--rb-accent); --rb-callout-tint: #e0f2f4; }

/* 8. Pasos en línea de tiempo vertical */
.rb-timeline { position: relative; display: grid; gap: 1.75rem; counter-reset: rb-step; }
.rb-timeline > li { position: relative; padding-left: 3.5rem; counter-increment: rb-step; }
.rb-timeline > li::before {
  content: counter(rb-step);
  position: absolute;
  left: 0;
  top: -.15rem;
  display: grid;
  place-items: center;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 999px;
  background: var(--rb-primary);
  color: #fff;
  font-weight: 800;
}
.rb-timeline > li:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 1.15rem;
  top: 2.6rem;
  bottom: -1.6rem;
  width: 2px;
  background: #f1c4cc;
}
.rb-timeline h3 { font-weight: 700; font-size: 1.05rem; }
.rb-timeline p { margin-top: .3rem; color: var(--rb-muted); line-height: 1.6; }

/* 9. Acordeón de preguntas con separadores (en vez de una tarjeta por pregunta) */
.rb-accordion { border-top: 1px solid #e2e8f0; }
.rb-accordion details { border-bottom: 1px solid #e2e8f0; }
.rb-accordion summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem .25rem;
  cursor: pointer;
  list-style: none;
  font-weight: 600;
}
.rb-accordion summary::-webkit-details-marker { display: none; }
.rb-accordion summary::after {
  content: "";
  flex: none;
  width: .6rem;
  height: .6rem;
  margin-right: .35rem;
  border-right: 2px solid var(--rb-primary);
  border-bottom: 2px solid var(--rb-primary);
  transform: rotate(45deg);
  transition: transform .2s ease;
}
.rb-accordion details[open] summary::after { transform: rotate(-135deg); }
.rb-accordion summary:hover { color: var(--rb-primary-700); }
.rb-accordion__body { padding: 0 .25rem 1.25rem; color: #334155; line-height: 1.65; max-width: 52rem; }

/* 10. Cifras / datos clave destacados */
.rb-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  border-radius: 1.25rem;
  overflow: hidden;
  border: 1px solid var(--rb-border);
  background: #fff;
  box-shadow: var(--rb-shadow-soft);
}
.rb-facts > div { padding: 1.25rem 1.5rem; border-right: 1px solid #eef2f6; border-bottom: 1px solid #eef2f6; }
.rb-facts dt { font-size: .8rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--rb-muted); }
.rb-facts dd { margin-top: .35rem; font-size: 1.15rem; font-weight: 700; line-height: 1.35; color: var(--rb-ink); }
.rb-facts dd.is-big { font-size: 1.6rem; color: var(--rb-primary-700); }
/* Columnas fijas (evitan una celda huérfana en la última fila). */
.rb-facts--2, .rb-facts--3 { grid-template-columns: 1fr; }
@media (min-width: 640px) { .rb-facts--2, .rb-facts--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 768px) { .rb-facts--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* Impresión ("Imprimir o guardar como PDF"): solo el contenido. */
@media print {
  site-header, site-footer, .rb-pagenav,
  .rb-chatbot-fab, .rb-feedback-widget, .rb-tour-toast, .skip-link { display: none !important; }
  .rb-hero { margin: 0 0 1rem; padding: 0; background: none; color: var(--rb-ink); }
  .rb-hero a, .rb-breadcrumb a, .rb-hero__lead, .rb-hero__note { color: var(--rb-ink); }
  .rb-hero__title { border-left-color: var(--rb-primary); }
  .rb-band { box-shadow: none; clip-path: none; background: none; padding: 0; }
  .rb-tile, .rb-accent-card, .rb-quicklink, .rb-facts, .rb-callout, .rb-table-wrap, .rb-card { box-shadow: none; }
  details { display: block; }
}

/* 11. Comparativa en dos columnas (sí / no, opción A / opción B) */
.rb-compare { display: grid; gap: 1rem; }
@media (min-width: 768px) { .rb-compare { grid-template-columns: 1fr 1fr; gap: 0; } }
.rb-compare > div { padding: 1.5rem; border: 1px solid var(--rb-border); background: #fff; }
@media (min-width: 768px) {
  .rb-compare > div:first-child { border-radius: 1.25rem 0 0 1.25rem; }
  .rb-compare > div:last-child { border-radius: 0 1.25rem 1.25rem 0; border-left: 0; }
}
@media (max-width: 767px) { .rb-compare > div { border-radius: 1.25rem; } }
.rb-compare__label {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-size: .8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.rb-compare__label--ok { color: var(--rb-success); }
.rb-compare__label--warn { color: #9a5b00; }
.rb-compare h3 { margin-top: .6rem; font-size: 1.1rem; font-weight: 700; }
.rb-compare p { margin-top: .5rem; color: #334155; line-height: 1.6; font-size: .95rem; }

/* 12. Lista de comprobación con check */
.rb-checklist { display: grid; gap: .75rem; }
.rb-checklist li { position: relative; padding-left: 2rem; line-height: 1.55; }
.rb-checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .1rem;
  width: 1.3rem;
  height: 1.3rem;
  border-radius: 999px;
  background: #e6f4ec url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 10.5l3 3 7-7.5' fill='none' stroke='%231f7a3a' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / .85rem no-repeat;
}
.rb-checklist--two { }
@media (min-width: 768px) { .rb-checklist--two { grid-template-columns: 1fr 1fr; column-gap: 2rem; } }

/* 13. Tabla comparativa sobria */
.rb-table-wrap { overflow-x: auto; border: 1px solid var(--rb-border); border-radius: 1rem; background: #fff; box-shadow: var(--rb-shadow-soft); }
.rb-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.rb-table th, .rb-table td { padding: .9rem 1.1rem; text-align: left; vertical-align: top; border-bottom: 1px solid #eef2f6; }
.rb-table thead th { background: #f8fafc; font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--rb-muted); }
.rb-table tbody th { font-weight: 700; white-space: nowrap; }
.rb-table tr:last-child > * { border-bottom: 0; }

/* 15. Buscador compacto (como el "Buscador de registro" de bizkaia.eus) */
.rb-searchbar {
  border-radius: 1rem;
  background: #fff;
  border: 1px solid var(--rb-border);
  box-shadow: var(--rb-shadow-soft);
  padding: 1.1rem 1.25rem 1.25rem;
}
.rb-searchbar__title { font-size: 1.05rem; font-weight: 700; margin-bottom: .75rem; }
.rb-searchbar__row { display: grid; gap: .65rem; }
@media (min-width: 640px) { .rb-searchbar__row { grid-template-columns: 1fr 1fr; } .rb-searchbar__field--text { grid-column: 1 / -1; } }
@media (min-width: 1024px) {
  .rb-searchbar__row { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1fr) auto; }
  .rb-searchbar__field--text { grid-column: auto; }
}
.rb-searchbar input,
.rb-searchbar select {
  width: 100%;
  min-height: 2.75rem;
  border: 1px solid #94a3b8;
  border-radius: .6rem;
  background: #fff;
  padding: 0 .85rem;
  font-size: .95rem;
  color: var(--rb-ink);
}
.rb-searchbar select {
  appearance: none;
  padding-right: 2.25rem;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='m5 7.5 5 5 5-5' fill='none' stroke='%2317181d' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") right .7rem center / 1rem no-repeat;
}
.rb-searchbar input:focus-visible,
.rb-searchbar select:focus-visible { border-color: var(--rb-accent); }
.rb-searchbar__submit {
  min-height: 2.75rem;
  border-radius: 999px;
  background: var(--rb-primary);
  color: #fff;
  font-weight: 600;
  padding: 0 1.6rem;
  transition: background-color .15s ease;
}
.rb-searchbar__submit:hover { background: var(--rb-primary-700); }
@media (min-width: 640px) and (max-width: 1023px) { .rb-searchbar__submit { grid-column: 1 / -1; justify-self: end; } }

/* Etiqueta de filtro activo (se quita al pulsar) */
.rb-chip {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  min-height: 2.25rem;
  border-radius: 999px;
  background: #e0f2f4;
  color: #035c66;
  padding: 0 .8rem;
  font-size: .85rem;
  font-weight: 600;
}
.rb-chip:hover { background: #cbe9ec; }

/* 16. Resultados en listado agrupado (filas, no tarjetas) */
.rb-results__title {
  display: flex;
  align-items: center;
  gap: .6rem;
  margin-bottom: .6rem;
  font-size: 1.05rem;
  font-weight: 700;
}
.rb-results__count {
  display: inline-grid;
  place-items: center;
  min-width: 1.6rem;
  height: 1.6rem;
  padding: 0 .4rem;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--rb-border);
  font-size: .8rem;
  color: var(--rb-muted);
}
.rb-results__list {
  overflow: hidden;
  border: 1px solid var(--rb-border);
  border-radius: 1rem;
  background: #fff;
  box-shadow: var(--rb-shadow-soft);
}
.rb-results__list li + li { border-top: 1px solid #eef2f6; }
.rb-result {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .5rem 1rem;
  align-items: center;
  padding: 1rem 1.1rem;
  transition: background-color .15s ease;
}
.rb-result:hover { background: #f8fafc; }
/* La lista recorta lo que sobresale: el foco va por dentro. */
.rb-result:focus-visible { box-shadow: inset 0 0 0 3px var(--rb-accent); border-radius: 0; }
.rb-result:hover .rb-result__name { color: var(--rb-primary-700); text-decoration: underline; text-underline-offset: 3px; }
.rb-result__main { display: grid; gap: .2rem; min-width: 0; }
.rb-result__name { font-weight: 700; line-height: 1.35; }
.rb-result__summary { font-size: .9rem; color: var(--rb-muted); line-height: 1.5; }
@media (max-width: 767px) {
  .rb-result__summary { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
}
.rb-result__key { grid-column: 1; font-size: .875rem; font-weight: 600; line-height: 1.45; color: var(--rb-ink); }
.rb-result__key-label { display: block; font-size: .75rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--rb-accent); }
.rb-result__arrow { grid-column: 2; grid-row: 1 / span 2; color: var(--rb-primary); }
@media (min-width: 768px) {
  .rb-result { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) auto; padding: 1.1rem 1.4rem; }
  .rb-result__key { grid-column: 2; border-left: 1px solid #eef2f6; padding-left: 1rem; }
  .rb-result__arrow { grid-column: 3; grid-row: auto; }
}

/* 17. Aviso discreto al final de la página */
.rb-disclaimer {
  display: flex;
  gap: .6rem;
  align-items: flex-start;
  border-top: 1px solid #e2e8f0;
  padding-top: 1.25rem;
  font-size: .85rem;
  line-height: 1.55;
  color: var(--rb-muted);
}
.rb-disclaimer::before {
  content: "i";
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 1.25rem;
  height: 1.25rem;
  margin-top: .05rem;
  border-radius: 999px;
  border: 1.5px solid currentColor;
  font-size: .75rem;
  font-weight: 700;
  font-style: normal;
}

/* 14. Botones y enlaces auxiliares */
.rb-btn-outline {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  min-height: 2.75rem;
  padding: .55rem 1.15rem;
  border: 1.5px solid var(--rb-primary);
  border-radius: 999px;
  color: var(--rb-primary);
  font-weight: 600;
  font-size: .9rem;
  transition: background-color .15s ease;
}
.rb-btn-outline:hover { background: #fff1f4; }
.rb-link-arrow { display: inline-flex; align-items: center; gap: .35rem; min-height: 2.75rem; color: var(--rb-accent); font-weight: 700; }
.rb-link-arrow:hover { text-decoration: underline; }

.rb-btn-primary {
  background: var(--rb-primary);
  color: #fff;
}
/* Botones de texto en bloque: mínimo 44px de alto (móvil). */
a.rb-btn-primary, button.rb-btn-primary, .rb-btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
}
.rb-btn-primary:hover { background: var(--rb-primary-700); }

.rb-tag {
  display: inline-flex; align-items: center; gap: .25rem;
  padding: .15rem .55rem; border-radius: 999px;
  font-size: .75rem; font-weight: 600;
  background: #eef3f9; color: var(--rb-primary-700);
}
.rb-tag.warn { background: #fff4e5; color: var(--rb-warn); }
.rb-tag.danger { background: #fde8e3; color: var(--rb-accent); }
.rb-tag.ok { background: #e6f4ec; color: var(--rb-success); }

a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, [tabindex]:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 3px rgba(200, 16, 46, 0.16),
    0 0 0 6px rgba(255, 255, 255, 0.95);
  border-radius: .5rem;
}

.skip-link {
  position: absolute; left: -9999px;
}
.skip-link:focus {
  left: 1rem; top: 1rem; z-index: 1000;
  background: var(--rb-ink); color: #fff;
  padding: .5rem .75rem; border-radius: .5rem;
}

.rb-source {
  font-size: .75rem; color: var(--rb-muted);
}
.rb-source a { text-decoration: underline; padding-block: .6rem; }
.rb-source { line-height: 2; }

/* Botones de opción del asistente. Clases planas para no depender de
   utilidades arbitrarias de Tailwind compiladas a tailwind.css. */
.rb-option {
  display: block; width: 100%; text-align: left;
  background: var(--rb-surface);
  border: 2px solid #e2e8f0;
  border-radius: .75rem;
  padding: 1rem;
  transition: transform .15s ease, border-color .15s ease, background-color .15s ease;
  cursor: pointer;
}
.rb-option:hover { transform: translateY(-1px); border-color: #cbd5e1; }
.rb-option.is-on {
  border-color: var(--rb-primary);
  background: #eef3f9;
}
.rb-option.is-on::before {
  content: "✓";
  color: var(--rb-primary);
  font-weight: 700;
  margin-right: .35rem;
}

.rb-desktop-only {
  display: none;
}

.rb-md-up-only {
  display: none;
}

.rb-mobile-only {
  display: block;
}

.rb-mobile-guide-index {
  position: static;
}

.rb-mobile-guide-index__inner {
  border: 1px solid var(--rb-border);
  border-radius: 1rem;
  background: rgba(255, 255, 255, .96);
  box-shadow: var(--rb-shadow-soft);
  padding: .6rem;
}

.rb-mobile-guide-index__button {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  border-radius: .75rem;
  padding: .75rem 1rem;
  background: var(--rb-primary);
  color: #fff;
  font-size: .875rem;
  font-weight: 700;
}

.rb-mobile-guide-index__panel {
  margin-top: .6rem;
  border-top: 1px solid var(--rb-border);
  padding-top: .6rem;
}

.rb-mobile-guide-index__nav {
  display: grid;
  gap: .45rem;
}

.rb-mobile-guide-index__nav a {
  border-radius: .75rem;
  background: #f8fafc;
  padding: .65rem .75rem;
  font-size: .875rem;
  font-weight: 600;
}

.rb-critical-alert {
  border-bottom: 1px solid rgba(184, 119, 10, .24);
  background: #fff7ed;
}

.rb-critical-alert__inner {
  display: grid;
  gap: .75rem;
  align-items: start;
  max-width: 72rem;
  margin: 0 auto;
  padding: .85rem 1rem;
}

.rb-critical-alert__icon {
  display: inline-grid;
  width: 1.75rem;
  height: 1.75rem;
  place-items: center;
  border-radius: 999px;
  background: var(--rb-warn);
  color: #fff;
  font-weight: 800;
}

.rb-critical-alert__content {
  display: grid;
  gap: .25rem;
}

.rb-critical-alert__actions {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  align-items: center;
}

.rb-critical-alert__link,
.rb-critical-alert__close {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0 .25rem;
  font-size: .875rem;
  font-weight: 700;
  text-decoration: underline;
}

.rb-weekly-card {
  display: block;
  height: 100%;
  border: 1px solid var(--rb-border);
  border-radius: .75rem;
  background: #fff;
  box-shadow: var(--rb-shadow-soft);
  padding: 1.25rem;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.rb-weekly-card:hover {
  border-color: rgba(15, 23, 42, .14);
  box-shadow: var(--rb-shadow-hover);
  transform: translateY(-2px);
}

.rb-tour-toast {
  position: fixed;
  right: 1rem;
  top: 5.25rem;
  bottom: auto;
  z-index: 60;
  width: min(25rem, calc(100vw - 2rem));
  border: 1px solid var(--rb-border);
  border-radius: 1rem;
  background: #fff;
  box-shadow: 0 18px 40px rgba(15, 23, 42, .16);
  padding: 1rem;
}

.rb-tour-toast__text {
  color: #0f172a;
  font-size: .95rem;
  font-weight: 700;
  line-height: 1.35;
}

.rb-tour-toast__actions {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: .85rem;
}

.rb-tour-toast__primary,
.rb-tour-toast__secondary {
  min-height: 2.75rem;
  border-radius: .75rem;
  padding: 0 .9rem;
  font-size: .875rem;
  font-weight: 700;
}

.rb-tour-toast__primary {
  border: 0;
  background: var(--rb-primary);
  color: #fff;
}

.rb-tour-toast__secondary {
  border: 1px solid var(--rb-border);
  background: #f8fafc;
  color: #334155;
}

/* Recorrido guiado (Driver.js) con diseño Bizkaia: cabecera roja con "Paso N de M",
   barra de progreso, icono por paso y botones en píldora. Lógica en tours.js. */
.driver-popover.rb-driver-popover {
  max-width: min(23rem, calc(100vw - 1.5rem));
  padding: 0;
  overflow: hidden;
  border-radius: 1.25rem;
  background: #fff;
  color: var(--rb-ink);
  font-family: inherit;
  box-shadow: 0 2px 6px rgba(15, 23, 42, .08), 0 18px 48px rgba(15, 23, 42, .18);
}
.rb-driver-popover .rb-tour__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .75rem 3rem .75rem 1.25rem;
  background: linear-gradient(100deg, #c8102e, #8e0c20);
  color: #fff;
  font-size: .78rem;
  font-weight: 600;
  line-height: 1.2;
}
.rb-driver-popover .rb-tour__bar { height: 4px; background: #f1f5f9; }
.rb-driver-popover .rb-tour__bar span { display: block; height: 100%; background: var(--rb-primary); transition: width .3s ease; }
.rb-driver-popover .driver-popover-title {
  /* Driver.js pone display:block en línea al pintar el título: hay que forzarlo. */
  display: flex !important;
  align-items: center;
  gap: .75rem;
  padding: 1.15rem 1.25rem 0;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.3;
}
.rb-driver-popover .rb-tour__icon {
  display: inline-grid;
  flex: none;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: .8rem;
  background: #fde8ec;
  color: var(--rb-primary);
}
.rb-driver-popover .driver-popover-description {
  padding: .6rem 1.25rem 0;
  color: var(--rb-muted);
  font-size: .92rem;
  line-height: 1.6;
}
.rb-driver-popover .driver-popover-footer {
  align-items: center;
  gap: .5rem;
  margin-top: 1rem;
  padding: .85rem 1.25rem 1.1rem;
  border-top: 1px solid #eef2f6;
}
.rb-driver-popover .driver-popover-progress-text { color: var(--rb-muted); font-size: .8rem; font-weight: 600; }
.rb-driver-popover .driver-popover-navigation-btns { gap: .5rem; }
.rb-driver-popover .driver-popover-footer button {
  min-height: 2.75rem;
  margin: 0;
  padding: .45rem 1rem;
  border: 1.5px solid var(--rb-primary);
  border-radius: 999px;
  background: #fff;
  color: var(--rb-primary);
  font: inherit;
  font-size: .85rem;
  font-weight: 700;
  text-shadow: none;
}
.rb-driver-popover .driver-popover-footer button:hover { background: #fff1f4; }
.rb-driver-popover .driver-popover-footer .driver-popover-next-btn { background: var(--rb-primary); color: #fff; }
.rb-driver-popover .driver-popover-footer .driver-popover-next-btn:hover { background: var(--rb-primary-700); }
.rb-driver-popover .driver-popover-footer { justify-content: flex-end; }
.rb-driver-popover .driver-popover-close-btn {
  top: .35rem;
  right: .35rem;
  width: 2.5rem;
  height: 2.5rem;
  color: #fff;
  font-size: 1.4rem;
}
.rb-driver-popover .driver-popover-close-btn:hover,
.rb-driver-popover .driver-popover-close-btn:focus { color: #fff; opacity: .85; }
.rb-driver-popover .driver-popover-arrow { border-width: 8px; }
.rb-driver-popover .driver-popover-arrow-side-bottom { border-bottom-color: #fff; }
.rb-driver-popover .driver-popover-arrow-side-top { border-top-color: #fff; }
.rb-driver-popover .driver-popover-arrow-side-left { border-left-color: #fff; }
.rb-driver-popover .driver-popover-arrow-side-right { border-right-color: #fff; }
.rb-driver-popover button:focus-visible { outline: 3px solid #ffbf47; outline-offset: 2px; box-shadow: none; }

/* Durante el recorrido no se muestra nada flotante que pueda solaparse con el globo. */
html.rb-touring .rb-tour-toast,
html.rb-touring .rb-chatbot-fab,
html.rb-touring .rb-feedback-widget { display: none !important; }

.rb-chatbot-fab {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 70;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  min-height: 3.25rem;
  border: 0;
  border-radius: 999px;
  background: var(--rb-primary);
  color: #fff;
  box-shadow: 0 16px 36px rgba(15, 23, 42, .22);
  padding: .4rem 1rem .4rem .45rem;
  font-weight: 800;
}

.rb-chatbot-fab__icon {
  display: inline-grid;
  width: 2.35rem;
  height: 2.35rem;
  place-items: center;
  border-radius: 999px;
  background: #fff;
  color: var(--rb-primary);
  font-weight: 900;
}

.rb-chatbot-panel {
  position: fixed;
  right: 1rem;
  bottom: 5rem;
  z-index: 69;
  display: grid;
  width: min(22.5rem, calc(100vw - 2rem));
  max-height: 78vh;
  grid-template-rows: auto minmax(11rem, 1fr) auto;
  overflow: hidden;
  border: 1px solid var(--rb-border);
  border-radius: 1.25rem;
  background: #fff;
  box-shadow: 0 24px 54px rgba(15, 23, 42, .22);
}

.rb-chatbot-panel__header {
  display: flex;
  gap: .75rem;
  align-items: flex-start;
  justify-content: space-between;
  border-bottom: 1px solid var(--rb-border);
  padding: .8rem .9rem;
}

.rb-chatbot-panel__title {
  color: #0f172a;
  font-size: 1.05rem;
  font-weight: 800;
}

.rb-chatbot-panel__actions {
  display: flex;
  gap: .5rem;
  align-items: center;
}

.rb-chatbot-plain {
  border: 0;
  background: transparent;
  color: var(--rb-primary);
  font-size: .78rem;
  font-weight: 800;
  text-decoration: underline;
}

.rb-chatbot-close {
  display: inline-grid;
  width: 2.75rem;
  height: 2.75rem;
  place-items: center;
  border: 1px solid var(--rb-border);
  border-radius: 999px;
  background: #fff;
  color: #334155;
  font-size: 1.5rem;
  line-height: 1;
}

.rb-chatbot-panel__body {
  display: grid;
  align-content: start;
  gap: .75rem;
  overflow: auto;
  padding: .8rem;
  background: #f8fafc;
}

.rb-chatbot-message {
  max-width: 92%;
  border-radius: 1rem;
  padding: .6rem .7rem;
  font-size: .86rem;
  line-height: 1.4;
}

.rb-chatbot-message--bot {
  justify-self: start;
  border: 1px solid var(--rb-border);
  background: #fff;
  color: #1e293b;
}

.rb-chatbot-message--user {
  justify-self: end;
  background: var(--rb-primary);
  color: #fff;
}

.rb-chatbot-message--result {
  max-width: 100%;
  justify-self: stretch;
  padding: 0;
  background: transparent;
}

.rb-chatbot-result {
  border: 1px solid var(--rb-border);
  border-radius: 1rem;
  background: #fff;
  padding: 1rem;
}

.rb-chatbot-result h3 {
  color: #0f172a;
  font-size: 1rem;
  font-weight: 800;
}

.rb-chatbot-result p {
  margin-top: .35rem;
  color: #475569;
  font-size: .9rem;
}

.rb-chatbot-result__links {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: .75rem;
}

.rb-chatbot-result__links a {
  display: inline-flex;
  border-radius: .75rem;
  background: #f1f5f9;
  color: var(--rb-primary);
  padding: .55rem .7rem;
  font-size: .82rem;
  font-weight: 800;
  text-decoration: underline;
}

.rb-chatbot-options {
  border-top: 1px solid var(--rb-border);
  max-height: 34vh;
  overflow: auto;
  padding: .65rem;
}

.rb-chatbot-options__grid,
.rb-chatbot-options__result-actions {
  display: grid;
  gap: .4rem;
}

.rb-chatbot-options button {
  width: 100%;
  border: 1px solid var(--rb-border);
  border-radius: .75rem;
  background: #fff;
  color: #0f172a;
  padding: .55rem .7rem;
  text-align: left;
  font-size: .84rem;
  font-weight: 800;
  line-height: 1.25;
}

.rb-chatbot-options__result-actions {
  grid-template-columns: 1fr 1fr;
}

.rb-chatbot-options__result-actions button:first-child {
  background: var(--rb-primary);
  color: #fff;
}

.rb-chatbot-fab:focus-visible,
.rb-chatbot-panel button:focus-visible,
.rb-chatbot-panel a:focus-visible {
  outline: 3px solid #ffbf47;
  outline-offset: 3px;
}

.rb-video-frame {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 1rem;
  background: #0f172a;
}

.rb-video-frame iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.rb-feedback-widget {
  width: min(72rem, calc(100% - 2rem));
  margin: 2rem auto 0;
  border: 1px solid var(--rb-border);
  border-radius: 1rem;
  background: #fff;
  box-shadow: 0 10px 26px rgba(15, 23, 42, .06);
  padding: 1.25rem;
}

.rb-feedback-widget__title {
  color: #0f172a;
  font-size: 1.05rem;
  font-weight: 800;
}

.rb-feedback-widget__choices,
.rb-feedback-widget__actions {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin-top: 1rem;
}

.rb-feedback-widget__choice,
.rb-feedback-widget__primary,
.rb-feedback-widget__secondary {
  min-height: 2.75rem;
  border-radius: .85rem;
  padding: 0 1rem;
  font-size: .95rem;
  font-weight: 800;
}

.rb-feedback-widget__choice {
  border: 1px solid var(--rb-border);
  background: #f8fafc;
  color: #0f172a;
}

.rb-feedback-widget__primary {
  border: 0;
  background: var(--rb-primary);
  color: #fff;
}

.rb-feedback-widget__secondary {
  border: 1px solid var(--rb-border);
  background: #fff;
  color: #334155;
}

.rb-feedback-widget__label {
  display: block;
  margin-top: 1rem;
  color: #334155;
  font-size: .9rem;
  font-weight: 700;
}

.rb-feedback-widget__textarea {
  display: block;
  width: 100%;
  margin-top: .5rem;
  border: 1px solid var(--rb-border);
  border-radius: .85rem;
  padding: .8rem;
  color: #0f172a;
}

.rb-feedback-widget__link {
  margin-top: .75rem;
  border: 0;
  background: transparent;
  color: var(--rb-primary);
  font-size: .85rem;
  font-weight: 800;
  text-decoration: underline;
}

.rb-feedback-widget button:focus-visible,
.rb-feedback-widget textarea:focus-visible {
  outline: 3px solid #ffbf47;
  outline-offset: 3px;
}

@media (max-width: 640px) {
  .rb-feedback-widget {
    width: calc(100% - 1.5rem);
    padding: 1rem;
  }

  .rb-feedback-widget__choices,
  .rb-feedback-widget__actions {
    display: grid;
  }
}

@media (max-width: 640px) {
  /* Zona de seguridad para que el botón flotante del asistente no tape
     el contenido al llegar al final de la página. */
  body { padding-bottom: 4.5rem; }

  .rb-tour-toast {
    top: 4.75rem;
    right: .75rem;
    width: min(23rem, calc(100vw - 1.5rem));
  }

  .rb-chatbot-fab {
    right: .75rem;
    bottom: .75rem;
  }

  .rb-chatbot-panel {
    inset: 0;
    width: 100%;
    max-height: none;
    height: 100svh;
    border-radius: 0;
  }

  .rb-chatbot-panel__header {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #fff;
  }

  .rb-chatbot-options {
    max-height: 36vh;
  }
}

@media (min-width: 768px) {
  .rb-critical-alert__inner {
    grid-template-columns: auto minmax(0, 1fr) auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

@media (min-width: 1024px) {
  .rb-desktop-only {
    display: block;
  }

  .rb-mobile-only {
    display: none !important;
  }
}

@media (min-width: 768px) {
  .rb-md-up-only {
    display: block;
  }
}

/* Bloqueo de scroll del fondo cuando el asistente está en pantalla completa (móvil). */
.rb-scroll-lock {
  overflow: hidden;
}

/* Cuando el menú móvil está abierto, ocultamos la UI flotante para que no se solape. */
.rb-nav-open .rb-chatbot-fab,
.rb-nav-open .rb-tour-toast {
  display: none !important;
}

/* Sub-navegación de Renta persistente (se inyecta tras el header en páginas ciudadanas).
   Da acceso al recorrido (Inicio · Preparar · Deducciones · Presentar · Ayuda) sin depender
   del mega-menú institucional. */
.rb-subnav {
  position: sticky;
  top: var(--rb-header-h, 78px);
  z-index: 40;
  background: #fff;
  border-bottom: 1px solid var(--rb-border);
}
.rb-subnav__inner {
  max-width: 72rem;
  margin: 0 auto;
  display: flex;
  gap: .25rem;
  padding: .4rem 1rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.rb-subnav a {
  white-space: nowrap;
  padding: .5rem .75rem;
  border-radius: .6rem;
  font-size: .875rem;
  font-weight: 600;
  color: var(--rb-muted);
}
.rb-subnav a:hover {
  background: #f1f5f9;
  color: var(--rb-ink);
}
.rb-subnav a[aria-current="page"] {
  background: #eef3f9;
  color: var(--rb-primary-700);
}

/* Respeto a la preferencia del sistema de movimiento reducido (WCAG 2.3.3 / 2.2.2,
   exigible por RD 1112/2018). Desactiva animaciones, transiciones y scroll suave
   para quienes lo solicitan, sin afectar a la legibilidad del contenido. */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}
