/* ============================================================
   GUIEX — hoja de estilo exclusiva de taric.html
   Namespace: body.taric-page. Modo claro único (la web no tiene modo oscuro).
   Depende de styles-burdeos.css para tokens, cabecera, pie, .button y las
   composiciones compartidas de la web que esta página reutiliza tal cual:
   .hand-feature-section, .eir-process-section, .eir-value-section,
   .defense-mini-form y .footer-cta.

   Reglas de la casa: NINGÚN recuadro lleva barra lateral de acento
   (border-left); toda caja es una tarjeta (borde completo de 1 px, fondo de
   superficie, padding generoso); las negritas van en burdeos; los números
   grandes en círculo burdeos son el recurso recurrente de la página.
   ============================================================ */

/* La cabecera burdeos necesita texto claro también en sus estados activos. */
.taric-page .site-header:is(.is-scrolled, .is-open) .site-nav > a:is(.is-active, :hover, :focus-visible),
.taric-page .site-header:is(.is-scrolled, .is-open) .language-switcher a:is(.is-current, :hover, :focus-visible),
.taric-page .site-header:is(.is-scrolled, .is-open) .nav-dropdown-trigger:is(:hover, :focus-visible),
.taric-page .site-header:is(.is-scrolled, .is-open) .nav-dropdown:is(.is-active, :hover, :focus-within) .nav-dropdown-trigger {
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.55);
}


body.taric-page {
  /* Las cifras arancelarias van en la Raleway negra de la portada («8471 30 00 00»),
     que es la letra que Milton quiere para el código (07-09); antes iban en una
     grotesca técnica (Bahnschrift) distinta de la de la cifra delineada. */
  --taric-code-font: Raleway, "Segoe UI", Arial, sans-serif;
  background: var(--paper);
}

.taric-page #clasificar {
  scroll-margin-top: 96px;
}

/* Negritas en burdeos (fuera de los paneles oscuros, que las llevan en blanco) */
.taric-page .taric-hero strong,
.taric-page .hand-feature-copy strong,
.taric-page .eir-value-heading strong,
.taric-page .eir-benefit-card strong,
.taric-page .taric-track strong,
.taric-page .taric-legal-nota strong {
  color: var(--wine);
}

/* Número grande en círculo burdeos: recurso recurrente */
.taric-page .taric-num {
  display: inline-grid;
  width: 40px;
  height: 40px;
  place-items: center;
  margin-bottom: 18px;
  color: #fff;
  background: var(--wine);
  border-radius: 50%;
  font-size: 0.8rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  box-shadow: 0 0 0 6px rgba(112, 44, 54, 0.08);
}

/* ------------------------------------------------------------
   1. Portada editorial (sin vídeo)
   ------------------------------------------------------------ */
.taric-page .taric-hero {
  position: relative;
  display: grid;
  align-content: center;
  min-height: clamp(460px, 62vh, 680px);
  padding: clamp(110px, 13vw, 180px) clamp(22px, 6vw, 84px) clamp(64px, 7vw, 100px);
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(circle at 88% 12%, rgba(112, 44, 54, 0.1), transparent 40%),
    var(--soft);
}

.taric-page .taric-hero-ghost {
  position: absolute;
  z-index: 0;
  inset: auto -0.04em -0.14em auto;
  color: transparent;
  font-size: clamp(4.4rem, 13vw, 15rem);
  font-weight: 900;
  font-variant-numeric: lining-nums tabular-nums;
  line-height: 0.74;
  letter-spacing: -0.01em;
  white-space: nowrap;
  -webkit-text-stroke: 1.5px rgba(112, 44, 54, 0.28);
  paint-order: stroke fill;
  pointer-events: none;
  user-select: none;
}

.taric-page .taric-hero-content {
  position: relative;
  z-index: 2;
  max-width: 940px;
}

.taric-page .taric-hero h1 {
  margin-bottom: 20px;
  color: var(--wine);
  font-size: clamp(3.4rem, 11vw, 9.5rem);
  font-weight: 900;
  line-height: 0.84;
  letter-spacing: -0.02em;
}

/* Lola, nota 6 (09-11-2026): que es gratis se ve justo bajo el título. */
.taric-page .taric-hero-free {
  display: inline-block;
  margin: 0 0 16px;
  padding: 6px 14px;
  background: var(--wine);
  color: #fff;
  font-size: clamp(0.92rem, 1.3vw, 1.06rem);
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.taric-page .taric-hero-lead {
  max-width: 640px;
  margin-bottom: 26px;
  color: var(--graphite);
  font-size: clamp(1.02rem, 1.5vw, 1.22rem);
}

.taric-page .taric-hero-actions .button {
  border-radius: 0;
}

/* ------------------------------------------------------------
   2. Qué resuelve (composición de mano de la web)
   ------------------------------------------------------------ */
.taric-page .hand-feature-copy h2 {
  max-width: 14ch;
  font-size: clamp(2.2rem, 4.2vw, 4.6rem);
}

.taric-page .hand-feature-copy p {
  max-width: 54ch;
  margin: 0;
  color: rgba(35, 31, 32, 0.74);
  font-size: clamp(1rem, 1.2vw, 1.14rem);
  line-height: 1.65;
}

/* Escena «0901» por piezas: cada elemento es un WebP con transparencia real
   colocado en porcentaje sobre un lienzo 1024×1536 (assets/elementos.json).
   Tres grupos con parallax suave al pasar el ratón: papel, cifras, objetos. */
.taric-page .taric-escena {
  position: relative;
  width: 100%;
  max-width: 600px;
  height: auto;
  margin-left: auto;
}

.taric-page .taric-pieza {
  position: absolute;
  display: block;
  object-fit: fill;
  /* cada pieza con su duración y retardo: se mueven como piezas sueltas, no como un bloque */
  transition: transform var(--dur, 0.7s) cubic-bezier(0.34, 1.45, 0.64, 1) var(--delay, 0s);
  will-change: transform;
}

.taric-page .taric-pieza-fondo { z-index: 0; }
.taric-page .taric-pieza-cifras { z-index: 2; }
.taric-page .taric-pieza-objetos { z-index: 1; }

/* Al pasar el ratón la escena se abre: cada pieza se aleja del centro
   (vector --dx/--dy calculado por componer.py) y las cifras se levantan. */
.taric-page .taric-escena:hover .taric-pieza { transform: translate(var(--dx, 0), var(--dy, 0)) rotate(var(--rot, 0)); }
.taric-page .taric-escena:hover .taric-pieza-cifras { transform: translate(var(--dx, 0), calc(var(--dy, 0) - 6px)) rotate(var(--rot, 0)); }
.taric-page .taric-escena:hover .taric-pieza-objetos { transform: translate(var(--dx, 0), calc(var(--dy, 0) + 6px)) rotate(var(--rot, 0)); }

/* Sección más panorámica: menos aire que en la web y la escena algo más ancha. */
.taric-page .hand-feature-section {
  min-height: 0;
  padding: clamp(28px, 3.5vw, 52px) clamp(20px, 5vw, 80px);
  gap: clamp(20px, 3vw, 48px);
}

/* ------------------------------------------------------------
   3. Cómo funciona (flujo numerado de la web)
   ------------------------------------------------------------ */
.taric-page .eir-process-step h3 {
  font-size: clamp(1.4rem, 2.1vw, 2.2rem);
}

.taric-page .eir-process-step p {
  max-width: 30ch;
}

/* ------------------------------------------------------------
   4. Widget: cabecera y formulario
   ------------------------------------------------------------ */
.taric-page .taric-widget-section {
  padding: clamp(56px, 7vw, 104px) clamp(22px, 6vw, 84px);
  background:
    radial-gradient(circle at 12% 8%, rgba(112, 44, 54, 0.07), transparent 38%),
    #f3f1ed;
}

.taric-page .taric-widget-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: clamp(26px, 4vw, 56px);
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(112, 44, 54, 0.12);
  box-shadow: 0 22px 56px rgba(79, 29, 39, 0.09);
}

.taric-page .taric-widget-header {
  margin-bottom: clamp(18px, 3vw, 28px);
}

.taric-page .taric-widget-header h2 {
  max-width: 18ch;
  margin-bottom: 0;
  color: var(--wine);
}

.taric-page .taric-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  padding-top: clamp(20px, 2.6vw, 30px);
  border-top: 1px solid rgba(112, 44, 54, 0.14);
}

.taric-page .taric-field {
  display: grid;
  gap: 8px;
  align-content: start;
}

.taric-page .taric-field-full {
  grid-column: 1 / -1;
}

.taric-page .taric-field label {
  color: var(--wine);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.taric-page .taric-field-optional {
  color: var(--gray);
  font-weight: 700;
  text-transform: none;
}

.taric-page .taric-field input,
.taric-page .taric-field textarea {
  width: 100%;
  min-height: 46px;
  padding: 12px 13px;
  border: 1px solid rgba(97, 97, 96, 0.28);
  border-radius: 0;
  color: var(--graphite);
  background: rgba(255, 255, 255, 0.95);
  font: inherit;
}

.taric-page .taric-field textarea {
  min-height: 132px;
  line-height: 1.55;
  resize: vertical;
}

.taric-page .taric-field input:focus-visible,
.taric-page .taric-field textarea:focus-visible {
  outline: 2px solid var(--wine);
  outline-offset: 3px;
  border-color: var(--wine);
}

.taric-page .taric-field-help {
  margin: 0;
  color: var(--gray);
  font-size: 0.78rem;
}

.taric-page .taric-field-help.is-limit {
  color: var(--wine);
  font-weight: 800;
}

/* 4.1 Documentación: solo la marca; se anima al pasar por encima ---- */
.taric-page .taric-dropzone {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 132px;
  background: rgba(255, 255, 255, 0.72);
  border: 1.5px dashed rgba(112, 44, 54, 0.38);
  cursor: pointer;
  transition: background 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
}

.taric-page .taric-dropzone:hover,
.taric-page .taric-dropzone:focus-visible {
  background: rgba(112, 44, 54, 0.04);
  border-color: rgba(112, 44, 54, 0.6);
}

.taric-page .taric-dropzone:focus-visible {
  outline: 2px solid var(--wine-dark);
  outline-offset: 3px;
}

.taric-page .taric-dropzone.is-over {
  background: rgba(112, 44, 54, 0.08);
  border-style: solid;
  border-color: var(--wine);
  box-shadow: 0 0 0 8px rgba(112, 44, 54, 0.08);
}

.taric-page .taric-dropzone.is-disabled {
  opacity: 0.55;
  cursor: progress;
}

/* Marca: tres hojas apiladas + flecha; en hover se abren en abanico */
.taric-page .taric-dropzone-mark {
  position: relative;
  width: 64px;
  height: 58px;
}

.taric-page .taric-dropzone-mark i {
  position: absolute;
  left: 14px;
  top: 4px;
  width: 36px;
  height: 46px;
  border: 1.5px solid var(--wine);
  background: #fff;
  transform-origin: 50% 100%;
  transition: transform 420ms cubic-bezier(0.2, 0.75, 0.2, 1), background 300ms ease;
}

.taric-page .taric-dropzone-mark i:nth-child(1) { transform: rotate(-9deg) translateX(-4px); }
.taric-page .taric-dropzone-mark i:nth-child(2) { transform: translateY(-2px); }
.taric-page .taric-dropzone-mark i:nth-child(3) { transform: rotate(9deg) translateX(4px); background: rgba(112, 44, 54, 0.08); }

/* Flecha de entrada: aparece al pasar por encima */
.taric-page .taric-dropzone-mark b {
  position: absolute;
  left: 50%;
  bottom: -6px;
  width: 12px;
  height: 12px;
  border-right: 2px solid var(--wine);
  border-bottom: 2px solid var(--wine);
  opacity: 0;
  transform: translate(-50%, -10px) rotate(45deg);
  transition: opacity 300ms ease, transform 420ms cubic-bezier(0.2, 0.75, 0.2, 1);
}

.taric-page .taric-dropzone:hover .taric-dropzone-mark i:nth-child(1),
.taric-page .taric-dropzone:focus-visible .taric-dropzone-mark i:nth-child(1) { transform: rotate(-22deg) translate(-12px, -4px); }
.taric-page .taric-dropzone:hover .taric-dropzone-mark i:nth-child(2),
.taric-page .taric-dropzone:focus-visible .taric-dropzone-mark i:nth-child(2) { transform: translateY(-8px); }
.taric-page .taric-dropzone:hover .taric-dropzone-mark i:nth-child(3),
.taric-page .taric-dropzone:focus-visible .taric-dropzone-mark i:nth-child(3) { transform: rotate(22deg) translate(12px, -4px); }
.taric-page .taric-dropzone:hover .taric-dropzone-mark b,
.taric-page .taric-dropzone:focus-visible .taric-dropzone-mark b { opacity: 1; transform: translate(-50%, 0) rotate(45deg); }

.taric-page .taric-dropzone.is-over .taric-dropzone-mark i { background: rgba(112, 44, 54, 0.12); }
.taric-page .taric-dropzone.is-over .taric-dropzone-mark b {
  opacity: 1;
  animation: taricDropArrow 900ms ease-in-out infinite;
}

@keyframes taricDropArrow {
  0%, 100% { transform: translate(-50%, -4px) rotate(45deg); }
  50% { transform: translate(-50%, 4px) rotate(45deg); }
}

/* Lista de archivos elegidos */
.taric-page .taric-files {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.taric-page .taric-file {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  background: #fff;
  border: 1px solid rgba(112, 44, 54, 0.16);
  animation: taricSoftRise 360ms cubic-bezier(0.2, 0.75, 0.2, 1) both;
}

.taric-page .taric-file.is-error {
  background: rgba(112, 44, 54, 0.06);
  border-color: rgba(112, 44, 54, 0.4);
}

.taric-page .taric-file-type {
  padding: 4px 7px;
  color: var(--wine-dark);
  background: rgba(112, 44, 54, 0.08);
  border: 1px solid rgba(112, 44, 54, 0.2);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.taric-page .taric-file-name {
  overflow: hidden;
  color: var(--graphite);
  font-size: 0.9rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.taric-page .taric-file-meta {
  color: var(--gray);
  font-size: 0.78rem;
  white-space: nowrap;
}

.taric-page .taric-file.is-error .taric-file-meta {
  color: var(--wine-dark);
  font-weight: 700;
  white-space: normal;
}

.taric-page .taric-file-remove {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(112, 44, 54, 0.24);
  background: #fff;
  color: var(--wine);
  font-size: 1.1rem;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
}

.taric-page .taric-file-remove:hover,
.taric-page .taric-file-remove:focus-visible {
  color: #fff;
  background: var(--wine);
  border-color: var(--wine);
}

/* Nota 9 de Lola: estado discreto mientras Turnstile comprueba en segundo plano. */
.taric-page .taric-verificacion { margin: 6px 0 0; color: var(--gray); font-size: 0.8rem; }
.taric-page .taric-turnstile {
  min-height: 66px;
}

.taric-page .taric-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

.taric-page .taric-form-actions .button {
  font-family: inherit;
  border-radius: 0;
}

.taric-page .button:focus-visible,
.taric-page .taric-seguir:focus-visible,
.taric-page .taric-widget-inner button:focus-visible,
.taric-page .taric-widget-inner a:focus-visible {
  outline: 2px solid var(--wine-dark);
  outline-offset: 3px;
}

.taric-page [data-taric-submit][disabled] {
  opacity: 0.55;
  cursor: progress;
}

.taric-page .taric-form-error {
  flex: 1 1 260px;
  margin: 0;
  padding: 11px 14px;
  color: var(--wine-dark);
  background: rgba(112, 44, 54, 0.07);
  border: 1px solid rgba(112, 44, 54, 0.34);
  font-size: 0.88rem;
  font-weight: 700;
}

/* Todas las menciones legales, juntas y en pequeño */
.taric-page .taric-legal-nota {
  margin: clamp(22px, 3vw, 32px) 0 0;
  padding-top: 16px;
  border-top: 1px solid rgba(112, 44, 54, 0.14);
  color: var(--gray);
  font-size: 0.76rem;
  line-height: 1.55;
}

/* ------------------------------------------------------------
   5. Escenario del teatro
   ------------------------------------------------------------ */
.taric-page .taric-stage {
  margin-top: clamp(28px, 4vw, 44px);
  padding-top: clamp(26px, 3.4vw, 40px);
  border-top: 1px solid rgba(112, 44, 54, 0.14);
}

/* 5.0 La agente: la nube se convierte en la marca GUIEX ----------- */
.taric-page .taric-agent {
  position: relative;
  display: grid;
  grid-template-columns: clamp(260px, 36vw, 420px) minmax(0, 1fr);
  column-gap: clamp(16px, 3vw, 40px);
  row-gap: clamp(4px, 0.8vw, 10px);
  align-items: center;
  min-height: clamp(280px, 32vw, 380px);
  margin-bottom: clamp(24px, 3.4vw, 40px);
  padding: clamp(14px, 2vw, 22px) clamp(18px, 3vw, 36px);
  overflow: hidden;
  background:
    radial-gradient(circle at 0% 0%, rgba(112, 44, 54, 0.08), transparent 42%),
    rgba(246, 246, 244, 0.9);
  border: 1px solid rgba(112, 44, 54, 0.16);
  animation: taricSoftRise 460ms cubic-bezier(0.2, 0.75, 0.2, 1) both;
}

.taric-page .taric-agent-visual {
  position: relative;
  z-index: 2;
  display: grid;
  grid-column: 1;
  grid-row: 1;
  place-items: center;
  width: 100%;
}

.taric-page .taric-agent-copy {
  display: contents;
}

.taric-page .taric-logo-motion {
  position: relative;
  width: min(100%, 420px);
  aspect-ratio: 26 / 17;
  isolation: isolate;
  overflow: hidden;
}

.taric-page .taric-logo-scene,
.taric-page .taric-logo-fill {
  position: absolute;
  inset: 0;
}

.taric-page .taric-logo-scene {
  z-index: 2;
  display: block;
  width: 100%;
  height: 100%;
}

.taric-page .taric-logo-goo {
  will-change: filter;
}

.taric-page .taric-logo-mancha,
.taric-page .taric-logo-hoja {
  fill: var(--wine);
}

.taric-page .taric-logo-fill {
  z-index: 3;
  inset: 4% 20%;
  background: var(--wine);
  opacity: 0;
  filter: blur(10px);
  transform: scale(0.97);
  transform-origin: center;
  -webkit-mask: url("assets/guiex-icon-mask.png?v=d0e508fc83") center / contain no-repeat;
  mask: url("assets/guiex-icon-mask.png?v=d0e508fc83") center / contain no-repeat;
}

.taric-page .taric-logo-motion.is-static .taric-logo-scene {
  display: none;
}

.taric-page .taric-logo-motion.is-static .taric-logo-fill {
  opacity: 1;
  filter: none;
  transform: scale(1);
}

.taric-page .taric-agent-status {
  position: relative;
  z-index: 2;
  display: flex;
  grid-column: 2;
  grid-row: 1;
  flex-wrap: wrap;
  gap: 4px;
  align-items: baseline;
  margin: 0 0 12px;
  color: var(--graphite);
  font-size: clamp(1.02rem, 1.5vw, 1.24rem);
  font-weight: 800;
  line-height: 1.3;
  min-height: 2.6em;
}

.taric-page .taric-agent-status [data-taric-agent-status] {
  display: inline-block;
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.taric-page .taric-agent-status [data-taric-agent-status]::after {
  content: "";
  display: inline-block;
  width: 2px;
  height: 0.92em;
  margin-left: 4px;
  background: var(--wine);
  opacity: 0;
  vertical-align: -0.1em;
}

.taric-page .taric-agent-status.is-typing [data-taric-agent-status]::after {
  opacity: 1;
  animation: taricTypeCaret 720ms step-end infinite;
}

.taric-page .taric-agent-status.is-typing .taric-agent-dots {
  opacity: 0;
}

@keyframes taricTypeCaret {
  0%, 52% { opacity: 1; }
  53%, 100% { opacity: 0; }
}

.taric-page .taric-agent-status-live {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.taric-page .taric-agent-dots {
  display: inline-flex;
  gap: 3px;
  align-items: flex-end;
  height: 0.7em;
  transition: opacity 180ms ease;
}

.taric-page .taric-agent-dots i {
  display: block;
  width: 5px;
  height: 5px;
  background: var(--wine);
  animation: taricDotHop 1.2s ease-in-out infinite;
}

.taric-page .taric-agent-dots i:nth-child(2) { animation-delay: 0.15s; }
.taric-page .taric-agent-dots i:nth-child(3) { animation-delay: 0.3s; }

@keyframes taricDotHop {
  0%, 60%, 100% { opacity: 0.35; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-4px); }
}

.taric-page .taric-agent.is-done .taric-agent-dots,
.taric-page .taric-agent.is-error .taric-agent-dots {
  display: none;
}

/* El código ocupa el ancho de la escena como la cifra delineada de portada.
   Cada TARIC cambia como una sola pieza; nunca parpadean dígitos independientes. */
.taric-page .taric-agent-code {
  position: absolute;
  z-index: 1;
  display: flex;
  right: clamp(20px, 3vw, 38px);
  bottom: clamp(5px, 0.7vw, 9px);
  left: calc(clamp(260px, 36vw, 420px) + clamp(24px, 3.6vw, 50px));
  flex-wrap: nowrap;
  white-space: nowrap;
  justify-content: flex-end;
  gap: 0 0.2em;
  width: auto;
  margin: 0;
  color: transparent;
  font-family: var(--taric-code-font);
  font-size: clamp(3rem, 7vw, 5.8rem);
  font-weight: 900;
  font-variant-numeric: lining-nums tabular-nums;
  line-height: 0.86;
  letter-spacing: -0.01em;
  -webkit-text-stroke: 1.5px rgba(112, 44, 54, 0.28);
  paint-order: stroke fill;
  transform-origin: right bottom;
  will-change: opacity, filter, transform;
  transition: opacity 220ms ease, filter 220ms ease, transform 220ms ease;
}

.taric-page .taric-code-group {
  display: inline-flex;
}

.taric-page .taric-digit {
  display: inline-block;
  min-width: 0.58em;
  color: transparent;
  text-align: center;
  -webkit-text-stroke: inherit;
  paint-order: stroke fill;
  transition: color 420ms ease, -webkit-text-stroke-color 420ms ease;
}

.taric-page .taric-digit.is-spinning {
  will-change: color;
}

.taric-page .taric-agent-code.is-code-changing {
  opacity: 0.16;
  filter: blur(1px);
  transform: translateY(-8%);
}

.taric-page .taric-agent-code.is-settling {
  animation: taricCodeSettle 900ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes taricCodeSettle {
  from { opacity: 0.42; filter: blur(2.4px); transform: translateY(4px); }
  to { opacity: 1; filter: blur(0); transform: none; }
}

.taric-page .taric-digit.is-locked {
  color: var(--wine);
  -webkit-text-stroke-color: var(--wine);
  animation: taricDigitLock 420ms cubic-bezier(0.2, 0.75, 0.2, 1) both;
}

@keyframes taricDigitLock {
  from { color: transparent; -webkit-text-stroke-color: rgba(112, 44, 54, 0.28); }
  to { color: var(--wine); -webkit-text-stroke-color: var(--wine); }
}

.taric-page .taric-agent.is-done .taric-digit {
  color: var(--wine);
  opacity: 1;
  filter: none;
  transform: none;
  -webkit-text-stroke-color: var(--wine);
}

.taric-page .taric-agent-lista {
  position: relative;
  left: auto;
  right: auto;
  bottom: auto;
  display: grid;
  grid-column: 2;
  grid-row: 2;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(12px, 1.6vw, 18px);
  width: 100%;
  max-width: 100%;
  margin: 0;
  box-sizing: border-box;
  font-variant-numeric: tabular-nums;
  -webkit-text-stroke: 0;
}

.taric-page .taric-agent.is-lista {
  grid-template-columns: clamp(300px, 39vw, 460px) minmax(0, 1fr);
  grid-template-rows: auto 1fr;
  align-items: start;
  min-height: clamp(350px, 38vw, 470px);
  padding-block: clamp(22px, 3vw, 38px);
  overflow: visible;
}

.taric-page .taric-agent.is-lista .taric-agent-visual {
  grid-column: 1;
  grid-row: 1 / span 2;
  align-self: center;
}

.taric-page .taric-agent.is-lista .taric-logo-motion {
  width: min(100%, 460px);
}

.taric-page .taric-agent.is-lista .taric-agent-status {
  grid-column: 2;
  grid-row: 1;
  margin: clamp(6px, 1vw, 14px) 0 clamp(18px, 2.2vw, 28px);
}

.taric-page .taric-agent.is-lista .taric-agent-lista {
  grid-template-columns: minmax(0, 1fr);
}

.taric-page .taric-agent-lista.is-count-1 { grid-template-columns: minmax(0, 1fr); }
.taric-page .taric-agent-lista.is-count-2,
.taric-page .taric-agent-lista.is-count-3-4,
.taric-page .taric-agent-lista.is-count-5-8,
.taric-page .taric-agent-lista.is-count-9-12,
.taric-page .taric-agent-lista.is-count-13-20 {
  grid-template-columns: minmax(0, 1fr);
}

.taric-page .taric-agent-code-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-start;
  min-width: 0;
  padding: 0;
  color: var(--wine);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.015em;
}

.taric-page .taric-agent-code-value {
  font-family: var(--taric-code-font);
  font-size: clamp(0.84rem, 1.45vw, 1.22rem);
  font-variant-numeric: lining-nums tabular-nums;
  font-weight: 700;
  letter-spacing: 0.015em;
  white-space: nowrap;
}

.taric-page .taric-agent-lista.is-count-1 .taric-agent-code-value { font-size: clamp(2.15rem, 4vw, 3.15rem); }
.taric-page .taric-agent-lista.is-count-2 .taric-agent-code-value { font-size: clamp(1.85rem, 3.25vw, 2.6rem); }
.taric-page .taric-agent-lista.is-count-3-4 .taric-agent-code-value { font-size: clamp(1.55rem, 2.7vw, 2.15rem); }
.taric-page .taric-agent-lista.is-count-5-8 .taric-agent-code-value { font-size: clamp(1.25rem, 2.15vw, 1.7rem); }
.taric-page .taric-agent-lista.is-count-9-12 .taric-agent-code-value { font-size: clamp(1.05rem, 1.8vw, 1.4rem); }
.taric-page .taric-agent-lista.is-count-13-20 .taric-agent-code-value { font-size: clamp(0.92rem, 1.5vw, 1.18rem); }

.taric-page .taric-agent-code-meta {
  display: grid;
  gap: 2px;
  width: 100%;
  color: var(--graphite);
  font-size: clamp(0.61rem, 0.82vw, 0.72rem);
  font-weight: 500;
  line-height: 1.24;
  letter-spacing: 0;
}

.taric-page .taric-agent-code-identifier {
  color: rgba(112, 44, 54, 0.78);
  font-size: 0.92em;
  font-weight: 850;
}

.taric-page .taric-agent-code-description {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.taric-page .taric-agent-code-item.is-pendiente .taric-agent-code-value {
  color: rgba(112, 44, 54, 0.48);
  font-weight: 700;
}

/* Solo las cifras arancelarias cambian de familia: una grotesca técnica más
   recta que Raleway. El resto conserva intacta la tipografía editorial GUIEX. */
.taric-page .taric-doubt-code,
.taric-page .taric-candidate-code,
.taric-page .taric-lista-code,
.taric-page .taric-precedent-code,
.taric-page .taric-veredicto-code,
.taric-page .taric-producto-code {
  font-family: var(--taric-code-font);
  font-variant-numeric: lining-nums tabular-nums;
}

.taric-page .taric-stage-grid {
  display: block;
  align-items: start;
}

/* El relato es el escenario; el antiguo panel de códigos no participa en esta vista. */
.taric-page .taric-stage .taric-agent,
.taric-page .taric-stage .taric-agent.is-lista { display: none; }

/* 5.1 Línea de tiempo: cuánto lleva y cuánto le falta ------------ */
.taric-page .taric-timeline {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  margin: 0 0 clamp(22px, 3vw, 34px);
  color: var(--gray);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  font-variant-numeric: tabular-nums;
}

.taric-page .taric-timeline-bar {
  position: relative;
  display: block;
  height: 2px;
  background: rgba(112, 44, 54, 0.16);
}

.taric-page .taric-timeline-bar i {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  background: var(--wine);
  transition: width 420ms linear;
}

.taric-page .taric-timeline-bar::after {
  content: "";
  position: absolute;
  top: 50%;
  left: var(--taric-timeline-x, 0%);
  width: 7px;
  height: 7px;
  background: var(--wine);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: left 420ms linear;
}

.taric-page .taric-timeline.is-done .taric-timeline-bar::after {
  display: none;
}

.taric-page .taric-timeline-left {
  min-width: 9ch;
  text-align: right;
  text-transform: uppercase;
}

.taric-page .taric-timeline-elapsed {
  color: var(--wine);
}

/* 5.1b Margen: decisiones y dudas en tiempo real ------------------ */
.taric-page .taric-margen {
  position: sticky;
  top: 104px;
  display: grid;
  gap: 14px;
  align-content: start;
  min-width: 0;
  padding-left: 18px;
  border-left: 1px solid rgba(112, 44, 54, 0.18);
  font-size: 0.8rem;
  line-height: 1.45;
  color: var(--gray);
}

.taric-page .taric-margen:empty {
  visibility: hidden;
}

.taric-page .taric-margen-nota {
  animation: taricSoftRise 460ms cubic-bezier(0.2, 0.75, 0.2, 1) both;
}

.taric-page .taric-margen-nota b {
  display: block;
  margin-bottom: 2px;
  color: var(--graphite);
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.taric-page .taric-margen-nota b small {
  margin-left: 6px;
  color: var(--wine);
  font-weight: 800;
  letter-spacing: 0.06em;
  font-variant-numeric: tabular-nums;
}

.taric-page .taric-margen-nota.is-decision b {
  color: var(--wine);
}

.taric-page .taric-margen-nota.is-duda {
  padding: 10px 12px;
  color: var(--wine-dark);
  background: rgba(112, 44, 54, 0.06);
  border: 1px solid rgba(112, 44, 54, 0.2);
}

.taric-page .taric-margen-nota.is-duda p {
  margin: 0;
  font-weight: 700;
}

.taric-page .taric-margen-nota ul {
  margin: 6px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 3px;
}

.taric-page .taric-margen-nota li {
  color: var(--graphite);
}

.taric-page .taric-margen-nota li .taric-doubt-code {
  margin-right: 6px;
}

.taric-page .taric-margen-nota .taric-margen-bloqueante {
  display: block;
  margin-top: 6px;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.taric-page .taric-margen-nota strong {
  color: var(--graphite);
}

/* 5.2 Pista narrativa --------------------------------------- */
.taric-page .taric-track {
  display: grid;
  gap: 16px;
  align-content: start;
  min-width: 0;
}

/* Un solo relato; comprobaciones y trazas quedan accesibles bajo demanda. */
.taric-page .taric-track { max-width: 76ch; margin-inline: auto; }
.taric-page .taric-detalles { margin: 28px auto 0; max-width: 76ch; border-top: 1px solid rgba(112, 44, 54, .22); }
.taric-page .taric-detalles > summary { cursor: pointer; color: var(--wine); font-weight: 800; padding: 16px 4px; }
.taric-page .taric-detalles-cuerpo { display: grid; gap: 16px; padding: 4px 0 20px; }
.taric-page .taric-detalles .taric-margen { position: static; display: grid; gap: 12px; border-left: 0; border-top: 1px solid rgba(112, 44, 54, .12); padding: 18px 0 0; }
.taric-page .taric-detalles .taric-block { max-width: none; }
.taric-page .taric-herramienta { border: 1px solid rgba(112, 44, 54, .2); background: rgba(255, 255, 255, .58); padding: 0 14px; }
.taric-page .taric-track .taric-herramienta { width: 100%; max-width: 76ch; box-sizing: border-box; margin: 0; border: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: transparent; padding: 0 4px; font-family: Raleway, "Segoe UI", Arial, sans-serif; }
.taric-page .taric-track .taric-herramienta > summary { display: flex; flex-wrap: wrap; gap: 4px 10px; min-height: 38px; padding: 5px 0; font-size: .86rem; }
.taric-page .taric-track .taric-herramienta > summary { list-style: none; }
.taric-page .taric-track .taric-herramienta > summary::-webkit-details-marker { display: none; }
.taric-page .taric-track .taric-herramienta > summary::before { content: ""; flex: 0 0 6px; width: 6px; height: 6px; margin: 12px 2px 0 2px; border-right: 2px solid var(--wine); border-bottom: 2px solid var(--wine); transform: rotate(-45deg); transition: transform 180ms ease; }
.taric-page .taric-track .taric-herramienta[open] > summary::before { transform: rotate(45deg); }
.taric-page .taric-track .taric-herramienta > summary strong { flex: 1 1 110px; font-weight: 700; overflow-wrap: anywhere; }
.taric-page .taric-track .taric-herramienta-estado { margin-left: auto; }
.taric-page .taric-track .taric-herramienta-resumen { flex-basis: 100%; min-width: 0; margin: -3px 0 3px 20px; font-size: .8rem; overflow-wrap: anywhere; }
.taric-page .taric-track .taric-herramienta-resultado { padding: 9px 0 16px 20px; border-top: 1px solid var(--line); }
.taric-page .taric-modo { display: inline-flex; align-items: center; gap: 10px; color: var(--graphite); font-size: .85rem; font-weight: 700; }
.taric-page .taric-modo select { min-height: 50px; padding: 10px 30px 10px 12px; color: var(--graphite); border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); font: inherit; }
.taric-page .taric-modo select:focus-visible { outline: 2px solid var(--wine); outline-offset: 2px; }
@media (max-width: 640px) {
  .taric-page .taric-form-fila { flex-wrap: wrap; }
  .taric-page .taric-form-fila .taric-form-actions { flex: 1 1 100%; }
}
.taric-page .taric-herramienta > summary { cursor: pointer; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; padding: 13px 2px; color: var(--graphite); }
.taric-page .taric-herramienta > summary strong { min-width: 0; font-weight: 800; }
.taric-page .taric-herramienta-estado { color: var(--wine); font-size: .76rem; white-space: nowrap; }
.taric-page .taric-herramienta-resumen { grid-column: 1 / -1; line-height: 1.5; font-size: .85rem; color: var(--gray); }
.taric-page .taric-herramienta-resumen[hidden] { display: none; }
.taric-page .taric-herramienta-resultado { overflow-wrap: anywhere; line-height: 1.5; }
.taric-page .taric-herramienta-lista { padding-left: 1.3em; }
.taric-page .taric-herramienta-lista li + li { margin-top: 7px; }
.taric-page .taric-herramienta-campos { display: grid; grid-template-columns: minmax(100px, 25%) minmax(0, 1fr); gap: 7px 12px; }
.taric-page .taric-herramienta-campos dt { font-weight: 800; }
.taric-page .taric-herramienta-campos dd { margin: 0; min-width: 0; }
.taric-page .taric-herramienta-tecnico { margin: 18px 0; border-top: 1px solid rgba(112, 44, 54, .15); padding-top: 10px; }
.taric-page .taric-herramienta-tecnico summary { cursor: pointer; font-weight: 700; }
.taric-page .taric-seguir { position: fixed; z-index: 20; right: max(16px, env(safe-area-inset-right)); bottom: max(20px, env(safe-area-inset-bottom)); border: 0; padding: 12px 18px; border-radius: 999px; color: #fff; background: var(--wine); box-shadow: 0 6px 22px rgba(0, 0, 0, .2); cursor: pointer; }
.taric-page .taric-seguir[hidden] { display: none; }
.taric-page .taric-conexion { max-width: 76ch; margin: 0 auto 16px; padding: 12px 16px; color: var(--wine-dark); background: rgba(112, 44, 54, .07); border: 1px solid rgba(112, 44, 54, .2); }
.taric-page .taric-conexion button { margin-left: 12px; color: var(--wine); border: 1px solid currentColor; background: transparent; padding: 6px 10px; cursor: pointer; }
.taric-page .taric-stage > .taric-ficha {
  width: 100%;
  max-width: 76ch;
  box-sizing: border-box;
  margin: 26px auto 0;
}
@media (max-width: 640px) { .taric-page .taric-herramienta-campos { grid-template-columns: 1fr; } }

.taric-page .taric-block {
  animation: taricSoftRise 460ms cubic-bezier(0.2, 0.75, 0.2, 1) both;
}

@keyframes taricSoftRise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

.taric-page .taric-block-eyebrow {
  display: block;
  margin-bottom: 8px;
  color: var(--wine);
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* Pensamiento: entrada del diario (hora + texto corrido, sin caja) */
.taric-page .taric-thought {
  max-width: 66ch;
  padding: 0;
}

.taric-page .taric-thought + .taric-thought {
  margin-top: -2px;
}

.taric-page .taric-thought-hora {
  display: block;
  margin: 0 0 6px;
  color: var(--wine);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
}

.taric-page .taric-thought-text {
  margin: 0;
  color: var(--graphite);
  font-size: 1.02rem;
  line-height: 1.66;
  white-space: pre-wrap;
}

.taric-page .taric-cursor {
  display: inline-block;
  width: 7px;
  margin-left: 2px;
  color: var(--wine);
  font-weight: 900;
  animation: taricCursorBlink 1s steps(2, start) infinite;
}

.taric-page .taric-thought.is-idle .taric-cursor {
  display: none;
}

@keyframes taricCursorBlink {
  to { opacity: 0; }
}

/* Hallazgo: tarjeta con un pequeño marcador cuadrado (no es una barra) */
.taric-page .taric-finding {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 14px 18px;
  background: #fff;
  border: 1px solid rgba(112, 44, 54, 0.18);
}

.taric-page .taric-finding-mark {
  width: 9px;
  height: 9px;
  margin-top: 7px;
  background: var(--wine);
}

.taric-page .taric-finding p {
  margin: 0;
  color: var(--graphite);
  font-size: 0.96rem;
  font-weight: 700;
  line-height: 1.5;
}

/* Documentación leída */
.taric-page .taric-docs {
  padding: 16px 20px;
  background: #fff;
  border: 1px solid rgba(112, 44, 54, 0.18);
}

.taric-page .taric-docs-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.taric-page .taric-docs-item {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  padding: 7px 11px;
  color: var(--wine-dark);
  background: rgba(112, 44, 54, 0.06);
  border: 1px solid rgba(112, 44, 54, 0.22);
  font-size: 0.82rem;
  font-weight: 700;
}

.taric-page .taric-docs-item small {
  color: var(--gray);
  font-size: 0.74rem;
  font-weight: 700;
}

/* Duda: tarjeta burdeos claro con las vías como tarjetas anidadas */
.taric-page .taric-doubt {
  padding: clamp(18px, 2.2vw, 26px);
  background: rgba(112, 44, 54, 0.06);
  border: 1px solid rgba(112, 44, 54, 0.24);
}

.taric-page .taric-doubt-question {
  margin: 0 0 14px;
  color: var(--wine-dark);
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  font-weight: 800;
  line-height: 1.35;
}

.taric-page .taric-doubt-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.taric-page .taric-doubt-option {
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(112, 44, 54, 0.18);
}

.taric-page .taric-doubt-option strong {
  display: block;
  color: var(--graphite);
  font-size: 0.94rem;
}

.taric-page .taric-doubt-option small {
  display: block;
  margin-top: 4px;
  color: var(--gray);
  font-size: 0.82rem;
  line-height: 1.45;
}

.taric-page .taric-doubt-code {
  display: inline-block;
  margin-right: 8px;
  color: var(--wine);
  font-family: var(--taric-code-font);
  font-weight: 700;
}

.taric-page .taric-doubt-blocking {
  margin: 12px 0 0;
  color: var(--wine-dark);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* Candidatos: letras delineadas */
.taric-page .taric-candidates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 12px;
}

.taric-page .taric-candidate {
  padding: 16px 18px;
  background: #fff;
  border: 1px solid rgba(112, 44, 54, 0.16);
  transition: background 420ms ease, border-color 420ms ease, opacity 420ms ease;
}

.taric-page .taric-candidate-code {
  display: block;
  margin-bottom: 8px;
  color: transparent;
  font-size: clamp(1.35rem, 2.4vw, 1.85rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0.01em;
  -webkit-text-stroke: 1.5px var(--wine);
  paint-order: stroke fill;
  transition: color 520ms ease, -webkit-text-stroke-color 520ms ease;
}

.taric-page .taric-candidate-desc {
  margin: 0;
  color: rgba(35, 31, 32, 0.72);
  font-size: 0.85rem;
  line-height: 1.45;
}

.taric-page .taric-candidate-motivo {
  display: block;
  margin-top: 8px;
  color: var(--gray);
  font-size: 0.76rem;
  line-height: 1.4;
}

.taric-page .taric-candidate.is-descartado {
  background: rgba(246, 246, 244, 0.7);
}

.taric-page .taric-candidate.is-descartado .taric-candidate-desc,
.taric-page .taric-candidate.is-descartado .taric-candidate-motivo {
  color: var(--gray);
}

.taric-page .taric-candidate.is-descartado .taric-candidate-code {
  -webkit-text-stroke-color: var(--gray);
  text-decoration: line-through;
  text-decoration-color: rgba(112, 44, 54, 0.7);
  text-decoration-thickness: 2px;
}

.taric-page .taric-candidate.is-elegido {
  background: var(--wine);
  border-color: var(--wine-dark);
}

.taric-page .taric-candidate.is-elegido .taric-candidate-code {
  color: #fff;
  -webkit-text-stroke-color: #fff;
}

.taric-page .taric-candidate.is-elegido .taric-candidate-desc,
.taric-page .taric-candidate.is-elegido .taric-candidate-motivo {
  color: rgba(255, 255, 255, 0.86);
}

/* Lista de productos (modo lista) */
.taric-page .taric-lista {
  padding: clamp(16px, 2vw, 22px);
  background: #fff;
  border: 1px solid rgba(112, 44, 54, 0.16);
}

.taric-page .taric-lista-rows {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.taric-page .taric-lista-row {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto auto;
  gap: 8px 14px;
  align-items: center;
  padding: 10px 12px;
  background: rgba(246, 246, 244, 0.7);
  border: 1px solid rgba(112, 44, 54, 0.12);
}

.taric-page .taric-lista-row .taric-num {
  width: 34px;
  height: 34px;
  margin: 0;
  font-size: 0.72rem;
  box-shadow: none;
}

.taric-page .taric-lista-row.is-clasificado .taric-num {
  color: var(--wine);
  background: #fff;
  border: 1.5px solid var(--wine);
}

/* El nombre de la familia se lee entero (antes se cortaba con puntos suspensivos). */
.taric-page .taric-lista-nombre {
  color: var(--graphite);
  font-size: 0.92rem;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.taric-page .taric-lista-code {
  color: var(--wine);
  font-size: 1.05rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.taric-page .taric-lista-row.is-verificando .taric-lista-code,
.taric-page .taric-lista-row.is-clasificado .taric-lista-code {
  color: transparent;
  -webkit-text-stroke: 1.2px var(--wine);
  paint-order: stroke fill;
}

.taric-page .taric-lista-estado {
  color: var(--gray);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* TARIC (Comisión Europea) */
.taric-page .taric-aeat {
  padding: clamp(18px, 2.2vw, 26px);
  background: #fff;
  border: 1px solid rgba(112, 44, 54, 0.16);
}

.taric-page .taric-aeat-title {
  margin: 0 0 10px;
  color: var(--graphite);
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.35;
}

.taric-page .taric-aeat-shimmer {
  position: relative;
  height: 8px;
  margin: 12px 0 4px;
  overflow: hidden;
  background: rgba(112, 44, 54, 0.1);
}

.taric-page .taric-aeat-shimmer::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 -40%;
  width: 40%;
  background: linear-gradient(90deg, transparent, rgba(112, 44, 54, 0.42), transparent);
  animation: taricShimmer 1400ms linear infinite;
}

@keyframes taricShimmer {
  to { transform: translateX(350%); }
}

.taric-page .taric-aeat.is-ok .taric-aeat-shimmer,
.taric-page .taric-aeat.is-fallback .taric-aeat-shimmer {
  display: none;
}

.taric-page .taric-aeat-fallback {
  margin: 8px 0 0;
  color: var(--gray);
  font-size: 0.85rem;
}

.taric-page .taric-measure-group {
  margin-top: 14px;
}

.taric-page .taric-measure-group h4 {
  margin: 0 0 7px;
  color: var(--wine);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.taric-page .taric-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.taric-page .taric-chip {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  align-items: baseline;
  padding: 7px 12px;
  color: var(--graphite);
  background: rgba(112, 44, 54, 0.05);
  border: 1px solid rgba(112, 44, 54, 0.2);
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.35;
}

.taric-page .taric-chip b {
  color: var(--wine);
  font-weight: 900;
}

.taric-page .taric-chip small {
  color: var(--gray);
  font-size: 0.72rem;
  font-weight: 700;
}


/* ── Notas explicativas consultadas (misma ficha que las IAV) ─────────── */
.taric-page .taric-notas-titulo {
  margin: 0 0 4px;
  grid-column: 2;
  color: var(--graphite);
  font-size: 0.9rem;
  font-weight: 800;
}

/* ── Interpretación de las medidas ──────────────────────────────────────── */
.taric-page .taric-resumen {
  margin: 0 0 14px;
  padding: 12px 14px;
  background: rgba(112, 44, 54, 0.05);
  border-left: 3px solid var(--wine);
}

.taric-page .taric-resumen h4,
.taric-page .taric-measure-group h4 {
  margin: 0 0 6px;
}

.taric-page .taric-resumen ul {
  margin: 0;
  padding-left: 18px;
  color: var(--graphite);
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.45;
}

.taric-page .taric-resumen li + li {
  margin-top: 3px;
}

.taric-page .taric-medida {
  padding: 8px 0 10px;
  border-bottom: 1px solid rgba(112, 44, 54, 0.12);
}

.taric-page .taric-medida:last-child {
  border-bottom: 0;
}

.taric-page .taric-medida.is-fuera {
  opacity: 0.55;
}

.taric-page .taric-medida-cab {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  align-items: baseline;
  justify-content: space-between;
}

.taric-page .taric-medida-cab b {
  color: var(--graphite);
  font-size: 0.92rem;
  font-weight: 800;
}

.taric-page .taric-medida-valor {
  color: var(--wine);
  font-size: 1rem;
  font-weight: 900;
  white-space: nowrap;
}

.taric-page .taric-medida-que {
  margin: 4px 0 0;
  color: var(--graphite);
  font-size: 0.86rem;
  line-height: 1.45;
}

.taric-page .taric-docchips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 7px;
}

.taric-page .taric-docchip {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 2px 6px;
  align-items: baseline;
  max-width: 100%;
  padding: 5px 10px;
  border: 1px solid rgba(112, 44, 54, 0.25);
  background: #fff;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.3;
}

.taric-page .taric-docchip b {
  color: var(--wine);
  font-weight: 900;
  letter-spacing: 0.04em;
}

.taric-page .taric-docchip small {
  color: var(--gray);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.taric-page .taric-docchip.is-no_aplica {
  border-style: dashed;
  background: transparent;
}

.taric-page .taric-docchip.is-no_aplica b {
  color: var(--graphite);
}

.taric-page .taric-medida-pie {
  display: block;
  margin-top: 6px;
  color: var(--gray);
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.4;
}

.taric-page .taric-capa-base {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed rgba(112, 44, 54, 0.25);
}

.taric-page .taric-genericas {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px dashed rgba(112, 44, 54, 0.25);
}

.taric-page .taric-genericas summary {
  cursor: pointer;
  color: var(--gray);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.taric-page .taric-genericas summary:hover,
.taric-page .taric-genericas summary:focus-visible {
  color: var(--wine);
}

.taric-page .taric-genericas[open] summary {
  margin-bottom: 8px;
}

.taric-page .taric-medida.is-generica .taric-medida-pie,
.taric-page .taric-medida.is-generica .taric-docchip small {
  color: var(--gray);
}

.taric-page .taric-margen-nota.is-hallazgo b {
  color: var(--graphite);
}

/* Desplegables de la casa: cerrados por defecto, rótulo pequeño en burdeos */
.taric-page .taric-desplegable {
  margin-top: 10px;
}

.taric-page .taric-desplegable > summary {
  cursor: pointer;
  list-style: none;
  color: var(--wine);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.taric-page .taric-desplegable > summary::-webkit-details-marker {
  display: none;
}

.taric-page .taric-desplegable > summary::before {
  content: "+";
  display: inline-block;
  width: 1.1em;
  font-weight: 900;
}

.taric-page .taric-desplegable[open] > summary::before {
  content: "–";
}

.taric-page .taric-desplegable[open] > summary {
  margin-bottom: 10px;
}

.taric-page .taric-medida-mas {
  margin-top: 4px;
}

.taric-page .taric-medida-mas > summary {
  font-size: 0.68rem;
}

.taric-page .taric-medida-mas .taric-medida-que {
  margin-top: 6px;
}

.taric-page .taric-candidates-descartados .taric-candidates-grid {
  margin-top: 0;
}

.taric-page .taric-docchip.is-vua {
  border-color: rgba(112, 44, 54, 0.5);
  background: rgba(112, 44, 54, 0.06);
}

/* ------------------------------------------------------------
   Ficha de partida: el panel que cierra la consulta (Milton, 08-09).
   El teatro se transforma en ella: el código viaja desde la cabecera,
   el panel se despliega y el logo se retira hasta quedar como sello.
   ------------------------------------------------------------ */
.taric-page .taric-ficha {
  grid-column: 1 / -1;
  position: relative;
  z-index: 2;
  margin-top: clamp(12px, 1.8vw, 20px);
  padding: clamp(16px, 2.2vw, 24px) clamp(18px, 2.6vw, 28px) clamp(12px, 1.6vw, 18px);
  background: #fff;
  border: 1px solid rgba(112, 44, 54, 0.28);
  box-shadow: 0 18px 40px -24px rgba(79, 29, 39, 0.35);

}

.taric-page .taric-ficha-cab {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.taric-page .taric-ficha-cab .taric-block-eyebrow {
  margin: 0;
}

.taric-page .taric-ficha-pager {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--gray);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  font-variant-numeric: tabular-nums;
}

.taric-page .taric-ficha-nav {
  width: 30px;
  height: 30px;
  padding: 0;
  color: var(--wine);
  background: #fff;
  border: 1px solid rgba(112, 44, 54, 0.4);
  font-size: 1.1rem;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
}

.taric-page .taric-ficha-nav:disabled {
  opacity: 0.35;
  cursor: default;
}

.taric-page .taric-ficha-titulo {
  display: flex;
  align-items: baseline;
  gap: 14px;
  flex-wrap: wrap;
  margin: 10px 0 4px;
}

.taric-page .taric-ficha-codigo {
  font-family: var(--taric-code-font);
  font-size: clamp(1.9rem, 3.6vw, 2.6rem);
  font-weight: 900;
  letter-spacing: 0.05em;
  line-height: 1;
  color: var(--wine);
  font-variant-numeric: lining-nums tabular-nums;
}

.taric-page .taric-ficha-nombre {
  color: var(--graphite);
  font-size: 1rem;
  font-weight: 800;
}

.taric-page .taric-ficha-contexto {
  display: -webkit-box;
  overflow: hidden;
  margin: 0;
  color: var(--gray);
  font-size: 0.8rem;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.taric-page .taric-ficha-distintivos {
  margin-top: 10px;
}

.taric-page .taric-ficha-distintivos .taric-veredicto-badges {
  margin: 0;
}

.taric-page .taric-ficha-cuerpo {
  margin-top: clamp(14px, 1.8vw, 18px);
}

/* Cifras: lo que se liquida, en grande. */
.taric-page .taric-ficha-cifras {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(168px, 1fr));
  gap: 10px;
  margin-bottom: clamp(12px, 1.6vw, 16px);
}

.taric-page .taric-ficha-cifra {
  padding: 13px 15px;
  background: var(--soft);
  border: 1px solid rgba(112, 44, 54, 0.24);
}

.taric-page .taric-ficha-cifra .n {
  display: block;
  font-family: var(--taric-code-font);
  font-size: clamp(1.6rem, 2.9vw, 2.1rem);
  font-weight: 900;
  line-height: 1;
  color: var(--wine);
  font-variant-numeric: lining-nums tabular-nums;
}

.taric-page .taric-ficha-cifra .n.is-corta {
  font-size: clamp(1.1rem, 1.9vw, 1.4rem);
  line-height: 1.2;
}

.taric-page .taric-ficha-cifra .l {
  display: block;
  margin-top: 7px;
  color: var(--graphite);
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.3;
}

.taric-page .taric-ficha-cifra .s {
  display: block;
  margin-top: 2px;
  color: var(--gray);
  font-size: 0.7rem;
  line-height: 1.35;
}

.taric-page .taric-ficha-nota {
  margin: 0 0 12px;
  color: var(--gray);
  font-size: 0.82rem;
  line-height: 1.5;
}

/* Restricciones: nombre, qué se presenta si procede y qué se declara si no. */
.taric-page .taric-ficha-tabla {
  width: 100%;
  border-collapse: collapse;
}

.taric-page .taric-ficha-tabla th {
  padding: 7px 10px;
  color: var(--wine);
  background: rgba(112, 44, 54, 0.06);
  border-bottom: 1px solid rgba(112, 44, 54, 0.24);
  font-size: 0.64rem;
  font-weight: 900;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  text-align: left;
}

.taric-page .taric-ficha-tabla th:nth-child(2),
.taric-page .taric-ficha-tabla th:nth-child(3) {
  width: 26%;
}

.taric-page .taric-ficha-tabla td {
  padding: 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.taric-page .taric-ficha-tabla td b {
  color: var(--graphite);
  font-size: 0.88rem;
  font-weight: 800;
}

.taric-page .taric-ficha-tabla td small {
  display: block;
  margin-top: 2px;
  color: var(--gray);
  font-size: 0.72rem;
  line-height: 1.4;
}

.taric-page .taric-ficha-vua {
  margin-left: 8px;
  color: var(--teal);
  font-size: 0.63rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.taric-page .taric-ficha-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.taric-page .taric-ficha-doc {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  max-width: 100%;
  padding: 3px 8px;
  background: rgba(112, 44, 54, 0.05);
  border: 1px solid rgba(112, 44, 54, 0.32);
  font-size: 0.76rem;
  font-variant-numeric: lining-nums tabular-nums;
}

.taric-page .taric-ficha-doc b {
  color: var(--wine);
  font-weight: 900;
  letter-spacing: 0.02em;
}

.taric-page .taric-ficha-doc.is-no {
  background: #fff;
  border-style: dashed;
}

.taric-page .taric-ficha-doc.is-no b {
  color: var(--graphite);
}

.taric-page .taric-ficha-nada {
  color: var(--gray);
  font-size: 0.85rem;
}

/* Avisos condicionados que dependen de los datos concretos de la operación. */
.taric-page .taric-ficha-capa {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.taric-page .taric-ficha-capa-r {
  margin: 0 0 8px;
  color: var(--gray);
  font-size: 0.64rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.taric-page .taric-ficha-capa-lista {
  display: grid;
  gap: 7px;
}

.taric-page .taric-ficha-capa-bloque {
  display: grid;
  grid-template-columns: minmax(210px, 1fr) minmax(220px, auto);
  gap: 3px 14px;
  align-items: start;
  padding: 8px 10px;
  background: rgba(112, 44, 54, 0.035);
  border-left: 2px solid rgba(112, 44, 54, 0.35);
}

.taric-page .taric-ficha-capa-nombre {
  margin: 0;
  color: var(--graphite);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.4;
}

.taric-page .taric-ficha-capa-norma {
  grid-column: 1;
  color: var(--gray);
  font-size: 0.66rem;
  line-height: 1.3;
}

.taric-page .taric-ficha-capa-bloque .taric-ficha-chips {
  grid-column: 2;
  grid-row: 1 / span 2;
  justify-content: flex-end;
}

.taric-page .taric-ficha-condiciones {
  margin-top: 7px;
  color: var(--graphite);
  font-size: 0.72rem;
}

.taric-page .taric-ficha-condiciones summary {
  width: fit-content;
  color: var(--wine);
  cursor: pointer;
  font-weight: 800;
}

.taric-page .taric-ficha-condiciones-lista {
  display: grid;
  gap: 6px;
  margin-top: 7px;
}

.taric-page .taric-ficha-condicion {
  padding-left: 8px;
  border-left: 2px solid var(--line);
}

.taric-page .taric-ficha-condicion-claves {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 2px;
}

.taric-page .taric-ficha-condicion-tipo,
.taric-page .taric-ficha-condicion-doc {
  color: var(--gray);
  font-family: var(--taric-code-font);
  font-size: 0.66rem;
  font-weight: 800;
}

.taric-page .taric-ficha-condicion p {
  margin: 0;
  color: var(--graphite);
  font-size: 0.7rem;
  line-height: 1.4;
}

.taric-page .taric-ficha-avisos {
  margin-top: 14px;
}

.taric-page .taric-ficha-avisos .taric-veredicto-avisos {
  margin: 0;
}

.taric-page .taric-ficha-pie {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.taric-page .taric-ficha-fuente {
  color: var(--gray);
  font-size: 0.72rem;
  line-height: 1.4;
}

.taric-page .taric-ficha-pdf {
  min-height: 42px;
  padding: 11px 18px;
  font-size: 0.78rem;
}

.taric-page .taric-agent.has-ficha {
  align-items: start;
}

@media (max-width: 780px) {
  .taric-page .taric-ficha-capa-bloque {
    grid-template-columns: minmax(0, 1fr);
  }

  .taric-page .taric-ficha-capa-bloque .taric-ficha-chips,
  .taric-page .taric-ficha-capa-norma {
    grid-column: 1;
    grid-row: auto;
  }

  .taric-page .taric-ficha-capa-bloque .taric-ficha-chips {
    justify-content: flex-start;
    margin-top: 4px;
  }

  .taric-page .taric-ficha-tabla,
  .taric-page .taric-ficha-tabla tbody,
  .taric-page .taric-ficha-tabla tr,
  .taric-page .taric-ficha-tabla td {
    display: block;
    width: auto;
  }

  .taric-page .taric-ficha-tabla thead {
    display: none;
  }

  .taric-page .taric-ficha-tabla tr {
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
  }

  .taric-page .taric-ficha-tabla td {
    padding: 4px 0;
    border: 0;
  }

  .taric-page .taric-ficha-tabla td + td::before {
    display: block;
    margin-bottom: 4px;
    color: var(--gray);
    content: attr(data-rotulo);
    font-size: 0.63rem;
    font-weight: 900;
    letter-spacing: 0.07em;
    text-transform: uppercase;
  }
}

.taric-page .taric-aeat-shot {
  display: block;
  width: 100%;
  margin-top: 14px;
  border: 1px solid rgba(112, 44, 54, 0.16);
  filter: blur(9px);
  opacity: 0.5;
  transition: filter 720ms ease, opacity 720ms ease;
}

.taric-page .taric-aeat-shot.is-sharp {
  filter: blur(0);
  opacity: 1;
}

/* Precedentes IAV apilados con desplazamiento */
.taric-page .taric-precedents {
  padding: clamp(18px, 2.2vw, 26px);
  background: rgba(246, 246, 244, 0.6);
  border: 1px solid rgba(112, 44, 54, 0.14);
}

.taric-page .taric-precedents-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.taric-page .taric-precedent {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 4px 14px;
  padding: 14px 16px;
  background: #fff;
  border: 1px solid rgba(112, 44, 54, 0.16);
  box-shadow: 0 12px 28px rgba(79, 29, 39, 0.06);
  animation: taricStackIn 520ms cubic-bezier(0.2, 0.75, 0.2, 1) both;
}

.taric-page .taric-precedent .taric-num {
  grid-row: 1 / -1;
  width: 34px;
  height: 34px;
  margin: 0;
  font-size: 0.7rem;
  box-shadow: none;
}

.taric-page .taric-precedent:nth-child(2) { margin-left: 12px; }
.taric-page .taric-precedent:nth-child(3) { margin-left: 24px; }
.taric-page .taric-precedent:nth-child(4) { margin-left: 36px; }
.taric-page .taric-precedent:nth-child(n + 5) { margin-left: 48px; }

@keyframes taricStackIn {
  from { opacity: 0; transform: translate(-14px, 12px); }
  to { opacity: 1; transform: translate(0, 0); }
}

/* Descripción de la IAV: tres líneas hasta que se despliega; la motivación solo
   se ve desplegada. El botón es un enlace discreto en burdeos. */
.taric-page .taric-precedent-desc {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.taric-page .taric-precedent.is-expanded .taric-precedent-desc {
  display: block;
  overflow: visible;
  -webkit-line-clamp: unset;
}

.taric-page .taric-precedent-motivacion {
  display: none;
  grid-column: 2;
  margin-top: 6px;
}

.taric-page .taric-precedent.is-expanded .taric-precedent-motivacion {
  display: block;
}

.taric-page .taric-precedent-motivacion .taric-block-eyebrow {
  margin-bottom: 4px;
}

.taric-page .taric-precedent-motivacion p {
  margin: 0;
}

.taric-page .taric-precedent-toggle {
  grid-column: 2;
  justify-self: start;
  margin: 2px 0 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--wine);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
}

.taric-page .taric-precedent-toggle:hover,
.taric-page .taric-precedent-toggle:focus-visible {
  text-decoration: underline;
  outline: none;
}

.taric-page .taric-precedent-head {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: baseline;
}

.taric-page .taric-precedent-ref {
  color: var(--wine);
  font-family: "Consolas", "SFMono-Regular", "Courier New", monospace;
  font-size: 0.88rem;
  font-weight: 700;
}

.taric-page .taric-precedent-meta {
  color: var(--gray);
  font-size: 0.78rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.taric-page .taric-precedent-code {
  color: var(--graphite);
  font-family: var(--taric-code-font);
  font-size: 0.84rem;
  font-weight: 700;
}

.taric-page .taric-precedent p {
  grid-column: 2;
  margin: 0;
  color: rgba(35, 31, 32, 0.74);
  font-size: 0.88rem;
  line-height: 1.5;
}

.taric-page .taric-precedents-nota {
  margin: 0;
  color: var(--gray);
  font-size: 0.88rem;
}

/* Veredicto */
.taric-page .taric-veredicto {
  padding: clamp(22px, 3vw, 36px);
  background:
    radial-gradient(circle at 88% 12%, rgba(112, 44, 54, 0.09), transparent 44%),
    #fff;
  border: 1px solid rgba(112, 44, 54, 0.28);
  box-shadow: 0 22px 56px rgba(79, 29, 39, 0.1);
}

.taric-page .taric-veredicto-code {
  margin: 0 0 12px;
  color: var(--wine);
  font-size: clamp(2.1rem, 6vw, 4.2rem);
  font-weight: 900;
  line-height: 0.92;
  letter-spacing: 0.01em;
}

.taric-page .taric-veredicto-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.taric-page .taric-badge {
  padding: 6px 11px;
  border: 1px solid rgba(112, 44, 54, 0.28);
  color: var(--wine-dark);
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.taric-page .taric-badge.is-alta {
  color: #fff;
  background: var(--wine);
  border-color: var(--wine);
}

.taric-page .taric-badge.is-media {
  background: rgba(112, 44, 54, 0.1);
}

.taric-page .taric-badge.is-baja {
  color: var(--graphite);
  background: rgba(97, 97, 96, 0.12);
  border-color: rgba(97, 97, 96, 0.36);
}

.taric-page .taric-veredicto-justificacion {
  margin: 0 0 18px;
  color: rgba(35, 31, 32, 0.82);
  line-height: 1.62;
}

/* Productos del veredicto en modo lista */
.taric-page .taric-veredicto-productos {
  display: grid;
  gap: 10px;
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
}

.taric-page .taric-producto {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 6px 14px;
  padding: 14px 16px;
  background: rgba(246, 246, 244, 0.7);
  border: 1px solid rgba(112, 44, 54, 0.14);
}

.taric-page .taric-producto .taric-num {
  grid-row: 1 / span 4;
  margin: 0;
  box-shadow: none;
}

.taric-page .taric-producto-nombre {
  margin: 0;
  color: var(--graphite);
  font-size: 0.96rem;
  font-weight: 800;
}

.taric-page .taric-producto-code {
  margin: 0;
  color: var(--wine);
  font-size: clamp(1.3rem, 2.4vw, 1.8rem);
  font-weight: 900;
  line-height: 1;
}

.taric-page .taric-producto p {
  grid-column: 2;
  margin: 0;
  color: rgba(35, 31, 32, 0.78);
  font-size: 0.88rem;
  line-height: 1.5;
}

.taric-page .taric-producto .taric-producto-identificadores {
  color: rgba(112, 44, 54, 0.76);
  font-size: 0.78rem;
  font-weight: 750;
  line-height: 1.35;
}

.taric-page .taric-producto .taric-veredicto-badges,
.taric-page .taric-producto .taric-aeat-medidas {
  grid-column: 2;
  margin: 4px 0 0;
}

.taric-page .taric-veredicto-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  padding-top: 16px;
  border-top: 1px solid rgba(112, 44, 54, 0.14);
}

.taric-page .taric-veredicto-actions .button {
  border-radius: 0;
}


/* Coste (solo aparece si el servidor lo expone: entorno de desarrollo) */
.taric-page .taric-coste {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  align-items: baseline;
  padding: 12px 16px;
  color: var(--gray);
  background: rgba(246, 246, 244, 0.9);
  border: 1px dashed rgba(97, 97, 96, 0.5);
  font-size: 0.8rem;
}

.taric-page .taric-coste strong {
  color: var(--graphite);
  font-size: 0.95rem;
}

/* Cola y error */
.taric-page .taric-queue {
  display: grid;
  gap: 6px;
  padding: 18px 20px;
  background: rgba(246, 246, 244, 0.9);
  border: 1px dashed rgba(112, 44, 54, 0.3);
}

.taric-page .taric-queue strong {
  color: var(--wine);
  font-size: 1.6rem;
  font-weight: 900;
  line-height: 1;
}

.taric-page .taric-queue p {
  margin: 0;
  color: var(--gray);
  font-size: 0.88rem;
}

.taric-page .taric-error {
  padding: clamp(18px, 2.2vw, 26px);
  background: rgba(112, 44, 54, 0.07);
  border: 1px solid rgba(112, 44, 54, 0.34);
}

.taric-page .taric-error p {
  margin: 0;
  color: var(--wine-dark);
  font-weight: 700;
  line-height: 1.55;
}

/* ------------------------------------------------------------
   6. Modo registro textual plano (reduced motion vía JS)
   ------------------------------------------------------------ */
.taric-page .taric-stage.is-plain .taric-block,
.taric-page .taric-stage.is-plain .taric-precedent,
.taric-page .taric-stage.is-plain .taric-agent,
.taric-page .taric-stage.is-plain .taric-digit {
  animation: none;
}

.taric-page .taric-stage.is-plain .taric-timeline-bar i,
.taric-page .taric-stage.is-plain .taric-timeline-bar::after {
  transition: none;
}

.taric-page .taric-stage.is-plain .taric-cursor,
.taric-page .taric-stage.is-plain .taric-agent-dots {
  display: none;
}

.taric-page .taric-stage.is-plain .taric-precedent {
  margin-left: 0;
}

.taric-page .taric-stage.is-plain .taric-aeat-shimmer {
  display: none;
}

.taric-page .taric-stage.is-plain .taric-aeat-shot {
  filter: none;
  opacity: 1;
}

.taric-page .taric-stage.is-plain .taric-candidate,
.taric-page .taric-stage.is-plain .taric-candidate-code {
  transition: none;
}

/* ------------------------------------------------------------
   7. Qué es / qué no es + preguntas + contacto (composición de la web)
   ------------------------------------------------------------ */
.taric-page .eir-value-heading h2 {
  max-width: 12ch;
}

.taric-page .eir-requirements h3 {
  max-width: 14ch;
  margin-bottom: 16px;
}

.taric-page .taric-requirements-lead {
  margin: 0 0 clamp(22px, 3vw, 32px);
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.98rem;
  line-height: 1.6;
}

.taric-page .taric-faq-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: clamp(14px, 1.7vw, 24px);
  align-content: stretch;
}

.taric-page .eir-benefit-card {
  min-height: 0;
}

.taric-page .eir-benefit-card h3 {
  margin-bottom: 10px;
  font-size: clamp(1.15rem, 1.6vw, 1.6rem);
}

.taric-page .eir-benefit-card p {
  max-width: none;
  font-size: 0.92rem;
  line-height: 1.5;
}

/* El formulario ocupa el resto de la columna, a la altura del panel gris */
.taric-page .taric-contact-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: start;
  align-self: stretch;
  padding: clamp(22px, 3vw, 36px);
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(112, 44, 54, 0.14);
  box-shadow: 0 22px 56px rgba(79, 29, 39, 0.1);
}

.taric-page .taric-contact-form .button {
  grid-column: 1 / -1;
  justify-self: start;
  border-radius: 0;
}

/* ------------------------------------------------------------
   8. Responsive: 980 / 760 / 620
   ------------------------------------------------------------ */
@media (max-width: 980px) {
  .taric-page .taric-stage-grid {
    grid-template-columns: 1fr;
  }

  /* En pantallas estrechas el margen pasa a ser una banda antes del diario. */
  .taric-page .taric-margen {
    position: static;
    order: -1;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px 18px;
    padding: 0 0 14px;
    border-left: 0;
    border-bottom: 1px solid rgba(112, 44, 54, 0.18);
  }

  .taric-page .taric-agent {
    grid-template-columns: clamp(210px, 31vw, 285px) minmax(0, 1fr);
  }

  .taric-page .taric-agent.is-lista {
    grid-template-columns: minmax(260px, 38%) minmax(0, 1fr);
  }

  .taric-page .taric-agent-code {
    left: calc(clamp(210px, 31vw, 285px) + clamp(24px, 3.6vw, 50px));
  }

  .taric-page .eir-process-flow {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 84px;
  }

  .taric-page .eir-process-flow::before {
    display: none;
  }

  /* La web pasa las tarjetas a barra lateral en móvil. Aquí nunca barras, ni
     laterales ni superiores (Milton, 03-09): manda la anatomía de tarjeta del
     bloque final de esta hoja (borde completo fino, sin filo grueso). */
  .taric-page .eir-process-step {
    border-left-width: 1px;
    border-top-width: 1px;
  }

}

@media (max-width: 760px) {
  .taric-page .taric-hero {
    min-height: 0;
  }

  .taric-page .taric-form {
    grid-template-columns: 1fr;
  }

  .taric-page .taric-precedent:nth-child(n) {
    margin-left: 0;
  }

  .taric-page .taric-agent {
    grid-template-columns: 1fr;
    justify-items: start;
    min-height: 410px;
    padding-bottom: 88px;
  }

  .taric-page .taric-agent-visual {
    grid-column: 1;
    grid-row: 1;
  }

  .taric-page .taric-agent-status {
    grid-column: 1;
    grid-row: 2;
  }

  .taric-page .taric-agent-code {
    left: 24px;
    right: 20px;
    bottom: 6px;
    justify-content: flex-end;
    width: auto;
    font-size: clamp(2.6rem, 12vw, 4.6rem);
  }

  .taric-page .taric-agent-lista {
    left: auto;
    right: auto;
    bottom: auto;
    width: 100%;
  }

  .taric-page .taric-agent.is-lista {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto auto;
    min-height: 0;
    padding: 22px 20px 28px;
  }

  .taric-page .taric-agent.is-lista .taric-agent-visual {
    grid-column: 1;
    grid-row: 1;
    justify-self: center;
  }

  .taric-page .taric-agent.is-lista .taric-logo-motion {
    width: min(100%, 380px);
  }

  .taric-page .taric-agent.is-lista .taric-agent-status {
    grid-column: 1;
    grid-row: 2;
    margin: 8px 0 22px;
  }

  .taric-page .taric-agent.is-lista .taric-agent-lista {
    grid-column: 1;
    grid-row: 3;
  }

  .taric-page .taric-logo-motion { width: min(100%, 340px); }

  .taric-page .taric-file,
  .taric-page .taric-lista-row {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .taric-page .taric-file-meta,
  .taric-page .taric-lista-estado {
    grid-column: 2;
  }

  .taric-page .taric-contact-form {
    grid-template-columns: 1fr;
  }
}

/* Revisión 14-09: cierre más compacto y sin aire sobrante en la rejilla. */
.taric-page .taric-widget-top > .taric-widget-col > .taric-widget-bottom {
  align-self: start;
}

.taric-page .taric-legal {
  padding-block: clamp(64px, 7vw, 88px);
}

.taric-page .taric-rebuild {
  gap: clamp(20px, 2.2vw, 30px);
}

.taric-page .taric-contact-form-card {
  padding: clamp(24px, 2.5vw, 34px);
}

@media (max-width: 760px) {
  .taric-page .taric-legal { padding-block: 48px; }
  .taric-page .taric-rebuild { gap: 18px; }
}

/* Revisión 16-09 (cascada final): título sobre la imagen y casos en cajas suaves. */
.taric-page .taric-call-row {
  display: block;
  border: 0;
  background: #fff;
}

.taric-page .taric-requirements-card {
  display: grid;
  grid-template-columns: minmax(0, .96fr) minmax(380px, 1.04fr);
  gap: clamp(32px, 4.5vw, 64px);
  align-items: stretch;
  margin: 0;
  padding: clamp(34px, 4vw, 54px);
  color: var(--ink);
  border: 0;
  background: #fff;
}

.taric-page .taric-call-intro {
  display: grid;
  align-content: start;
  min-width: 0;
}

.taric-page .taric-call-intro h3 {
  grid-column: auto;
  max-width: 100%;
  margin: 0 0 clamp(20px, 2.6vw, 30px);
  color: var(--wine);
  font-size: clamp(2.35rem, 4vw, 4.4rem);
  line-height: .94;
}

.taric-page .taric-call-intro-body {
  display: grid;
  grid-template-columns: minmax(180px, .9fr) minmax(190px, 1.1fr);
  gap: clamp(20px, 2.5vw, 34px);
  align-items: center;
}

.taric-page .taric-phone-visual {
  width: 100%;
  height: auto;
  min-height: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  aspect-ratio: 1920 / 878;
  background: transparent;
}

.taric-page .taric-phone-visual img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  object-fit: contain;
  object-position: center;
  transform: none;
}

.taric-page .taric-call-copy {
  display: grid;
  gap: 24px;
  align-content: center;
}

.taric-page .taric-call-copy .taric-requirements-lead {
  grid-column: auto;
  margin: 0;
  color: var(--ink);
}

.taric-page .taric-call-copy .taric-phone-action {
  grid-column: auto;
  align-self: start;
  margin: 0;
}

.taric-page .taric-requirements-card .taric-requirements-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-column: 2;
  grid-row: 1;
  gap: 14px;
  align-self: stretch;
  margin: 0;
  padding: 0;
  overflow: visible;
  color: var(--ink);
  background: transparent;
  border: 0;
  list-style: none;
}

.taric-page .taric-requirements-list li,
.taric-page .taric-requirements-list li:nth-child(odd),
.taric-page .taric-requirements-list li:nth-child(-n + 2) {
  display: flex;
  align-items: center;
  min-height: 132px;
  margin: 0;
  padding: 22px 24px;
  color: var(--ink);
  background: rgba(112, 44, 54, .09);
  border: 1px solid rgba(112, 44, 54, .14);
  line-height: 1.5;
}

@media (max-width: 960px) {
  .taric-page .taric-requirements-card {
    grid-template-columns: 1fr;
  }

  .taric-page .taric-requirements-card .taric-requirements-list {
    grid-column: 1;
    grid-row: auto;
  }
}

@media (max-width: 600px) {
  .taric-page .taric-requirements-card {
    gap: 28px;
    padding: 28px 22px 30px;
  }

  .taric-page .taric-call-intro h3 {
    font-size: clamp(2.1rem, 10vw, 2.8rem);
  }

  .taric-page .taric-call-intro-body,
  .taric-page .taric-requirements-card .taric-requirements-list {
    grid-template-columns: 1fr;
  }

  .taric-page .taric-phone-visual {
    width: 100%;
    margin: 0;
  }

  .taric-page .taric-requirements-list li,
  .taric-page .taric-requirements-list li:nth-child(odd),
  .taric-page .taric-requirements-list li:nth-child(-n + 2) {
    min-height: 96px;
    padding: 18px 20px;
    border: 1px solid rgba(112, 44, 54, .14);
  }
}

/* Revisión 16-09: título sobre la imagen y casos en cajas de burdeos suave. */
.taric-page .taric-call-row {
  display: block;
  border: 0;
  background: #fff;
}

.taric-page .taric-requirements-card {
  display: grid;
  grid-template-columns: minmax(0, .96fr) minmax(380px, 1.04fr);
  gap: clamp(32px, 4.5vw, 64px);
  align-items: stretch;
  padding: clamp(34px, 4vw, 54px);
  color: var(--ink);
  border: 0;
  background: #fff;
}

.taric-page .taric-call-intro {
  display: grid;
  align-content: start;
  min-width: 0;
}

.taric-page .taric-call-intro h3 {
  grid-column: auto;
  max-width: 100%;
  margin: 0 0 clamp(20px, 2.6vw, 30px);
  color: var(--wine);
  font-size: clamp(2.35rem, 4vw, 4.4rem);
  line-height: .94;
}

.taric-page .taric-call-intro-body {
  display: grid;
  grid-template-columns: minmax(180px, .9fr) minmax(190px, 1.1fr);
  gap: clamp(20px, 2.5vw, 34px);
  align-items: center;
}

.taric-page .taric-phone-visual {
  width: 100%;
  height: auto;
  min-height: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  aspect-ratio: 1920 / 878;
  background: transparent;
}

.taric-page .taric-phone-visual img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  object-fit: contain;
  object-position: center;
  transform: none;
}

.taric-page .taric-call-copy {
  display: grid;
  gap: 24px;
  align-content: center;
}

.taric-page .taric-call-copy .taric-requirements-lead {
  grid-column: auto;
  margin: 0;
  color: var(--ink);
}

.taric-page .taric-call-copy .taric-phone-action {
  grid-column: auto;
  align-self: start;
  margin: 0;
}

.taric-page .taric-requirements-card .taric-requirements-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-column: 2;
  grid-row: 1;
  gap: 14px;
  align-self: stretch;
  margin: 0;
  padding: 0;
  overflow: visible;
  color: var(--ink);
  background: transparent;
  border: 0;
  list-style: none;
}

.taric-page .taric-requirements-list li,
.taric-page .taric-requirements-list li:nth-child(odd),
.taric-page .taric-requirements-list li:nth-child(-n + 2) {
  display: flex;
  align-items: center;
  min-height: 132px;
  padding: 22px 24px;
  color: var(--ink);
  background: rgba(112, 44, 54, .09);
  border: 1px solid rgba(112, 44, 54, .14);
  line-height: 1.5;
}

@media (max-width: 960px) {
  .taric-page .taric-requirements-card {
    grid-template-columns: 1fr;
  }

  .taric-page .taric-requirements-card .taric-requirements-list {
    grid-column: 1;
    grid-row: auto;
  }
}

@media (max-width: 600px) {
  .taric-page .taric-requirements-card {
    gap: 28px;
    padding: 28px 22px 30px;
  }

  .taric-page .taric-call-intro h3 {
    font-size: clamp(2.1rem, 10vw, 2.8rem);
  }

  .taric-page .taric-call-intro-body,
  .taric-page .taric-requirements-card .taric-requirements-list {
    grid-template-columns: 1fr;
  }

  .taric-page .taric-phone-visual {
    width: 100%;
    margin: 0;
  }

  .taric-page .taric-requirements-list li,
  .taric-page .taric-requirements-list li:nth-child(odd),
  .taric-page .taric-requirements-list li:nth-child(-n + 2) {
    min-height: 96px;
    padding: 18px 20px;
    border: 1px solid rgba(112, 44, 54, .14);
  }
}

@media (max-width: 620px) {
  .taric-page .taric-agent-lista {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 14px;
  }

  .taric-page .taric-agent-code-item {
    gap: 3px;
  }


  .taric-page .taric-candidates-grid {
    grid-template-columns: 1fr;
  }

  .taric-page .taric-hero-ghost {
    font-size: 3.4rem;
  }

  .taric-page .taric-veredicto-actions,

  .taric-page .taric-form-actions .button,
  .taric-page .taric-hero-actions .button {
    width: 100%;
  }

  .taric-page .eir-process-flow {
    grid-template-columns: 1fr;
  }
}

/* ------------------------------------------------------------
   9. prefers-reduced-motion: se desactiva todo el movimiento
        del teatro. El contenido queda como registro textual.
   ------------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  .taric-page .taric-timeline-bar i,
  .taric-page .taric-timeline-bar::after,
  .taric-page .taric-margen-nota,
  .taric-page .taric-agent,
  .taric-page .taric-digit,
  .taric-page .taric-agent-dots i,
  .taric-page .taric-cursor,
  .taric-page .taric-block,
  .taric-page .taric-finding,
  .taric-page .taric-doubt,
  .taric-page .taric-precedent,
  .taric-page .taric-veredicto,
  .taric-page .taric-queue,
  .taric-page .taric-file,
  .taric-page .taric-dropzone-mark b,
  .taric-page .taric-aeat-shimmer::after {
    animation: none;
  }

  .taric-page .taric-cursor,
  .taric-page .taric-agent-dots,
  .taric-page .taric-aeat-shimmer {
    display: none;
  }

  .taric-page .taric-block,
  .taric-page .taric-finding,
  .taric-page .taric-doubt,
  .taric-page .taric-agent {
    opacity: 1;
    transform: none;
  }

  .taric-page .taric-candidate,
  .taric-page .taric-candidate-code,
  .taric-page .taric-digit,
  .taric-page .taric-dropzone,
  .taric-page .taric-dropzone-mark i,
  .taric-page .taric-dropzone-mark b,
  .taric-page .taric-track .taric-herramienta > summary::before {
    transition: none;
  }

  .taric-page .taric-aeat-shot {
    filter: none;
    opacity: 1;
    transition: none;
  }

  .taric-page .taric-precedent:nth-child(n) {
    margin-left: 0;
  }

  .taric-page .taric-stage *,
  .taric-page .taric-stage *::before,
  .taric-page .taric-stage *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
  }
}

/* ------------------------------------------------------------
   Revisión de Milton (03-09): sin barras en tarjetas, hover del botón,
   marca de agua más presente y los tres niveles del código (SA/NC/TARIC).
   ------------------------------------------------------------ */

/* Botón principal: blanco sobre burdeos en reposo. La regla global de la web
   vacía el fondo en hover pero deja el texto blanco (ilegible sobre marfil):
   aquí, al vaciarse el fondo, el texto y el borde pasan a burdeos. */
.taric-page .button.primary:hover,
.taric-page .button.primary:focus-visible {
  color: var(--wine);
  border-color: var(--wine);
  background: transparent;
}

/* Tarjetas del flujo. PROHIBIDAS las barras de acento, laterales o superiores
   (la web pone `border-top: 4px`). Anatomía de tarjeta GUIEX: borde completo
   de 1 px en burdeos tenue, esquinas de 4 px, superficie clara y una elevación
   suave al pasar el ratón para que sigan siendo vistosas sin adornos. */
.taric-page .eir-process-step,
.taric-page .eir-process-step:nth-child(even) {
  border: 1px solid rgba(112, 44, 54, 0.22);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 1px 0 rgba(35, 31, 32, 0.04);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.taric-page .eir-process-step:nth-child(even) {
  background: rgba(255, 255, 255, 0.78);
}

.taric-page .eir-process-step:hover {
  transform: translateY(-4px);
  border-color: rgba(112, 44, 54, 0.5);
  box-shadow: 0 16px 32px -20px rgba(112, 44, 54, 0.38);
}

/* Marca de agua (isotipo GUIEX enmascarado en burdeos): más presencia. */
.taric-page .eir-process-watermark {
  top: clamp(4px, 1.6vw, 20px);
  width: clamp(220px, 27vw, 420px);
  opacity: 0.12;
}

/* Los tres niveles del código: seis, ocho y diez dígitos. La cifra grande es
   el recurso de la casa (números como elemento visual, sin minititulares). */
.taric-page .taric-niveles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 2.2vw, 28px);
  margin: clamp(24px, 3vw, 36px) 0 0;
  padding: clamp(20px, 2.4vw, 28px) 0 0;
  border-top: 1px solid rgba(112, 44, 54, 0.14);
}

.taric-page .taric-niveles > div {
  display: grid;
  align-content: start;
  gap: 8px;
  margin: 0;
}

.taric-page .taric-niveles dt {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 0;
  color: var(--wine);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.taric-page .taric-nivel-cifra {
  font-size: clamp(1.9rem, 2.6vw, 2.6rem);
  font-weight: 900;
  line-height: 0.9;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.taric-page .taric-niveles dd {
  margin: 0;
  color: rgba(35, 31, 32, 0.72);
  font-size: 0.92rem;
  line-height: 1.55;
}

@media (max-width: 980px) {
  .taric-page .taric-niveles {
    grid-template-columns: 1fr;
    gap: 18px;
  }
}

@media (max-width: 760px) {
  .taric-page .eir-process-watermark {
    width: 150px;
    opacity: 0.08;
  }
}

@media (prefers-reduced-motion: reduce) {
  .taric-page .eir-process-step,
  .taric-page .eir-process-step:hover {
    transform: none;
    transition: none;
  }
}

/* Avisos del veredicto: qué comprobar antes de declarar. Tarjeta (borde completo,
   sin barras) en burdeos tenue, debajo de la justificación. */
.taric-page .taric-veredicto-avisos {
  display: grid;
  gap: 12px;
  margin-top: 22px;
  padding: 18px 20px;
  border: 1px solid rgba(112, 44, 54, 0.28);
  border-radius: 4px;
  background: rgba(112, 44, 54, 0.04);
}

.taric-page .taric-avisos-lista,
.taric-page .taric-aviso-opciones {
  margin: 0;
  padding-left: 18px;
}

.taric-page .taric-avisos-lista li {
  margin: 4px 0;
  font-size: 0.95rem;
  line-height: 1.5;
}

.taric-page .taric-aviso-pregunta {
  margin: 0 0 6px;
  color: var(--wine);
  font-weight: 700;
}

.taric-page .taric-aviso-opciones li {
  margin: 3px 0;
  color: rgba(35, 31, 32, 0.78);
  font-size: 0.92rem;
  line-height: 1.5;
}

.taric-page .taric-aviso-condicion {
  color: var(--gray);
}

/* ------------------------------------------------------------
   Revisión de Milton (03-09, segunda tanda): escena arriba y bloque compacto,
   niveles del código como apunte, aureola de las bolas, widget rediseñado.
   ------------------------------------------------------------ */

/* 2 · La escena sube: mismo margen superior que el título, columnas alineadas
   arriba y el apunte de los tres niveles a ancho completo debajo. */
.taric-page .hand-feature-section {
  align-items: start;
  grid-template-rows: auto auto;
  min-height: 0;
  padding: clamp(40px, 5vw, 76px) clamp(24px, 7vw, 112px) clamp(36px, 4.5vw, 64px);
  gap: clamp(26px, 3.4vw, 56px) clamp(20px, 3vw, 48px);
}

/* 15-09: el título y su texto se centran con la escena situada a la derecha. */
.taric-page .hand-feature-copy {
  align-self: center;
}

.taric-page .hand-feature-media.taric-escena {
  align-self: start;
  margin: 0 0 0 auto;
  max-width: 540px;
  height: auto;
}

.taric-page .taric-niveles-box {
  grid-column: 1 / -1;
  padding: clamp(20px, 2.4vw, 30px) clamp(20px, 2.8vw, 34px);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(112, 44, 54, 0.2);
  border-radius: 4px;
}

.taric-page .taric-niveles-tip {
  margin: 0 0 16px;
  color: var(--wine);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.taric-page .taric-niveles {
  margin: 0;
  padding: 0;
  border: 0;
  gap: clamp(18px, 2.6vw, 36px);
}

.taric-page .taric-niveles dd strong {
  color: var(--wine);
}

.taric-page .taric-niveles dt {
  align-items: center;
  gap: 14px;
  text-transform: none;
  letter-spacing: 0;
}

.taric-page .taric-nivel-cifra {
  display: grid;
  place-items: center;
  flex: none;
  width: 58px;
  height: 58px;
  color: #fff;
  background: var(--wine);
  border-radius: 50%;
  font-size: 1.35rem;
  letter-spacing: 0;
  line-height: 1;
}

.taric-page .taric-nivel-nombre {
  display: grid;
  gap: 2px;
  color: var(--graphite);
  font-size: 1.02rem;
  font-weight: 800;
}

.taric-page .taric-nivel-nombre small {
  color: var(--gray);
  font-size: 0.8rem;
  font-weight: 500;
}

/* 3 · Las bolas numeradas: sin aureola beige. Un fino filete blanco que lee
   igual sobre la banda y sobre la tarjeta en la que entra la bola. */
.taric-page .eir-process-number {
  box-shadow: 0 0 0 3px #fff;
}

/* 4 · Widget: mismo lenguaje que el resto de la página. Sin caja de formulario:
   título grande, columna de documentación con las hojas grandes y realistas,
   columna de texto con campos limpios. */
.taric-page .taric-widget-section {
  padding: clamp(64px, 8vw, 120px) clamp(24px, 7vw, 112px);
  background:
    radial-gradient(circle at 88% 8%, rgba(112, 44, 54, 0.08), transparent 34%),
    var(--soft);
}

.taric-page .taric-widget-inner {
  max-width: 1240px;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.taric-page .taric-widget-header {
  max-width: 820px;
  margin-bottom: clamp(30px, 4vw, 52px);
}

.taric-page .taric-widget-header h2 {
  max-width: 12ch;
  margin: 0 0 18px;
  color: var(--wine);
  font-size: clamp(2.45rem, 4.8vw, 5.3rem);
  font-weight: 900;
  line-height: 0.96;
  text-transform: uppercase;
}

.taric-page .taric-widget-lead {
  max-width: 58ch;
  margin: 0;
  color: rgba(35, 31, 32, 0.74);
  font-size: clamp(1rem, 1.2vw, 1.14rem);
  line-height: 1.65;
}

.taric-page .taric-form {
  grid-template-columns: minmax(300px, 0.9fr) minmax(360px, 1.1fr);
  gap: clamp(28px, 4vw, 56px);
  align-items: start;
  padding: 0;
  border: 0;
}

.taric-page .taric-form-docs,
.taric-page .taric-form-text {
  display: grid;
  gap: 20px;
  align-content: start;
}

/* La zona de arrastre: un gran lienzo con las tres hojas y una indicación. */
.taric-page .taric-dropzone {
  min-height: clamp(340px, 36vw, 460px);
  align-content: center;
  gap: 26px;
  padding: 32px 28px;
  background: rgba(255, 255, 255, 0.55);
  border: 1.5px dashed rgba(112, 44, 54, 0.35);
  border-radius: 4px;
}

.taric-page .taric-dropzone:hover,
.taric-page .taric-dropzone:focus-visible {
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(112, 44, 54, 0.6);
}

.taric-page .taric-dropzone-label {
  display: grid;
  gap: 6px;
  color: var(--wine);
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-align: center;
  text-transform: uppercase;
}

/* Hojas grandes y realistas: papel con gradiente, sombra, esquina doblada y
   líneas de texto simuladas. El abanico es el mismo gesto, más amplio. */
.taric-page .taric-dropzone-mark {
  width: 260px;
  height: 214px;
}

.taric-page .taric-dropzone-mark i {
  left: 70px;
  top: 12px;
  width: 120px;
  height: 158px;
  border: 1px solid rgba(112, 44, 54, 0.32);
  border-radius: 2px;
  background: linear-gradient(180deg, #ffffff 0%, #f6f4ef 100%);
  box-shadow: 0 20px 34px -20px rgba(35, 31, 32, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  overflow: hidden;
}

.taric-page .taric-dropzone-mark i::before {
  content: "";
  position: absolute;
  inset: 30px 18px auto 18px;
  height: 84px;
  background: repeating-linear-gradient(180deg, rgba(112, 44, 54, 0.2) 0 2px, transparent 2px 13px);
}

.taric-page .taric-dropzone-mark i::after {
  content: "";
  position: absolute;
  top: -1px;
  right: -1px;
  width: 24px;
  height: 24px;
  background: linear-gradient(225deg, var(--soft) 0 50%, rgba(112, 44, 54, 0.22) 50% 52%, #ebe7df 52%);
}

.taric-page .taric-dropzone-mark i:nth-child(1) { transform: rotate(-8deg) translateX(-16px); }
.taric-page .taric-dropzone-mark i:nth-child(2) { transform: translateY(-6px); }
.taric-page .taric-dropzone-mark i:nth-child(3) {
  transform: rotate(8deg) translateX(16px);
  background: linear-gradient(180deg, #fbf7f7 0%, #f1e6e7 100%);
}

.taric-page .taric-dropzone-mark b {
  bottom: -2px;
  width: 22px;
  height: 22px;
  border-width: 3px;
}

.taric-page .taric-dropzone:hover .taric-dropzone-mark i:nth-child(1),
.taric-page .taric-dropzone:focus-visible .taric-dropzone-mark i:nth-child(1) { transform: rotate(-20deg) translate(-48px, -12px); }
.taric-page .taric-dropzone:hover .taric-dropzone-mark i:nth-child(2),
.taric-page .taric-dropzone:focus-visible .taric-dropzone-mark i:nth-child(2) { transform: translateY(-24px); }
.taric-page .taric-dropzone:hover .taric-dropzone-mark i:nth-child(3),
.taric-page .taric-dropzone:focus-visible .taric-dropzone-mark i:nth-child(3) { transform: rotate(20deg) translate(48px, -12px); }

.taric-page .taric-dropzone.is-over .taric-dropzone-mark i {
  background: linear-gradient(180deg, #fbf3f4 0%, #f3e1e3 100%);
}

/* Campos: etiqueta pequeña en burdeos, cajas limpias con esquinas suaves. */
.taric-page .taric-field-title {
  display: block;
  color: var(--wine);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.taric-page .taric-field input,
.taric-page .taric-field textarea {
  border: 1px solid rgba(112, 44, 54, 0.22);
  border-radius: 4px;
  background: #fff;
}

.taric-page .taric-field-desc textarea {
  min-height: 236px;
  font-size: 1.02rem;
}

.taric-page .taric-form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
  margin-top: 4px;
}

.taric-page .taric-form-actions .button {
  min-width: 220px;
  min-height: 56px;
  font-size: 0.95rem;
}

.taric-page .taric-legal-nota {
  margin-top: clamp(28px, 4vw, 44px);
}

@media (max-width: 980px) {
  .taric-page .hand-feature-section {
    grid-template-rows: auto;
  }
  .taric-page .taric-form {
    grid-template-columns: 1fr;
  }
  .taric-page .taric-dropzone {
    min-height: 300px;
  }
  .taric-page .taric-dropzone-mark {
    width: 220px;
    height: 190px;
  }
  .taric-page .taric-dropzone-mark i {
    left: 55px;
    width: 110px;
    height: 144px;
  }
}

/* ------------------------------------------------------------
   Revisión de Milton (03-09, tercera tanda): bolas sin anillo, widget con la
   composición de «Cada mercancía…» (título izquierda, documentos derecha) y el
   recuadro discontinuo solo mientras se arrastra.
   ------------------------------------------------------------ */

/* 3 · Bolas del flujo: sin anillo de ningún color. La línea muere en el borde de
   la bola, como un stepper; la bola sigue entrando en la tarjeta. */
.taric-page .eir-process-number {
  box-shadow: none;
}

/* Flujo TARIC aprobado: secuencia vertical editorial con eje central. Cada
   fila alterna icono y copy; los elementos no se presentan como tarjetas. */
.taric-page .eir-process-flow {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  width: min(100%, 980px);
  margin: 0 auto;
  padding: 34px 0 18px;
}

.taric-page .eir-process-flow::before {
  top: 34px;
  right: auto;
  bottom: 18px;
  left: 50%;
  width: 1px;
  height: auto;
  background: rgba(112, 44, 54, 0.32);
  transform: translateX(-50%);
}

.taric-page .eir-process-step,
.taric-page .eir-process-step:nth-child(even) {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 54px minmax(0, 1fr);
  align-items: center;
  column-gap: clamp(28px, 4vw, 58px);
  min-height: clamp(176px, 16vw, 220px);
  padding: 28px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  transition: none;
}

.taric-page .eir-process-step:hover {
  border-color: transparent;
  box-shadow: none;
  transform: none;
}

.taric-page .taric-step-icon {
  position: static;
  z-index: 1;
  display: block;
  width: clamp(94px, 9vw, 122px);
  aspect-ratio: 1;
  color: var(--wine);
}

.taric-page .taric-step-icon img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.taric-page .taric-step-marker {
  position: relative;
  z-index: 2;
  display: grid;
  grid-column: 2;
  place-items: center;
  width: 36px;
  height: 36px;
  justify-self: center;
  border: 1px solid rgba(112, 44, 54, 0.32);
  border-radius: 50%;
  background: #fff;
  color: var(--wine);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.taric-page .taric-step-copy {
  width: min(100%, 34ch);
}

.taric-page .taric-step-copy h3 {
  margin: 0 0 12px;
  font-size: clamp(1.25rem, 1.8vw, 1.75rem);
  line-height: 1.08;
}

.taric-page .taric-step-copy p {
  max-width: none;
  line-height: 1.65;
}

.taric-page .eir-process-step:nth-child(odd) .taric-step-icon {
  grid-column: 1;
  grid-row: 1;
  justify-self: end;
}

.taric-page .eir-process-step:nth-child(odd) .taric-step-copy {
  grid-column: 3;
  grid-row: 1;
  justify-self: start;
}

.taric-page .eir-process-step:nth-child(even) .taric-step-icon {
  grid-column: 3;
  grid-row: 1;
  justify-self: start;
}

.taric-page .eir-process-step:nth-child(even) .taric-step-copy {
  grid-column: 1;
  grid-row: 1;
  justify-self: end;
  text-align: right;
}

@media (max-width: 700px) {
  .taric-page .eir-process-flow {
    width: 100%;
    padding: 12px 0 0 54px;
  }

  .taric-page .eir-process-flow::before {
    display: block;
    top: 36px;
    bottom: 36px;
    left: 20px;
    transform: none;
  }

  .taric-page .eir-process-step,
  .taric-page .eir-process-step:nth-child(even) {
    position: relative;
    grid-template-columns: 1fr;
    gap: 16px;
    min-height: 0;
    padding: 24px 0 34px;
  }

  .taric-page .taric-step-marker {
    position: absolute;
    top: 34px;
    left: -52px;
    right: auto;
    grid-column: auto;
    justify-self: auto;
    width: 36px;
    height: 36px;
  }

  .taric-page .eir-process-step:nth-child(n) .taric-step-icon {
    grid-column: 1;
    grid-row: 1;
    width: 76px;
    justify-self: start;
  }

  .taric-page .eir-process-step:nth-child(n) .taric-step-copy {
    grid-column: 1;
    grid-row: 2;
    width: 100%;
    justify-self: start;
    text-align: left;
  }
}

/* 4 · Widget. Arriba, la misma rejilla que la sección «Cada mercancía…». */
.taric-page .taric-form {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(28px, 4vw, 52px);
  padding: 0;
  border: 0;
}

.taric-page .taric-widget-top {
  display: grid;
  grid-template-columns: minmax(300px, 0.82fr) minmax(380px, 1.18fr);
  align-items: start;
  gap: clamp(20px, 3vw, 48px);
}

.taric-page .taric-widget-header {
  max-width: 660px;
  margin: 0;
}

.taric-page .taric-widget-header h2 {
  max-width: 11ch;
  margin: 0 0 24px;
}

/* Los documentos, a la derecha, sin caja: la zona de soltar es toda la figura.
   El recuadro discontinuo aparece SOLO mientras se arrastra algo encima. */
.taric-page .taric-dropzone {
  min-height: clamp(360px, 40vw, 520px);
  align-content: center;
  gap: 28px;
  padding: 24px;
  background: transparent;
  border: 1.5px dashed transparent;
  border-radius: 4px;
  transition: background 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
}

.taric-page .taric-dropzone:hover,
.taric-page .taric-dropzone:focus-visible {
  background: transparent;
  border-color: transparent;
}

.taric-page .taric-dropzone.is-over {
  background: rgba(112, 44, 54, 0.05);
  border-style: dashed;
  border-color: var(--wine);
  box-shadow: none;
}

/* Hojas más grandes; el abanico se abre al pasar por encima o al arrastrar. */
.taric-page .taric-dropzone-mark {
  width: 380px;
  height: 300px;
}

.taric-page .taric-dropzone-mark i {
  left: 105px;
  top: 14px;
  width: 170px;
  height: 224px;
}

.taric-page .taric-dropzone-mark i::before {
  inset: 44px 24px auto 24px;
  height: 120px;
  background: repeating-linear-gradient(180deg, rgba(112, 44, 54, 0.2) 0 2px, transparent 2px 15px);
}

.taric-page .taric-dropzone-mark i::after {
  width: 30px;
  height: 30px;
}

.taric-page .taric-dropzone-mark i:nth-child(1) { transform: rotate(-9deg) translateX(-26px); }
.taric-page .taric-dropzone-mark i:nth-child(2) { transform: translateY(-8px); }
.taric-page .taric-dropzone-mark i:nth-child(3) { transform: rotate(9deg) translateX(26px); }

.taric-page .taric-dropzone:hover .taric-dropzone-mark i:nth-child(1),
.taric-page .taric-dropzone:focus-visible .taric-dropzone-mark i:nth-child(1),
.taric-page .taric-dropzone.is-over .taric-dropzone-mark i:nth-child(1) { transform: rotate(-22deg) translate(-70px, -16px); }
.taric-page .taric-dropzone:hover .taric-dropzone-mark i:nth-child(2),
.taric-page .taric-dropzone:focus-visible .taric-dropzone-mark i:nth-child(2),
.taric-page .taric-dropzone.is-over .taric-dropzone-mark i:nth-child(2) { transform: translateY(-30px); }
.taric-page .taric-dropzone:hover .taric-dropzone-mark i:nth-child(3),
.taric-page .taric-dropzone:focus-visible .taric-dropzone-mark i:nth-child(3),
.taric-page .taric-dropzone.is-over .taric-dropzone-mark i:nth-child(3) { transform: rotate(22deg) translate(70px, -16px); }

.taric-page .taric-dropzone-mark b {
  bottom: 2px;
  width: 26px;
  height: 26px;
}

/* Abajo: descripción ancha a la izquierda, email y botón a la derecha. */
.taric-page .taric-widget-bottom {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.7fr);
  align-items: start;
  gap: clamp(20px, 3vw, 48px);
  padding-top: clamp(20px, 2.6vw, 30px);
  border-top: 1px solid rgba(112, 44, 54, 0.14);
}

.taric-page .taric-form-side {
  display: grid;
  gap: 20px;
  align-content: start;
}

.taric-page .taric-field-desc textarea {
  min-height: 190px;
}

.taric-page .taric-form-actions .button {
  width: 100%;
}

@media (max-width: 980px) {
  .taric-page .taric-widget-top,
  .taric-page .taric-widget-bottom {
    grid-template-columns: 1fr;
  }
  .taric-page .taric-dropzone {
    min-height: 320px;
  }
  .taric-page .taric-dropzone-mark {
    width: 280px;
    height: 230px;
  }
  .taric-page .taric-dropzone-mark i {
    left: 75px;
    width: 130px;
    height: 170px;
  }
  .taric-page .taric-dropzone-mark i::before {
    inset: 34px 18px auto 18px;
    height: 90px;
  }
}

/* ------------------------------------------------------------
   Documentos REALES del widget (03-09): tres PNG con transparencia generados
   por Milton (ficha técnica, factura comercial, packing list), recortados y
   servidos como WebP por web/tools/documentos.py. Sustituyen a las hojas CSS.
   Orden: ficha detrás a la izquierda, packing list detrás a la derecha, la
   factura delante (es la que enseña códigos HS: la más elocuente).
   ------------------------------------------------------------ */
.taric-page .taric-dropzone-mark {
  width: 420px;
  height: 330px;
}

.taric-page .taric-dropzone-mark .taric-doc {
  position: absolute;
  top: 0;
  left: 50%;
  width: 200px;
  height: auto;
  margin-left: -100px;
  transform-origin: 50% 100%;
  filter: drop-shadow(0 16px 22px rgba(35, 31, 32, 0.28));
  transition: transform 520ms cubic-bezier(0.2, 0.75, 0.2, 1), filter 300ms ease;
  will-change: transform;
}

.taric-page .taric-doc-ficha   { z-index: 1; transform: rotate(-10deg) translateX(-70px) translateY(6px); }
.taric-page .taric-doc-packing { z-index: 2; transform: rotate(10deg) translateX(70px) translateY(6px); }
.taric-page .taric-doc-factura { z-index: 3; transform: translateY(-4px); }

.taric-page .taric-dropzone:hover .taric-doc-ficha,
.taric-page .taric-dropzone:focus-visible .taric-doc-ficha,
.taric-page .taric-dropzone.is-over .taric-doc-ficha { transform: rotate(-22deg) translate(-118px, -14px); }
.taric-page .taric-dropzone:hover .taric-doc-packing,
.taric-page .taric-dropzone:focus-visible .taric-doc-packing,
.taric-page .taric-dropzone.is-over .taric-doc-packing { transform: rotate(22deg) translate(118px, -14px); }
.taric-page .taric-dropzone:hover .taric-doc-factura,
.taric-page .taric-dropzone:focus-visible .taric-doc-factura,
.taric-page .taric-dropzone.is-over .taric-doc-factura { transform: translateY(-30px); }

.taric-page .taric-dropzone:hover .taric-doc,
.taric-page .taric-dropzone.is-over .taric-doc {
  filter: drop-shadow(0 26px 30px rgba(35, 31, 32, 0.34));
}

/* La flecha de entrada, bajo el abanico */
.taric-page .taric-dropzone-mark b {
  bottom: -6px;
  z-index: 4;
}

@media (max-width: 980px) {
  .taric-page .taric-dropzone-mark {
    width: 300px;
    height: 250px;
  }
  .taric-page .taric-dropzone-mark .taric-doc {
    width: 150px;
    margin-left: -75px;
  }
  .taric-page .taric-doc-ficha   { transform: rotate(-10deg) translateX(-52px) translateY(4px); }
  .taric-page .taric-doc-packing { transform: rotate(10deg) translateX(52px) translateY(4px); }
  .taric-page .taric-dropzone:hover .taric-doc-ficha,
  .taric-page .taric-dropzone.is-over .taric-doc-ficha { transform: rotate(-20deg) translate(-86px, -10px); }
  .taric-page .taric-dropzone:hover .taric-doc-packing,
  .taric-page .taric-dropzone.is-over .taric-doc-packing { transform: rotate(20deg) translate(86px, -10px); }
}

@media (prefers-reduced-motion: reduce) {
  .taric-page .taric-dropzone-mark .taric-doc {
    transition: none;
  }
}

/* ------------------------------------------------------------
   Revisión de Milton (03-09, cuarta tanda): marca de agua centrada con el
   título, documentos a la altura del título, pie del formulario compacto,
   bloque de equipos GUIEX en lugar de las preguntas frecuentes.
   ------------------------------------------------------------ */

/* 3 · Marca de agua: centrada en vertical respecto al bloque del título y con
   el mismo margen a la derecha que el título a la izquierda. */
.taric-page .eir-process-watermark {
  top: clamp(56px, 6.5vw, 104px);
  right: clamp(28px, 6vw, 96px);
}

/* 4 · Widget: los documentos arrancan a la altura del título. */
.taric-page .taric-widget-top {
  align-items: start;
}

.taric-page .taric-dropzone {
  min-height: 0;
  align-content: start;
  padding: 0 24px 24px;
}

.taric-page .taric-dropzone-mark {
  margin-top: 4px;
}

/* Pie del formulario: descripción a todo el ancho y, debajo, email y botón en
   la misma fila, pegados. */
.taric-page .taric-widget-bottom {
  grid-template-columns: 1fr;
  gap: 18px;
}

.taric-page .taric-field-desc textarea {
  min-height: 150px;
}

/* Solo el botón (sin campo de correo, Milton 07-09), alineado a la derecha. */
.taric-page .taric-form-fila {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 16px;
}

.taric-page .taric-form-fila .taric-form-actions {
  margin: 0;
}

.taric-page .taric-form-fila .taric-form-actions .button {
  width: auto;
  min-width: 220px;
  min-height: 50px;
}

/* 5 · Equipos GUIEX: cuatro tarjetas de la misma altura (así el isotipo del
   centro queda centrado de verdad) y enlace a cada departamento. */
.taric-page .eir-benefits {
  grid-auto-rows: 1fr;
}

.taric-page .eir-benefit-card {
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.taric-page .eir-benefit-card p {
  flex: 1 1 auto;
}

.taric-page .taric-dept-link {
  display: inline-block;
  margin-top: 14px;
  color: var(--wine);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-decoration: none;
  text-transform: uppercase;
}

.taric-page .taric-dept-link::after {
  content: " \2192";
}

.taric-page .taric-dept-link:hover,
.taric-page .taric-dept-link:focus-visible {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.taric-page .taric-requirements-list {
  margin: 18px 0 0;
  padding-left: 18px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.93rem;
  line-height: 1.55;
}

.taric-page .taric-requirements-list li {
  margin: 8px 0;
}

@media (max-width: 760px) {
  .taric-page .taric-form-fila {
    justify-content: stretch;
  }
  .taric-page .taric-form-fila .taric-form-actions .button {
    width: 100%;
  }
}

/* ------------------------------------------------------------
   Revisión de Milton (03-09, quinta tanda): los tres documentos más grandes y
   abiertos, de modo que los tres sobresalen del recuadro (como ya hacía la
   factura por arriba). El recuadro no recorta nada.
   ------------------------------------------------------------ */
.taric-page .taric-dropzone {
  overflow: visible;
}

.taric-page .taric-dropzone-mark {
  width: 100%;
  max-width: 520px;
  height: 380px;
  margin-top: 0;
}

.taric-page .taric-dropzone-mark .taric-doc {
  top: -10px;
  left: 53%;                 /* el ventall abre hacia el margen derecho, no hacia el texto */
  width: 244px;
  margin-left: -122px;
}

.taric-page .taric-doc-ficha   { transform: rotate(-12deg) translate(-150px, 20px); }
.taric-page .taric-doc-packing { transform: rotate(12deg) translate(150px, 20px); }
.taric-page .taric-doc-factura { transform: translateY(-24px); }

.taric-page .taric-dropzone:hover .taric-doc-ficha,
.taric-page .taric-dropzone:focus-visible .taric-doc-ficha,
.taric-page .taric-dropzone.is-over .taric-doc-ficha { transform: rotate(-19deg) translate(-180px, 6px); }
.taric-page .taric-dropzone:hover .taric-doc-packing,
.taric-page .taric-dropzone:focus-visible .taric-doc-packing,
.taric-page .taric-dropzone.is-over .taric-doc-packing { transform: rotate(19deg) translate(180px, 6px); }
.taric-page .taric-dropzone:hover .taric-doc-factura,
.taric-page .taric-dropzone:focus-visible .taric-doc-factura,
.taric-page .taric-dropzone.is-over .taric-doc-factura { transform: translateY(-46px); }

.taric-page .taric-dropzone-mark b {
  bottom: -14px;
}

.taric-page .taric-dropzone-label {
  margin-top: 8px;
}

.taric-page .taric-widget-lead + .taric-widget-lead {
  margin-top: 14px;
}

@media (max-width: 980px) {
  .taric-page .taric-dropzone-mark {
    max-width: 340px;
    height: 290px;
  }
  .taric-page .taric-dropzone-mark .taric-doc {
    width: 180px;
    margin-left: -90px;
  }
  .taric-page .taric-doc-ficha   { transform: rotate(-12deg) translate(-96px, 12px); }
  .taric-page .taric-doc-packing { transform: rotate(12deg) translate(96px, 12px); }
  .taric-page .taric-doc-factura { transform: translateY(-14px); }
  .taric-page .taric-dropzone:hover .taric-doc-ficha,
  .taric-page .taric-dropzone.is-over .taric-doc-ficha { transform: rotate(-20deg) translate(-130px, -4px); }
  .taric-page .taric-dropzone:hover .taric-doc-packing,
  .taric-page .taric-dropzone.is-over .taric-doc-packing { transform: rotate(20deg) translate(130px, -4px); }
}

/* Los ficheros del visitante NO se dibujan sobre los tres documentos de muestra
   (Milton, 07-09): solo la lista bajo el título. */

/* La lista accesible, bajo el título: fichas compactas en la columna izquierda. */
.taric-page .taric-widget-header .taric-files {
  margin-top: 22px;
  gap: 8px;
}

.taric-page .taric-widget-header .taric-file {
  padding: 8px 10px;
  border-radius: 4px;
  border-color: rgba(112, 44, 54, 0.2);
  background: rgba(255, 255, 255, 0.86);
}

.taric-page .taric-widget-header .taric-file-name {
  font-size: 0.86rem;
}

/* ------------------------------------------------------------
   Revisión de Milton (07-09): la composición del abanico EN REPOSO es la de antes
   (±150 px, que le gustaba) a cualquier anchura. Solo el empuje al pasar el ratón o
   al arrastrar crece con el ancho de la ventana, para que la ficha de la izquierda
   y el packing salgan del recuadro también a ventana completa (antes solo salían la
   factura y el packing). La flecha se ve siempre y flota al pasar el ratón.
   (Segunda revisión: en reposo las hojas NO se separan más a ventana completa.)
   ------------------------------------------------------------ */
.taric-page .taric-doc-ficha   { transform: rotate(-12deg) translate(-150px, 20px); }
.taric-page .taric-doc-packing { transform: rotate(12deg) translate(150px, 20px); }

/* Al pasar el ratón: el gesto de siempre (±180 px). Solo al ARRASTRAR encima
   (`is-over`) el empuje crece con la ventana para que la ficha y el packing salgan
   del recuadro también a pantalla completa. */
.taric-page .taric-dropzone:hover .taric-doc-ficha,
.taric-page .taric-dropzone:focus-visible .taric-doc-ficha { transform: rotate(-19deg) translate(-180px, 6px); }
.taric-page .taric-dropzone:hover .taric-doc-packing,
.taric-page .taric-dropzone:focus-visible .taric-doc-packing { transform: rotate(19deg) translate(180px, 6px); }
.taric-page .taric-dropzone.is-over .taric-doc-ficha { transform: rotate(-19deg) translate(clamp(-240px, 95px - 21.4vw, -180px), 6px); }
.taric-page .taric-dropzone.is-over .taric-doc-packing { transform: rotate(19deg) translate(clamp(180px, 21.4vw - 95px, 240px), 6px); }

/* La flecha: siempre visible; al pasar el ratón (o al arrastrar encima) flota. */
.taric-page .taric-dropzone-mark b {
  opacity: 1;
  transform: translate(-50%, -10px) rotate(45deg);
}
.taric-page .taric-dropzone:hover .taric-dropzone-mark b,
.taric-page .taric-dropzone:focus-visible .taric-dropzone-mark b,
.taric-page .taric-dropzone.is-over .taric-dropzone-mark b {
  opacity: 1;
  animation: taricFlechaFlota 1.1s ease-in-out infinite;
}
@keyframes taricFlechaFlota {
  0%, 100% { transform: translate(-50%, -10px) rotate(45deg); }
  50% { transform: translate(-50%, -1px) rotate(45deg); }
}

@media (max-width: 980px) {
  /* En pantallas estrechas manda la composición anterior (sin empuje extra). */
  .taric-page .taric-doc-ficha   { transform: rotate(-12deg) translate(-96px, 12px); }
  .taric-page .taric-doc-packing { transform: rotate(12deg) translate(96px, 12px); }
  .taric-page .taric-dropzone:hover .taric-doc-ficha,
  .taric-page .taric-dropzone.is-over .taric-doc-ficha { transform: rotate(-20deg) translate(-130px, -4px); }
  .taric-page .taric-dropzone:hover .taric-doc-packing,
  .taric-page .taric-dropzone.is-over .taric-doc-packing { transform: rotate(20deg) translate(130px, -4px); }
}

@media (prefers-reduced-motion: reduce) {
  .taric-page .taric-dropzone:hover .taric-dropzone-mark b { animation: none; }
}

/* ============================================================
   RONDA 08-09 (Milton) · el formulario cabe en una pantalla y el cierre
   deja UNA sola tarjeta: la ficha de partida, con el logo de marca de agua.
   ============================================================ */

/* 1 · Formulario compacto: la descripción, al lado de los documentos, y sin
   la línea que partía el bloque. */
.taric-page .taric-widget-col {
  display: grid;
  align-content: start;
  gap: clamp(16px, 2.2vw, 26px);
  min-width: 0;
}

.taric-page .taric-widget-header {
  margin: 0;
}

.taric-page .taric-widget-header h2 {
  margin: 0 0 16px;
}

.taric-page .taric-widget-lead {
  font-size: 0.98rem;
  line-height: 1.55;
}

.taric-page .taric-widget-bottom {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  padding: clamp(16px, 2vw, 22px);
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(112, 44, 54, 0.18);
  border-radius: 4px;
}

.taric-page .taric-field-desc textarea {
  min-height: clamp(112px, 12vw, 148px);
  font-size: 0.98rem;
}

.taric-page .taric-dropzone {
  min-height: clamp(260px, 26vw, 380px);
  padding: 0 16px 12px;
}

/* 2 · Cierre: la caja del teatro desaparece y solo queda la ficha. */
.taric-page .taric-agent.is-cerrando {
  min-height: 0;
  padding: 0;
  background: none;
  border-color: transparent;
  box-shadow: none;
  grid-template-columns: minmax(0, 1fr);
  transition: padding 620ms cubic-bezier(0.2, 0.75, 0.2, 1),
              background-color 620ms ease, border-color 620ms ease;
}

.taric-page .taric-agent.is-cerrando .taric-agent-visual,
.taric-page .taric-agent.is-cerrando .taric-agent-copy,
.taric-page .taric-agent.is-cerrando .taric-agent-status,
.taric-page .taric-agent.is-cerrando .taric-agent-code {
  display: none;
}

.taric-page .taric-agent.is-cerrando .taric-ficha {
  margin-top: 0;
}

/* El logo, que ha estado formándose durante toda la consulta, se muda a la ficha
   y emerge de su esquina superior derecha como marca de agua. */
.taric-page .taric-logo-motion.is-marca {
  position: absolute;
  z-index: 0;
  top: clamp(-96px, -7vw, -40px);
  right: clamp(-72px, -5vw, -28px);
  width: clamp(300px, 42vw, 620px);
  height: auto;
  opacity: 0.09;
  pointer-events: none;
  filter: saturate(0.85);
}

.taric-page .taric-ficha {
  overflow: hidden;
}

.taric-page .taric-ficha > *:not(.taric-logo-motion) {
  position: relative;
  z-index: 1;
}

/* 3 · El razonamiento, plegado tras la flecha de la portada. */
.taric-page .taric-proceso {
  grid-column: 1 / -1;
  margin-top: clamp(18px, 2.4vw, 28px);
}

.taric-page .taric-proceso-boton {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  width: 100%;
  padding: 14px 18px;
  color: var(--wine);
  background: transparent;
  border: 1.5px dashed rgba(112, 44, 54, 0.35);
  border-radius: 4px;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 220ms ease, border-color 220ms ease;
}

.taric-page .taric-proceso-boton:hover,
.taric-page .taric-proceso-boton:focus-visible {
  background: rgba(255, 255, 255, 0.7);
  border-color: rgba(112, 44, 54, 0.6);
}

/* La misma flecha que invita a soltar la documentación en la portada. */
.taric-page .taric-proceso-flecha {
  position: relative;
  width: 18px;
  height: 18px;
  border-right: 3px solid var(--wine);
  border-bottom: 3px solid var(--wine);
  transform: translateY(-4px) rotate(45deg);
  transition: transform 420ms cubic-bezier(0.2, 0.75, 0.2, 1);
}

.taric-page .taric-proceso-boton:hover .taric-proceso-flecha {
  animation: taricDropArrow 900ms ease-in-out infinite;
}

.taric-page .taric-proceso.is-abierto .taric-proceso-flecha {
  transform: translateY(2px) rotate(-135deg);
  animation: none;
}

.taric-page .taric-proceso-cuerpo {
  overflow: hidden;
  margin-top: 16px;
}

.taric-page .taric-proceso:not(.is-abierto) .taric-proceso-cuerpo {
  display: none;
}

/* 4 · Cronómetro: cuánto ha llevado, nunca cuánto falta. */
.taric-page .taric-timeline.is-done .taric-timeline-bar {
  opacity: 0.35;
}

.taric-page .taric-timeline-left {
  font-variant-numeric: lining-nums tabular-nums;
}

.taric-page .taric-timeline.is-done .taric-timeline-left {
  color: var(--wine);
  font-weight: 800;
}

@media (max-width: 980px) {
  .taric-page .taric-logo-motion.is-marca {
    width: 74vw;
    top: -40px;
    right: -30px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .taric-page .taric-proceso-boton:hover .taric-proceso-flecha,
  .taric-page .taric-proceso-flecha {
    animation: none;
    transition: none;
  }
}

/* ------------------------------------------------------------
   Códigos tocables (Milton, 09-09): el código no lleva su nombre escrito al
   lado; se subraya, y al tocarlo se abre la misma ventana del glosario de la
   web con el nombre oficial de la declaración.
   ------------------------------------------------------------ */
.taric-page .taric-ficha-doc {
  font: inherit;
  font-variant-numeric: lining-nums tabular-nums;
  cursor: pointer;
  appearance: none;
  transition: background 200ms ease, border-color 200ms ease;
}

.taric-page .taric-ficha-doc b {
  text-decoration: underline;
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
}

.taric-page .taric-ficha-doc:hover,
.taric-page .taric-ficha-doc:focus-visible {
  background: rgba(112, 44, 54, 0.12);
  border-color: rgba(112, 44, 54, 0.5);
}

.taric-page .taric-ficha-clave {
  padding: 0;
  color: var(--wine);
  background: none;
  border: 0;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  font-variant-numeric: lining-nums tabular-nums;
}

.taric-page .taric-ficha-clave b {
  text-decoration: underline;
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
}

/* La ventana reutiliza la hoja del glosario de la web; aquí solo lo propio. */
.taric-codigo-dialog .taric-codigo-titulo {
  font-family: var(--taric-code-font);
  letter-spacing: 0.05em;
}

.taric-codigo-dialog .taric-codigo-papel {
  color: var(--wine);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.taric-codigo-dialog .taric-codigo-texto {
  font-size: 0.98rem;
  line-height: 1.55;
}

.taric-codigo-dialog .taric-codigo-fuente {
  margin: 0;
  color: var(--gray);
  font-size: 0.78rem;
}

/* Regla de la casa: ninguna barra lateral de acento. La condición va en una caja. */
.taric-codigo-dialog .taric-codigo-condicion {
  padding: 10px 12px;
  background: rgba(112, 44, 54, 0.05);
  color: var(--graphite);
  font-size: 0.9rem;
  line-height: 1.5;
}
.hand-feature-copy .taric-title-line {
  display: block;
}

.hand-feature-copy .taric-title-line--keep {
  white-space: nowrap;
}

/* Preview 2026-09-09 · revisión TARIC a 929 px. */
.taric-page .taric-nivel-cifra {
  display: block;
  width: auto;
  height: auto;
  color: transparent;
  background: none;
  border: 0;
  border-radius: 0;
  -webkit-text-stroke: clamp(1.4px, 0.13vw, 2px) var(--wine);
  font-size: clamp(3.4rem, 5vw, 5.4rem);
  font-weight: 900;
  line-height: 0.9;
}

@media (min-width: 760px) and (max-width: 1100px) {
  .taric-page .hand-feature-section {
    grid-template-columns: minmax(0, 0.92fr) minmax(300px, 1.08fr);
    grid-template-rows: auto auto;
    column-gap: clamp(24px, 4vw, 44px);
  }

  .taric-page .hand-feature-copy {
    grid-column: 1;
    grid-row: 1;
  }

  .taric-page .hand-feature-media.taric-escena {
    grid-column: 2;
    grid-row: 1;
    width: min(100%, 430px);
  }

  .taric-page .taric-niveles-box {
    grid-column: 1 / -1;
    grid-row: 2;
  }
}

.taric-page .taric-nivel-nombre--inline {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: 0.5em;
  row-gap: 2px;
  color: var(--wine);
}

.taric-page .taric-nivel-nombre--inline small {
  flex: 0 1 auto;
}

/* Preview 2026-09-10 · niveles TARIC alineados con la base de las cifras. */
.taric-page .taric-niveles dt {
  align-items: flex-end;
  gap: clamp(6px, 1.2vw, 12px);
}

.taric-page .taric-nivel-nombre--inline {
  padding-bottom: clamp(3px, 0.4vw, 6px);
  font-size: clamp(1.14rem, 1.65vw, 1.38rem);
  line-height: 1.05;
}

.taric-page .taric-nivel-nombre--inline small {
  font-size: clamp(0.9rem, 1.28vw, 1.08rem);
  line-height: 1.18;
}

.taric-page .eir-benefit-card p .glossary-term {
  display: inline;
  width: auto;
  margin: 0;
  padding: 0;
  vertical-align: baseline;
  color: inherit;
  font: inherit;
  line-height: inherit;
  text-align: inherit;
}

/* Preview 2026-09-10 · cronología TARIC horizontal. En escritorio y tablet
   ancho, los cuatro pasos avanzan de izquierda a derecha sobre un único eje. */
@media (min-width: 561px) {
  .taric-page .eir-process-flow {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
    width: min(100%, 1180px);
    margin: 0 auto;
    padding: 24px 0;
  }

  .taric-page .eir-process-flow::before {
    display: block;
    top: 299px;
    right: 12.5%;
    bottom: auto;
    left: 12.5%;
    width: auto;
    height: 1px;
    background: rgba(112, 44, 54, 0.32);
    transform: none;
  }

  .taric-page .eir-process-step,
  .taric-page .eir-process-step:nth-child(even) {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: 250px 50px 250px;
    gap: 0;
    min-height: 0;
    padding: 0 clamp(8px, 1.2vw, 18px);
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    transition: none;
  }

  .taric-page .eir-process-step:hover {
    border-color: transparent;
    box-shadow: none;
    transform: none;
  }

  .taric-page .taric-step-marker {
    position: relative;
    top: auto;
    right: auto;
    bottom: auto;
    left: auto;
    grid-column: 1;
    grid-row: 2;
    place-self: center;
    width: 36px;
    height: 36px;
    transform: none;
  }

  .taric-page .eir-process-step:nth-child(n) .taric-step-icon {
    position: static;
    grid-column: 1;
    width: clamp(82px, 7.5vw, 112px);
    justify-self: center;
  }

  .taric-page .eir-process-step:nth-child(n) .taric-step-copy {
    grid-column: 1;
    width: 100%;
    max-width: 27ch;
    justify-self: center;
    text-align: center;
  }

  .taric-page .eir-process-step:nth-child(odd) .taric-step-copy {
    grid-row: 1;
    align-self: end;
    padding-bottom: 26px;
  }

  .taric-page .eir-process-step:nth-child(odd) .taric-step-icon {
    grid-row: 3;
    align-self: start;
    padding-top: 26px;
  }

  .taric-page .eir-process-step:nth-child(even) .taric-step-icon {
    grid-row: 1;
    align-self: end;
    padding-bottom: 26px;
  }

  .taric-page .eir-process-step:nth-child(even) .taric-step-copy {
    grid-row: 3;
    align-self: start;
    padding-top: 26px;
  }
}

@media (min-width: 561px) and (max-width: 760px) {
  .taric-page .eir-process-step,
  .taric-page .eir-process-step:nth-child(even) {
    grid-template-rows: 270px 46px 270px;
    padding-inline: 7px;
  }

  .taric-page .eir-process-flow::before {
    top: 317px;
  }

  .taric-page .taric-step-copy h3 {
    font-size: 1rem;
  }

  .taric-page .taric-step-copy p {
    font-size: 0.8rem;
    line-height: 1.5;
  }

  .taric-page .eir-process-step:nth-child(n) .taric-step-icon {
    width: 78px;
  }
}

@media (max-width: 560px) {
  .taric-page .eir-process-flow {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
    padding: 12px 0 0 54px;
  }

  .taric-page .eir-process-flow::before {
    display: block;
    top: 36px;
    right: auto;
    bottom: 36px;
    left: 20px;
    width: 1px;
    height: auto;
    transform: none;
  }

  .taric-page .eir-process-step,
  .taric-page .eir-process-step:nth-child(even) {
    position: relative;
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    gap: 16px;
    min-height: 0;
    padding: 24px 0 34px;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  .taric-page .taric-step-marker {
    position: absolute;
    top: 34px;
    right: auto;
    left: -52px;
    grid-column: auto;
    width: 36px;
    height: 36px;
  }

  .taric-page .eir-process-step:nth-child(n) .taric-step-icon {
    grid-column: 1;
    grid-row: 1;
    width: 76px;
    justify-self: start;
    align-self: auto;
    padding: 0;
  }

  .taric-page .eir-process-step:nth-child(n) .taric-step-copy {
    grid-column: 1;
    grid-row: 2;
    width: 100%;
    max-width: none;
    justify-self: start;
    align-self: auto;
    padding: 0;
    text-align: left;
  }
}

/* Ajuste final del visual TARIC: la imagen se muestra completa, sin recortar el teléfono. */
.taric-page .taric-call-row {
  align-items: center;
  overflow: hidden;
  background: linear-gradient(115deg, #f4f0ed 0 49%, #fff 49% 100%);
}

.taric-page .taric-phone-visual {
  align-self: center;
  min-height: 0;
  aspect-ratio: 1920 / 878;
  overflow: visible;
  background: transparent;
}

.taric-page .taric-phone-visual img {
  width: 100%;
  height: auto;
  max-width: 100%;
  transform: none;
}

.taric-page .taric-requirements-card {
  color: var(--ink);
  background: transparent;
}

.taric-page .taric-requirements-card h3,
.taric-page .taric-requirements-card p,
.taric-page .taric-requirements-card li {
  color: inherit;
}

@media (max-width: 860px) {
  .taric-page .taric-call-row {
    background: #fff;
  }

  .taric-page .taric-phone-visual {
    min-height: 0;
    aspect-ratio: 1920 / 878;
    background: radial-gradient(circle at 78% 50%, rgba(112, 44, 54, .12), transparent 28%), #f4f0ed;
  }

  .taric-page .taric-phone-visual img {
    width: 100%;
    transform: none;
  }
}

@media (max-width: 560px) {
  .taric-page .taric-phone-visual {
    min-height: 0;
  }

  .taric-page .taric-phone-visual img {
    width: 100%;
    transform: none;
  }
}

/* preview 2026-09-10 · ronda 12 · TARIC: flujo compacto e iconos protegidos */
@media (min-width: 761px) {
  .taric-page .eir-process-flow {
    grid-template-rows: 150px 50px 150px;
    padding-block: 10px;
  }

  .taric-page .eir-process-step,
  .taric-page .eir-process-step:nth-child(even) {
    grid-template-rows: 150px 50px 150px;
  }

  .taric-page .eir-process-flow::before {
    top: 185px;
  }
}

@media (min-width: 561px) and (max-width: 760px) {
  .taric-page .eir-process-flow {
    grid-template-rows: 140px 46px 140px;
    padding-block: 16px;
  }

  .taric-page .eir-process-step,
  .taric-page .eir-process-step:nth-child(even) {
    grid-template-rows: 140px 46px 140px;
  }

  .taric-page .eir-process-flow::before {
    top: 179px;
  }
}

.taric-page .taric-step-icon {
  display: grid;
  place-items: center;
  box-sizing: border-box;
  aspect-ratio: 1;
  padding: 0;
  overflow: visible;
  border: 1px solid rgba(112, 44, 54, 0.34);
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, rgba(112, 44, 54, 0.12) 0 54%, transparent 55%),
    #f8f5f2;
}

.taric-page .taric-step-icon img {
  width: 54%;
  height: 54%;
  object-fit: contain;
  overflow: visible;
}

.taric-page .eir-process-step:nth-child(n) .taric-step-icon {
  padding: 0;
}

/* TARIC: áreas conectadas presentadas como pestañas. */
.taric-page .taric-department-tabs{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:20px;border-bottom:1px solid rgba(112,44,54,.22)}
.taric-page .taric-department-tabs button{padding:12px 16px;border:0;border-bottom:3px solid transparent;background:transparent;color:var(--gray);font:inherit;font-size:.78rem;font-weight:850;letter-spacing:.03em;cursor:pointer}
.taric-page .taric-department-tabs button[aria-selected="true"]{border-bottom-color:var(--wine);color:var(--wine)}
.taric-page .taric-department-tabs button:focus-visible{outline:2px solid var(--wine);outline-offset:2px}
.taric-page .taric-department-panels{display:block}.taric-page .taric-department-panels .eir-benefit-card{min-height:0;clip-path:none}.taric-page .taric-department-panels .eir-benefit-card[hidden]{display:none}
@media(max-width:760px){.taric-page .taric-department-tabs{gap:0}.taric-page .taric-department-tabs button{flex:1 1 50%;padding:10px 8px;font-size:.7rem;text-align:left}.taric-page .taric-department-panels .eir-benefit-card{padding:28px 24px}}

/* TARIC: relación entre áreas y contacto. Conserva el contenido y lo ordena como una única composición. */
.taric-page .taric-connection-layout {
  display: grid;
  grid-template-columns: minmax(220px, .8fr) minmax(300px, 1.15fr) minmax(280px, .9fr);
  gap: clamp(20px, 2.6vw, 36px);
  align-items: stretch;
}
.taric-page .taric-connection-layout > .eir-requirements,
.taric-page .taric-services-panel,
.taric-page .taric-contact-card {
  min-width: 0;
  margin: 0;
}
.taric-page .taric-services-panel { display: flex; flex-direction: column; }
.taric-page .taric-services-kicker {
  margin: 0 0 10px;
  color: var(--wine);
  font-size: .72rem;
  font-weight: 850;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.taric-page .taric-services-panel .taric-department-tabs { margin: 0 0 18px; }
.taric-page .taric-services-panel .eir-benefits { flex: 1; }
.taric-page .taric-contact-card {
  display: grid;
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(112, 44, 54, .18);
}
.taric-page .taric-contact-visual {
  position: relative;
  min-height: 154px;
  overflow: hidden;
  background: var(--wine);
}
.taric-page .taric-contact-visual::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(120deg, rgba(68, 20, 29, .2), rgba(112, 44, 54, .58));
}
.taric-page .taric-contact-visual video {
  width: 100%;
  height: 100%;
  min-height: 154px;
  object-fit: cover;
  display: block;
}
.taric-page .taric-contact-visual span {
  position: absolute;
  z-index: 1;
  right: 18px;
  bottom: 12px;
  color: #fff;
  font-size: clamp(2rem, 3vw, 3.5rem);
  font-weight: 900;
  letter-spacing: -.06em;
}
.taric-page .taric-contact-copy { padding: 22px 24px 4px; }
.taric-page .taric-contact-copy h3 { margin: 0 0 8px; color: var(--wine); font-size: clamp(1.35rem, 2vw, 1.8rem); }
.taric-page .taric-contact-copy p:not(.taric-services-kicker) { margin: 0; line-height: 1.5; }
.taric-page .taric-contact-card .taric-contact-form {
  margin: 0;
  padding: 20px 24px 24px;
  background: transparent;
  border: 0;
}
@media (max-width: 1140px) {
  .taric-page .taric-connection-layout { grid-template-columns: minmax(230px, .8fr) minmax(320px, 1.2fr); }
  .taric-page .taric-contact-card { grid-column: 1 / -1; grid-template-columns: minmax(190px, .65fr) minmax(200px, .75fr) minmax(280px, 1fr); align-items: stretch; }
  .taric-page .taric-contact-visual { min-height: 100%; }
  .taric-page .taric-contact-visual video { min-height: 100%; }
  .taric-page .taric-contact-copy { padding: 28px 24px; align-self: center; }
  .taric-page .taric-contact-card .taric-contact-form { align-content: center; }
}
@media (max-width: 760px) {
  .taric-page .taric-connection-layout { grid-template-columns: 1fr; gap: 18px; }
  .taric-page .taric-contact-card { grid-column: auto; grid-template-columns: 1fr; }
  .taric-page .taric-contact-visual, .taric-page .taric-contact-visual video { min-height: 190px; }
  .taric-page .taric-contact-copy { padding: 24px 22px 2px; }
  .taric-page .taric-contact-card .taric-contact-form { padding: 20px 22px 24px; }
}
/* TARIC: bloque de acompañamiento reconstruido con la foto de teléfono aportada. */
.taric-page .taric-rebuild { display: grid; gap: clamp(24px, 3vw, 42px); }
.taric-page .taric-call-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(310px, .92fr); background: #fff; border: 1px solid rgba(112, 44, 54, .18); }
.taric-page .taric-phone-visual { position: relative; display: flex; align-items: center; min-height: 390px; margin: 0; overflow: hidden; background: radial-gradient(circle at 67% 47%, rgba(112, 44, 54, .13), transparent 37%), #f4f0ed; }
.taric-page .taric-phone-visual img { width: 150%; max-width: none; transform: translateX(-18%); display: block; }
.taric-page .taric-requirements-card { display: flex; flex-direction: column; justify-content: center; margin: 0; padding: clamp(30px, 4vw, 56px); border: 0; background: transparent; }
.taric-page .taric-requirements-card .taric-phone-action { align-self: flex-start; margin-top: 8px; }
.taric-page .taric-phone-action span { margin-left: 8px; font-size: 1.15em; }
.taric-page .taric-rebuild .taric-services-panel { display: block; margin: 0; }
.taric-page .taric-rebuild .taric-services-panel .eir-benefits { display: block; }
.taric-page .taric-contact-form-card { display: grid; grid-template-columns: 1.1fr 1fr 1fr; gap: 16px 18px; align-items: end; margin: 0; padding: clamp(26px, 3vw, 42px); border: 1px solid rgba(112, 44, 54, .18); background: #f8f6f3; }
.taric-page .taric-contact-form-card .taric-form-heading { align-self: center; padding-right: clamp(8px, 2vw, 26px); }
.taric-page .taric-contact-form-card .taric-form-heading h3 { margin: 0; color: var(--wine); font-size: clamp(1.35rem, 2vw, 1.85rem); }
.taric-page .taric-contact-form-card .full { grid-column: 2 / -1; }
.taric-page .taric-contact-form-card .button { grid-column: 2 / -1; justify-self: start; }
@media (max-width: 860px) {
  .taric-page .taric-call-row { grid-template-columns: 1fr; }
  .taric-page .taric-phone-visual { min-height: 270px; }
  .taric-page .taric-phone-visual img { width: 135%; transform: translateX(-12%); }
  .taric-page .taric-contact-form-card { grid-template-columns: 1fr 1fr; }
  .taric-page .taric-contact-form-card .taric-form-heading, .taric-page .taric-contact-form-card .full, .taric-page .taric-contact-form-card .button { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .taric-page .taric-phone-visual { min-height: 220px; }
  .taric-page .taric-phone-visual img { width: 145%; transform: translateX(-16%); }
  .taric-page .taric-requirements-card { padding: 28px 22px 30px; }
  .taric-page .taric-contact-form-card { grid-template-columns: 1fr; padding: 26px 22px; }
  .taric-page .taric-contact-form-card .taric-form-heading, .taric-page .taric-contact-form-card .full, .taric-page .taric-contact-form-card .button { grid-column: auto; }
}

/* Encuadre definitivo: el teléfono y la mano deben verse completos. */
.taric-page .taric-call-row {
  align-items: center;
  background: #fff;
}

.taric-page .taric-phone-visual {
  align-self: center;
  min-height: 0;
  aspect-ratio: 1920 / 878;
  overflow: hidden;
  background: radial-gradient(circle at 75% 50%, rgba(112, 44, 54, .11), transparent 27%), #f4f0ed;
}

.taric-page .taric-phone-visual img {
  width: 100%;
  height: auto;
  max-width: 100%;
  transform: none;
}

.taric-page .taric-requirements-card,
.taric-page .taric-requirements-card h3,
.taric-page .taric-requirements-card p,
.taric-page .taric-requirements-card li {
  color: var(--ink);
}

@media (max-width: 860px) {
  .taric-page .taric-call-row { background: #fff; }
  .taric-page .taric-phone-visual {
    min-height: 0;
    aspect-ratio: 1920 / 878;
    background: radial-gradient(circle at 78% 50%, rgba(112, 44, 54, .12), transparent 28%), #f4f0ed;
  }
  .taric-page .taric-phone-visual img { width: 100%; transform: none; }
}

@media (max-width: 560px) {
  .taric-page .taric-phone-visual { min-height: 0; }
  .taric-page .taric-phone-visual img { width: 100%; transform: none; }
}

/* Composición final: visual horizontal, preguntas compactas y áreas debajo. */
.taric-page .taric-call-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  overflow: visible;
  border: 0;
  background: transparent;
}

.taric-page .taric-phone-visual {
  width: 100%;
  aspect-ratio: 1920 / 878;
  border: 1px solid rgba(112, 44, 54, .14);
  background: radial-gradient(circle at 80% 50%, rgba(112, 44, 54, .11), transparent 25%), #f4f0ed;
}

.taric-page .taric-requirements-card {
  display: grid;
  grid-template-columns: minmax(230px, .72fr) minmax(0, 1.28fr);
  grid-template-rows: auto auto 1fr;
  column-gap: clamp(36px, 6vw, 84px);
  row-gap: 14px;
  align-items: start;
  padding: clamp(30px, 4vw, 52px);
  border: 1px solid rgba(112, 44, 54, .14);
  border-top: 0;
  background: #fff;
}

.taric-page .taric-requirements-card h3,
.taric-page .taric-requirements-card .taric-requirements-lead,
.taric-page .taric-requirements-card .taric-phone-action {
  grid-column: 1;
}

.taric-page .taric-requirements-card .taric-requirements-list {
  grid-column: 2;
  grid-row: 1 / span 3;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 28px;
  margin: 0;
}

.taric-page .taric-requirements-card .taric-phone-action {
  align-self: end;
  margin-top: 10px;
}

@media (max-width: 760px) {
  .taric-page .taric-requirements-card {
    display: block;
    padding: 28px 22px 30px;
  }

  .taric-page .taric-requirements-card .taric-requirements-list {
    display: block;
    margin-top: 22px;
  }
}

/* La foto funciona como apoyo lateral, no como visual principal. */
.taric-page .taric-call-row {
  grid-template-columns: minmax(220px, 30%) minmax(0, 1fr);
  align-items: stretch;
  border: 1px solid rgba(112, 44, 54, .14);
  background: #fff;
}

.taric-page .taric-phone-visual {
  width: auto;
  height: 100%;
  min-height: 330px;
  aspect-ratio: auto;
  border: 0;
  overflow: hidden;
  background: radial-gradient(circle at 78% 50%, rgba(112, 44, 54, .15), transparent 34%), #f4f0ed;
}

.taric-page .taric-phone-visual img {
  width: 230%;
  max-width: none;
  transform: translateX(-55%);
}

.taric-page .taric-requirements-card {
  border: 0;
}

@media (max-width: 760px) {
  .taric-page .taric-call-row {
    grid-template-columns: 105px minmax(0, 1fr);
  }

  .taric-page .taric-phone-visual {
    min-height: 100%;
    aspect-ratio: auto;
  }

  .taric-page .taric-phone-visual img {
    width: 340%;
    max-width: none;
    transform: translateX(-67%);
  }

  .taric-page .taric-requirements-card {
    padding: 26px 18px 28px;
  }

  .taric-page .taric-requirements-card h3 {
    font-size: clamp(1.65rem, 8vw, 2.15rem);
  }
}

@media (max-width: 390px) {
  .taric-page .taric-call-row {
    grid-template-columns: 88px minmax(0, 1fr);
  }

  .taric-page .taric-phone-visual img {
    width: 390%;
    transform: translateX(-70%);
  }
}

/* Revisión 14-09: la foto lateral se muestra completa, sin cortar el borde derecho. */
.taric-page .taric-phone-visual {
  padding: clamp(10px, 1.4vw, 18px);
  overflow: visible;
}
.taric-page .taric-phone-visual img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  object-fit: contain;
  object-position: center;
  transform: none;
}
@media (max-width: 760px) {
  .taric-page .taric-phone-visual img { width: 100%; max-width: 100%; transform: none; }
}

/* Revisión visual 14-09: foto completa como apoyo ligero y CTA blanco. */
.taric-page .taric-call-row {
  grid-template-columns: minmax(220px, 270px) minmax(0, 1fr);
  align-items: center;
}
.taric-page .taric-phone-visual {
  width: calc(100% - 28px);
  height: auto;
  min-height: 0;
  aspect-ratio: 1920 / 878;
  margin: 14px;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(112, 44, 54, .12);
  background: #f4f0ed;
}
.taric-page .taric-phone-visual img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.taric-page .taric-phone-action.button.primary {
  border: 1px solid var(--wine);
  background: #fff;
  color: var(--wine);
  box-shadow: none;
}
.taric-page .taric-phone-action.button.primary:hover,
.taric-page .taric-phone-action.button.primary:focus-visible {
  background: var(--wine);
  color: #fff;
}
@media (max-width: 760px) {
  .taric-page .taric-call-row { grid-template-columns: 1fr; }
  .taric-page .taric-phone-visual {
    width: calc(100% - 36px);
    margin: 18px 18px 0;
    aspect-ratio: 1920 / 878;
  }
}

/* El campo principal ocupa todo el ancho; cabecera y documentos permanecen arriba. */
.taric-page .taric-widget-top > .taric-widget-col {
  display: contents;
}

.taric-page .taric-widget-top > .taric-widget-col > .taric-widget-header {
  grid-column: 1;
  grid-row: 1;
}

.taric-page .taric-widget-top > .taric-dropzone {
  grid-column: 2;
  grid-row: 1;
}

.taric-page .taric-widget-top > .taric-widget-col > .taric-widget-bottom {
  grid-column: 1 / -1;
  grid-row: 2;
  width: 100%;
}

.taric-page .taric-widget-top .taric-field-desc,
.taric-page .taric-widget-top .taric-field-desc textarea {
  width: 100%;
  max-width: none;
}

@media (max-width: 980px) {
  .taric-page .taric-widget-top > .taric-widget-col > .taric-widget-header,
  .taric-page .taric-widget-top > .taric-dropzone,
  .taric-page .taric-widget-top > .taric-widget-col > .taric-widget-bottom {
    grid-column: 1;
    grid-row: auto;
  }
}

/* Cierre de la revisión 14-09: estas reglas deben prevalecer sobre las rondas anteriores. */
.taric-page .taric-widget-top > .taric-widget-col > .taric-widget-bottom { align-self: start; }
.taric-page .taric-legal { padding-block: clamp(64px, 7vw, 88px); }
.taric-page .taric-rebuild { gap: clamp(20px, 2.2vw, 30px); }
.taric-page .taric-contact-form-card { padding: clamp(24px, 2.5vw, 34px); }

/* Revisión visual 14-09: foto horizontal sin marco y vínculo 01–04 con Soluciones. */
.taric-page .taric-call-row {
  grid-template-columns: minmax(220px, 270px) minmax(0, 1fr);
  align-items: center;
  border: 0;
  background: #fff;
}

.taric-page .taric-phone-visual {
  width: calc(100% - 28px);
  height: auto;
  min-height: 0;
  margin: 14px;
  border: 0;
  aspect-ratio: 1920 / 878;
  overflow: hidden;
  background: transparent;
}

.taric-page .taric-phone-visual img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  object-fit: contain;
  object-position: center;
  transform: none;
}

.taric-page .taric-requirements-card {
  border: 0;
}

.taric-page .taric-requirements-card h3 {
  color: var(--wine);
}

.taric-page .taric-requirements-list {
  gap: 0;
  overflow: hidden;
  color: #fff;
  background: var(--wine);
  border: 1px solid rgba(255, 255, 255, .22);
}

.taric-page .taric-requirements-list li {
  display: flex;
  align-items: center;
  min-height: 112px;
  padding: 20px 24px;
  color: #fff;
  border: 0;
  line-height: 1.5;
}

.taric-page .taric-requirements-list li::before {
  content: none;
}

.taric-page .taric-requirements-list li:nth-child(odd) {
  border-right: 1px solid rgba(255, 255, 255, .22);
}

.taric-page .taric-requirements-list li:nth-child(-n + 2) {
  border-bottom: 1px solid rgba(255, 255, 255, .22);
}

.taric-page .taric-services-panel {
  position: relative;
  margin-top: 0;
  padding-top: clamp(28px, 3vw, 40px);
  border-top: 1px solid rgba(112, 44, 54, .2);
}

.taric-page .taric-department-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  overflow: hidden;
  background: var(--wine);
  border: 0;
}

.taric-page .taric-department-tabs button {
  position: relative;
  min-height: 82px;
  padding: 18px 20px;
  color: #fff;
  background: var(--wine);
  border: 0;
  border-right: 1px solid rgba(255, 255, 255, .22);
  text-align: left;
}

.taric-page .taric-department-tabs button:last-child {
  border-right: 0;
}

.taric-page .taric-department-tabs button::before {
  content: none;
}

.taric-page .taric-department-tabs button:hover,
.taric-page .taric-department-tabs button:focus-visible,
.taric-page .taric-department-tabs button[aria-selected="true"] {
  color: #fff;
  background: var(--wine-dark);
  border-bottom-color: transparent;
}

.taric-page .taric-department-tabs button[aria-selected="true"]::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 4px;
  background: #fff;
}

.taric-page .taric-department-tabs button:focus-visible {
  outline: 2px solid #fff;
  outline-offset: -4px;
}

@media (max-width: 760px) {
  .taric-page .taric-call-row {
    grid-template-columns: 1fr;
  }

  .taric-page .taric-phone-visual {
    width: calc(100% - 36px);
    height: auto;
    margin: 18px 18px 0;
    aspect-ratio: 1920 / 878;
  }

  .taric-page .taric-phone-visual img {
    width: 100%;
    height: 100%;
    object-position: center;
  }

  .taric-page .taric-requirements-list li {
    min-height: 0;
    padding: 18px 20px;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, .22);
  }

  .taric-page .taric-requirements-list li:last-child {
    border-bottom: 0;
  }

  .taric-page .taric-department-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .taric-page .taric-department-tabs button {
    min-height: 72px;
    padding: 14px 16px;
    border-right: 1px solid rgba(255, 255, 255, .22);
    border-bottom: 1px solid rgba(255, 255, 255, .22);
  }

  .taric-page .taric-department-tabs button:nth-child(2n) {
    border-right: 0;
  }

  .taric-page .taric-department-tabs button:nth-last-child(-n + 2) {
    border-bottom: 0;
  }
}
.taric-page .taric-turnstile:empty { display: none; }
@media (max-width: 760px) {
  .taric-page .taric-legal { padding-block: 48px; }
  .taric-page .taric-rebuild { gap: 18px; }
}

/* Revisión 16-09: el cierre de contacto TARIC adopta la composición de Legal. */
.taric-page .taric-short-contact h2 {
  font-size: clamp(2.3rem, 4.9vw, 4.9rem);
}

/* Revisión 16-09: composición final del bloque de llamada. */
.taric-page .taric-call-row {
  display: block;
  border: 0;
  background: #fff;
}

.taric-page .taric-requirements-card {
  display: grid;
  grid-template-columns: minmax(0, .96fr) minmax(380px, 1.04fr);
  gap: clamp(32px, 4.5vw, 64px);
  align-items: stretch;
  margin: 0;
  padding: clamp(34px, 4vw, 54px);
  color: var(--ink);
  border: 0;
  background: #fff;
}

.taric-page .taric-call-intro {
  display: grid;
  align-content: start;
  min-width: 0;
}

.taric-page .taric-call-intro h3 {
  grid-column: auto;
  max-width: 100%;
  margin: 0 0 clamp(20px, 2.6vw, 30px);
  color: var(--wine);
  font-size: clamp(2.35rem, 4vw, 4.4rem);
  line-height: .94;
}

.taric-page .taric-call-intro-body {
  display: grid;
  grid-template-columns: minmax(180px, .9fr) minmax(190px, 1.1fr);
  gap: clamp(20px, 2.5vw, 34px);
  align-items: center;
}

.taric-page .taric-phone-visual {
  width: 100%;
  height: auto;
  min-height: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  aspect-ratio: 1920 / 878;
  background: transparent;
}

.taric-page .taric-phone-visual img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  object-fit: contain;
  object-position: center;
  transform: none;
}

.taric-page .taric-call-copy {
  display: grid;
  gap: 24px;
  align-content: center;
}

.taric-page .taric-call-copy .taric-requirements-lead {
  grid-column: auto;
  margin: 0;
  color: var(--ink);
}

.taric-page .taric-call-copy .taric-phone-action {
  grid-column: auto;
  align-self: start;
  margin: 0;
}

.taric-page .taric-requirements-card .taric-requirements-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-column: 2;
  grid-row: 1;
  gap: 14px;
  align-self: stretch;
  margin: 0;
  padding: 0;
  overflow: visible;
  color: var(--ink);
  background: transparent;
  border: 0;
  list-style: none;
}

.taric-page .taric-requirements-list li,
.taric-page .taric-requirements-list li:nth-child(odd),
.taric-page .taric-requirements-list li:nth-child(-n + 2) {
  display: flex;
  align-items: center;
  min-height: 132px;
  margin: 0;
  padding: 22px 24px;
  color: var(--ink);
  background: rgba(112, 44, 54, .09);
  border: 1px solid rgba(112, 44, 54, .14);
  line-height: 1.5;
}

@media (max-width: 960px) {
  .taric-page .taric-requirements-card {
    grid-template-columns: 1fr;
  }

  .taric-page .taric-requirements-card .taric-requirements-list {
    grid-column: 1;
    grid-row: auto;
  }

}

@media (max-width: 600px) {
  .taric-page .taric-requirements-card {
    gap: 28px;
    padding: 28px 22px 30px;
  }

  .taric-page .taric-call-intro h3 {
    font-size: clamp(2.1rem, 10vw, 2.8rem);
  }

  .taric-page .taric-call-intro-body,
  .taric-page .taric-requirements-card .taric-requirements-list {
    grid-template-columns: 1fr;
  }

  .taric-page .taric-phone-visual {
    width: 100%;
    margin: 0;
  }

  .taric-page .taric-requirements-list li,
  .taric-page .taric-requirements-list li:nth-child(odd),
  .taric-page .taric-requirements-list li:nth-child(-n + 2) {
    min-height: 96px;
    padding: 18px 20px;
    border: 1px solid rgba(112, 44, 54, .14);
  }
}

/* Stream Focus A+D. Adaptación nativa de Vercel AI Elements (Apache 2.0).
   Una columna de ciclos públicos y resultado persistente, sin coreografía ornamental. */
.taric-page .taric-stage.is-editorial-stream {
  --paper: #f7f3ef; --soft: #eee7df; --line: #dcd2c9; --graphite: #2b2b2b;
  --gray: #616160; --wine: #702c36; --wine-dark: #4f1d27; --surface-content: var(--paper);
  --text-editorial: var(--graphite);
  color: var(--graphite); background: transparent; color-scheme: light;
  padding: 32px 0; border: 0; box-shadow: none;
  font-family: Raleway, "Segoe UI", Arial, sans-serif;
}
.taric-page .is-editorial-stream > :is(.taric-agent,.taric-timeline,.taric-detalles),
.taric-page .is-editorial-stream :is(.taric-margen,.taric-thought-hora,.taric-cursor) { display: none; }
.taric-page .is-editorial-stream .taric-stage-grid { display: block; margin: 0; padding: 0; }
.taric-page .is-editorial-stream .taric-track {
  display: flex; flex-direction: column; gap: 16px; width: 100%; max-width: 860px;
  margin-inline: auto; overflow-anchor: none;
}
.taric-page .is-editorial-stream[data-following="false"] .taric-track { overflow-anchor: auto; }
.taric-page .is-editorial-stream .taric-block { animation: none; }
.taric-page .is-editorial-stream .taric-thought {
  max-width: none; margin: 0; padding: 0; border: 0; background: transparent; box-shadow: none;
}
.taric-page .is-editorial-stream .taric-thought-text {
  margin: 0; color: var(--graphite); font: 400 16px/1.75 Raleway,"Segoe UI",sans-serif;
  white-space: pre-wrap; overflow-wrap: anywhere;
}
.taric-page .is-editorial-stream .taric-cycle {
  min-width: 0; width: 100%; border: 1px solid var(--line); border-radius: 6px;
  background: var(--paper); transition: border-color 200ms ease;
}
.taric-page .is-editorial-stream .taric-cycle.is-collapsed { border-color: transparent; border-bottom-color: var(--line); border-radius: 0; }
.taric-page .taric-cycle-toggle {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 48px; padding: 12px 20px;
  border: 0; border-radius: 6px; background: transparent; color: var(--gray); cursor: pointer;
  font: 500 14px/1.5 Raleway,"Segoe UI",sans-serif; text-align: left;
}
.taric-page .taric-cycle-toggle::before {
  content: ""; width: 16px; height: 16px; flex: 0 0 16px; background: currentColor;
  mask: url("assets/icons/taric/chevron-right.svg?v=2758143d7b") center/contain no-repeat; transform: rotate(90deg); transition: transform 200ms;
}
.taric-page .taric-cycle-toggle[aria-expanded="false"]::before { transform: none; }
.taric-page .taric-cycle-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.taric-page .taric-cycle-activity { font-size:12px; color:var(--gray); white-space:nowrap; }
.taric-page .taric-cycle-activity:empty { display:none; }
.taric-page .taric-cycle-duration { font-variant-numeric: tabular-nums; white-space: nowrap; font-size: 12px; }
.taric-page .taric-cycle-body { display: grid; gap: 20px; padding: 4px 24px 24px; min-width: 0; }
.taric-page .taric-cycle-body[hidden] { display: none; }
.taric-page .is-editorial-stream :is(.taric-herramienta,.taric-stream-detail) {
  width: 100%; min-width: 0; max-width: none; margin: 0; padding: 0; border: 0;
  border-top: 1px solid var(--line); border-radius: 0; background: transparent; box-shadow: none;
}
.taric-page .is-editorial-stream :is(.taric-herramienta,.taric-stream-detail) > summary {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; min-height: 44px;
  padding: 12px 0; margin: 0; list-style: none; color: var(--gray); text-transform: none;
  font: 400 14px/1.5 Raleway,"Segoe UI",Arial,sans-serif; cursor: pointer; letter-spacing: 0;
}
.taric-page .is-editorial-stream summary::-webkit-details-marker { display: none; }
.taric-page .is-editorial-stream :is(.taric-herramienta,.taric-stream-detail) > summary::before {
  content: ""; width: 16px; height: 16px; flex: 0 0 16px; background: currentColor;
  border: 0; margin: 0; transform: none;
  mask: url("assets/icons/taric/chevron-right.svg?v=2758143d7b") center/contain no-repeat; transition: transform 200ms;
}
.taric-page .is-editorial-stream :is(.taric-herramienta,.taric-stream-detail)[open] > summary::before { transform: rotate(90deg); }
.taric-page .is-editorial-stream .taric-herramienta[data-detail="none"] > summary { cursor: default; }
.taric-page .is-editorial-stream .taric-herramienta[data-detail="none"] > summary::before { mask-image: url("assets/icons/taric/search.svg?v=283d371c2e"); }
.taric-page .is-editorial-stream .taric-herramienta[data-detail="none"][data-state="completed"] > summary::before { mask-image: url("assets/icons/taric/check.svg?v=7f33acc9a7"); }
.taric-page .is-editorial-stream .taric-herramienta > summary strong { flex: 1 1 140px; font-weight: 500; color: var(--graphite); }
.taric-page .taric-tool-source { color: var(--gray); font-size: 12px; }
.taric-page .taric-tool-source:empty { display: none; }
.taric-page .is-editorial-stream .taric-herramienta-estado { margin-left: auto; font: 400 12px/1.5 Raleway,sans-serif; color: var(--gray); text-align: right; }
.taric-page .is-editorial-stream [data-state="error"] .taric-herramienta-estado { color: var(--wine); }
.taric-page .is-editorial-stream .taric-herramienta-resumen { flex: 1 0 calc(100% - 28px); margin: 0 0 0 28px; color: var(--gray); font: 400 14px/1.6 Raleway,sans-serif; }
.taric-page .is-editorial-stream .taric-herramienta-resumen[hidden] { display: none; }
.taric-page .is-editorial-stream .taric-herramienta-resultado { min-width: 0; padding: 0 0 12px; margin: 0 0 0 28px; border: 0; color: var(--graphite); font: 400 14px/1.65 Raleway,sans-serif; }
.taric-page .is-editorial-stream .taric-stream-detail > .taric-block { margin: 8px 0 0 28px; max-width: none; }
.taric-page .is-editorial-stream .taric-source-activity { display: none; }
.taric-page .is-editorial-stream .taric-herramienta[data-state="active"] > summary .taric-source-activity {
  display: inline-block; width: 16px; height: 16px; flex: 0 0 16px; background: var(--gray);
  mask: url("assets/icons/taric/loader-circle.svg?v=043021bb90") center/contain no-repeat; animation: taricFocusSpin 1.4s linear infinite;
}
.taric-page .is-editorial-stream .taric-source-activity > * { display: none; }
.taric-page .is-editorial-stream .taric-stream-presence { display: flex; gap: 4px; padding: 4px 0; }
.taric-page .is-editorial-stream .taric-activity-dot { width: 4px; height: 4px; border-radius: 50%; background: var(--gray); animation: taricFocusPulse 1.4s ease-in-out infinite; }
.taric-page .is-editorial-stream .taric-activity-dot:nth-child(2) { animation-delay: .16s; }
.taric-page .is-editorial-stream .taric-activity-dot:nth-child(3) { animation-delay: .32s; }
.taric-page .is-editorial-stream .taric-precedents { padding: 0; border: 0; background: transparent; }
.taric-page .is-editorial-stream .taric-stream-final { width: 100%; max-width: none; margin: 8px 0 0; padding: 0; border: 0; background: none; box-shadow: none; }
.taric-page .is-editorial-stream .taric-stream-final > .taric-ficha {
  display: block; opacity: 1; transform: none; width: 100%; max-width: none; margin: 0;
  padding: clamp(20px,3vw,32px); border: 1px solid var(--line); border-radius: 6px;
  background: var(--paper); box-shadow: none; animation: none; color: var(--graphite);
}

.taric-page .is-editorial-stream .taric-ficha-titulo { display: grid; gap: 12px; margin: 20px 0 16px; }
.taric-page .is-editorial-stream .taric-ficha-codigo { font: 500 clamp(28px,4vw,36px)/1.2 Raleway,sans-serif; letter-spacing: .02em; color: var(--wine); }
.taric-page .is-editorial-stream .taric-ficha-nombre { font: 500 18px/1.5 Raleway,sans-serif; }
.taric-page .is-editorial-stream .taric-ficha-nombre-fuente { color: var(--gray); font: 400 14px/1.5 Raleway,sans-serif; }
.taric-page .is-editorial-stream .taric-ficha-contexto { font: 400 14px/1.6 Raleway,sans-serif; color: var(--gray); }
.taric-page .is-editorial-stream .taric-ficha :is(.taric-block-eyebrow,.taric-badge) { color:var(--gray); text-transform:none; font:500 14px/1.5 Raleway,sans-serif; letter-spacing:0; }
.taric-page .is-editorial-stream .taric-badge { background:var(--soft); border:1px solid var(--line); border-radius:6px; padding:4px 8px; }
.taric-page .is-editorial-stream .taric-ficha-pdf { text-transform:none; letter-spacing:0; font:500 14px/1.5 Raleway,sans-serif; border-radius:6px; }
.taric-page .is-editorial-stream .taric-ficha-cuerpo > * { animation:none; opacity:1; transform:none; }
.taric-page .is-editorial-stream .taric-result-overview { display:grid; grid-template-columns:minmax(0,1.4fr) minmax(0,1fr); gap:32px; padding-top:4px; }
.taric-page .is-editorial-stream .taric-result-context { min-width:0; padding-top:16px; }
.taric-page .is-editorial-stream .taric-result-context .taric-veredicto-badges { gap:8px; background:none; }
.taric-page .is-editorial-stream .taric-result-context .taric-veredicto-avisos ul { margin:12px 0 0; padding-left:20px; }
.taric-page .is-editorial-stream .taric-result-context:empty { display:none; }
.taric-page .is-editorial-stream .taric-ficha-conclusion { margin: 20px 0; font: 400 16px/1.75 Raleway,sans-serif; }
.taric-page .is-editorial-stream .taric-ficha-condiciones { margin: 16px 0; }
.taric-page .is-editorial-stream .taric-veredicto-avisos { margin: 0; padding: 12px 0; border: 0; border-block: 1px solid var(--line); border-radius: 0; background: none; color: var(--graphite); font-size: 14px; line-height: 1.7; }
.taric-page .is-editorial-stream :is(.taric-aviso-opciones,.taric-avisos-lista) li { color: var(--graphite); font-size: 14px; }
.taric-page .is-editorial-stream .taric-result-argument { margin: 20px 0; border: 0; border-block: 1px solid var(--line); border-radius: 0; background: none; padding: 12px 0; font-size: 14px; }
.taric-page .is-editorial-stream .taric-result-argument > summary { display:flex; align-items:center; gap:8px; color:var(--gray); text-transform:none; letter-spacing:0; font:500 14px/1.5 Raleway,sans-serif; }
.taric-page .is-editorial-stream .taric-result-argument > summary::before { content:""; width:16px; height:16px; background:currentColor; mask:url("assets/icons/taric/chevron-right.svg?v=2758143d7b") center/contain no-repeat; transform:none; }
.taric-page .is-editorial-stream .taric-result-argument[open] > summary::before { transform:rotate(90deg); }
.taric-page .is-editorial-stream .taric-result-prose { padding: 12px 0; font-size: 16px; line-height: 1.75; }
.taric-page .is-editorial-stream .taric-ficha-pie { display:grid; gap:8px; grid-template-columns:minmax(0,1fr); margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); }
.taric-page .is-editorial-stream .taric-ficha-fuente { font: 400 12px/1.6 Raleway,sans-serif; }
.taric-page .is-editorial-stream .taric-result-status { margin: 8px 0 16px; font: 400 14px/1.6 Raleway,sans-serif; color: var(--gray); }
.taric-page .is-editorial-stream [hidden] { display: none !important; }
.taric-page .is-editorial-stream :is(p,dd,a,summary) { overflow-wrap: anywhere; }
.taric-page .is-editorial-stream :is(button,summary,a):focus-visible { outline: 2px solid var(--wine); outline-offset: 4px; }
.taric-page .is-editorial-stream .taric-precedent-toggle { min-height: 44px; }
@keyframes taricFocusSpin { to { transform: rotate(360deg); } }
@keyframes taricFocusPulse { 0%,100% { opacity: .3; } 50% { opacity: 1; } }
@supports (interpolate-size: allow-keywords) {
  .taric-page .is-editorial-stream details { interpolate-size: allow-keywords; }
  .taric-page .is-editorial-stream details::details-content { height: 0; overflow: clip; transition: height 200ms ease, content-visibility 200ms allow-discrete; }
  .taric-page .is-editorial-stream details[open]::details-content { height: auto; }
}
@media (max-width:600px) {
  .taric-page .is-editorial-stream .taric-result-overview { grid-template-columns:minmax(0,1fr); gap:4px; }
  .taric-page .is-editorial-stream .taric-result-context { padding-top:0; }
  .taric-page .taric-cycle-toggle { padding: 12px; gap: 8px; }
  .taric-page .taric-cycle-body { padding: 4px 16px 20px; }
  .taric-page .is-editorial-stream .taric-herramienta-resultado,
  .taric-page .is-editorial-stream .taric-stream-detail > .taric-block { margin-left: 0; }
}
/* Despacho paralelo: diez plazas visibles y trazabilidad plegable por partida. */
.taric-page .is-editorial-stream .taric-dispatch { margin: 14px 0 24px; color: var(--graphite); }
.taric-page .is-editorial-stream .taric-dispatch-header { display:flex; align-items:center; flex-wrap:wrap; gap:8px 12px; font-size:14px; }
.taric-page .is-editorial-stream .taric-dispatch-count { margin-left:auto; color:var(--gray); font-size:12px; font-variant-numeric:tabular-nums; }
.taric-page .is-editorial-stream .taric-dispatch-caption { margin:8px 0; font-size:13px; line-height:1.6; color:var(--gray); }
.taric-page .is-editorial-stream .taric-dispatch-progress { display:block; width:100%; height:3px; margin:12px 0; appearance:none; border:0; background:var(--line); accent-color:var(--wine); }
.taric-page .is-editorial-stream .taric-dispatch-progress::-webkit-progress-bar { background:var(--line); }
.taric-page .is-editorial-stream .taric-dispatch-progress::-webkit-progress-value { background:var(--wine); }
.taric-page .is-editorial-stream .taric-dispatch-progress::-moz-progress-bar { background:var(--wine); }
.taric-page .is-editorial-stream .taric-dispatch-agents { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:8px; margin:14px 0; }
.taric-page .is-editorial-stream .taric-dispatch-agent { position:relative; min-width:0; padding:9px 10px 9px 18px; border:1px solid var(--line); border-radius:4px; font-size:11px; line-height:1.6; }
.taric-page .is-editorial-stream .taric-dispatch-agent::before { content:""; position:absolute; left:8px; top:15px; width:4px; height:4px; border-radius:50%; background:var(--line); }
.taric-page .is-editorial-stream .taric-dispatch-agent[data-state="active"] { border-color:var(--wine); }
.taric-page .is-editorial-stream .taric-dispatch-agent[data-state="active"]::before { background:var(--wine); animation:taricFocusPulse 1.6s ease-in-out infinite; }
.taric-page .is-editorial-stream .taric-dispatch-agent strong,
.taric-page .is-editorial-stream .taric-dispatch-agent span { display:block; overflow-wrap:anywhere; }
.taric-page .is-editorial-stream .taric-dispatch-agent span { color:var(--gray); }
.taric-page .is-editorial-stream .taric-dispatch-details > summary { display:flex; align-items:center; gap:8px; min-height:44px; font-size:13px; color:var(--wine); cursor:pointer; list-style:none; }
.taric-page .is-editorial-stream .taric-dispatch-details > summary::before { content:""; width:14px; height:14px; background:currentColor; mask:url("assets/icons/taric/chevron-right.svg?v=2758143d7b") center/contain no-repeat; }
.taric-page .is-editorial-stream .taric-dispatch-details[open] > summary::before { transform:rotate(90deg); }
.taric-page .is-editorial-stream .taric-dispatch-items { list-style:none; margin:0; padding:0; }
.taric-page .is-editorial-stream .taric-dispatch-items > li { padding:0; border-top:1px solid var(--line); }
.taric-page .is-editorial-stream .taric-dispatch-items summary { display:flex; align-items:center; flex-wrap:wrap; gap:6px 12px; min-height:44px; padding:8px 0; font-size:13px; cursor:pointer; }
.taric-page .is-editorial-stream .taric-dispatch-reference { color:var(--gray); min-width:0; overflow-wrap:anywhere; }
.taric-page .is-editorial-stream .taric-dispatch-state { margin-left:auto; font-size:12px; }
.taric-page .is-editorial-stream .taric-dispatch-items > li[data-state="en_curso"] .taric-dispatch-state { color:var(--wine); }
.taric-page .is-editorial-stream .taric-dispatch-items p { margin:0 0 10px; font-size:13px; line-height:1.6; }
@media (max-width:600px) {
  .taric-page .is-editorial-stream .taric-dispatch-agents { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .taric-page .is-editorial-stream .taric-dispatch-count { margin-left:0; }
}
@media (prefers-reduced-motion:reduce) {
  .taric-page .is-editorial-stream .taric-dispatch-agent[data-state="active"]::before { animation:none; }
}
.taric-page .is-editorial-stream .taric-iav-list { gap: 20px; }
.taric-page .is-editorial-stream .taric-iav-card:nth-child(n) {
  display: block;
  min-width: 0;
  margin: 0;
  padding: clamp(18px, 3vw, 28px);
  color: var(--text-editorial, var(--graphite));
  background: var(--surface-content, var(--paper));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: none;
  animation: none;
}
.taric-page .is-editorial-stream .taric-iav-card > .taric-num { display: none; }
.taric-page .is-editorial-stream .taric-precedent-head { gap: 8px 16px; padding-bottom: 16px; }
.taric-page .is-editorial-stream .taric-precedent-ref { font-size: .95rem; overflow-wrap: anywhere; }
.taric-page .is-editorial-stream .taric-iav-section {
  padding: 18px 0;
  border-top: 1px solid var(--line);
}
.taric-page .is-editorial-stream .taric-iav-section h4 {
  margin: 0 0 9px;
  color: var(--graphite);
  font-size: .95rem;
  font-weight: 650;
  letter-spacing: 0;
  text-transform: none;
}
.taric-page .is-editorial-stream .taric-iav-section p {
  display: block;
  margin: 0;
  max-height: none;
  color: var(--text-editorial, var(--graphite));
  overflow: visible;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  font-size: .93rem;
  line-height: 1.65;
  -webkit-line-clamp: unset;
}
.taric-page .is-editorial-stream .taric-iav-official {
  display: inline-block;
  margin-top: 16px;
  color: var(--wine);
  font-size: .88rem;
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}
.taric-page .is-editorial-stream .taric-iav-official::after { content: " ↗"; }
.taric-page .is-editorial-stream .taric-iav-language { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
.taric-page .is-editorial-stream .taric-iav-language button {
  padding: 8px 10px;
  color: var(--gray);
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  font: inherit;
  font-size: .83rem;
  cursor: pointer;
}
.taric-page .is-editorial-stream .taric-iav-language button[aria-pressed="true"] { color: var(--wine); border-bottom-color: var(--wine); }
.taric-page .is-editorial-stream .taric-iav-translation-status { color: var(--gray); font-size: .8rem; line-height: 1.5; }

/* Descarga del expediente: estado visible y alternativas nativas del navegador. */
.taric-page .taric-documentos { display: grid; gap: 10px; width: 100%; min-width: 0; }
.taric-page .taric-documentos .button { justify-self: start; }
.taric-page .taric-documentos-estado { margin: 0; font-size: .84rem; color: var(--gray); }
.taric-page .taric-documentos-enlaces { display: grid; gap: 12px; }
.taric-page .taric-documentos-error { color: var(--wine); font-weight: 700; }

/* Desde 640 px, título y tres hojas comparten fila; descripción debajo. */
@media (min-width: 640px) {
  .taric-page .taric-widget-top { grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(20px, 3vw, 48px); }
  .taric-page .taric-widget-top > .taric-widget-col > .taric-widget-header { grid-column: 1; grid-row: 1; min-width: 0; padding-top: clamp(20px, 3vw, 42px); }
  .taric-page .taric-widget-top > .taric-dropzone { grid-column: 2; grid-row: 1; min-width: 0; min-height: 0; padding: 0 4px 18px; }
  .taric-page .taric-widget-top > .taric-widget-col > .taric-widget-bottom { grid-column: 1 / -1; grid-row: 2; }
  .taric-page .taric-dropzone-mark { width: 100%; max-width: 520px; height: clamp(205px, 28vw, 380px); margin: 0; }
  .taric-page .taric-dropzone-mark .taric-doc { width: 48%; left: 50%; top: 24px; margin-left: -24%; }
  .taric-page .taric-doc-ficha { transform: rotate(-12deg) translate(-40%, 4%); }
  .taric-page .taric-doc-packing { transform: rotate(12deg) translate(40%, 4%); }
  .taric-page .taric-doc-factura { transform: translateY(-6%); }
  .taric-page .taric-dropzone:hover .taric-doc-ficha,
  .taric-page .taric-dropzone:focus-visible .taric-doc-ficha,
  .taric-page .taric-dropzone.is-over .taric-doc-ficha { transform: rotate(-16deg) translate(-44%, 0); }
  .taric-page .taric-dropzone:hover .taric-doc-packing,
  .taric-page .taric-dropzone:focus-visible .taric-doc-packing,
  .taric-page .taric-dropzone.is-over .taric-doc-packing { transform: rotate(16deg) translate(44%, 0); }
  .taric-page .taric-dropzone:hover .taric-doc-factura,
  .taric-page .taric-dropzone:focus-visible .taric-doc-factura,
  .taric-page .taric-dropzone.is-over .taric-doc-factura { transform: translateY(-10%); }
}

/* Cabecera persistente del proceso. */
.taric-page .taric-process-header { display:flex; align-items:center; flex-wrap:wrap; gap:8px 16px; max-width:860px; margin:0 auto 20px; padding:0 0 16px; border-bottom:1px solid var(--line); }
.taric-page .taric-process-toggle { display:inline-flex; align-items:center; gap:8px; min-height:44px; padding:0; border:0; background:none; color:var(--graphite); font:500 14px/1.5 Raleway,sans-serif; cursor:pointer; }
.taric-page .taric-process-toggle::before { content:""; width:16px; height:16px; background:currentColor; mask:url("assets/icons/taric/chevron-right.svg?v=2758143d7b") center/contain no-repeat; transform:rotate(90deg); transition:transform 200ms; }
.taric-page .taric-process-toggle[aria-expanded="false"]::before { transform:none; }
.taric-page .taric-process-mode { margin-left:auto; padding:4px 8px; border:1px solid var(--line); border-radius:6px; font-size:12px; color:var(--gray); }
.taric-page .taric-process-time { font:400 12px/1.5 Raleway,sans-serif; font-variant-numeric:tabular-nums; color:var(--gray); }
.taric-page .taric-process-status { flex:1 0 60%; font:400 14px/1.5 Raleway,sans-serif; color:var(--gray); }
.taric-page .is-editorial-stream[data-running="true"] .taric-process-state::before { content:""; display:inline-block; width:6px; height:6px; margin:0 10px 3px 0; border-radius:50%; background:var(--wine); animation:taricFocusPulse 1.4s ease-in-out infinite; }
.taric-page .taric-process-status:empty { display:none; }
.taric-page .taric-process-body[hidden] { display:none; }
.taric-page .taric-sr-status { position:absolute; width:1px; height:1px; padding:0; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
/* PRO-24 · TUX-024: mientras está a la vista, el escenario reserva el alto de la ventana para que la sección
   siguiente no se desplace dentro de la vista cuando crece el relato ni cuando termina (CLS). [revisar Lola] */
.taric-page .taric-stage:not([hidden]) { min-height: calc(100svh - 80px); }
/* TUX-024: con la ficha arriba de la vista, el resultado ocupa al menos la ventana y la sección siguiente
   no asoma (lo que la ficha cargue después no la desplaza dentro de la vista). [revisar Lola] */
.taric-page .is-editorial-stream .taric-stream-final { min-height: 0; }
@media (prefers-color-scheme: dark) {
  .taric-page .taric-stage.is-editorial-stream {
    --paper:#19191a; --soft:#232325; --line:#424246; --graphite:#eeeeed; --gray:#bcbcbc;
    --wine:#e6a8b3; --wine-dark:#efbac3; color-scheme:dark; background:var(--paper); padding-inline:20px; border-radius:6px;
  }
  .taric-page .is-editorial-stream :is(.taric-margen-nota,.taric-error,.taric-precedent,.taric-ficha-distintivos > *, .taric-chip,.taric-medida,.taric-aeat-medidas) { background:var(--soft); color:var(--graphite); border-color:var(--line); }
  .taric-page .is-editorial-stream :is(button,a,summary) { color:var(--wine); }
  .taric-page .is-editorial-stream :is(.taric-precedent-ref,.taric-precedent-desc,.taric-notas-titulo,.taric-badge) { color:var(--graphite); }
  .taric-page .is-editorial-stream .button { background:#702c36; color:#fff; }
  /* PRO-56 · FMT-032: numeración de notas y familias, texto oscuro sobre el acento claro (1,98:1 → 8,9:1). */
  .taric-page .is-editorial-stream .taric-num { color:var(--paper); }
  .taric-page .is-editorial-stream .taric-lista-row.is-clasificado .taric-num { color:var(--wine); background:var(--paper); border-color:var(--wine); }
  /* Lista de familias, candidatos, chips de documentos y paginador de la ficha: superficie oscura. */
  .taric-page .is-editorial-stream .taric-lista-row { background:var(--soft); border-color:var(--line); }
  .taric-page .is-editorial-stream :is(.taric-candidate, .taric-candidate.is-descartado) { background:var(--soft); border-color:var(--line); }
  .taric-page .is-editorial-stream .taric-candidate.is-elegido { background:var(--wine); border-color:var(--wine-dark); }
  .taric-page .is-editorial-stream .taric-candidate-desc { color:var(--graphite); }
  .taric-page .is-editorial-stream .taric-candidate.is-descartado :is(.taric-candidate-desc, .taric-candidate-motivo) { color:var(--gray); }
  .taric-page .is-editorial-stream .taric-candidate.is-elegido .taric-candidate-code { color:var(--paper); -webkit-text-stroke-color:var(--paper); }
  .taric-page .is-editorial-stream .taric-candidate.is-elegido :is(.taric-candidate-desc, .taric-candidate-motivo) { color:var(--paper); }
  .taric-page .is-editorial-stream :is(.taric-docchip, .taric-ficha-nav) { background:var(--soft); border-color:var(--line); }
}
@media (prefers-reduced-motion:reduce) {
  .taric-page .is-editorial-stream *, .taric-page .is-editorial-stream *::before,
  .taric-page .is-editorial-stream *::after, .taric-page .is-editorial-stream details::details-content {
    animation:none !important; transition:none !important; scroll-behavior:auto !important;
  }
}

/* Entrada serena del contenido nuevo, sin desplazar al lector ni repetir animaciones. */
.taric-page .is-editorial-stream .is-arriving {
  animation: taricStreamArrival 320ms cubic-bezier(.22,.7,.25,1) backwards;
}
@keyframes taricStreamArrival {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}
.taric-page .is-editorial-stream .taric-stream-icon {
  display: inline-block; width: 18px; height: 18px; flex: 0 0 18px;
  object-fit: contain; vertical-align: middle; opacity: .85;
}
.taric-page .is-editorial-stream .taric-stream-icon.is-official {
  width: 30px; height: 30px; flex-basis: 30px; opacity: 1;
}
.taric-page .taric-thought-label { display: none; }
.taric-page .is-editorial-stream .taric-thought-label {
  display: flex; align-items: center; gap: 8px; margin-bottom: 10px;
  color: var(--wine); font-size: 13px; font-weight: 600;
}
@media (prefers-color-scheme: dark) {
  .taric-page .is-editorial-stream .taric-stream-icon:not(.is-official) { filter: invert(1); }
}
@media (prefers-reduced-motion: reduce) {
  .taric-page .is-editorial-stream .is-arriving { animation: none; }
}

/* Superficies: mismos marfiles y degradados que las composiciones de la web. */
.taric-page .is-editorial-stream :is(.taric-iav-card:nth-child(n), .taric-notas .taric-precedent, .taric-docs, .taric-medida, .taric-aeat, .taric-lista) {
  background: radial-gradient(ellipse at 100% 0%, #702c3606, transparent 65%), linear-gradient(135deg, #fbfaf7, #f3f1ed);
  border-color: #dcd2c9;
}
.taric-page .is-editorial-stream :is(.taric-iav-card:nth-child(2n), .taric-notas .taric-precedent:nth-of-type(2n)) {
  background: linear-gradient(135deg, #f8f5f2, #f2eeeb);
}
.taric-page .is-editorial-stream .taric-precedent-head { align-items: center; }
.taric-page .is-editorial-stream .taric-precedent-ref {
  flex: 1 0 100%; max-width: 100%; overflow: visible; white-space: normal;
  font-size: clamp(.86rem, 1.1vw, 1rem); line-height: 1.55; letter-spacing: 0;
}
.taric-page .is-editorial-stream .taric-precedent-meta {
  min-width: 0; max-width: 100%; white-space: normal; overflow: visible;
  line-height: 1.6; text-transform: none; letter-spacing: 0; font-variant-numeric: tabular-nums;
}
/* Los elementos interactivos responden al puntero y al teclado, sin desplazar texto. */
.taric-page .is-editorial-stream :is(button, summary, a) {
  transition: background-color 180ms ease, color 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}
.taric-page .is-editorial-stream :is(button, summary):not(:disabled):not([aria-disabled="true"]):hover {
  background-color: #702c360b; color: var(--wine); border-radius: 6px;
}
.taric-page .is-editorial-stream :is(button, summary, a):focus-visible {
  outline: 2px solid var(--wine); outline-offset: 4px; border-radius: 4px;
}
.taric-page .is-editorial-stream details[open] > summary { color: var(--wine); }
.taric-page .is-editorial-stream a:hover { color: var(--wine-dark); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.taric-page .is-editorial-stream .taric-iav-official::after {
  display: inline-block; transition: transform 180ms ease;
}
.taric-page .is-editorial-stream .taric-iav-official:is(:hover,:focus-visible)::after { transform: translate(3px,-2px); }
.taric-page .is-editorial-stream .taric-iav-language button[aria-pressed="true"] { background: #702c360b; font-weight: 650; }
@media (prefers-color-scheme: dark) {
  .taric-page .is-editorial-stream :is(.taric-iav-card:nth-child(n), .taric-notas .taric-precedent:nth-of-type(n), .taric-docs, .taric-medida, .taric-aeat, .taric-lista) {
    background: linear-gradient(135deg, var(--soft), var(--paper)); border-color: var(--line);
  }
  .taric-page .is-editorial-stream :is(button, summary):not(:disabled):not([aria-disabled="true"]):hover,
  .taric-page .is-editorial-stream .taric-iav-language button[aria-pressed="true"] { background-color: #e6a8b312; }
}
@media (prefers-reduced-motion: reduce) {
  .taric-page .is-editorial-stream :is(button, summary, a),
  .taric-page .is-editorial-stream .taric-iav-official::after { transition: none; }
}

/* Consola de datos públicos: tipografía técnica y cromática editorial. */
.taric-page .is-editorial-stream .taric-tool-console {
  width:100%; min-width:0; margin:12px 0; overflow:hidden;
  border:1px solid var(--line); border-radius:8px;
  background:linear-gradient(145deg,#fbfaf7,#f2eeeb); color:var(--graphite);
  box-shadow:0 5px 18px #2b2b2b05;
}
.taric-page .is-editorial-stream .taric-tool-console-head {
  display:flex; align-items:center; flex-wrap:wrap; gap:8px 12px; padding:10px 16px;
  border-bottom:1px solid var(--line); background:#702c3605;
}
.taric-page .is-editorial-stream .taric-tool-console-title { font-size:.8rem; font-weight:650; }
.taric-page .is-editorial-stream .taric-tool-console-format { color:var(--gray); font:500 .7rem/1.5 Consolas,monospace; letter-spacing:.06em; }
.taric-page .is-editorial-stream .taric-tool-console-copy {
  margin-left:auto; min-height:36px; padding:5px 10px; border:1px solid var(--line); border-radius:5px;
  color:var(--wine); background:transparent; font:600 .75rem/1.5 Raleway,sans-serif; cursor:pointer;
}
.taric-page .is-editorial-stream .taric-tool-console pre {
  margin:0; padding:18px; max-height:420px; max-width:100%; overflow:auto;
  font:400 .8rem/1.75 Consolas,"SFMono-Regular",monospace;
  white-space:pre-wrap; overflow-wrap:anywhere; tab-size:2; color:var(--graphite); background:none;
}
.taric-page .is-editorial-stream .taric-tool-console code { font:inherit; color:inherit; background:none; padding:0; }
.taric-page .is-editorial-stream .taric-json-key { color:#702c36; font-weight:600; }
.taric-page .is-editorial-stream .taric-json-string { color:#415950; }
.taric-page .is-editorial-stream .taric-json-number { color:#674126; }
.taric-page .is-editorial-stream .taric-json-literal { color:#605775; }
/* Una sola cabecera para los hechos, con una lista clara y separadores discretos. */
.taric-page .is-editorial-stream .taric-findings { margin:8px 0; padding:20px 24px; border:1px solid var(--line); border-radius:6px; background:linear-gradient(135deg,#fbfaf7,#f3f1ed); }
.taric-page .is-editorial-stream .taric-findings-title { display:block; margin:0 0 12px; color:var(--wine); font:650 .86rem/1.5 Raleway,sans-serif; letter-spacing:0; text-transform:none; }
.taric-page .is-editorial-stream .taric-findings-list { list-style:none; padding:0; margin:0; }
.taric-page .is-editorial-stream .taric-findings-list li { position:relative; margin:0; padding:12px 0 12px 22px; border-top:1px solid var(--line); color:var(--graphite); font:400 .92rem/1.7 Raleway,sans-serif; }
.taric-page .is-editorial-stream .taric-findings-list li:first-child { border-top:0; padding-top:0; }
.taric-page .is-editorial-stream .taric-findings-list li::before { content:""; position:absolute; left:0; top:20px; width:5px; height:5px; border-radius:50%; background:var(--wine); opacity:.65; }
.taric-page .is-editorial-stream .taric-findings-list li:first-child::before { top:8px; }
/* Miniatura local del adjunto, con metadatos en segundo plano. */
.taric-page .is-editorial-stream .taric-docs-list { display:flex; flex-wrap:wrap; gap:16px; }
.taric-page .is-editorial-stream .taric-docs-item { display:block; width:148px; max-width:100%; min-width:0; padding:12px; border:1px solid var(--line); border-radius:6px; background:linear-gradient(150deg,#fbfaf7,#f2eeeb); }
.taric-page .is-editorial-stream .taric-doc-preview { display:grid; place-items:center; min-height:112px; margin-bottom:8px; }
.taric-page .is-editorial-stream .taric-doc-preview-button { display:grid; place-items:center; padding:6px; max-width:100%; border-radius:4px; border:1px solid transparent; }
.taric-page .is-editorial-stream .taric-doc-preview-button:is(:hover,:focus-visible) { background:#702c360a; border-color:#702c3633; box-shadow:0 5px 14px #702c3612; }
.taric-page .is-editorial-stream .taric-doc-preview-image { display:block; width:80px; height:104px; object-fit:contain; filter:drop-shadow(0 3px 4px #2b2b2b14); }
.taric-page .is-editorial-stream .taric-doc-name { display:block; margin:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:.73rem; font-weight:400; line-height:1.5; color:var(--gray); }
.taric-page .is-editorial-stream .taric-doc-preview-fallback { display:grid; place-items:center; min-height:100px; color:var(--wine); font-size:.8rem; }
@media (max-width:600px) {
  .taric-page .is-editorial-stream .taric-findings { padding:16px; }
  .taric-page .is-editorial-stream .taric-tool-console-head { padding:8px 12px; }
  .taric-page .is-editorial-stream .taric-tool-console pre { padding:12px; font-size:.75rem; }
}
@media (prefers-color-scheme: dark) {
  .taric-page .is-editorial-stream :is(.taric-tool-console,.taric-findings,.taric-docs-item) { background:linear-gradient(145deg,var(--soft),var(--paper)); }
  .taric-page .is-editorial-stream .taric-json-key { color:#e6a8b3; }
  .taric-page .is-editorial-stream .taric-json-string { color:#b2ceba; }
  .taric-page .is-editorial-stream .taric-json-number { color:#dec2a6; }
  .taric-page .is-editorial-stream .taric-json-literal { color:#c5b9d7; }
}

.taric-page .is-editorial-stream .taric-docs-item small { display:block; margin-top:4px; font-size:.68rem; line-height:1.5; font-weight:400; }
.taric-page .is-editorial-stream .taric-doc-preview-button { font-size:.75rem; font-weight:600; }

/* Resultado mínimo aprobado: misma página, una ficha y un único acceso al proceso. */
.taric-page .is-editorial-stream .taric-track { max-width: 1120px; gap: 18px; }
.taric-page .taric-process-shell { min-width: 0; width: 100%; }
.taric-page .taric-process-stop { min-height: 44px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 6px; background: none; color: var(--wine); font: 500 14px/1.4 Raleway,sans-serif; cursor: pointer; }
.taric-page .taric-process-stop[aria-disabled="true"] { color: var(--gray); cursor: default; }
.taric-page .taric-process-cancel-status { flex-basis: 100%; font-size: 13px; color: var(--gray); }
.taric-page .taric-process-cancel-status:empty { display: none; }
.taric-page .taric-process-header { max-width: none; margin: 0; padding: 6px 0 12px; border: 0; }
.taric-page .taric-process-body { padding-top: 12px; display: grid; gap: 16px; }
.taric-page .taric-process-time { margin-left: auto; }
.taric-page .is-editorial-stream .taric-ficha-compacta { padding: clamp(18px, 3vw, 30px); background: var(--paper); }
.taric-page .taric-compact-heading { display: grid; grid-template-columns: auto minmax(150px, 1fr) auto; gap: 12px 28px; align-items: center; }
.taric-page .taric-compact-heading .taric-ficha-titulo { display: flex; align-items: center; gap: 10px; margin: 0; min-width: 0; }
.taric-page .taric-compact-heading .taric-ficha-codigo { font-size: clamp(24px, 3vw, 36px); font-weight: 500; white-space: nowrap; }
.taric-page .taric-compact-heading .taric-ficha-nombre { margin: 0; font-size: clamp(16px, 1.7vw, 21px); line-height: 1.4; font-weight: 500; }
.taric-page .taric-compact-origin { margin: 0; font-size: 16px; line-height: 1.4; color: var(--graphite); }
.taric-page .taric-ficha-compacta .taric-result-status { margin: 10px 0 18px; font-size: 14px; }
.taric-result-icon { display: block; width: 24px; height: 24px; flex: 0 0 24px; color: var(--wine, #702c36); }
.taric-page .taric-ficha-copiar { display: inline-flex; align-items: center; justify-content: center; width: 44px; min-height: 44px; padding: 8px; border: 0; background: transparent; color: var(--wine); cursor: pointer; }
.taric-page .taric-compact-charge { display: inline-flex; flex-wrap: wrap; gap: 8px; align-items: baseline; min-height: 44px; padding: 8px 0; border: 0; background: none; color: var(--graphite); font: inherit; font-size: 16px; text-align: left; cursor: pointer; }
.taric-page .taric-compact-charge strong { font-weight: 700; }
.taric-page .taric-compact-more { min-height: 44px; border: 0; background: none; color: var(--wine); font: inherit; cursor: pointer; text-decoration: underline; }
.taric-page .taric-compact-actions { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; margin: 20px 0 12px; padding-top: 16px; border-top: 1px solid var(--line); }
.taric-page .taric-compact-action { display: inline-flex; align-items: center; gap: 12px; min-height: 44px; padding: 4px 0; border: 0; background: none; color: var(--graphite); font: inherit; font-size: 16px; text-align: left; cursor: pointer; }
.taric-page .taric-ficha-compacta .taric-ficha-condiciones { margin: 10px 0; }
.taric-page .taric-ficha-compacta .taric-veredicto-avisos { border: 0; padding: 0; font-size: 13px; }
.taric-page .taric-ficha-compacta .taric-veredicto-avisos ul { margin: 4px 0; }
.taric-page .taric-veredicto-avisos.taric-avisos-plegables { display: block; }
.taric-page .taric-avisos-plegables > summary.taric-block-eyebrow { display: list-item; margin: 0; }
.taric-page .taric-avisos-plegables > :not(summary) { margin-top: 12px; }
.taric-page .taric-ficha-avisos-generales { min-width: 0; margin-top: 14px; }
.taric-page .taric-ficha-avisos-generales[hidden] { display: none; }
.taric-page .taric-avisos-generales { min-width: 0; padding: 12px 0; border-block: 1px solid var(--line); color: var(--graphite); overflow-wrap: anywhere; }
.taric-page .taric-avisos-generales h3 { margin: 0 0 4px; font-size: 14px; font-weight: 600; color: var(--wine); }
.taric-page .taric-aviso-general summary { min-height: 44px; box-sizing: border-box; padding: 10px 0; cursor: pointer; font-size: 14px; line-height: 1.6; }
.taric-page .taric-aviso-general summary:focus-visible { outline: 2px solid var(--wine); outline-offset: 3px; }
.taric-page .taric-aviso-general-texto { margin: 4px 0 12px; max-width: 90ch; font-size: 15px; line-height: 1.6; white-space: normal; }
.taric-page .taric-avisos-generales .taric-veredicto-avisos { border: 0; }
.taric-page .taric-ficha-compacta .taric-ficha-fuente { margin: 8px 0 0; }
.taric-page .taric-ficha-compacta .taric-ficha-pager { justify-content: flex-end; margin: 14px 0 0; }
.taric-page .taric-ficha-compacta .taric-documentos { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; margin-top: 14px; }
.taric-page .taric-documentos-panel[hidden] { display: none !important; }
.taric-page .taric-documentos-panel { display: grid; gap: 18px; width: 100%; }
.taric-page .taric-documentos-panel > .button { justify-self: start; }
.taric-page .taric-documentos-aviso[hidden] { display: none; }
.taric-page .taric-documentos-abrir:disabled { opacity: .6; cursor: default; }
.taric-page .taric-ficha-compacta .taric-documentos > .taric-documentos-estado { flex-basis: 100%; font-size: 12px; }
.taric-page .taric-ficha-compacta .taric-documentos-enlaces { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 10px 18px; width: 100%; }
.taric-page .taric-model-card { display: grid; gap: 4px; min-width: 0; max-width: 100%; padding: 8px 12px; border: 1px solid var(--line); border-radius: 6px; background: var(--paper); }
.taric-page .taric-model-download { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px; min-height: 44px; color: var(--wine); font: 500 14px/1.5 Raleway,sans-serif; text-decoration: none; overflow-wrap: anywhere; }
.taric-page .taric-model-download:hover .taric-model-title { text-decoration: underline; }
.taric-page .taric-model-title { flex: 1; min-width: 0; }
.taric-page .taric-model-format { padding: 2px 6px; border-radius: 3px; background: var(--soft); color: var(--gray); font-size: 11px; }
.taric-page .taric-model-context { padding-left: 32px; font-size: 12px; color: var(--gray); }
.taric-page .taric-model-error { flex-basis: 100%; font-size: 12px; color: var(--wine); }
.taric-page .taric-model-download[aria-busy="true"] { opacity: .6; cursor: progress; }
.taric-page .taric-ficha-compacta .taric-documentos-enlaces > .taric-documentos-estado { flex-basis: 100%; font-size: 12px; }
.taric-page .taric-ficha-compacta .taric-documentos-pendientes { flex-basis: 100%; margin: 0; font-size: 13px; }
.taric-result-dialog { box-sizing: border-box; width: min(900px, calc(100vw - 32px)); max-width: 900px; max-height: calc(100dvh - 40px); padding: 0; border: 1px solid #e1e1e1; border-radius: 6px; background: #fff; color: #2b2b2b; font-family: Raleway, 'Segoe UI', Arial, sans-serif; color-scheme: light; }
.taric-result-dialog::backdrop { background: rgba(43,43,43,.5); }
.taric-result-dialog-head { position: sticky; top: 0; display: flex; align-items: center; gap: 20px; padding: 18px 24px; border-bottom: 1px solid #e1e1e1; background: #fff; z-index: 1; }
.taric-result-dialog-head h2 { flex: 1; margin: 0; font-size: 22px; line-height: 1.3; color: #702c36; font-weight: 600; }
.taric-result-dialog-close { display: grid; place-items: center; width: 44px; min-height: 44px; padding: 0; background: transparent; border: 0; color: #702c36; font-size: 30px; cursor: pointer; }
.taric-result-dialog-body { padding: 20px 24px 28px; overflow-wrap: anywhere; }
.taric-result-dialog .taric-documentos-enlaces { display: grid; gap: 14px; }
.taric-result-dialog .taric-model-card { padding: 12px 16px; }
.taric-result-dialog .taric-model-download { font-size: 16px; }
.taric-result-dialog .taric-model-context { display: block; line-height: 1.6; }
.taric-result-dialog .taric-documentos-pendientes { margin: 0; padding-left: 20px; }
.taric-result-dialog .taric-documentos-pendientes li { margin: 8px 0; }
.taric-result-dialog .taric-documentos-pendientes .taric-model-context { padding-left: 0; }
.taric-result-dialog :is(button,summary,a):focus-visible { outline: 2px solid #702c36; outline-offset: 3px; }
.taric-result-dialog .taric-result-prose { margin: 12px 0; font: 400 16px/1.75 Raleway, sans-serif; white-space: normal; }
.taric-result-dialog .taric-result-note { padding: 0 0 18px; margin-bottom: 18px; border-bottom: 1px solid #e1e1e1; }
.taric-result-dialog .taric-result-note h3 { font-size: 18px; font-weight: 600; color: #702c36; }
.taric-result-dialog .taric-result-note-source { font-size: 12px; color: #616160; }
.taric-result-dialog .taric-iav-list { display: grid; gap: 20px; list-style: none; padding: 0; }
.taric-result-dialog .taric-iav-card { padding: 16px 0; border-bottom: 1px solid #e1e1e1; background: none; }
.taric-result-dialog .taric-iav-card > .taric-num { display: none; }
.taric-result-dialog .taric-iav-section p { white-space: normal; font-size: 16px; line-height: 1.65; }
.taric-result-dialog .taric-precedent-head { display: flex; flex-wrap: wrap; gap: 10px; }
.taric-result-dialog .taric-iav-language { display: flex; gap: 12px; margin: 12px 0; }
.taric-result-dialog .taric-iav-language button { min-height: 44px; border: 0; background: #f6f6f4; color: #702c36; padding: 8px 12px; cursor: pointer; }
.taric-result-dialog .taric-iav-official { display: inline-block; padding: 12px 0; color: #702c36; }
.taric-result-dialog .taric-iav-image-status { margin: 10px 0 0; font-size: 13px; color: #616160; }
@media (max-width: 850px) {
  .taric-page .taric-compact-heading { grid-template-columns: 1fr auto; gap: 8px 18px; }
  .taric-page .taric-compact-heading .taric-ficha-nombre { grid-column: 1 / -1; grid-row: 2; }
}
@media (max-width: 520px) {
  .taric-page .taric-compact-heading { grid-template-columns: 1fr; }
  .taric-page .taric-compact-origin { grid-row: 3; font-size: 14px; }
  .taric-page .taric-compact-heading .taric-ficha-codigo { font-size: 24px; letter-spacing: 0; }
  .taric-page .taric-compact-heading .taric-ficha-titulo { gap: 4px; }
  .taric-page .taric-compact-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; }
  .taric-page .taric-compact-action { gap: 8px; font-size: 14px; }
  .taric-result-dialog { width: calc(100vw - 16px); max-height: calc(100dvh - 16px); }
  .taric-result-dialog-head { padding: 12px 16px; }
  .taric-result-dialog-body { padding: 16px; }
}
@media (max-width: 360px) {
  .taric-page .taric-compact-heading .taric-ficha-codigo { font-size: 22px; }
  .taric-page .taric-compact-heading .taric-ficha-titulo { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
  .taric-page .taric-ficha-compacta *, .taric-result-dialog * { animation: none !important; transition: none !important; }
}

/* ============================================================
   Proceso y resultados (Milton, 09-11-2026). Cabecera con estado, fase,
   progreso y agentes; índice de partidas; fichas con impuestos y códigos
   siempre a la vista; ventanas con «Copiar». Sin barras laterales de acento.
   ============================================================ */
.taric-page .taric-process-header .taric-process-mode { margin-left: 0; }
.taric-page .taric-process-state { display: inline-flex; align-items: center; font: 600 18px/1.4 Raleway,sans-serif; color: var(--graphite); }
.taric-page .taric-process-summary { display: grid; gap: 8px; min-width: 0; margin: 0 0 4px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 6px; background: linear-gradient(135deg,#fbfaf7,#f3f1ed); }
.taric-page .taric-process-progress { display: block; width: 100%; height: 4px; margin: 0 0 4px; appearance: none; -webkit-appearance: none; border: 0; border-radius: 2px; overflow: hidden; background: var(--line); accent-color: var(--wine); }
.taric-page .taric-process-progress::-webkit-progress-bar { background: var(--line); border-radius: 2px; }
.taric-page .taric-process-progress::-webkit-progress-value { background: var(--wine); border-radius: 2px; transition: width 400ms ease; }
.taric-page .taric-process-progress::-moz-progress-bar { background: var(--wine); border-radius: 2px; }
.taric-page .taric-process-phase { margin: 0; font: 500 14px/1.5 Raleway,sans-serif; color: var(--graphite); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.taric-page .taric-process-phase:empty { display: none; }
.taric-page .taric-process-summary .taric-process-status { flex: none; margin: 0; font-size: 13px; }
.taric-page .taric-process-agents:empty { display: none; }
.taric-page .is-editorial-stream .taric-process-agents .taric-dispatch { margin: 4px 0 0; }
.taric-page .is-editorial-stream .taric-process-agents .taric-dispatch-progress { display: none; }
.taric-page .is-editorial-stream .taric-process-agents .taric-dispatch-agents { margin: 10px 0 4px; }
.taric-page .taric-process-toggle { color: var(--wine); }

/* Cabecera de cierre: qué ha terminado, cuánto ha tardado y el aviso de alcance. */
.taric-page .taric-resultados-cabecera { display: grid; gap: 6px; margin: 8px 0 22px; padding: 0 0 18px; border-bottom: 1px solid var(--line); scroll-margin-top: 96px; }
.taric-page .taric-resultados-titulo { margin: 0; font: 600 clamp(22px,2.6vw,30px)/1.25 Raleway,sans-serif; color: var(--wine); letter-spacing: 0; }
.taric-page .taric-resultados-meta { margin: 0; font: 400 14px/1.5 Raleway,sans-serif; color: var(--gray); font-variant-numeric: tabular-nums; }
.taric-page .taric-resultados-aviso { justify-self: start; margin: 6px 0 0; padding: 8px 12px; border-radius: 6px; background: #702c360a; font: 500 14px/1.5 Raleway,sans-serif; color: var(--graphite); }
/* Lola, nota 2: el PDF también al final; vacío mientras el informe no está listo. */
.taric-page .taric-resultados-pie { display: flex; justify-content: center; margin: 28px 0 8px; }
.taric-page .taric-resultados-pie > .taric-documentos { display: flex; justify-content: center; width: auto; }
.taric-page .taric-resultados-pie:not(:has(a)) { display: none; }
.taric-page .taric-resultados-cabecera > .taric-documentos { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; margin-top: 8px; }
.taric-page .taric-resultados-cabecera > .taric-documentos > .taric-documentos-estado { order: 1; flex-basis: 100%; }
.taric-page .taric-resultados-cabecera > .taric-documentos > .button { width: auto; }

/* Índice: una fila por partida con sus impuestos; un clic lleva a su ficha. */
.taric-page .taric-indice { min-width: 0; margin: 0 0 28px; }
.taric-page .taric-indice-titulo { margin: 0 0 10px; font: 600 16px/1.4 Raleway,sans-serif; color: var(--graphite); }
.taric-page .taric-indice-tabla { width: 100%; border-collapse: collapse; font: 400 14px/1.5 Raleway,sans-serif; font-variant-numeric: tabular-nums; color: var(--graphite); }
.taric-page .taric-indice-tabla th { padding: 8px 12px; border-bottom: 1px solid var(--line); text-align: left; font-size: 12px; font-weight: 600; color: var(--gray); white-space: nowrap; }
.taric-page .taric-indice-tabla td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.taric-page .taric-indice-tabla tbody tr { cursor: pointer; transition: background-color 160ms ease; }
.taric-page .taric-indice-tabla tbody tr:hover { background: #702c3608; }
.taric-page .taric-indice-num { width: 3.5em; color: var(--gray); }
.taric-page .taric-indice-codigo { white-space: nowrap; }
.taric-page .taric-indice-codigo a { color: var(--wine); font-weight: 600; letter-spacing: .02em; text-decoration: none; }
.taric-page .taric-indice-codigo a:is(:hover,:focus-visible) { text-decoration: underline; text-underline-offset: 3px; }
.taric-page .taric-indice-codigo small { display: block; color: var(--gray); font-size: 12px; }
.taric-page .taric-indice-nombre { min-width: 12em; overflow-wrap: anywhere; }
.taric-page .taric-indice-origen { white-space: nowrap; }
.taric-page .taric-indice-impuesto { white-space: nowrap; font-weight: 600; }

/* Fichas: todas seguidas; impuestos y códigos son secciones fijas de cada una. */
.taric-page .taric-fichas { display: grid; gap: 24px; min-width: 0; }
.taric-page .is-editorial-stream .taric-fichas > .taric-ficha {
  display: block; opacity: 1; transform: none; width: 100%; max-width: none; margin: 0; box-sizing: border-box;
  padding: clamp(18px,3vw,30px); border: 1px solid var(--line); border-radius: 6px;
  background: var(--paper); box-shadow: none; animation: none; color: var(--graphite); scroll-margin-top: 96px;
}
.taric-page .taric-fichas > .taric-ficha:focus { outline: none; }
.taric-page .taric-fichas > .taric-ficha:focus-visible { outline: 2px solid var(--wine); outline-offset: 4px; }
.taric-page .taric-ficha-etiqueta { margin: 0 0 8px; font: 600 13px/1.4 Raleway,sans-serif; color: var(--gray); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.taric-page .taric-ficha-bloque { min-width: 0; margin: 18px 0 0; padding-top: 16px; border-top: 1px solid var(--line); }
.taric-page .taric-ficha-seccion { margin: 0 0 10px; font: 600 14px/1.4 Raleway,sans-serif; color: var(--wine); letter-spacing: 0; text-transform: none; }
.taric-page .taric-ficha-vacio { margin: 0; font: 400 14px/1.6 Raleway,sans-serif; color: var(--gray); }
.taric-page .taric-ficha-nota { margin: 10px 0 0; font: 400 12px/1.5 Raleway,sans-serif; color: var(--gray); }
.taric-page .taric-impuestos { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; padding: 0; list-style: none; }
.taric-page .taric-impuestos > li { min-width: 0; margin: 0; padding: 0; }
.taric-page .taric-impuestos .taric-compact-charge { display: grid; gap: 2px; min-width: 132px; min-height: 44px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 6px; background: linear-gradient(135deg,#fbfaf7,#f3f1ed); color: var(--graphite); text-align: left; }
.taric-page .taric-impuestos .taric-compact-charge span { font: 400 12px/1.4 Raleway,sans-serif; color: var(--gray); }
.taric-page .taric-impuestos .taric-compact-charge strong { font: 600 20px/1.3 Raleway,sans-serif; color: var(--wine); font-variant-numeric: tabular-nums; }
.taric-page .taric-impuestos .taric-compact-charge:is(:hover,:focus-visible) { border-color: var(--wine); }
.taric-page .taric-codigos { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.taric-page .taric-codigo-control { display: grid; gap: 8px; min-width: 0; margin: 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: 6px; }
.taric-page .taric-codigo-control-cabeza { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; min-width: 0; }
.taric-page .taric-codigo-control-cabeza strong { font: 600 15px/1.45 Raleway,sans-serif; color: var(--graphite); overflow-wrap: anywhere; }
.taric-page .taric-codigo-control-cabeza small { font: 400 12px/1.4 Raleway,sans-serif; color: var(--gray); }
.taric-page .taric-codigo-linea { display: grid; grid-template-columns: 7.5em minmax(0,1fr); gap: 6px 12px; align-items: start; }
.taric-page .taric-codigo-rotulo { padding-top: 5px; font: 500 12px/1.4 Raleway,sans-serif; color: var(--gray); }
.taric-page .taric-codigo-chips { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.taric-page .taric-codigo-chip { display: inline-flex; align-items: baseline; gap: 6px; max-width: 100%; min-width: 0; box-sizing: border-box; padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--soft); font: 400 13px/1.4 Raleway,sans-serif; color: var(--graphite); }
.taric-page .taric-codigo-chip strong { flex: none; font-weight: 700; color: var(--wine); letter-spacing: .02em; font-variant-numeric: tabular-nums; }
.taric-page .taric-codigo-chip span { min-width: 0; max-width: 36ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.taric-page .taric-codigo-linea.is-exencion .taric-codigo-chip { border-color: #702c3633; background: #702c360a; }
.taric-page .taric-codigo-mas { align-self: center; font: 500 12px/1.4 Raleway,sans-serif; color: var(--gray); }
/* Nota 5 de Lola: cada medida plegada; nombre y códigos siempre en el resumen. */
.taric-page .taric-codigo-plegable { display: grid; gap: 8px; min-width: 0; }
.taric-page .taric-codigo-plegable > summary { cursor: pointer; list-style: none; }
.taric-page .taric-codigo-plegable > summary::-webkit-details-marker { display: none; }
.taric-page .taric-codigo-plegable > summary::after { content: "+"; order: 1; margin-left: auto; color: var(--wine); font: 800 20px/1 Raleway,sans-serif; }
.taric-page .taric-codigo-plegable[open] > summary::after { content: "\2212"; }
.taric-page .taric-codigo-claves { order: 2; display: flex; flex-wrap: wrap; flex-basis: 100%; gap: 6px; margin-top: 4px; }
.taric-page .taric-codigo-claves .taric-codigo-chip { padding: 2px 9px; }
.taric-page .taric-codigo-claves .taric-codigo-chip.is-exencion { border-color: #702c3633; background: #702c360a; }
/* Desplegado, la explicación de cada código se lee entera: el plegado ya la esconde. */
.taric-page .taric-codigo-plegable .taric-codigo-linea .taric-codigo-chip { border-radius: 8px; }
.taric-page .taric-codigo-plegable .taric-codigo-linea .taric-codigo-chip span { max-width: none; overflow: visible; white-space: normal; text-overflow: clip; overflow-wrap: anywhere; }
.taric-page .taric-codigo-plegable > .taric-compact-more { justify-self: start; min-height: 36px; padding: 0; font-size: 13px; }
.taric-page .taric-codigo-control > .taric-compact-more { justify-self: start; min-height: 36px; padding: 0; font-size: 13px; }
.taric-page .taric-opciones { display: flex; flex-wrap: wrap; gap: 8px; }
.taric-page .taric-opcion { display: grid; gap: 2px; min-width: 150px; min-height: 44px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 6px; background: var(--paper); color: var(--graphite); font: inherit; text-align: left; cursor: pointer; }
.taric-page .taric-opcion strong { font: 600 16px/1.3 Raleway,sans-serif; letter-spacing: .02em; font-variant-numeric: tabular-nums; }
.taric-page .taric-opcion span { font: 400 12px/1.4 Raleway,sans-serif; color: var(--gray); }
.taric-page .taric-opcion[aria-pressed="true"] { border-color: var(--wine); box-shadow: inset 0 0 0 1px var(--wine); background-color: #702c360b; }
.taric-page .taric-opcion[aria-pressed="true"] strong { color: var(--wine); }
.taric-page .taric-opcion-condicion { margin: 10px 0 0; font: 400 14px/1.6 Raleway,sans-serif; color: var(--graphite); }
.taric-page .taric-compact-actions > .taric-documentos { width: auto; margin: 0; }
@media (max-width: 640px) {
  .taric-page .taric-indice-tabla thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .taric-page .taric-indice-tabla, .taric-page .taric-indice-tabla tbody { display: block; width: 100%; }
  .taric-page .taric-indice-tabla tbody tr { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; padding: 12px 4px; border-bottom: 1px solid var(--line); }
  .taric-page .taric-indice-tabla td { display: block; padding: 0; border: 0; }
  .taric-page .taric-indice-tabla .taric-indice-num { width: auto; }
  .taric-page .taric-indice-tabla .taric-indice-nombre { flex: 1 0 100%; order: 3; min-width: 0; }
  .taric-page .taric-indice-tabla :is(.taric-indice-origen,.taric-indice-impuesto) { order: 4; font-size: 13px; }
  .taric-page .taric-indice-tabla :is(.taric-indice-origen,.taric-indice-impuesto)::before { content: attr(data-columna) " "; font-weight: 400; color: var(--gray); }
  .taric-page .taric-codigo-linea { grid-template-columns: minmax(0,1fr); gap: 4px; }
  .taric-page .taric-codigo-rotulo { padding-top: 0; }
  .taric-page .taric-codigo-chip span { max-width: 24ch; }
  .taric-page .taric-impuestos > li { flex: 1 1 140px; }
  .taric-page .taric-impuestos .taric-compact-charge { width: 100%; min-width: 0; }
  .taric-page .taric-opcion { flex: 1 1 140px; min-width: 0; }
}
@media (prefers-color-scheme: dark) {
  .taric-page .taric-stage.is-editorial-stream :is(.taric-process-summary, .taric-impuestos .taric-compact-charge) { background: linear-gradient(135deg, var(--soft), var(--paper)); }
  .taric-page .taric-stage.is-editorial-stream :is(.taric-resultados-aviso, .taric-codigo-linea.is-exencion .taric-codigo-chip, .taric-opcion[aria-pressed="true"]) { background-color: #e6a8b312; }
  .taric-page .taric-stage.is-editorial-stream .taric-codigo-linea.is-exencion .taric-codigo-chip { border-color: #b94858; }
  .taric-page .taric-stage.is-editorial-stream .taric-indice-tabla tbody tr:hover { background: #e6a8b312; }
}

/* Ventana de detalle: «Copiar todo» en la cabecera, «Copiar» por sección y pantalla completa en móvil. */
.taric-result-dialog-status { margin: 0; padding: 8px 24px 0; font: 400 13px/1.5 Raleway,"Segoe UI",Arial,sans-serif; color: #616160; }
.taric-result-dialog-status:empty { display: none; }
.taric-result-dialog-head h2 { min-width: 0; overflow-wrap: anywhere; }
.taric-result-dialog .taric-copiar:not(.button) { display: inline-flex; align-items: center; gap: 6px; flex: none; min-height: 36px; padding: 6px 12px; border: 1px solid #dcd2c9; border-radius: 6px; background: #fff; color: #702c36; font: 500 13px/1.3 Raleway,"Segoe UI",Arial,sans-serif; white-space: nowrap; cursor: pointer; transition: background-color 160ms ease, border-color 160ms ease; }
.taric-result-dialog .taric-copiar:not(.button):hover { border-color: #702c36; background: #702c360b; }
.taric-result-dialog .taric-copiar .taric-result-icon { width: 16px; height: 16px; flex-basis: 16px; }
.taric-result-dialog .taric-con-copia { display: flow-root; }
.taric-result-dialog .taric-con-copia[hidden] { display: none; }
.taric-result-dialog .taric-copiar-seccion { float: right; margin: 0 0 8px 16px; }
.taric-result-dialog .button { display: inline-flex; align-items: center; gap: 8px; }
.taric-result-dialog .button .taric-result-icon { width: 18px; height: 18px; flex-basis: 18px; color: currentColor; }
.taric-copia-temporal { position: fixed; top: 0; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.taric-result-dialog .taric-declaraciones-intro { margin: 0 0 16px; font: 400 15px/1.6 Raleway,"Segoe UI",Arial,sans-serif; }
.taric-result-dialog .taric-declaraciones { display: grid; gap: 12px; margin: 0 0 20px; padding: 0; list-style: none; }
.taric-result-dialog .taric-declaracion { display: grid; gap: 8px; margin: 0; padding: 14px 16px; border: 1px solid #e1e1e1; border-radius: 6px; }
.taric-result-dialog .taric-declaracion h3 { margin: 0; font: 600 16px/1.4 Raleway,"Segoe UI",Arial,sans-serif; color: #2b2b2b; }
.taric-result-dialog .taric-declaracion .taric-model-context { margin: 0; padding: 0; font-size: 13px; color: #616160; }
.taric-result-dialog .taric-declaracion-acciones { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; margin: 4px 0; }
.taric-result-dialog .taric-model-download { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px; min-height: 44px; color: #702c36; font: 500 15px/1.5 Raleway,"Segoe UI",Arial,sans-serif; text-decoration: underline; text-underline-offset: 3px; }
.taric-result-dialog .taric-declaracion-volver { min-height: 44px; padding: 0; }
.taric-result-dialog h3.taric-declaracion-titulo { margin: 8px 0 4px; font: 600 20px/1.35 Raleway,"Segoe UI",Arial,sans-serif; color: #702c36; }
.taric-result-dialog .taric-declaracion-aviso { margin: 8px 0; padding: 10px 12px; border-radius: 6px; background: #fff5ed; color: #5c3822; font-size: 14px; line-height: 1.55; }
.taric-result-dialog .taric-declaracion-pendientes { margin: 10px 0; font-size: 14px; line-height: 1.55; }
.taric-result-dialog .taric-declaracion-documento { margin-top: 16px; padding: clamp(16px,4vw,40px); border: 1px solid #e1e1e1; border-radius: 4px; background: #fff; color: #2b2b2b; font: 400 15px/1.7 Raleway,"Segoe UI",Arial,sans-serif; box-shadow: 0 1px 4px rgba(43,43,43,.06); }
.taric-result-dialog .taric-declaracion-documento .taric-declaracion-titulo { margin: 0 0 16px; text-align: center; font: 700 15px/1.45 Raleway,"Segoe UI",Arial,sans-serif; color: #2b2b2b; letter-spacing: .02em; }
.taric-result-dialog .taric-declaracion-parrafo { margin: 0 0 12px; white-space: pre-wrap; }
.taric-result-dialog .taric-declaracion-tabla { margin: 0 0 12px; padding: 8px 12px; border-radius: 4px; background: #f6f6f4; white-space: pre-wrap; font-variant-numeric: tabular-nums; }
.taric-result-dialog .taric-declaracion-campo { margin: 0 0 8px; white-space: pre-wrap; }
.taric-result-dialog mark.taric-campo { padding: 0 3px; border-radius: 2px; background: #fff1a8; color: #2b2b2b; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
@media (max-width: 640px) {
  .taric-result-dialog { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; border: 0; border-radius: 0; }
  .taric-result-dialog-head { gap: 8px; padding: 10px 8px 10px 16px; }
  .taric-result-dialog-head h2 { font-size: 18px; }
  .taric-result-dialog-status { padding: 8px 16px 0; }
  .taric-result-dialog-body { padding: 16px 16px 32px; }
}
@media (prefers-reduced-motion: reduce) {
  .taric-page .taric-process-progress::-webkit-progress-value { transition: none; }
  .taric-result-dialog .taric-copiar { transition: none; }
}

/* Botón secundario: el sitio solo define primary y ghost. Contorno granate que se rellena al pasar. */
.taric-page .button.secondary { border-color: #702c36; background: transparent; color: #702c36; }
.taric-page .button.secondary:hover { background: #702c36; color: #fff; }
/* Los botones de la ventana son flex items: sin esta regla, «hidden» no los oculta. */
.taric-result-dialog [hidden] { display: none !important; }
@media (min-width: 641px) {
  .taric-result-dialog .button { width: auto; }
}
@media (prefers-color-scheme: dark) {
  .taric-page .button.secondary { border-color: #e6a8b3; color: #e6a8b3; }
  .taric-page .button.secondary:hover { background: #e6a8b3; color: #2b2b2b; }
  /* La ventana de detalle es siempre clara. */
  .taric-page .taric-result-dialog .button.secondary { border-color: #702c36; color: #702c36; }
  .taric-page .taric-result-dialog .button.secondary:hover { background: #702c36; color: #fff; }
}
.taric-result-dialog h3.taric-declaracion-titulo + .taric-model-context { margin: 0 0 8px; padding-left: 0; font-size: 13px; color: #616160; }
/* Los iconos de fuente también se dibujan dentro de la ventana de detalle, fuera del escenario. */
.taric-result-dialog .taric-stream-icon { display: inline-block; width: 24px; height: 24px; margin-right: 8px; object-fit: contain; vertical-align: middle; }
.taric-result-dialog .taric-block-eyebrow { display: flex; align-items: center; }
.taric-result-dialog .taric-declaracion-fila { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.taric-result-dialog .taric-declaracion-fila + .taric-declaracion-fila { margin-top: 8px; padding-top: 8px; border-top: 1px solid #e5e2dd; }
.taric-result-dialog .taric-declaracion-celda { flex: 1 1 14em; min-width: 0; }
.taric-result-dialog .taric-declaracion-celda > :last-child { margin-bottom: 0; }
.taric-result-dialog ul.taric-declaracion-avisos { padding: 10px 14px 10px 32px; }
.taric-result-dialog .taric-declaracion-avisos li + li { margin-top: 6px; }
/* Tiempo total junto al estado, solo al terminar (Milton, 09-11-2026): «Clasificación terminada · Completado en 84 s».
   Mientras corre no hay segundos en ninguna parte del proceso: ni total, ni por fase, ni por consulta. */
.taric-page .taric-stage[data-running="true"] :is(.taric-cycle-duration, .taric-tool-duration) { display: none; }
.taric-page .taric-process-header .taric-process-time { margin-left: -8px; font: 500 16px/1.4 Raleway,sans-serif; font-variant-numeric: tabular-nums; color: var(--gray); }
.taric-page .taric-process-header .taric-process-time::before { content: "\00b7"; margin-right: 8px; }
.taric-page .taric-process-header .taric-process-stop { margin-left: auto; }

/* Cifras de caja alta en todo TARIC (Milton, 09-11-2026). Raleway trae cifras elzevirianas por
   defecto y cada atajo «font:» de esta hoja reinicia font-variant-numeric y font-feature-settings,
   así que la herencia no basta: «lnum» se fija en cada descendiente, también en las ventanas.
   «tnum» sigue llegando por font-variant-numeric donde ya había tabular-nums. */
.taric-page main,
.taric-result-dialog,
.taric-codigo-dialog,
.taric-seguir { font-variant-numeric: lining-nums; }
.taric-page main,
.taric-page main *,
.taric-result-dialog,
.taric-result-dialog *,
.taric-codigo-dialog,
.taric-codigo-dialog *,
.taric-seguir,
.taric-seguir * { font-feature-settings: "lnum" 1 !important; }

/* Precedentes IAV en la ventana: tarjeta con el mismo aire que el resto (Milton, 09-11-2026).
   La numeración no se pinta aquí: la cabecera (referencia, país, vigencia y código) ocupa la
   primera columna y «Copiar» su propia columna a la derecha, así nunca se montan. */
.taric-result-dialog .taric-iav-list { gap: 16px; margin: 0; }
.taric-result-dialog .taric-iav-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0 16px;
  align-items: start;
  padding: clamp(16px, 2.4vw, 24px);
  border: 1px solid rgba(112, 44, 54, 0.16);
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 1px 4px rgba(43, 43, 43, 0.06);
}
/* Sin la escalera de la lista del escenario: en la ventana todas las tarjetas van alineadas. */
.taric-result-dialog .taric-iav-list > .taric-iav-card:nth-child(n) { margin: 0; animation: none; }
.taric-result-dialog .taric-iav-list > .taric-iav-card > * { grid-column: 1 / -1; min-width: 0; }
.taric-result-dialog .taric-iav-list > .taric-iav-card > .taric-precedent-head { grid-column: 1; grid-row: 1; gap: 6px 14px; align-items: baseline; margin: 0; }
.taric-result-dialog .taric-iav-list > .taric-iav-card > .taric-copiar-seccion { grid-column: 2; grid-row: 1; float: none; margin: 0; }
.taric-result-dialog .taric-iav-card .taric-precedent-ref { font-weight: 600; color: #702c36; }
.taric-result-dialog .taric-iav-card .taric-iav-section { margin-top: 16px; }
.taric-result-dialog .taric-iav-card .taric-iav-section h4 { margin: 0 0 6px; }
.taric-result-dialog .taric-iav-list > .taric-iav-card > .taric-iav-image-status { margin-top: 14px; }
.taric-result-dialog .taric-iav-list > .taric-iav-card > .taric-iav-official { justify-self: start; padding: 10px 0 0; }

/* Vistas de la página (Milton, 09-11-2026), fijadas por taric.js en body[data-taric-vista].
   Fuera de «inicio» no hay portada ni formulario: la consulta, el proceso o las tarjetas quedan
   justo bajo la navegación fija, y debajo siguen Soluciones, Hablemos y el pie. */
body.taric-page[data-taric-vista]:not([data-taric-vista="inicio"]) .taric-hero,
body.taric-page[data-taric-vista]:not([data-taric-vista="inicio"]) .taric-entry-grid { display: none; }
body.taric-page[data-taric-vista]:not([data-taric-vista="inicio"]) .taric-widget-section {
  padding-top: calc(var(--taric-cabecera, 86px) + clamp(16px, 3vw, 32px));
}
body.taric-page[data-taric-vista="enviando"] .taric-stage { display: none; }
/* Sin el formulario encima, el escenario no necesita su separación superior. */
body.taric-page[data-taric-vista]:not([data-taric-vista="inicio"]) .taric-stage { margin-top: 0; padding-top: 0; }
body.taric-page[data-taric-vista="resultado"] .taric-track > .taric-stream-final:first-child,
body.taric-page[data-taric-vista="resultado"] .taric-stream-final > .taric-resultados-cabecera { margin-top: 0; }
/* Mientras se envía, la burbuja ocupa la ventana: Soluciones no asoma para desaparecer después. */
body.taric-page[data-taric-vista="enviando"] .taric-widget-section { min-height: 100svh; box-sizing: border-box; }
body.taric-page:is([data-taric-vista="inicio"], [data-taric-vista="resultado"]) .taric-stage:not([hidden]) { min-height: 0; }

/* Burbuja de la consulta: lo enviado, alineado a la derecha como un mensaje propio. */
.taric-page .taric-consulta {
  display: grid;
  gap: 8px;
  width: fit-content;
  max-width: min(720px, 100%);
  box-sizing: border-box;
  margin: 0 0 clamp(20px, 3vw, 32px) auto;
  padding: 16px 20px;
  border: 1px solid #dcd2c9;
  border-radius: 18px 18px 4px 18px;
  background: #fff;
  color: var(--graphite);
  box-shadow: 0 1px 4px rgba(43, 43, 43, 0.06);
}
.taric-page .taric-consulta[hidden],
.taric-page .taric-consulta [hidden] { display: none; }
.taric-page .taric-consulta:focus { outline: none; }
.taric-page .taric-consulta:focus-visible { outline: 2px solid var(--wine); outline-offset: 3px; }
.taric-page .taric-consulta-texto {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  font: 500 17px/1.6 Raleway, sans-serif;
  white-space: pre-line;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 6;
  line-clamp: 6;
}
.taric-page .taric-consulta-adjuntos { margin: 0; font: 400 13px/1.5 Raleway, sans-serif; color: var(--gray); overflow-wrap: anywhere; }
.taric-page .taric-consulta-carga { display: flex; align-items: center; gap: 10px; margin: 2px 0 0; font: 500 14px/1.4 Raleway, sans-serif; color: var(--wine); }
.taric-page .taric-consulta-puntos { display: inline-flex; align-items: center; gap: 4px; height: 1em; }
.taric-page .taric-consulta-puntos i { display: block; width: 6px; height: 6px; border-radius: 50%; background: var(--wine); animation: taricDotHop 1.2s ease-in-out infinite; }
.taric-page .taric-consulta-puntos i:nth-child(2) { animation-delay: .15s; }
.taric-page .taric-consulta-puntos i:nth-child(3) { animation-delay: .3s; }

/* Resultado: las tarjetas primero y, debajo, el proceso como un desplegable cerrado. */
body.taric-page[data-taric-vista="resultado"] .taric-process-shell { margin-top: clamp(24px, 4vw, 40px); }
body.taric-page[data-taric-vista="resultado"] :is(.taric-process-summary, .taric-process-stop, .taric-process-cancel-status) { display: none; }
.taric-page .taric-resultados-cabecera { grid-template-columns: minmax(0, 1fr) auto; column-gap: 20px; }
.taric-page .taric-resultados-cabecera > * { grid-column: 1 / -1; }
.taric-page .taric-resultados-cabecera > .taric-resultados-titulo { grid-column: 1; grid-row: 1; align-self: center; }
.taric-page .taric-resultados-cabecera > .taric-nueva-consulta { grid-column: 2; grid-row: 1; align-self: center; width: auto; min-height: 44px; white-space: nowrap; }
.taric-page .taric-resultados-cabecera > .taric-nueva-consulta[hidden] { display: none !important; }
.taric-page .taric-resultados-titulo:focus { outline: none; }
.taric-page .taric-resultados-titulo:focus-visible { outline: 2px solid var(--wine); outline-offset: 4px; }

/* Transición: lo que se va se funde hacia arriba y lo que llega sube desde abajo. */
body.taric-page.taric-vista-saliendo :is(.taric-hero, .taric-widget-section, .taric-departments-section) {
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 180ms ease, transform 180ms ease;
}
body.taric-page.taric-vista-entrando :is(.taric-hero, .taric-widget-section, .taric-departments-section) {
  animation: taricVistaEntra 400ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
@keyframes taricVistaEntra {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}
@media (max-width: 600px) {
  .taric-page .taric-resultados-cabecera > .taric-nueva-consulta { grid-column: 1 / -1; grid-row: auto; justify-self: start; margin: 4px 0 2px; }
}
@media (max-width: 520px) {
  .taric-page .taric-consulta { padding: 14px 16px; }
  .taric-page .taric-consulta-texto { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  body.taric-page.taric-vista-saliendo :is(.taric-hero, .taric-widget-section, .taric-departments-section) { opacity: 1; transform: none; transition: none; }
  body.taric-page.taric-vista-entrando :is(.taric-hero, .taric-widget-section, .taric-departments-section) { animation: none; }
  .taric-page .taric-consulta-puntos i { animation: none; opacity: .6; }
}
