/* The Pickle Codex · Construir una pista: niveles de presupuesto y banda para empresas.
   Solo variables de la hoja principal. Zonas táctiles de 44 px y sin desbordamiento a 360 px. */

.pp { margin: 0 0 2rem; }
.pp-cabecera { margin: 0 0 1.25rem; }
.pp-antetitulo {
  display: inline-block; margin: 0 0 .6rem; padding: .2rem .7rem; border-radius: 999px;
  background: var(--lima); color: var(--tinta); font-size: .78rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
}
.texto .pp-titulo, .pp-titulo { margin: 0 0 .4rem; font-size: clamp(1.6rem, 4.5vw, 2.2rem); line-height: 1.1; }
.pp-intro { margin: 0; color: var(--gris); }

.pp-niveles {
  display: grid; column-gap: 1rem; row-gap: 0; margin: 0; container-type: inline-size;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 12.5rem), 1fr));
}
/* Cada tarjeta ocupa siete filas compartidas (subgrid): cabecera, precio, unidad, lista, uso, fuentes y botón
   quedan a la misma altura en las tres. */
.pp-nivel {
  display: grid; grid-row: span 7; grid-template-rows: subgrid; row-gap: 0;
  min-width: 0; overflow: hidden;
  border: 2px solid var(--borde); border-radius: var(--radio); background: var(--superficie);
  box-shadow: var(--sombra); transition: border-color .2s, box-shadow .2s; margin-bottom: 1rem;
}
@container (max-width: 40rem) { .texto .pp-precio, .pp-precio { font-size: 2rem; } }
@supports not (grid-template-rows: subgrid) { .pp-nivel { display: flex; flex-direction: column; } .pp-fuentes { margin-top: auto; } }
.pp-nivel > :not(.pp-nivel-cabecera) { margin-left: 1rem; margin-right: 1rem; }
.pp-nivel-cabecera { display: flex; flex-direction: column; justify-content: flex-end; gap: .5rem; padding: 1rem; background: var(--pista); color: #fff; }
.pp-etiqueta {
  align-self: flex-start; padding: .2rem .65rem; border-radius: 999px;
  background: var(--lima); color: var(--tinta); font-size: .78rem; font-weight: 700; letter-spacing: .03em;
}
.texto .pp-nivel-titulo, .pp-nivel-titulo { margin: 0; color: #fff; font-size: 1.12rem; line-height: 1.25; }
.texto .pp-precio, .pp-precio {
  align-self: end; margin-top: 1.1rem; margin-bottom: 0; font-family: var(--fuente-titulos);
  font-size: clamp(1.35rem, 3.4cqi, 2.1rem); font-weight: 700; line-height: 1.08; letter-spacing: -.01em; color: var(--pista);
}
.pp-unidad { margin-top: .3rem; margin-bottom: .9rem; color: var(--gris); font-size: .85rem; }
.texto .pp-incluye, .pp-incluye { margin-top: 0; margin-bottom: .9rem; padding: .9rem 0 0; list-style: none; border-top: 1px solid var(--borde); }
.pp-incluye li { position: relative; margin: 0 0 .45rem; padding-left: 1.6rem; font-size: .95rem; line-height: 1.4; }
.pp-incluye li::before {
  content: ""; position: absolute; left: 0; top: .15rem; width: 1.05rem; height: 1.05rem; border-radius: 50%;
  background: var(--pista-velo) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.5l3 3 6-6' fill='none' stroke='%230052E5' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / .75rem no-repeat;
}
.pp-cuando { margin-top: 0; margin-bottom: .6rem; color: var(--gris); font-size: .88rem; line-height: 1.45; }
.pp-fuentes { margin-top: 0; margin-bottom: .6rem; font-size: .88rem; }
.pp-fuentes summary {
  display: flex; align-items: center; min-height: 44px; cursor: pointer; color: var(--pista-hondo); font-weight: 600;
}
.texto .pp-fuentes ul, .pp-fuentes ul { margin: .2rem 0 0; padding-left: 1.1rem; }
.pp-fuentes li { margin: .4rem 0; line-height: 1.45; }

.pp-elegir {
  display: inline-flex; gap: .4rem; align-items: center; justify-content: center; align-self: end; text-decoration: none; min-height: 48px; width: auto; margin-bottom: 1rem; padding: .6rem 1rem;
  border: 2px solid var(--pista); border-radius: 999px; background: var(--superficie); color: var(--pista);
  font: 700 1rem/1.2 var(--fuente-texto); cursor: pointer; transition: background-color .15s, color .15s;
}
.pp-elegir:hover, .texto a.pp-elegir:hover { background: var(--pista); color: #fff; }
.texto a.pp-elegir { color: var(--pista); text-decoration: none; }
.pp-elegir:focus-visible { outline: 3px solid var(--pista-hondo); outline-offset: 3px; }
.pp-elegida { border-color: var(--pista); box-shadow: 0 0 0 3px var(--lima), var(--sombra); }
.pp-elegida .pp-elegir, .texto .pp-elegida a.pp-elegir { background: var(--pista); color: #fff; }

.pp-siguiente {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem 1rem;
  margin: 0 0 1rem; padding: 1rem 1.1rem; border-radius: var(--radio); background: var(--pista-velo);
}
.pp-siguiente[hidden] { display: none; }
.pp-siguiente p { margin: 0; flex: 1 1 16rem; }
.pp-boton, .texto a.pp-boton {
  display: inline-flex; align-items: center; min-height: 48px; padding: .6rem 1.2rem; border-radius: 999px;
  background: var(--pista); color: #fff; font-weight: 700; text-decoration: none;
}
.pp-boton:hover, .texto a.pp-boton:hover { background: var(--pista-hondo); color: #fff; }

.texto .pp-otros, .pp-otros { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 .8rem; padding: 0; list-style: none; }
.pp-otros li { margin: 0; }
.pp-otros a, .texto .pp-otros a {
  display: inline-block; min-height: 44px; padding: .65rem .95rem; line-height: 1.35; border: 1px solid var(--borde);
  border-radius: 999px; background: var(--superficie); color: var(--tinta); font-size: .9rem; text-decoration: none;
}
.pp-otros a:hover { border-color: var(--pista); color: var(--pista-hondo); }
.pp-nota { margin: 0; color: var(--gris); font-size: .85rem; }

/* ---------- Cómo sería la obra (pestañas) ---------- */
.pp-obra { margin: 2rem 0 0; padding: clamp(1rem, 3vw, 1.6rem); border-radius: var(--radio); background: var(--pista-velo); scroll-margin-top: 90px; }
.texto .pp-obra-titulo, .pp-obra-titulo { margin: 0 0 1rem; font-size: clamp(1.35rem, 3.5vw, 1.7rem); line-height: 1.15; }
.pp-pestanas { display: grid; grid-template-columns: repeat(3, 1fr); gap: .35rem; margin: 0 0 1.2rem; padding: .35rem; border-radius: 999px; background: var(--superficie); box-shadow: var(--sombra); }
.pp-pestanas[hidden] { display: none; }
.pp-pestanas button {
  min-height: 44px; padding: .45rem .4rem; border: 0; border-radius: 999px; background: transparent; white-space: nowrap;
  color: var(--tinta); font: 700 clamp(.85rem, 3.4vw, .95rem)/1.2 var(--fuente-texto); cursor: pointer;
}
.pp-pestanas button:hover { background: var(--pista-velo); }
.pp-pestanas button[aria-selected="true"] { background: var(--pista); color: #fff; }
.pp-pestanas button:focus-visible { outline: 3px solid var(--pista-hondo); outline-offset: 2px; }
.pp-panel { padding: clamp(1rem, 3vw, 1.5rem); border-radius: var(--radio); background: var(--superficie); box-shadow: var(--sombra); scroll-margin-top: 90px; }
.pp-panel + .pp-panel { margin-top: 1rem; }
.pp-panel[hidden] { display: none; }
.pp-panel-etiqueta {
  display: inline-block; margin: 0 0 .5rem; padding: .2rem .65rem; border-radius: 999px;
  background: var(--lima); color: var(--tinta); font-size: .78rem; font-weight: 700; letter-spacing: .03em;
}
.pp-activo .pp-panel-etiqueta { display: none; }
.texto .pp-panel-titulo, .pp-panel-titulo { margin: 0 0 .4rem; font-size: 1.3rem; line-height: 1.2; }
.pp-panel-intro { margin: 0 0 1.2rem; color: var(--gris); }
.texto .pp-panel-sub, .pp-panel-sub {
  margin: 1.4rem 0 .7rem; color: var(--gris); font-family: var(--fuente-texto); font-size: .8rem; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase;
}

/* Pasos: fichas numeradas que llevan a cada apartado del texto */
.texto .pp-pasos, .pp-pasos {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 8rem), 1fr)); gap: .5rem;
  margin: 0; padding: 0; list-style: none; counter-reset: none;
}
.pp-pasos li { margin: 0; }
.pp-pasos a, .texto .pp-pasos a {
  display: flex; align-items: center; gap: .6rem; height: 100%; min-height: 52px; padding: .55rem .7rem;
  border: 1px solid var(--borde); border-radius: 14px; background: var(--superficie); color: var(--tinta);
  font-size: .9rem; font-weight: 600; line-height: 1.25; text-decoration: none; transition: border-color .15s, background-color .15s;
}
.pp-pasos a:hover { border-color: var(--pista); background: var(--pista-velo); }
.pp-paso-n {
  flex: 0 0 auto; display: grid; place-items: center; width: 1.8rem; height: 1.8rem; border-radius: 50%;
  background: var(--pista); color: #fff; font-size: .85rem; font-weight: 700;
}

/* Partidas: barras de rango sobre una escala común de 0 a 10.000 € */
.pp-eje, .pp-partida { display: grid; grid-template-columns: minmax(9rem, 13rem) 1fr 7.5rem; align-items: center; gap: .3rem 1rem; }
.pp-eje { margin: 0 0 .3rem; color: var(--gris); font-size: .72rem; }
.texto .pp-partidas, .pp-partidas { margin: 0 0 .8rem; padding: 0; list-style: none; }
.pp-partida { margin: 0; padding: .55rem 0; border-bottom: 1px solid var(--borde); }
.pp-partida:last-child { border-bottom: 0; }
.pp-partida-nombre { font-size: .92rem; font-weight: 600; line-height: 1.3; }
.pp-barra {
  position: relative; height: 12px; border-radius: 999px;
  background: repeating-linear-gradient(90deg, var(--pista-velo) 0 calc(25% - 1px), var(--borde) calc(25% - 1px) 25%);
}
.pp-tramo {
  position: absolute; top: 0; bottom: 0; left: calc(var(--a) * 100%); width: calc((var(--b) - var(--a)) * 100%);
  min-width: 10px; border-radius: 999px; background: var(--pista);
}
.pp-partida-sin .pp-barra { background: transparent; border: 1px dashed var(--borde); }
.pp-partida-cifra { font-size: .92rem; font-weight: 700; color: var(--pista); text-align: right; white-space: nowrap; }
.pp-partida-sin .pp-partida-cifra { color: var(--gris); font-weight: 600; white-space: normal; }
.pp-escala { display: flex; justify-content: space-between; margin: 0 0 .2rem; color: var(--gris); font-size: .72rem; }
.pp-panel-fuente { margin: 0 0 .6rem; color: var(--gris); font-size: .82rem; line-height: 1.45; }
.pp-panel-ref { margin: 0 0 .6rem; padding: .75rem .9rem; border-left: 4px solid var(--lima); border-radius: 0 12px 12px 0; background: var(--pista-velo); font-size: .92rem; }
.texto .pp-tiempos, .pp-tiempos { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); gap: .6rem; margin: 0 0 .6rem; padding: 0; list-style: none; }
.pp-tiempos li { display: flex; align-items: baseline; gap: .6rem; margin: 0; padding: .8rem .9rem; border-radius: 14px; background: var(--tinta); color: #fff; }
.pp-tiempos strong { flex: 0 0 auto; color: var(--lima); font-family: var(--fuente-titulos); font-size: 1.4rem; line-height: 1; }
.pp-tiempos span { font-size: .88rem; line-height: 1.35; color: rgba(255, 255, 255, .88); }
.pp-panel .pp-boton { margin-top: .8rem; }
@media (max-width: 560px) {
  .pp-partida { grid-template-columns: 1fr auto; }
  .pp-partida .pp-barra { grid-column: 1 / -1; grid-row: 2; }
  .pp-eje { display: none; }
}

/* ---------- Banda para empresas ---------- */
.banda-empresas {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 1rem 1.25rem;
  margin: 1.5rem 0 0; padding: 1.25rem 1.4rem; border-radius: var(--radio);
  background: var(--tinta); color: #fff;
}
.banda-empresas-icono {
  display: grid; place-items: center; width: 3rem; height: 3rem; border-radius: 50%;
  background: rgba(255, 255, 255, .1); color: var(--lima);
}
.banda-empresas-icono svg { width: 1.5rem; height: 1.5rem; }
.banda-empresas-texto p { margin: 0; color: rgba(255, 255, 255, .85); font-size: .95rem; line-height: 1.45; }
.texto .banda-empresas-titulo, .banda-empresas-titulo { margin: 0 0 .2rem !important; color: #fff !important; font-family: var(--fuente-titulos); font-size: 1.12rem; font-weight: 700; line-height: 1.25; }
.banda-empresas-boton, .texto a.banda-empresas-boton {
  display: inline-flex; align-items: center; gap: .4rem; min-height: 48px; padding: .6rem 1.2rem; border-radius: 999px;
  background: var(--lima); color: var(--tinta); font-weight: 700; text-decoration: none; white-space: nowrap;
}
.banda-empresas-boton:hover, .texto a.banda-empresas-boton:hover { background: #fff; color: var(--tinta); }
@media (max-width: 640px) {
  .banda-empresas { grid-template-columns: 1fr; text-align: left; }
  .banda-empresas-icono { display: none; }
  .banda-empresas-boton { justify-content: center; }
}
