/* Generador de paletas de colores (/herramientas/paleta-de-colores/).
   Va despues de plantilla-servicio.css y usa la misma especificidad. */

html:not(#z) body main.ps .sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------- herramienta ---------- */
html:not(#z) body main.ps > section.pal-app { padding-top: 32px !important; scroll-margin-top: 80px; }
html:not(#z) body main.ps .pal-controles {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 0 0 14px;
}
html:not(#z) body main.ps .pal-controles button,
html:not(#z) body main.ps .pal-controles select,
html:not(#z) body main.ps .pal-controles label.pal-base {
  min-height: 44px; border-radius: 10px; font: inherit; font-size: .95rem;
  border: 1.5px solid var(--ps-ink); background: var(--ps-paper); color: var(--ps-ink);
  padding: 0 14px; cursor: pointer; box-sizing: border-box;
}
html:not(#z) body main.ps .pal-controles button.pal-generar {
  background: var(--ps-ink); color: #fff; font-weight: 700; padding: 0 22px;
}
html:not(#z) body main.ps .pal-controles label.pal-base {
  display: inline-flex; align-items: center; gap: 8px;
}
html:not(#z) body main.ps .pal-controles label.pal-base input {
  width: 30px; height: 30px; border: 0; padding: 0; background: none; cursor: pointer;
}
html:not(#z) body main.ps .pal-controles .pal-sin-base {
  border-style: dashed; font-size: .85rem;
}
html:not(#z) body main.ps .pal-atajo { color: var(--ps-muted); font-size: .85rem; margin: 0; }
@media (max-width: 767.98px) { html:not(#z) body main.ps .pal-atajo { display: none; } }

html:not(#z) body main.ps ul.pal-colores {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: 1fr; gap: 0;
  border-radius: 16px; overflow: hidden; border: 1px solid var(--ps-rule);
}
html:not(#z) body main.ps ul.pal-colores > li.pal-color {
  display: grid; grid-template-columns: 1fr auto; grid-template-areas: "hex acc" "rgb acc" "con acc";
  align-items: center; gap: 2px 10px; padding: 14px 16px; min-height: 92px;
  margin: 0; border: 0; border-radius: 0; box-shadow: none; transition: background .25s;
}
html:not(#z) body main.ps ul.pal-colores > li.pal-color::before { display: none; content: none; }
@media (min-width: 900px) {
  html:not(#z) body main.ps ul.pal-colores { grid-template-columns: repeat(5, 1fr); }
  html:not(#z) body main.ps ul.pal-colores > li.pal-color {
    grid-template-columns: 1fr; grid-template-areas: "acc" "hex" "rgb" "con";
    align-content: end; min-height: 230px; padding: 18px;
  }
}
html:not(#z) body main.ps .pal-hex {
  grid-area: hex; justify-self: start; background: none; border: 0; padding: 0; color: inherit;
  font: 800 1.35rem/1.1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .02em; cursor: copy;
}
html:not(#z) body main.ps .pal-hex:hover { text-decoration: underline; }
html:not(#z) body main.ps .pal-rgb,
html:not(#z) body main.ps .pal-contraste { font-size: .8rem; opacity: .85; }
html:not(#z) body main.ps .pal-rgb { grid-area: rgb; }
html:not(#z) body main.ps .pal-contraste { grid-area: con; }
html:not(#z) body main.ps .pal-acciones { grid-area: acc; display: flex; gap: 8px; align-items: center; }
@media (min-width: 900px) { html:not(#z) body main.ps .pal-acciones { margin-bottom: auto; justify-content: space-between; } }
html:not(#z) body main.ps .pal-acciones button,
html:not(#z) body main.ps .pal-acciones .pal-editar {
  min-height: 40px; min-width: 40px; border-radius: 999px; font: inherit; font-size: .8rem; font-weight: 600;
  border: 1.5px solid currentColor; background: transparent; color: inherit; padding: 0 12px;
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer; box-sizing: border-box;
}
html:not(#z) body main.ps .pal-editar { position: relative; overflow: hidden; }
html:not(#z) body main.ps .pal-editar::after { content: "Editar"; }
html:not(#z) body main.ps .pal-editar input {
  position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; border: 0; padding: 0;
}
html:not(#z) body main.ps .pal-color.is-fijo .pal-candado { box-shadow: inset 0 0 0 40px rgba(0,0,0,.2); }

html:not(#z) body main.ps .pal-exportar { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; }
html:not(#z) body main.ps .pal-exportar button {
  min-height: 44px; border-radius: 10px; font: inherit; font-size: .9rem; font-weight: 600; cursor: pointer;
  border: 1.5px solid var(--ps-rule); background: var(--ps-soft); color: var(--ps-ink); padding: 0 14px;
}
html:not(#z) body main.ps .pal-aviso { min-height: 1.5em; margin: 8px 0 0; font-size: .9rem; font-weight: 600; color: var(--ps-ink); }

/* ---------- vista previa de una web ---------- */
html:not(#z) body main.ps .pal-vista {
  --v-texto: #111; --v-fondo: #fff; --v-principal: #2f6fed; --v-sobre-principal: #fff;
  --v-acento: #f59e0b; --v-sobre-acento: #111; --v-suave: #dbe6fb; --v-sobre-suave: #111;
  background: var(--v-fondo); color: var(--v-texto); border-radius: 16px; overflow: hidden;
  border: 1px solid var(--ps-rule); margin: 8px 0 0; transition: background .25s, color .25s;
}
html:not(#z) body main.ps .pal-vista * { transition: background .25s, color .25s; }
html:not(#z) body main.ps .v-barra {
  display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 20px;
  background: var(--v-principal); color: var(--v-sobre-principal); font-weight: 700;
}
html:not(#z) body main.ps .v-barra span:last-child { font-weight: 500; font-size: .85rem; opacity: .9; }
html:not(#z) body main.ps .v-hero { padding: 32px 20px 24px; }
html:not(#z) body main.ps .v-hero strong {
  display: block; font-size: clamp(1.4rem, 1.1rem + 1.5vw, 2.2rem); line-height: 1.1; margin: 0 0 10px; color: var(--v-texto);
}
html:not(#z) body main.ps .v-hero p { margin: 0 0 18px; max-width: 48ch; color: var(--v-texto); opacity: .85; }
html:not(#z) body main.ps .v-botones { display: flex; flex-wrap: wrap; gap: 10px; }
html:not(#z) body main.ps .v-boton {
  display: inline-block; padding: 12px 18px; border-radius: 10px; font-weight: 700; font-size: .95rem;
  background: var(--v-acento); color: var(--v-sobre-acento);
}
html:not(#z) body main.ps .v-boton--2 { background: transparent; color: var(--v-texto); box-shadow: inset 0 0 0 2px var(--v-principal); }
html:not(#z) body main.ps .v-tarjetas { display: grid; grid-template-columns: 1fr; gap: 12px; padding: 0 20px 24px; }
@media (min-width: 700px) { html:not(#z) body main.ps .v-tarjetas { grid-template-columns: repeat(3, 1fr); } }
html:not(#z) body main.ps .v-tarjeta { background: var(--v-suave); color: var(--v-sobre-suave); border-radius: 12px; padding: 16px; font-size: .9rem; }
html:not(#z) body main.ps .v-tarjeta b { display: block; margin-bottom: 4px; }

html:not(#z) body main.ps .pal-cta {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px;
  margin: 16px 0 0; padding: 18px 20px; border-radius: 14px; background: var(--ps-soft);
}
html:not(#z) body main.ps .pal-cta p { margin: 0; max-width: 60ch; color: var(--ps-text); }
html:not(#z) body main.ps .pal-cta a.btn-primary { white-space: nowrap; }
@media (max-width: 479.98px) { html:not(#z) body main.ps .pal-cta a.btn-primary { white-space: normal; width: 100%; text-align: center; } }

/* ---------- paletas por rubro ---------- */
html:not(#z) body main.ps .pal-rubros {
  list-style: none; padding: 0; margin: 0; display: grid; gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
}
html:not(#z) body main.ps .pal-rubros > li {
  margin: 0; padding: 14px; border: 1px solid var(--ps-rule); border-radius: 14px; background: var(--ps-paper);
}
html:not(#z) body main.ps .pal-rubros > li::before { display: none; content: none; }
html:not(#z) body main.ps .pal-tira { display: flex; height: 44px; border-radius: 8px; overflow: hidden; margin: 0 0 10px; }
html:not(#z) body main.ps .pal-tira i { flex: 1; }
html:not(#z) body main.ps .pal-rubros p { margin: 0 0 10px; font-size: .9rem; color: var(--ps-muted); line-height: 1.5; }
html:not(#z) body main.ps .pal-rubros button {
  min-height: 40px; border-radius: 999px; font: inherit; font-size: .85rem; font-weight: 700; cursor: pointer;
  border: 1.5px solid var(--ps-ink); background: var(--ps-paper); color: var(--ps-ink); padding: 0 14px;
}

/* hero compacto: la herramienta tiene que verse sin bajar */
html:not(#z) body main.ps.pal-pagina > section.pagina-intro { padding-top: 24px !important; padding-bottom: 22px !important; }
@media (min-width: 1024px) {
  html:not(#z) body main.ps.pal-pagina > section.pagina-intro { padding-top: 36px !important; padding-bottom: 28px !important; }
}
html:not(#z) body main.ps.pal-pagina .pagina-intro h1 { margin: 0 0 12px !important; font-size: clamp(1.75rem, 1.3rem + 2.2vw, 3rem) !important; }
html:not(#z) body main.ps.pal-pagina .pagina-intro > p.lead { margin: 0 !important; }
html:not(#z) body main.ps .pal-controles p.pal-atajo { font-size: .85rem !important; line-height: 1.3 !important; margin: 0 !important; }
html:not(#z) body main.ps .pal-controles select { flex: 1 1 180px; max-width: 260px; }
