/* ============================================================================
   une.css — componentes del Verificador UNE 197001 sobre la base de marca
   mereba.css. Sin dependencias: sin CDN, sin frameworks, iconos del sprite
   SVG de layout.html. Todo bajo .app-une para no afectar a otras apps.

   Índice:
     1. Página y secciones      5. Resultado de la verificación
     2. Hero y zona de subida   6. Planes y activación de licencia
     3. Pasos y propuesta       7. Historial
     4. Gratis / con plan, FAQ  8. Métricas (panel interno)
   ========================================================================== */

/* ---- 1. Página y secciones ---------------------------------------------- */
.app-une main { padding-top: clamp(1.2rem, 3vw, 2.4rem); }
.app-une .section { margin-bottom: var(--sp-5); }
.app-une .section-title { margin-bottom: var(--sp-3); }
.app-une .section-title p { max-width: var(--measure); color: var(--text-dim); }
.app-une .page-head { margin-bottom: var(--sp-4); }
.app-une .page-head .lead { max-width: var(--measure); }
.app-une .kicker { font-size: var(--fs-sm); font-weight: 600; color: var(--accent-2);
  margin-bottom: .35rem; }
.app-une .note { font-size: var(--fs-sm); color: var(--text-dim); max-width: 70ch; }
.app-une .actions { display: flex; flex-wrap: wrap; gap: var(--sp-1) var(--sp-2);
  align-items: center; }
.app-une .stack > * + * { margin-top: var(--sp-2); }

/* Fila de estado (progreso del análisis, avisos de licencia, errores) */
.app-une .estado {
  margin-top: var(--sp-2); padding: .6rem .8rem; border-radius: var(--r-sm);
  font-size: var(--fs-sm); border: 1px solid var(--border);
}
.app-une .estado.info  { background: var(--info-weak); color: var(--info); border-color: transparent; }
.app-une .estado.warn  { background: var(--warn-weak); color: var(--warn); border-color: transparent; }
.app-une .estado.error { background: var(--crit-weak); color: var(--crit); border-color: transparent; }
.app-une .estado.ok    { background: var(--ok-weak);   color: var(--ok);   border-color: transparent; }
.app-une .estado a { color: inherit; text-decoration: underline; font-weight: 600; }

/* ---- 2. Hero y zona de subida ------------------------------------------- */
.app-une .hero {
  display: grid; gap: var(--sp-5);
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  align-items: center; margin-bottom: var(--sp-6);
}
.app-une .hero-copy h1 { max-width: 20ch; }
.app-une .hero-copy .lead { max-width: 44ch; margin-bottom: var(--sp-4); }
.app-une .trust { list-style: none; display: flex; flex-direction: column; gap: .55rem;
  font-size: var(--fs-sm); color: var(--text-dim); }
.app-une .trust li { display: flex; gap: .55rem; align-items: flex-start; }
.app-une .trust .ico { color: var(--accent); margin-top: .15em; }
.app-une .trust strong { color: var(--text); }

/* La hoja: tarjeta de subida con el sello de privacidad. Es el único elemento
   con carácter propio de la página; todo lo demás se mantiene sobrio. */
.app-une .sheet {
  position: relative; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r); box-shadow: var(--shadow-lg);
  padding: clamp(1.1rem, 2.5vw, 1.6rem);
}
.app-une .sheet::before {          /* filo superior verde, como el cabezal de un informe */
  content: ""; position: absolute; inset: 0 0 auto 0; height: 5px;
  background: var(--accent); border-radius: var(--r) var(--r) 0 0;
}
.app-une .seal {
  position: absolute; top: -1.5rem; right: -1rem; width: 7.4rem; height: 7.4rem;
  transform: rotate(-9deg); color: var(--accent); pointer-events: none;
  filter: drop-shadow(0 2px 3px rgba(11,61,46,.18));
}
.app-une .seal text { font: 700 9.4px var(--font); letter-spacing: .12em; fill: currentColor; }
.app-une .seal .seal-ico { stroke: currentColor; fill: none; stroke-width: 5.5;
  stroke-linecap: round; stroke-linejoin: round; }

.app-une .drop {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: .45rem; text-align: center; padding: clamp(1.6rem, 4vw, 2.6rem) 1rem;
  margin-top: .4rem;
  border: 2px dashed var(--border-strong); border-radius: 12px;
  background: var(--surface-2); cursor: pointer; transition: border-color .15s, background .15s;
  font-weight: 400; color: var(--text);
}
.app-une .drop:hover, .app-une .drop.dragging,
.app-une .drop:has(input:focus-visible) { border-color: var(--accent); background: var(--accent-weak); }
.app-une .drop.has-file { border-style: solid; border-color: var(--accent); }
.app-une .drop-icon { width: 2.4rem; height: 2.4rem; color: var(--accent); stroke-width: 1.6; }
.app-une .drop-text { font-size: 1.05rem; }
.app-une .drop-text strong { color: var(--accent); }
.app-une .drop-hint { font-size: var(--fs-sm); color: var(--text-dim); }
.app-une .drop-file { font-size: var(--fs-sm); font-weight: 600; color: var(--accent);
  word-break: break-all; }
.app-une .drop-file:empty { display: none; }
.app-une .sheet .actions { margin-top: var(--sp-3); }
.app-une .sheet .btn { min-height: 46px; padding-inline: 1.2rem; font-size: 1rem; }
.app-une .sheet .note { flex: 1 1 14rem; margin: 0; }

@media (max-width: 880px) {
  .app-une .hero { grid-template-columns: 1fr; gap: var(--sp-4); margin-bottom: var(--sp-5); }
  .app-une .hero-copy h1 { max-width: none; }
  .app-une .seal { right: .2rem; top: -1.1rem; width: 5.4rem; height: 5.4rem; }
}

/* ---- 3. Pasos y propuesta ----------------------------------------------- */
.app-une .steps { list-style: none; counter-reset: paso;
  display: grid; gap: var(--sp-4); grid-template-columns: repeat(3, minmax(0, 1fr)); }
.app-une .steps li { counter-increment: paso; padding-top: var(--sp-2);
  border-top: 2px solid var(--accent); }
.app-une .steps li::before { content: counter(paso); display: inline-grid; place-items: center;
  width: 1.7rem; height: 1.7rem; border-radius: 50%; margin-bottom: .55rem;
  background: var(--accent); color: var(--accent-contrast);
  font: 700 .9rem var(--font-brand); }
.app-une .steps h3 { margin-bottom: .25rem; }
.app-une .steps p { color: var(--text-dim); font-size: var(--fs-sm); }

.app-une .props { display: grid; gap: var(--sp-4) var(--sp-5);
  grid-template-columns: repeat(2, minmax(0, 1fr)); }
.app-une .prop { display: grid; grid-template-columns: auto 1fr; gap: .8rem; align-items: start; }
.app-une .prop .ico { width: 1.9rem; height: 1.9rem; stroke-width: 1.7; color: var(--accent);
  padding: .3rem; background: var(--accent-weak); border-radius: 9px; box-sizing: content-box; }
.app-une .prop h3 { margin-bottom: .2rem; }
.app-une .prop p { color: var(--text-dim); font-size: var(--fs-sm); }

@media (max-width: 720px) {
  .app-une .steps { grid-template-columns: 1fr; gap: var(--sp-3); }
  .app-une .props { grid-template-columns: 1fr; }
}

/* ---- 4. Gratis / con plan, FAQ ------------------------------------------ */
.app-une .compare { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  border: 1px solid var(--border); border-radius: var(--r); overflow: hidden;
  background: var(--surface); }
.app-une .compare > div { padding: clamp(1rem, 2.4vw, 1.5rem); }
.app-une .compare > div + div { border-left: 1px solid var(--border); }
.app-une .compare .plus { background: var(--accent-weak); }
.app-une .compare h3 { display: flex; align-items: baseline; gap: .6rem; margin-bottom: .6rem; }
.app-une .compare h3 small { font-weight: 500; color: var(--text-dim); font-size: var(--fs-sm); }
.app-une .compare .btn { margin-top: var(--sp-3); }
@media (max-width: 640px) {
  .app-une .compare { grid-template-columns: 1fr; }
  .app-une .compare > div + div { border-left: 0; border-top: 1px solid var(--border); }
}

/* Lista de prestaciones con check verde (planes, comparativa) */
.app-une .feats { list-style: none; display: flex; flex-direction: column; gap: .4rem;
  font-size: var(--fs-sm); color: var(--text-dim); }
.app-une .feats li { display: flex; gap: .5rem; align-items: flex-start; }
.app-une .feats .ico { color: var(--accent); margin-top: .15em; stroke-width: 2.4; }
.app-une .feats strong { color: var(--text); }

.app-une .faq { border-top: 1px solid var(--border); }
.app-une .faq details { border-bottom: 1px solid var(--border); }
.app-une .faq summary { list-style: none; cursor: pointer; padding: .9rem 2.2rem .9rem 0;
  font-weight: 600; font-size: 1rem; position: relative; }
.app-une .faq summary::-webkit-details-marker { display: none; }
.app-une .faq summary::after { content: ""; position: absolute; right: .4rem; top: 50%;
  width: .55rem; height: .55rem; border-right: 2px solid var(--text-faint);
  border-bottom: 2px solid var(--text-faint); transform: translateY(-70%) rotate(45deg);
  transition: transform .15s; }
.app-une .faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.app-une .faq details > p { color: var(--text-dim); font-size: var(--fs-sm);
  padding-bottom: 1rem; max-width: 72ch; }

/* ---- 5. Resultado de la verificación ------------------------------------ */
.app-une .report-head { border-top: 5px solid var(--accent); }
.app-une .report-verdict { display: grid; grid-template-columns: auto 1fr; gap: 1.2rem;
  align-items: center; }
.app-une .report-verdict .score {
  font-family: var(--font-brand); font-size: 3rem; font-weight: 800; line-height: 1;
  letter-spacing: -.03em; min-width: 5.2rem; text-align: center;
  padding: .7rem .6rem; border-radius: var(--r);
  font-variant-numeric: tabular-nums;
}
.app-une .report-verdict .score small { display: block; font-family: var(--font);
  font-size: var(--fs-xs); font-weight: 600; letter-spacing: 0; opacity: .8; margin-top: .2rem; }
.app-une .report-verdict.ok   .score { background: var(--ok-weak);   color: var(--ok); }
.app-une .report-verdict.warn .score { background: var(--warn-weak); color: var(--warn); }
.app-une .report-verdict.fail .score { background: var(--crit-weak); color: var(--crit); }
.app-une .report-verdict h1 { font-size: var(--fs-3); margin-bottom: .2rem; }
.app-une .report-verdict .report-meta { color: var(--text-dim); font-size: var(--fs-sm); margin: 0; }
.app-une .report-head .stats { margin-top: var(--sp-3); }
@media (max-width: 520px) {
  .app-une .report-verdict { grid-template-columns: 1fr; }
  .app-une .report-verdict .score { justify-self: start; }
}

/* Barra de acciones del resultado: se pega abajo mientras se lee el detalle */
.app-une .report-actions {
  position: sticky; bottom: 0; z-index: 20;
  display: flex; flex-wrap: wrap; gap: .6rem 1rem; align-items: center;
  justify-content: space-between;
  padding: .75rem clamp(.8rem, 2vw, 1.2rem);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  border: 1px solid var(--border); border-radius: var(--r); box-shadow: var(--shadow-lg);
  margin: var(--sp-4) 0;
}
.app-une .report-actions .report-status { flex: 1 1 18rem; font-size: var(--fs-sm);
  color: var(--text-dim); }
.app-une .report-actions .report-status strong { color: var(--text); }
.app-une .report-actions .actions { flex: 0 0 auto; }
.app-une .report-actions .estado { flex: 1 1 100%; margin-top: 0; }

.app-une .ap-title { font-size: var(--fs-1); margin: 0 0 .6rem; padding-bottom: .4rem;
  border-bottom: 1px solid var(--border); }
.app-une .checks { display: flex; flex-direction: column; gap: .45rem; }
.app-une .check {
  display: flex; gap: .7rem; align-items: flex-start;
  padding: .7rem .85rem; border: 1px solid var(--border); border-radius: 10px;
  background: var(--surface); border-left-width: 4px;
}
.app-une .check.row-ok    { border-left-color: var(--ok); }
.app-une .check.row-warn  { border-left-color: var(--warn); }
.app-une .check.row-crit  { border-left-color: var(--crit); }
.app-une .check.row-muted { border-left-color: var(--muted); }
.app-une .check-ico {
  flex: none; width: 1.6rem; height: 1.6rem; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center; margin-top: .1rem;
}
.app-une .check-ico .ico { width: 1rem; height: 1rem; stroke-width: 2.6; }
.app-une .check-ico.ok    { background: var(--ok-weak);   color: var(--ok); }
.app-une .check-ico.warn  { background: var(--warn-weak); color: var(--warn); }
.app-une .check-ico.crit  { background: var(--crit-weak); color: var(--crit); }
.app-une .check-ico.muted { background: var(--muted-weak); color: var(--muted); }
.app-une .check-body { min-width: 0; }
.app-une .check-title { font-weight: 650; display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.app-une .check-detail { font-size: var(--fs-sm); margin-top: .2rem; }

/* Tarjeta de upgrade (resumen gratuito) y bloque de transparencia */
.app-une .lock-card { border-left: 5px solid var(--accent-2); }
.app-une .lock-card h2 { display: flex; align-items: center; gap: .5rem; font-size: var(--fs-2); }
.app-une .lock-card h2 .ico { color: var(--accent-2); }
.app-une .lock-card p { max-width: 72ch; color: var(--text-dim); }
.app-une .lock-card .actions { margin-top: var(--sp-3); }
.app-une .registro h3 { display: flex; align-items: center; gap: .5rem; }
.app-une .registro h3 .ico { color: var(--accent); }
.app-une .registro p { max-width: 74ch; color: var(--text-dim); font-size: var(--fs-sm); }
.app-une .registro .hash { font-size: var(--fs-xs); word-break: break-all; margin-top: .6rem; }
.app-une .disclaimer { font-size: var(--fs-xs); color: var(--text-faint); max-width: 74ch; }

/* Prompt para el agente de IA */
.app-une .prompt-card h2 { display: flex; align-items: center; gap: .5rem; font-size: var(--fs-2); }
.app-une .prompt-card h2 .ico { color: var(--accent-2); }
.app-une .prompt-card textarea { width: 100%; min-height: 14rem; font-family: var(--mono);
  font-size: .84rem; line-height: 1.45; resize: vertical; }
.app-une .prompt-card .actions { margin-top: var(--sp-2); }

/* ---- 6. Planes y activación de licencia --------------------------------- */
.app-une .plans { display: grid; gap: var(--sp-3);
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); align-items: stretch; }
.app-une .plan { display: flex; flex-direction: column; position: relative;
  padding: clamp(1.1rem, 2.4vw, 1.5rem); }
.app-une .plan.featured { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), var(--shadow-lg); }
.app-une .plan-tag { position: absolute; top: -.75rem; left: 1.1rem;
  padding: .2rem .65rem; border-radius: var(--r-pill);
  background: var(--accent); color: var(--accent-contrast);
  font-size: var(--fs-xs); font-weight: 700; }
.app-une .plan-name { font-family: var(--font-brand); font-size: var(--fs-1); font-weight: 700;
  margin-bottom: .5rem; }
.app-une .plan-price { display: flex; align-items: baseline; gap: .4rem; flex-wrap: wrap;
  font-family: var(--font-brand); font-size: 2.1rem; font-weight: 800; letter-spacing: -.02em;
  line-height: 1; color: var(--accent); }
.app-une .plan-price small { font-family: var(--font); font-size: var(--fs-xs); font-weight: 600;
  color: var(--text-dim); letter-spacing: 0; }
.app-une .plan-tax { font-size: var(--fs-xs); color: var(--text-faint); margin: .35rem 0 0; }
.app-une .plan-detail { font-size: var(--fs-xs); color: var(--text-dim); margin-top: .6rem; }
.app-une .plan .feats { margin: var(--sp-3) 0 var(--sp-4); }
.app-une .plan .btn { margin-top: auto; }
.app-une .plan-after { font-size: var(--fs-xs); color: var(--text-dim); margin-top: .6rem; }

.app-une .lic-card { display: grid; gap: var(--sp-3) var(--sp-5);
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); align-items: start; }
.app-une .lic-card h2 { display: flex; align-items: center; gap: .5rem; font-size: var(--fs-2); }
.app-une .lic-card h2 .ico { color: var(--accent); }
.app-une .lic-card p { color: var(--text-dim); font-size: var(--fs-sm); }
.app-une .lic-form { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.app-une .lic-form input { flex: 1 1 14rem; font-family: var(--mono); text-transform: uppercase;
  letter-spacing: .06em; }
.app-une .lic-msg { font-size: var(--fs-sm); color: var(--text-dim); margin-top: .5rem; }
.app-une .lic-msg:empty { display: none; }
@media (max-width: 720px) { .app-une .lic-card { grid-template-columns: 1fr; } }

.app-une .howto { columns: 2; column-gap: var(--sp-5); }
.app-une .howto li { break-inside: avoid; margin-bottom: .6rem; padding-left: 1.1rem;
  font-size: var(--fs-sm); color: var(--text-dim); }
.app-une .howto strong { color: var(--text); }
@media (max-width: 720px) { .app-une .howto { columns: 1; } }

/* ---- 7. Historial ------------------------------------------------------- */
.app-une .empty { display: flex; flex-direction: column; align-items: flex-start; gap: .6rem;
  padding: clamp(1.2rem, 3vw, 2rem); border: 1px dashed var(--border-strong);
  border-radius: var(--r); background: var(--surface); }
.app-une .empty .ico { width: 2rem; height: 2rem; color: var(--accent); stroke-width: 1.6; }
.app-une .empty p { color: var(--text-dim); max-width: 52ch; }
.app-une td.center, .app-une th.center { text-align: center; }

/* ---- 7b. Páginas legales (privacidad, cookies, aviso legal) -------------- */
.app-une .legal { max-width: 76ch; }
.app-une .legal .updated { font-size: var(--fs-xs); color: var(--text-faint); margin-bottom: var(--sp-3); }
.app-une .legal h2 { font-size: var(--fs-2); margin: var(--sp-4) 0 var(--sp-2); }
.app-une .legal h2:first-of-type { margin-top: 0; }
.app-une .legal p, .app-une .legal li { color: var(--text-dim); }
.app-une .legal ul, .app-une .legal ol { padding-left: 1.2rem; margin-bottom: var(--sp-2); }
.app-une .legal li { margin-bottom: .35rem; }
.app-une .legal strong { color: var(--text); }
.app-une .legal .table-wrap { margin: var(--sp-2) 0 var(--sp-3); }
.app-une .legal table td { vertical-align: top; font-size: var(--fs-sm); }
.app-une .legal .callout { padding: .9rem 1rem; border-radius: var(--r-sm);
  background: var(--accent-weak); border-left: 4px solid var(--accent); margin: var(--sp-2) 0 var(--sp-3); }
.app-une .legal .callout p { color: var(--text); }

/* ---- 8. Métricas (panel interno) ---------------------------------------- */
.app-une .window { display: inline-flex; gap: .25rem; margin-top: .4rem; }
.app-une .window a, .app-une .window strong { display: inline-flex; align-items: center;
  min-height: 32px; padding: 0 .7rem; border-radius: var(--r-sm); font-size: var(--fs-sm);
  border: 1px solid var(--border); background: var(--surface); color: var(--text-dim); }
.app-une .window strong { background: var(--accent); color: var(--accent-contrast);
  border-color: var(--accent); }
.app-une .window a:hover { background: var(--surface-2); text-decoration: none; }

.app-une .funnel { list-style: none; display: flex; flex-direction: column; }
.app-une .funnel li { display: grid; grid-template-columns: 7ch 1fr; gap: .4rem 1rem;
  align-items: center; padding: .6rem 0; border-top: 1px solid var(--border); }
.app-une .funnel .n { font-family: var(--font-brand); font-size: 1.5rem; font-weight: 700;
  font-variant-numeric: tabular-nums; text-align: right; }
.app-une .funnel .bar { height: .55rem; border-radius: var(--r-pill); background: var(--surface-2);
  overflow: hidden; }
.app-une .funnel .bar i { display: block; height: 100%; background: var(--accent);
  border-radius: inherit; }
.app-une .funnel .lab { grid-column: 2; font-size: var(--fs-sm); color: var(--text-dim); }
.app-une .funnel .lab strong { color: var(--text); }
.app-une .funnel .rate { grid-column: 1; text-align: right; font-size: var(--fs-xs);
  color: var(--text-faint); font-variant-numeric: tabular-nums; }
.app-une .metric-grid { display: grid; gap: var(--sp-3);
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.app-une .metric-grid h2 { font-size: var(--fs-1); }
.app-une .metric-grid table { font-size: var(--fs-sm); }

/* Anchos del embudo en pasos de 5%, para no depender de style="width:…"
   (los tests prohíben estilos inline salvo display:none). */
.app-une .funnel .w0{width:0}.app-une .funnel .w5{width:5%}.app-une .funnel .w10{width:10%}.app-une .funnel .w15{width:15%}.app-une .funnel .w20{width:20%}.app-une .funnel .w25{width:25%}.app-une .funnel .w30{width:30%}.app-une .funnel .w35{width:35%}.app-une .funnel .w40{width:40%}.app-une .funnel .w45{width:45%}.app-une .funnel .w50{width:50%}
.app-une .funnel .w55{width:55%}.app-une .funnel .w60{width:60%}.app-une .funnel .w65{width:65%}.app-une .funnel .w70{width:70%}.app-une .funnel .w75{width:75%}.app-une .funnel .w80{width:80%}.app-une .funnel .w85{width:85%}.app-une .funnel .w90{width:90%}.app-une .funnel .w95{width:95%}.app-une .funnel .w100{width:100%}
