/* cl_herramientas — estilos comunes de las herramientas (todo bajo .clh para no chocar con el tema) */
.clh {
  --clh-fucsia: #fa026f;
  --clh-azul: #2ea8e3;
  --clh-negro: #0b0b0f;
  --clh-bien: #16a34a;
  --clh-regular: #f59e0b;
  --clh-mal: #dc2626;
  --clh-gris: #9ca3af;
  --clh-borde: #e5e7eb;
  --clh-suave: #f6f7f9;
  color: #1f2937;
  font-size: 16px;
  line-height: 1.55;
  max-width: 1100px;
  margin: 0 auto;
}
.clh *, .clh *::before, .clh *::after { box-sizing: border-box; }
.clh [hidden] { display: none !important; }
.clh-h2 { font-size: 1.5rem; margin: 0 0 .4rem; }
.clh-h3 { font-size: 1.2rem; margin: 0 0 .6rem; display: flex; align-items: center; gap: .6rem; }
.clh-muted, .clh-nota { color: #6b7280; font-size: .9rem; }
.clh label, .clh .clh-label { text-align: left; }
.clh-label { display: block; font-weight: 600; margin: 0 0 .4rem; }

/* formularios */
.clh-form { display: flex; flex-direction: column; gap: .8rem; }
.clh-form label { font-size: .95rem; }
.clh-fila { display: flex; gap: .6rem; flex-wrap: wrap; }
.clh-fila .clh-input { flex: 1 1 260px; }
.clh-input { width: 100%; padding: .75rem .9rem; border: 1px solid #d1d5db; border-radius: 10px; font: inherit; background: #fff; color: inherit; }
.clh-input:focus { outline: 2px solid var(--clh-azul); outline-offset: 1px; border-color: transparent; }
.clh input[type=color] { width: 44px; height: 34px; border: 1px solid #d1d5db; border-radius: 8px; padding: 2px; vertical-align: middle; background: #fff; }
.clh input[type=range] { width: 100%; accent-color: var(--clh-fucsia); }
.clh-check { display: flex; align-items: center; gap: .5rem; cursor: pointer; }
.clh-check input { accent-color: var(--clh-fucsia); width: 18px; height: 18px; }
.clh-grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: .7rem; }
.clh-grid2 label { display: flex; flex-direction: column; gap: .3rem; }
.clh-grid2 label.clh-check { flex-direction: row; }

.clh-btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; padding: .75rem 1.3rem; border: 0; border-radius: 10px;
  background: linear-gradient(90deg, var(--clh-fucsia), var(--clh-azul)); color: #fff !important; font-weight: 700; font-size: 1rem; cursor: pointer;
  text-decoration: none !important; transition: transform .15s, box-shadow .15s; }
.clh-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(250, 2, 111, .25); }
.clh-btn:disabled { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }
.clh-btn-sec { background: #fff; color: var(--clh-negro) !important; border: 1px solid #d1d5db; }
.clh-btn-sec:hover { box-shadow: 0 4px 12px rgba(0, 0, 0, .08); }
.clh-acciones { display: flex; gap: .6rem; flex-wrap: wrap; margin: .8rem 0; }

.clh-error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; padding: .8rem 1rem; border-radius: 10px; }
.clh-exito { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; padding: .8rem 1rem; border-radius: 10px; }

/* pestañas de tipo */
.clh-tipos { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.clh-tipo input { position: absolute; opacity: 0; pointer-events: none; }
.clh-tipo span { display: inline-block; padding: .45rem .9rem; border: 1px solid #d1d5db; border-radius: 999px; cursor: pointer; font-size: .92rem; background: #fff; }
.clh-tipo input:checked + span { background: var(--clh-negro); color: #fff; border-color: var(--clh-negro); }
.clh-tipo input:focus-visible + span { outline: 2px solid var(--clh-azul); outline-offset: 2px; }

/* progreso */
.clh-progreso { display: flex; align-items: center; gap: 1rem; padding: 1.4rem; background: var(--clh-suave); border-radius: 14px; margin: 1rem 0; }
.clh-spinner { width: 34px; height: 34px; border-radius: 50%; border: 4px solid #e5e7eb; border-top-color: var(--clh-fucsia); animation: clh-giro 1s linear infinite; flex: none; }
@keyframes clh-giro { to { transform: rotate(360deg); } }

/* resultado del analizador */
.clh-resultado { margin-top: 1.5rem; }
.clh-cabecera, .clh-ps-cab { display: flex; gap: 1.5rem; align-items: center; flex-wrap: wrap; padding: 1.5rem; border-radius: 16px;
  background: radial-gradient(circle at 10% 10%, rgba(250, 2, 111, .12), transparent 55%), radial-gradient(circle at 90% 90%, rgba(46, 168, 227, .14), transparent 55%), #fff;
  border: 1px solid var(--clh-borde); }
.clh-cabecera-txt { flex: 1 1 300px; }
.clh-veredicto { font-size: 1.05rem; margin: 0 0 .3rem; }
.clh-plataforma { color: #4b5563; margin: 0; }
.clh-gauge { --clh-c: var(--clh-gris); width: 128px; height: 128px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: conic-gradient(var(--clh-c) calc(var(--clh-p) * 1%), #eef0f3 0); }
.clh-gauge-num { width: 100px; height: 100px; border-radius: 50%; background: #fff; display: grid; place-content: center; text-align: center; }
.clh-gauge-num strong { font-size: 2.2rem; line-height: 1; }
.clh-gauge-num span { color: #6b7280; font-size: .85rem; }
.clh-gauge.clh-bien { --clh-c: var(--clh-bien); }
.clh-gauge.clh-regular { --clh-c: var(--clh-regular); }
.clh-gauge.clh-mal { --clh-c: var(--clh-mal); }

.clh-categorias { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: .8rem; margin: 1.2rem 0; }
.clh-cat { display: flex; flex-direction: column; gap: .3rem; padding: 1rem; border: 1px solid var(--clh-borde); border-radius: 12px; color: inherit !important; text-decoration: none !important; background: #fff; }
.clh-cat:hover { box-shadow: 0 6px 18px rgba(0, 0, 0, .06); }
.clh-cat-nombre { font-weight: 600; color: #4b5563; }
.clh-cat-nota { font-size: 1.8rem; line-height: 1; }
.clh-barra { display: block; height: 6px; background: #eef0f3; border-radius: 99px; overflow: hidden; }
.clh-barra > span { display: block; height: 100%; width: 0; background: var(--clh-gris); border-radius: 99px; transition: width .4s; }
.clh-bien .clh-barra > span, .clh-barra.clh-bien > span { background: var(--clh-bien); }
.clh-regular .clh-barra > span, .clh-barra.clh-regular > span { background: var(--clh-regular); }
.clh-mal .clh-barra > span, .clh-barra.clh-mal > span { background: var(--clh-mal); }
.clh-cat.clh-bien .clh-cat-nota { color: var(--clh-bien); }
.clh-cat.clh-regular .clh-cat-nota { color: #b45309; }
.clh-cat.clh-mal .clh-cat-nota { color: var(--clh-mal); }
.clh-pill { font-size: .8rem; padding: .15rem .55rem; border-radius: 99px; color: #fff; background: var(--clh-gris); }
.clh-pill.clh-bien { background: var(--clh-bien); }
.clh-pill.clh-regular { background: var(--clh-regular); }
.clh-pill.clh-mal { background: var(--clh-mal); }

.clh-detalle { margin: 1.6rem 0; scroll-margin-top: 90px; }
.clh-checks { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.clh-check-item { display: flex; gap: .8rem; padding: .9rem 1rem; border: 1px solid var(--clh-borde); border-radius: 12px; background: #fff; }
.clh-check-item p { margin: .2rem 0 0; color: #4b5563; }
.clh-icono { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; color: #fff; background: var(--clh-gris); font-size: .9rem; }
.clh-e-ok .clh-icono { background: var(--clh-bien); }
.clh-e-aviso .clh-icono { background: var(--clh-regular); }
.clh-e-mal .clh-icono { background: var(--clh-mal); }
.clh-e-mal { border-left: 4px solid var(--clh-mal); }
.clh-e-aviso { border-left: 4px solid var(--clh-regular); }
.clh-ayuda { display: inline-block; margin-top: .4rem; font-weight: 600; color: var(--clh-fucsia) !important; }

.clh-pagespeed { margin: 1.2rem 0; padding: 1.2rem; border: 1px solid var(--clh-borde); border-radius: 16px; background: #fff; }
.clh-pagespeed.clh-pendiente { display: flex; gap: 1rem; align-items: center; background: var(--clh-suave); }
.clh-pagespeed .clh-ps-cab { border: 0; padding: 0; background: none; }
.clh-metricas { list-style: none; padding: 0; margin: 1rem 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: .6rem; }
.clh-metricas li { display: flex; justify-content: space-between; gap: .5rem; padding: .6rem .8rem; border-radius: 10px; background: var(--clh-suave); border-left: 4px solid var(--clh-gris); }
.clh-metricas li.clh-bien { border-left-color: var(--clh-bien); }
.clh-metricas li.clh-regular { border-left-color: var(--clh-regular); }
.clh-metricas li.clh-mal { border-left-color: var(--clh-mal); }

.clh-contacto { margin-top: 2rem; padding: 1.6rem; border-radius: 16px; color: #fff;
  background: radial-gradient(circle at 15% 20%, rgba(250, 2, 111, .45), transparent 55%), radial-gradient(circle at 85% 85%, rgba(46, 168, 227, .4), transparent 55%), var(--clh-negro); }
.clh-contacto .clh-h3, .clh-contacto p, .clh-contacto label { color: #fff; }
.clh-contacto a { color: #fff; text-decoration: underline; }
.clh-contacto .clh-input { border-color: transparent; }

/* QR / favicon */
.clh-qr-layout { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 1.6rem; align-items: start; }
@media (max-width: 860px) { .clh-qr-layout { grid-template-columns: 1fr; } }
.clh-qr-preview { position: sticky; top: 100px; padding: 1.2rem; border: 1px solid var(--clh-borde); border-radius: 16px; background: var(--clh-suave); }
.clh-qr-img { aspect-ratio: 1; display: grid; place-items: center; background: repeating-conic-gradient(#eef0f3 0 25%, #fff 0 50%) 0 0 / 20px 20px; border-radius: 12px; padding: 1rem; }
.clh-qr-img img { width: 100%; height: auto; max-width: 360px; }
.clh-diseno { border: 1px solid var(--clh-borde); border-radius: 12px; padding: .8rem 1rem; background: #fff; }
.clh-diseno summary { font-weight: 700; cursor: pointer; margin-bottom: .6rem; }
.clh-logo { display: flex; flex-direction: column; gap: .3rem; margin-top: .6rem; }
.clh-fav-previews { display: flex; gap: 1rem; align-items: flex-end; flex-wrap: wrap; padding: 1rem; background: repeating-conic-gradient(#eef0f3 0 25%, #fff 0 50%) 0 0 / 16px 16px; border-radius: 12px; }
.clh-fav-previews figure { margin: 0; text-align: center; font-size: .8rem; color: #6b7280; }
.clh-fav-previews canvas { display: block; margin: 0 auto .3rem; image-rendering: auto; }
.clh-fav-pestana { margin: .8rem 0; }
.clh-fav-tab { display: inline-flex; align-items: center; gap: .5rem; padding: .45rem .9rem; background: #fff; border-radius: 10px 10px 0 0; border: 1px solid var(--clh-borde); border-bottom: 0; font-size: .85rem; }
.clh-codigo { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .8rem; }

/* contraseñas */
.clh-pw-salida { display: flex; gap: .5rem; align-items: stretch; flex-wrap: wrap; }
.clh-pw-valor { flex: 1 1 280px; padding: 1rem; border-radius: 12px; background: var(--clh-negro); color: #fff; font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 1.25rem; word-break: break-all; min-height: 3.4rem; }
.clh-pw-fuerza { display: flex; flex-direction: column; gap: .3rem; }
.clh-pw-fuerza-txt { font-size: .9rem; color: #4b5563; }
.clh-pw-lista { list-style: none; padding: 0; margin: 0; display: grid; gap: .4rem; }
.clh-pw-lista li { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; padding: .5rem .8rem; background: var(--clh-suave); border-radius: 8px; cursor: copy; word-break: break-all; }
.clh-pw-lista li.clh-copiada { background: #dcfce7; }
