/* ═══════════════════════════════════════════════════════════════════════
   /agencias — ESTÁNDAR DE ENTREGA
   AgenciasEstandar.jsx (sección: lista + panel) y
   AgenciasEstandarEscenas.jsx (demos animadas del panel).
   Prefijos: .ag-estandar__ (sección) · .ag-est- (escenas).
═══════════════════════════════════════════════════════════════════════ */

/* ── SECCIÓN ───────────────────────────────────────────────────────── */
.ag-estandar__rejilla {
  display: grid;
  gap: 40px;
}

/* Mismo punto de corte que AG_ESTANDAR_ESCRITORIO (AgenciasEstandar.jsx) */
@media (min-width: 1024px) {
  .ag-estandar__rejilla {
    grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
    gap: clamp(40px, 5vw, 72px);
    align-items: start;
  }

  .ag-estandar__lateral {
    position: sticky;
    top: calc(var(--ag-nav-h) + 32px);
  }
}

.ag-estandar__lista {
  display: flex;
  flex-direction: column;
  gap: 6px;
  list-style: none;
}

.ag-estandar__item {
  position: relative;
  padding: 14px 16px;
  border: 1px solid transparent;
  border-radius: 14px;
  transition: border-color 0.25s ease, background-color 0.25s ease;
}

.ag-estandar__item[data-activo='true'] {
  border-color: rgba(200, 184, 149, 0.5);
  background: rgba(16, 18, 21, 0.55);
}

@media (hover: hover) {
  .ag-estandar__item[data-activo='false']:hover {
    border-color: rgba(200, 184, 149, 0.2);
  }
}

.ag-estandar__boton {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 32px;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

/* Toda la fila responde al clic: el área del botón se extiende sobre el
   criterio. El foco se dibuja en esa área, no sólo en el título. */
.ag-estandar__boton::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 14px;
}

.ag-estandar__boton:focus-visible {
  outline: none;
}

.ag-estandar__boton:focus-visible::after {
  outline: 2px solid var(--ag-accent);
  outline-offset: 3px;
}

.ag-estandar__num {
  display: grid;
  place-items: center;
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(200, 184, 149, 0.1);
  color: var(--ag-muted);
  font-size: 12px;
  font-weight: 600;
  transition: background-color 0.25s ease, color 0.25s ease;
}

.ag-estandar__item[data-activo='true'] .ag-estandar__num {
  background: var(--ag-accent);
  color: var(--ag-bg);
}

.ag-estandar__nombre {
  color: var(--ag-text);
  transition: color 0.25s ease;
}

.ag-estandar__item[data-activo='true'] .ag-estandar__nombre {
  color: var(--ag-heading);
}

.ag-estandar__texto {
  margin: 6px 0 0 42px;
  color: var(--ag-muted);
  font-size: 0.9375rem;
  line-height: 1.55;
}

/* ── PANEL ─────────────────────────────────────────────────────────── */
.ag-estandar__panel {
  overflow: hidden;
  border: 1px solid rgba(200, 184, 149, 0.2);
  border-radius: 18px;
  background:
    radial-gradient(ellipse 80% 60% at 70% 0%, rgba(200, 184, 149, 0.08), transparent 70%),
    rgba(11, 13, 15, 0.78);
  box-shadow: inset 0 1px 0 rgba(242, 239, 232, 0.06), 0 24px 60px -24px rgba(0, 0, 0, 0.7);
}

/* El área de las escenas es el contenedor de referencia: todo dentro se
   mide en em derivados de su tamaño (ver .ag-est). */
.ag-estandar__escenas {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  container: ag-est-panel / size;
}

@media (max-width: 639px) {
  .ag-estandar__escenas { aspect-ratio: 1 / 1; }
}

.ag-estandar__medio {
  position: absolute;
  inset: 0;
  visibility: hidden;
  opacity: 0;
  transform: translateY(10px) scale(0.985);
  transition:
    opacity 0.35s ease,
    transform 0.45s cubic-bezier(0.2, 0.7, 0.2, 1),
    visibility 0s linear 0.45s;
}

.ag-estandar__medio[data-activa='true'] {
  visibility: visible;
  opacity: 1;
  transform: none;
  transition:
    opacity 0.35s ease 0.08s,
    transform 0.45s cubic-bezier(0.2, 0.7, 0.2, 1) 0.08s,
    visibility 0s;
}

.ag-estandar__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Barra inferior, como la de un reproductor: rótulo y pausa */
.ag-estandar__pie {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 52px;
  padding: 4px 4px 4px 18px;
  border-top: 1px solid rgba(200, 184, 149, 0.12);
}

.ag-estandar__rotulo {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
  overflow: hidden;
  color: var(--ag-muted);
  font-size: 13px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.ag-estandar__rotulo-num {
  color: var(--ag-accent);
  font-size: 12px;
  letter-spacing: 0.08em;
}

.ag-estandar__pausa {
  display: grid;
  place-items: center;
  flex: none;
  width: 44px;
  height: 44px;
  margin-left: auto;
  padding: 0;
  border: 1px solid rgba(200, 184, 149, 0.28);
  border-radius: 50%;
  background: rgba(200, 184, 149, 0.05);
  color: var(--ag-accent);
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.ag-estandar__pausa:hover { background: rgba(200, 184, 149, 0.14); }

.ag-estandar__pausa svg {
  width: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Móvil y tableta: el panel ocupa el pie del criterio activo, de borde a
   borde. Va por encima del área de clic del botón (::after). */
.ag-estandar__abrible {
  position: relative;
  z-index: 1;
  overflow: hidden;
  margin: 14px -16px -14px;
}

.ag-estandar__abrible .ag-estandar__panel {
  border-width: 1px 0 0;
  border-radius: 0 0 13px 13px;
  box-shadow: none;
}

/* En móvil el título ya está justo encima: el pie sólo lleva la pausa */
.ag-estandar__abrible .ag-estandar__rotulo { display: none; }

@media (prefers-reduced-motion: reduce) {
  .ag-estandar__item,
  .ag-estandar__num,
  .ag-estandar__nombre,
  .ag-estandar__medio,
  .ag-estandar__medio[data-activa='true'] { transition: none; }
}

/* ═══════════════════════════════════════════════════════════════════════
   ESCENAS (.ag-est-)
   1em ≈ 1/32 del ancho del panel (1/27 si es estrecho) y nunca más de
   1/24 de su alto: cada escena mide ~32 × 24 em y escala con el panel.
═══════════════════════════════════════════════════════════════════════ */
.ag-est {
  --ag-est-tinta: #F2EFE8;
  --ag-est-arena: #C8B895;
  --ag-est-ambar: #D18A3D;
  --ag-est-linea: rgba(200, 184, 149, 0.16);
  --ag-est-mono: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
  --ag-est-foto:
    radial-gradient(circle at 72% 28%, rgba(209, 138, 61, 0.6), transparent 52%),
    radial-gradient(circle at 18% 92%, rgba(138, 16, 11, 0.55), transparent 55%),
    linear-gradient(160deg, #2C1712, #141012 65%);
  position: absolute;
  inset: 0;
  padding: 1.6em;
  overflow: hidden;
  color: var(--ag-text);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: clamp(9px, min(100cqw / 32, 100cqh / 24), 17px);
  line-height: 1.3;
  pointer-events: none;
  user-select: none;
}

@container ag-est-panel (max-width: 440px) {
  .ag-est {
    padding: 1.2em;
    font-size: clamp(9px, min(100cqw / 27, 100cqh / 24), 17px);
  }
}

.ag-est ul { list-style: none; }

/* ── Piezas comunes ── */
.ag-est-b {
  display: block;
  flex: none;
  width: var(--w, 100%);
  height: 0.42em;
  border-radius: 99em;
  background: rgba(232, 227, 218, 0.16);
  transform-origin: left center;
}

.ag-est-b--fuerte { background: rgba(232, 227, 218, 0.34); }
.ag-est-b--acento { height: 0.36em; background: rgba(200, 184, 149, 0.7); }

.ag-est-b--titulo {
  height: 0.82em;
  border-radius: 0.18em;
  background: rgba(242, 239, 232, 0.78);
}

.ag-est-puntos {
  display: flex;
  flex: none;
  gap: 0.3em;
}

.ag-est-puntos i {
  display: block;
  width: 0.38em;
  height: 0.38em;
  border-radius: 50%;
  background: rgba(232, 227, 218, 0.22);
}

.ag-est-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  padding: 0.3em 0.65em;
  border: 1px solid rgba(200, 184, 149, 0.3);
  border-radius: 99em;
  background: rgba(17, 19, 22, 0.92);
  color: var(--ag-est-arena);
  font-size: 0.66em;
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
}

.ag-est-chip--ok {
  border-color: rgba(200, 184, 149, 0.55);
  color: var(--ag-est-tinta);
}

.ag-est-check {
  flex: none;
  width: 1.1em;
  height: 1.1em;
  fill: none;
  stroke: var(--ag-est-arena);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ag-est-ventana {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border: 1px solid var(--ag-est-linea);
  border-radius: 0.7em;
  background: #111316;
  box-shadow: 0 1.2em 2.4em -1.2em rgba(0, 0, 0, 0.75);
}

.ag-est-ventana__barra {
  display: flex;
  flex: none;
  align-items: center;
  gap: 0.8em;
  height: 1.7em;
  padding: 0 0.7em;
  border-bottom: 1px solid rgba(200, 184, 149, 0.1);
  background: #15171A;
}

.ag-est-ventana__url {
  flex: 0 1 12em;
  margin: 0 auto;
  padding: 0.2em 0.8em;
  overflow: hidden;
  border-radius: 99em;
  background: rgba(232, 227, 218, 0.06);
  color: rgba(232, 227, 218, 0.55);
  font-size: 0.58em;
  text-align: center;
  white-space: nowrap;
}

.ag-est-ventana__cuerpo {
  position: relative;
  flex: 1;
  min-height: 0;
}

/* Cursor: --cx/--cy en % de la escena. La punta de la flecha (no la
   esquina de la caja) cae en ese punto. */
.ag-est-cursor {
  --cx: 104;
  --cy: 104;
  position: absolute;
  left: calc(var(--cx) * 1%);
  top: calc(var(--cy) * 1%);
  z-index: 5;
  width: 1.3em;
  height: 1.3em;
  margin: -0.16em 0 0 -0.29em;
  opacity: 0;
}

.ag-est-cursor__flecha {
  display: block;
  width: 100%;
  height: 100%;
  transform-origin: 22% 12%;
  filter: drop-shadow(0 0.15em 0.3em rgba(0, 0, 0, 0.6));
}

.ag-est-cursor__flecha svg {
  display: block;
  width: 100%;
  height: 100%;
  fill: var(--ag-est-tinta);
  stroke: #0B0D0F;
  stroke-width: 1.1;
  stroke-linejoin: round;
}

.ag-est-cursor__onda {
  position: absolute;
  top: -0.44em;
  left: -0.31em;
  width: 1.2em;
  height: 1.2em;
  border: 0.12em solid var(--ag-est-arena);
  border-radius: 50%;
  opacity: 0;
}

/* ── 1. Fidelidad visual ── */
.ag-est-fid {
  display: flex;
  flex-direction: column;
  gap: 0.9em;
}

.ag-est-fid .ag-est-ventana {
  flex: 1;
  height: auto;
  min-height: 0;
}

.ag-est-fid__maqueta {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  gap: 1.1em;
  padding: 0.9em 1.2em 1.1em;
}

.ag-est-fid__nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ag-est-fid__links {
  display: flex;
  gap: 0.7em;
}

.ag-est-fid__links .ag-est-b { width: 2.1em; }

.ag-est-fid__hero {
  display: grid;
  flex: 1;
  grid-template-columns: 1.15fr 1fr;
  gap: 1.3em;
  min-height: 0;
}

.ag-est-fid__texto {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  min-width: 0;
}

.ag-est-fid__titulo {
  display: flex;
  flex-direction: column;
  gap: 0.32em;
  width: 100%;
  margin-top: 0.75em;
}

.ag-est-fid__espacio {
  position: relative;
  display: block;
  flex: none;
  width: 100%;
  height: 1.1em;
}

.ag-est-fid__espacio--ancho { height: 1.45em; }

.ag-est-fid__parrafo {
  display: flex;
  flex-direction: column;
  gap: 0.4em;
  width: 100%;
}

.ag-est-fid__boton {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 0.55em 1.1em;
  border: 1px solid rgba(200, 184, 149, 0.55);
  border-radius: 99em;
  background-color: rgba(200, 184, 149, 0.08);
  color: #C8B895;
  font-size: 0.64em;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
}

.ag-est-fid__anillo {
  position: absolute;
  inset: -0.4em;
  border: 0.16em solid #C8B895;
  border-radius: 99em;
  opacity: 0;
}

.ag-est-fid__imagen {
  min-height: 0;
  border-radius: 0.55em;
  background: var(--ag-est-foto);
}

/* Capa de diseño: la misma composición, sólo contornos y cotas */
.ag-est-fid__maqueta--diseno {
  --dx: 0;
  --dy: 0;
  opacity: 0.95;
  transform: translate(calc(var(--dx) * 1em), calc(var(--dy) * 1em));
}

.ag-est-fid__maqueta--diseno .ag-est-b,
.ag-est-fid__maqueta--diseno .ag-est-fid__boton,
.ag-est-fid__maqueta--diseno .ag-est-fid__imagen {
  border-color: transparent;
  background: none;
  color: transparent;
  outline: 1px dashed rgba(209, 138, 61, 0.9);
}

/* En las líneas finas el discontinuo parece una cadena: contorno continuo */
.ag-est-fid__maqueta--diseno .ag-est-b {
  outline: 1px solid rgba(209, 138, 61, 0.75);
}

.ag-est-fid__cota {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0.2em;
  border-left: 1px solid var(--ag-est-ambar);
}

.ag-est-fid__cota::before,
.ag-est-fid__cota::after {
  content: '';
  position: absolute;
  left: -0.25em;
  width: 0.5em;
  border-top: 1px solid var(--ag-est-ambar);
}

.ag-est-fid__cota::before { top: 0; }
.ag-est-fid__cota::after { bottom: 0; }

.ag-est-fid__cota span {
  position: absolute;
  top: 50%;
  left: 0.6em;
  color: var(--ag-est-ambar);
  font-family: var(--ag-est-mono);
  font-size: 0.55em;
  font-weight: 600;
  line-height: 1;
  transform: translateY(-50%);
}

.ag-est-fid__chips {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: space-between;
  gap: 0.6em;
}

.ag-est-fid__estados { display: grid; }

.ag-est-fid__estados > * {
  grid-area: 1 / 1;
  justify-self: center;
}

.ag-est-fid__chip--hover,
.ag-est-fid__chip--foco { opacity: 0; }

/* ── 2. Experiencia móvil ──
   --ancho (en .ag-est-mov__pista) es el ancho de la ventana en %. El
   contenido responde con container queries a su ancho real. */
.ag-est-mov { padding-right: 2.2em; }

.ag-est-mov__pista {
  --ancho: 36;
  position: relative;
  width: 100%;
  height: 100%;
}

.ag-est-mov__fantasma {
  position: absolute;
  inset: 0;
  border: 1px dashed rgba(200, 184, 149, 0.26);
  border-radius: 0.7em;
}

.ag-est-mov__marco {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  width: calc(var(--ancho) * 1%);
  overflow: hidden;
  border: 1px solid rgba(200, 184, 149, 0.32);
  border-radius: 0.7em;
  background: #111316;
  box-shadow: 0 1.2em 2.4em -1.2em rgba(0, 0, 0, 0.75);
  container: ag-est-mov / inline-size;
}

.ag-est-mov__barra {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: space-between;
  gap: 0.6em;
  height: 1.6em;
  padding: 0 0.6em;
  border-bottom: 1px solid rgba(200, 184, 149, 0.1);
  background: #15171A;
}

.ag-est-mov__tamano {
  color: var(--ag-est-arena);
  font-size: 0.58em;
  font-weight: 600;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.ag-est-mov__tamano > span { display: none; }
.ag-est-mov__tamano .ag-est-mov__tamano--movil { display: inline; }

.ag-est-mov__sitio {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 0.9em;
  min-height: 0;
  padding: 0.8em 0.9em;
  overflow: hidden;
}

.ag-est-mov__nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6em;
}

.ag-est-mov__links {
  display: none;
  gap: 0.6em;
}

.ag-est-mov__links .ag-est-b { width: 2em; }

.ag-est-mov__menu {
  display: flex;
  flex-direction: column;
  gap: 0.2em;
}

.ag-est-mov__menu i {
  display: block;
  width: 1em;
  height: 0.12em;
  border-radius: 99em;
  background: rgba(232, 227, 218, 0.6);
}

.ag-est-mov__hero {
  display: grid;
  gap: 0.8em;
}

.ag-est-mov__texto {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.4em;
  min-width: 0;
}

.ag-est-mov__parrafo {
  display: flex;
  flex-direction: column;
  gap: 0.35em;
  width: 100%;
  margin-top: 0.2em;
}

.ag-est-mov__boton {
  display: block;
  width: 100%;
  margin-top: 0.35em;
  padding: 0.5em 0;
  border-radius: 99em;
  background: #C8B895;
  color: #0B0D0F;
  font-size: 0.58em;
  font-weight: 600;
  text-align: center;
  white-space: nowrap;
}

.ag-est-mov__imagen {
  display: block;
  aspect-ratio: 16 / 10;
  border-radius: 0.5em;
  background: var(--ag-est-foto);
}

.ag-est-mov__tarjetas {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.6em;
}

.ag-est-mov__tarjeta {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 0.35em;
  height: 3.4em;
  padding: 0.55em;
  border: 1px solid rgba(200, 184, 149, 0.14);
  border-radius: 0.45em;
  background: rgba(232, 227, 218, 0.04);
}

@container ag-est-mov (min-width: 14em) {
  .ag-est-mov__tamano .ag-est-mov__tamano--movil { display: none; }
  .ag-est-mov__tamano .ag-est-mov__tamano--tableta { display: inline; }
  .ag-est-mov__links { display: flex; }
  .ag-est-mov__menu { display: none; }
  .ag-est-mov__hero { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: center; }
  .ag-est-mov__boton { width: auto; padding: 0.5em 1.1em; }
  .ag-est-mov__tarjetas { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@container ag-est-mov (min-width: 22em) {
  .ag-est-mov__tamano .ag-est-mov__tamano--tableta { display: none; }
  .ag-est-mov__tamano .ag-est-mov__tamano--escritorio { display: inline; }
  .ag-est-mov__tarjetas { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.ag-est-mov__asa {
  position: absolute;
  top: 50%;
  left: calc(var(--ancho) * 1%);
  width: 0.55em;
  height: 2.6em;
  margin: -1.3em 0 0 -0.28em;
  border-radius: 99em;
  background: #C8B895;
  box-shadow: 0 0 0 0.3em rgba(200, 184, 149, 0.16);
}

/* ── 3. Rendimiento ── */
.ag-est-ren {
  display: grid;
  grid-template-columns: minmax(0, 0.72fr) minmax(0, 1.28fr);
  gap: 1.1em;
}

.ag-est-ren__pagina {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(200, 184, 149, 0.24);
  border-radius: 1em;
  background: #111316;
}

.ag-est-ren__desplazable {
  --scroll: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55em;
  padding: 0.8em;
  transform: translateY(calc(var(--scroll) * -8.5em));
}

.ag-est-ren__foto {
  display: block;
  flex: none;
  aspect-ratio: 4 / 3;
  border-radius: 0.45em;
  background: var(--ag-est-foto);
}

.ag-est-ren__foto--hero {
  --borroso: 0;
  margin-bottom: 0.25em;
  filter: blur(calc(var(--borroso) * 1em));
}

.ag-est-ren__parrafo {
  display: flex;
  flex-direction: column;
  gap: 0.38em;
  margin: 0.2em 0 0.3em;
}

.ag-est-ren__galeria {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45em;
}

.ag-est-ren__foto--galeria {
  --carga: 1;
  position: relative;
  aspect-ratio: 1;
  background:
    radial-gradient(circle at 30% 30%, rgba(209, 138, 61, 0.5), transparent 60%),
    linear-gradient(140deg, #3A1D14, #15120F);
}

.ag-est-ren__foto--b {
  background:
    radial-gradient(circle at 70% 60%, rgba(200, 184, 149, 0.45), transparent 60%),
    linear-gradient(200deg, #2A1A17, #121012);
}

/* Hueco reservado mientras la imagen diferida no ha cargado */
.ag-est-ren__foto--galeria::after {
  content: '';
  position: absolute;
  inset: 0;
  border: 1px dashed rgba(200, 184, 149, 0.4);
  border-radius: inherit;
  background: #15171A;
  opacity: calc(1 - var(--carga));
}

.ag-est-ren__recursos {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.75em;
  min-width: 0;
  padding: 1em 1.1em;
  border: 1px solid var(--ag-est-linea);
  border-radius: 1em;
  background: rgba(17, 19, 22, 0.9);
}

.ag-est-ren__cabecera {
  display: flex;
  justify-content: space-between;
  gap: 1em;
  color: rgba(232, 227, 218, 0.5);
  font-size: 0.56em;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.ag-est-ren__lista {
  display: flex;
  flex-direction: column;
  gap: 0.7em;
}

.ag-est-ren__fila {
  display: grid;
  grid-template-columns: 6.6em minmax(0, 1fr);
  align-items: center;
  gap: 0.7em;
}

.ag-est-ren__nombre {
  display: flex;
  align-items: center;
  gap: 0.4em;
  min-width: 0;
  color: rgba(232, 227, 218, 0.82);
  font-family: var(--ag-est-mono);
  font-size: 0.6em;
  white-space: nowrap;
}

.ag-est-ren__formato { display: inline-grid; }

.ag-est-ren__formato > span,
.ag-est-ren__estado {
  grid-area: 1 / 1;
  padding: 0.05em 0.4em;
  border-radius: 0.3em;
  font-size: 0.85em;
}

.ag-est-ren__formato-antes {
  background: rgba(165, 54, 15, 0.35);
  color: #F1C9A8;
  opacity: 0;
}

.ag-est-ren__formato-despues {
  background: rgba(200, 184, 149, 0.18);
  color: var(--ag-est-arena);
}

.ag-est-ren__estado {
  border: 1px dashed rgba(200, 184, 149, 0.45);
  color: var(--ag-est-arena);
}

.ag-est-ren__pista {
  position: relative;
  height: 0.55em;
  border-radius: 99em;
  background: rgba(232, 227, 218, 0.06);
}

/* --ini y --lon: inicio y longitud relativos (%), no mediciones */
.ag-est-ren__barra {
  --crece: 1;
  position: absolute;
  top: 0;
  bottom: 0;
  left: calc(var(--ini) * 1%);
  width: calc(var(--lon) * var(--crece) * 1%);
  border-radius: 99em;
  background: linear-gradient(90deg, #A5360F, #D18A3D);
}

.ag-est-ren__barra--diferida { background: linear-gradient(90deg, #8A744A, #C8B895); }

.ag-est-ren__leyenda {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4em;
  margin-top: 0.2em;
}

/* ── 4. Base técnica para buscadores ── */
.ag-est-seo {
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(0, 1.14fr);
  gap: 1.1em;
}

.ag-est-seo__estructura {
  display: flex;
  flex-direction: column;
  gap: 0.45em;
  min-width: 0;
  padding: 0.7em;
  border: 1px solid var(--ag-est-linea);
  border-radius: 0.9em;
  background: #111316;
}

.ag-est-seo__bloque {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.38em;
  padding: 1.15em 0.6em 0.6em;
  border: 1px dashed rgba(209, 138, 61, 0.55);
  border-radius: 0.45em;
  background-color: rgba(209, 138, 61, 0.04);
}

.ag-est-seo__bloque--main { flex: 1; }

.ag-est-seo__tag {
  position: absolute;
  top: 0.32em;
  left: 0.5em;
  color: var(--ag-est-ambar);
  font-family: var(--ag-est-mono);
  font-size: 0.52em;
  line-height: 1;
}

.ag-est-seo__fila {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5em;
}

.ag-est-seo__derecha {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.75em;
  min-width: 0;
}

.ag-est-seo__codigo {
  display: flex;
  flex-direction: column;
  gap: 0.2em;
  padding: 0.75em 0.85em;
  overflow: hidden;
  border: 1px solid var(--ag-est-linea);
  border-radius: 0.75em;
  background: #0D0F11;
  color: rgba(232, 227, 218, 0.85);
  font-family: var(--ag-est-mono);
  font-size: 0.6em;
  line-height: 1.6;
}

/* --rev: 0 = oculto, 1 = escrito (se recorta de izquierda a derecha) */
.ag-est-seo__linea,
.ag-est-seo__titulo {
  --rev: 1;
  align-self: flex-start;
  white-space: nowrap;
  clip-path: inset(0 calc((1 - var(--rev)) * 100%) 0 0);
}

.ag-est-seo__linea i {
  color: var(--ag-est-ambar);
  font-style: normal;
}

.ag-est-seo__linea b {
  color: var(--ag-est-arena);
  font-weight: 400;
}

.ag-est-seo__resultado {
  display: flex;
  flex-direction: column;
  gap: 0.38em;
  padding: 0.8em 0.9em;
  border: 1px solid var(--ag-est-linea);
  border-radius: 0.75em;
  background: rgba(242, 239, 232, 0.04);
}

.ag-est-seo__sitio {
  display: flex;
  align-items: center;
  gap: 0.5em;
  overflow: hidden;
  color: rgba(232, 227, 218, 0.62);
  font-size: 0.56em;
  white-space: nowrap;
}

.ag-est-seo__favicon {
  flex: none;
  width: 1.3em;
  height: 1.3em;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #C8B895, #8A744A);
}

.ag-est-seo__titulo {
  color: var(--ag-est-arena);
  font-family: 'Sora', system-ui, sans-serif;
  font-size: 0.82em;
}

.ag-est-seo__archivos {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4em;
}

/* ── 5. Continuidad ── */
.ag-est-con {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
  grid-template-rows: auto auto;
  align-content: center;
  gap: 1.3em 1.1em;
}

.ag-est-con__arbol {
  min-width: 0;
  padding: 0.75em 0.55em;
  overflow: hidden;
  border: 1px solid var(--ag-est-linea);
  border-radius: 0.9em;
  background: #111316;
}

.ag-est-con__cabecera {
  margin: 0 0 0.55em 0.55em;
  color: rgba(232, 227, 218, 0.5);
  font-size: 0.56em;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.ag-est-con__lista {
  display: flex;
  flex-direction: column;
  gap: 0.1em;
}

.ag-est-con__fila {
  display: flex;
  align-items: center;
  gap: 0.45em;
  padding: 0.3em 0.55em;
  border-radius: 0.4em;
  color: rgba(232, 227, 218, 0.8);
  font-family: var(--ag-est-mono);
  font-size: 0.6em;
  white-space: nowrap;
}

.ag-est-con__fila--n1 { padding-left: 1.9em; }
.ag-est-con__fila--carpeta { color: var(--ag-est-arena); }

.ag-est-con__fila--readme {
  background-color: rgba(200, 184, 149, 0.16);
  color: var(--ag-est-tinta);
}

/* --alto: 0 = fila plegada, 1 = visible (archivo nuevo) */
.ag-est-con__fila--nueva {
  --alto: 1;
  max-height: calc(var(--alto) * 2.2em);
  padding-top: calc(var(--alto) * 0.3em);
  padding-bottom: calc(var(--alto) * 0.3em);
  overflow: hidden;
}

.ag-est-con__icono {
  flex: none;
  width: 1.15em;
  height: 1.15em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.2;
  stroke-linejoin: round;
  opacity: 0.8;
}

.ag-est-con__nombre {
  overflow: hidden;
  text-overflow: ellipsis;
}

.ag-est-con__nuevo {
  margin-left: auto;
  padding: 0 0.5em;
  border: 1px solid rgba(209, 138, 61, 0.55);
  border-radius: 99em;
  color: var(--ag-est-ambar);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.85em;
}

.ag-est-con__doc {
  display: flex;
  flex-direction: column;
  gap: 0.55em;
  min-width: 0;
  padding: 0.9em 1em;
  overflow: hidden;
  border: 1px solid var(--ag-est-linea);
  border-radius: 0.9em;
  background: rgba(242, 239, 232, 0.035);
}

.ag-est-con__doc-archivo {
  color: rgba(232, 227, 218, 0.5);
  font-family: var(--ag-est-mono);
  font-size: 0.52em;
}

.ag-est-con__doc-titulo {
  color: var(--ag-est-tinta);
  font-family: 'Sora', system-ui, sans-serif;
  font-size: 0.9em;
}

.ag-est-con__apartado {
  display: flex;
  flex-direction: column;
  gap: 0.32em;
}

.ag-est-con__h {
  color: var(--ag-est-arena);
  font-family: var(--ag-est-mono);
  font-size: 0.58em;
}

.ag-est-con__linea {
  display: flex;
  grid-column: 1 / -1;
  align-items: center;
  gap: 0.55em;
  padding: 0 0.2em;
}

.ag-est-con__hito {
  display: flex;
  flex: none;
  align-items: center;
  gap: 0.45em;
  color: rgba(232, 227, 218, 0.85);
  font-size: 0.6em;
  white-space: nowrap;
}

.ag-est-con__punto {
  flex: none;
  width: 0.9em;
  height: 0.9em;
  border: 1px solid var(--ag-est-arena);
  border-radius: 50%;
  background-color: #C8B895;
}

.ag-est-con__tramo {
  flex: 1;
  height: 1px;
  background: rgba(200, 184, 149, 0.45);
  transform-origin: left center;
}

/* Portada: el estándar de entrega en la home (AgenciasEstandar portada).
   Los tokens --ag-*, el relleno de la sección y la escala del título
   vienen de .ag-portada (styles/agencias/portada.css). Las seis
   disciplinas van en su propia sección (styles/disciplinas.css). */
.ag-estandar--portada .ag-estandar__rejilla {
  width: min(100%, 1296px);
  margin-inline: auto;
  padding-inline: clamp(20px, 4vw, 48px);
}

.ag-estandar--portada .ag-encabezado {
  margin-bottom: clamp(24px, 4vw, 40px);
}

.ag-estandar--portada .ag-intro {
  max-width: 55ch;
  margin-top: 16px;
  color: var(--ag-muted);
  font-size: 1rem;
}

.ag-estandar--portada .ag-estandar__titulo {
  color: var(--ag-heading);
  font-size: 1.0625rem;
  font-weight: 600;
}

.ag-estandar--portada .ag-estandar__nombre {
  --scramble-color: #e8e3da;
  --scramble-hover: #f5e9d0;
}

.ag-estandar--portada .ag-estandar__pausa:focus-visible {
  outline: 2px solid var(--ag-accent);
  outline-offset: 2px;
}
