/* =========================================================
   Auto Evaluación Ciber Seguridad · OTI
   Estilo terminal minimalista. Todo bajo .otiq para no
   chocar con Elementor. Colores de oti-ciber-v1.css.
   v1.5: bloque «Legibilidad y ajuste» al final del archivo.
   ========================================================= */
.otiq {
  --q-bg: #070F1F; --q-panel: rgba(12, 26, 51, .55);
  --q-acc: #5EFBD7; --q-acc2: #22D3EE; --q-warn: #FBBF24; --q-err: #F87171;
  --q-txt: #E8EEFA; --q-mut: #8FA3C4; --q-dim: #4A5B7A;
  --q-line: rgba(94, 251, 215, .14); --q-line2: rgba(94, 251, 215, .32);
  --q-font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --q-mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
  max-width: 860px; margin: 0 auto; container-type: inline-size; container-name: otiq; color: var(--q-txt); font: 400 16px/1.6 var(--q-font);
  text-align: left;
}
.otiq *, .otiq *::before, .otiq *::after { box-sizing: border-box; }
.otiq [hidden] { display: none !important; }
.otiq p { margin: 0; }
.otiq a { color: var(--q-acc); text-decoration: none; }
.otiq h3 { margin: 0; color: var(--q-txt) !important; font-family: var(--q-font) !important; letter-spacing: -.01em; }
.otiq button, .otiq input, .otiq select { font-family: var(--q-mono) !important; letter-spacing: 0; text-transform: none; }
.otiq .otiq-opt { font-family: var(--q-font) !important; }
.otiq button:focus { outline: none; }
.otiq button:focus-visible, .otiq a:focus-visible { outline: 1px dashed var(--q-acc); outline-offset: 2px; }

/* ---------- Ventana de terminal ---------- */
.otiq-term { border: 1px solid var(--q-line2); border-radius: 12px; background: var(--q-panel); backdrop-filter: blur(6px);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .3), 0 24px 60px -30px rgba(34, 211, 238, .35); overflow: hidden; position: relative; }
.otiq-bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; border-bottom: 1px solid var(--q-line); font: 12px var(--q-mono); color: var(--q-dim); }
.otiq-bar i { width: 9px; height: 9px; border-radius: 50%; background: var(--q-dim); opacity: .6; }
.otiq-bar span { margin-left: 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.otiq-body { padding: clamp(20px, 4vw, 36px); }
.otiq-in { animation: otiqIn .35s ease both; }

.otiq-cmd { font: 500 14px var(--q-mono); color: var(--q-acc); margin-bottom: 4px !important; }
.otiq-out { font: 13px var(--q-mono); color: var(--q-mut); margin-bottom: 26px !important; }
.otiq-row { display: inline-flex; gap: 14px; align-items: center; }

/* ---------- Botones ---------- */
.otiq-btn { display: inline-flex; align-items: center; gap: 10px; padding: 10px 18px; border-radius: 8px; cursor: pointer;
  font: 600 14px var(--q-mono); color: var(--q-acc) !important; background: transparent; border: 1px solid var(--q-acc);
  transition: background .15s, color .15s, box-shadow .15s; text-decoration: none; }
.otiq-btn:hover:not(:disabled) { background: var(--q-acc); color: var(--q-bg) !important; box-shadow: 0 0 18px rgba(94, 251, 215, .4); }
.otiq-btn:disabled { opacity: .4; cursor: default; }
.otiq-btn kbd { font: 11px var(--q-mono); padding: 1px 6px; border: 1px solid currentColor; border-radius: 4px; opacity: .7; background: none; color: inherit; }
.otiq-link-btn { background: none; border: 0; padding: 6px 0; cursor: pointer; font: 500 14px var(--q-mono); color: var(--q-mut); transition: color .15s; }
.otiq-link-btn:hover:not(:disabled) { color: var(--q-acc); }
.otiq-link-btn:disabled { opacity: .3; cursor: default; }

/* ---------- Registro ---------- */
.otiq-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 22px 28px; }
.otiq-form label { display: grid; gap: 4px; }
.otiq-form label:not(.otiq-consent) > span { font: 12px var(--q-mono); color: var(--q-dim); }
.otiq-form label:not(.otiq-consent) > span::before { content: "> "; color: var(--q-acc); }
.otiq-form input:not([type="checkbox"]), .otiq-form select {
  width: 100%; padding: 8px 0; border: 0; border-bottom: 1px solid var(--q-line2); border-radius: 0; background: transparent;
  color: var(--q-txt); font: 15px var(--q-mono); outline: none; transition: border-color .2s; -webkit-appearance: none; appearance: none; }
.otiq-form select { background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%235EFBD7'/%3E%3C/svg%3E") no-repeat right 4px center; padding-right: 20px; }
.otiq-form select option { background: #0C1A33; color: var(--q-txt); }
.otiq-form input::placeholder { color: var(--q-dim); }
.otiq-form input:focus, .otiq-form select:focus { border-bottom-color: var(--q-acc); }
.otiq-consent { grid-template-columns: 18px 1fr !important; gap: 12px !important; align-items: start; margin: 28px 0 18px; font-size: 13px; line-height: 1.5; color: var(--q-mut); }
.otiq-consent input { width: 16px; height: 16px; margin-top: 3px; accent-color: var(--q-acc); }
.otiq-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.otiq-error { min-height: 22px; margin-bottom: 14px; font: 13px var(--q-mono); color: var(--q-err); }
.otiq-error.shake { animation: otiqShake .3s; }
.otiq-resume { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; margin: -6px 0 26px;
  padding: 10px 14px; border-left: 2px solid var(--q-warn); background: rgba(251, 191, 36, .06); font: 13px var(--q-mono); color: var(--q-warn); }

/* ---------- Arranque / corrección ---------- */
.otiq-boot { min-height: 180px; font: 14px var(--q-mono); color: var(--q-mut); }
.otiq-line { animation: otiqIn .25s ease both; margin: 4px 0; }
.otiq-line b { color: var(--q-txt); font-weight: 500; }
.otiq-line em { font-style: normal; color: var(--q-acc); margin-left: 6px; }
.otiq-line.otiq-err { color: var(--q-err); }
.otiq-caret { display: inline-block; width: 8px; height: 15px; margin-left: 4px; vertical-align: -2px; background: var(--q-acc); animation: otiqBlink 1s steps(1) infinite; }
.otiq-spin { color: var(--q-acc); margin-left: 8px; }

/* ---------- Pregunta ---------- */
.otiq-head { display: flex; justify-content: space-between; gap: 12px; font: 13px var(--q-mono); color: var(--q-mut); }
.otiq-cat { font: 13px var(--q-mono); color: var(--q-acc); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.otiq-cat span { color: var(--q-mut); margin-left: 6px; }
.otiq-stat b { color: var(--q-txt); font-weight: 600; }
.otiq-timer.warn { color: var(--q-warn); animation: otiqBlink 1s steps(1) infinite; }
.otiq-ticks { display: flex; gap: 3px; margin: 12px 0 34px; }
.otiq-ticks i { flex: 1; height: 3px; border-radius: 2px; background: var(--q-line); transition: background .3s; }
.otiq-ticks i.gap { margin-left: 5px; }
.otiq-ticks i.on { background: var(--q-acc); opacity: .75; }
.otiq-ticks i.cur { background: var(--q-txt); opacity: 1; box-shadow: 0 0 8px var(--q-acc); }
.otiq-q.from-right { animation: otiqFromR .3s ease both; }
.otiq-q.from-left { animation: otiqFromL .3s ease both; }
.otiq .otiq-qtext { font-size: clamp(1.15rem, 2.4vw, 1.45rem) !important; font-weight: 600 !important; line-height: 1.35 !important; margin-bottom: 22px; }
.otiq-opts { display: grid; border-top: 1px solid var(--q-line); }
.otiq-opt { display: grid; grid-template-columns: 28px 1fr; gap: 14px; align-items: baseline; width: 100%; text-align: left;
  padding: 14px 10px 14px 12px; border: 0; border-bottom: 1px solid var(--q-line); border-left: 2px solid transparent; background: transparent;
  color: #C9D6EC; font: 15px/1.5 var(--q-font); cursor: pointer; transition: background .15s, color .15s, border-color .15s; }
.otiq-opt:hover { background: rgba(94, 251, 215, .04); color: var(--q-txt); }
.otiq-key { font: 600 13px var(--q-mono); color: var(--q-dim); transition: color .15s; }
.otiq-key::before { content: "["; } .otiq-key::after { content: "]"; }
.otiq-opt:hover .otiq-key { color: var(--q-acc); }
.otiq-opt.sel { border-left-color: var(--q-acc); background: rgba(94, 251, 215, .07); color: var(--q-txt); }
.otiq-opt.sel .otiq-key { color: var(--q-acc); }
.otiq-nav { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-top: 26px; flex-wrap: wrap; }
.otiq-hint { font: 11px var(--q-mono); color: var(--q-dim); }
.otiq-toast { position: absolute; right: 16px; top: 8px; font: 12px var(--q-mono); color: var(--q-acc); opacity: 0; transform: translateY(-4px); transition: all .3s; pointer-events: none; }
.otiq-toast.show { opacity: 1; transform: none; }

/* ---------- Revisión ---------- */
.otiq-review { display: grid; gap: 2px; border-top: 1px solid var(--q-line); }
.otiq-rg { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--q-line); }
.otiq-rg > span:last-child { display: inline-flex; gap: 6px; }
.otiq-dot { width: 34px; height: 28px; border-radius: 6px; cursor: pointer; font: 12px var(--q-mono);
  border: 1px dashed rgba(251, 191, 36, .6); background: transparent; color: var(--q-warn); }
.otiq-dot.on { border: 1px solid var(--q-line2); color: var(--q-acc); }
.otiq-dot:hover { background: rgba(94, 251, 215, .08); }

/* ---------- Resultado ---------- */
.otiq-result { display: grid; grid-template-columns: auto 1fr; gap: 32px; align-items: center; padding-bottom: 28px; margin-bottom: 26px; border-bottom: 1px solid var(--q-line); }
.otiq-score b { display: block; font: 700 clamp(3.2rem, 9vw, 4.8rem)/1 var(--q-mono); color: var(--q-warn); letter-spacing: -.03em; }
.otiq-result.pass .otiq-score b { color: var(--q-acc); text-shadow: 0 0 28px rgba(94, 251, 215, .35); }
.otiq-score span { font: 12px var(--q-mono); color: var(--q-mut); }
.otiq-tag { font: 600 12px var(--q-mono); color: var(--q-warn); letter-spacing: .08em; text-transform: uppercase; }
.otiq-result.pass .otiq-tag { color: var(--q-acc); }
.otiq-verdict h3 { font-size: clamp(1.2rem, 2.6vw, 1.6rem) !important; margin: 6px 0 4px; }
.otiq-verdict .otiq-out { margin-bottom: 10px !important; }
.otiq-meta { font: 12px var(--q-mono); color: var(--q-dim); }
.otiq-meta b { color: var(--q-txt); font-weight: 500; }
.otiq-cats { display: grid; margin-top: 14px; border-top: 1px solid var(--q-line); }
.otiq-crow { display: grid; grid-template-columns: minmax(0, 1fr) auto 36px 84px; gap: 16px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--q-line); }
.otiq-seg { display: inline-flex; gap: 3px; }
.otiq-seg i { width: 18px; height: 6px; border-radius: 1px; background: var(--q-line); }
.otiq-seg i.on.show { background: var(--q-acc); animation: otiqFill .3s ease both; animation-delay: var(--d); }
.otiq-crow:not(.full) .otiq-seg i.on.show { background: var(--q-warn); }
.otiq-n { font: 12px var(--q-mono); color: var(--q-mut); text-align: right; }
.otiq-ok { font: 12px var(--q-mono); color: var(--q-acc); text-align: right; }
.otiq-rep { font: 12px var(--q-mono); text-align: right; }
.otiq-actions { display: flex; flex-wrap: wrap; gap: 22px; align-items: center; margin-top: 28px; }
.otiq-actions .otiq-btn { margin-left: auto; }
.otiq-answers { margin-top: 26px; border-top: 1px solid var(--q-line); }
.otiq-ans { padding: 14px 0 14px 14px; border-bottom: 1px solid var(--q-line); border-left: 2px solid var(--q-acc); }
.otiq-ans.bad { border-left-color: var(--q-err); }
.otiq-ans p { margin: 3px 0; font-size: 14px; }
.otiq-ans-h { font: 12px var(--q-mono); color: var(--q-mut); display: flex; gap: 8px; }
.otiq-ans-h b { color: var(--q-txt); }
.otiq-ans-q { font-weight: 600; color: var(--q-txt); }
.otiq-ans-y { color: #FCA5A5; } .otiq-ans-c { color: var(--q-acc); } .otiq-ans-w { color: var(--q-mut); }

/* ---------- Animaciones ---------- */
@keyframes otiqIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes otiqFromR { from { opacity: 0; transform: translateX(18px); } to { opacity: 1; transform: none; } }
@keyframes otiqFromL { from { opacity: 0; transform: translateX(-18px); } to { opacity: 1; transform: none; } }
@keyframes otiqShake { 0%, 100% { transform: none; } 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
@keyframes otiqBlink { 50% { opacity: .2; } }
@keyframes otiqFill { from { transform: scaleX(0); } to { transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .otiq *, .otiq *::before, .otiq *::after { animation: none !important; transition: none !important; }
}

/* ---------- Móvil ---------- */
@media (max-width: 680px) {
  .otiq-grid2 { grid-template-columns: 1fr; }
  .otiq-hint { display: none; }
  .otiq-result { grid-template-columns: 1fr; gap: 12px; }
  .otiq-crow { grid-template-columns: 1fr auto; row-gap: 4px; }
  .otiq-crow .otiq-cat { grid-column: 1 / -1; }
  .otiq-rg { grid-template-columns: 1fr; }
  .otiq-actions .otiq-btn { margin-left: 0; }
  .otiq-cat span { display: none; }
}


/* =========================================================
   v1.5 · Legibilidad y ajuste (mismos criterios que la evaluación IA)
   1. El tema del sitio impide el salto de línea en los botones
      (white-space: nowrap): en celular las alternativas quedaban
      cortadas. Ahora el texto se ajusta al ancho disponible.
   2. Más tamaño y contraste en preguntas, alternativas y etiquetas.
   3. Consentimiento, metadatos y pistas más legibles.
   4. Diseño según el ancho real del contenedor (container queries).
   ========================================================= */
.otiq { --q-dim: #7488AB; }
.otiq button { white-space: normal !important; height: auto; min-height: 0; max-width: 100%; overflow-wrap: anywhere; word-break: normal; }
.otiq .otiq-btn, .otiq .otiq-link-btn, .otiq .otiq-dot { white-space: nowrap !important; overflow-wrap: normal; }
.otiq .otiq-body { padding: clamp(20px, 4vw, 40px); }
.otiq .otiq-cmd { font-size: 15px; }
.otiq .otiq-out { font-size: 14px; line-height: 1.55; }
.otiq .otiq-form label:not(.otiq-consent) > span { font-size: 13px; color: #9FB2D1; }
.otiq .otiq-form input:not([type="checkbox"]), .otiq .otiq-form select { font-size: 16px; padding: 10px 0; }
.otiq .otiq-consent { font-size: 14.5px; line-height: 1.6; color: #C9D6EC; }
.otiq .otiq-consent input { width: 18px; height: 18px; margin-top: 3px; }
.otiq .otiq-error { font-size: 14px; }
.otiq .otiq-head { font-size: 14px; align-items: center; }
.otiq .otiq-cat { font-size: 14px; }
.otiq .otiq-cat span { color: #A9BBD8; }
.otiq .otiq-qtext { font-size: clamp(1.25rem, 2.6vw, 1.6rem) !important; line-height: 1.38 !important; margin-bottom: 24px; overflow-wrap: break-word; }
.otiq .otiq-opt { grid-template-columns: 34px minmax(0, 1fr); align-items: center; padding: 16px 12px 16px 14px; font-size: 16.5px; line-height: 1.5; color: #DCE6F7; }
.otiq .otiq-opt > span:last-child { min-width: 0; }
.otiq .otiq-key { font-size: 14px; color: #8FA3C4; }
.otiq .otiq-opt.sel { background: rgba(94, 251, 215, .10); }
.otiq .otiq-hint { font-size: 12px; color: #8FA3C4; }
.otiq .otiq-link-btn { font-size: 14.5px; padding: 10px 2px; color: #A9BBD8; }
.otiq .otiq-link-btn:disabled { opacity: .4; }
.otiq .otiq-btn { font-size: 15px; padding: 12px 20px; }
.otiq .otiq-btn kbd { opacity: .85; }
.otiq .otiq-dot { width: 40px; height: 34px; font-size: 13px; }
.otiq .otiq-rg .otiq-cat, .otiq .otiq-crow .otiq-cat { white-space: normal; }
.otiq .otiq-meta { font-size: 13px; color: #8FA3C4; line-height: 1.6; }
.otiq .otiq-n, .otiq .otiq-ok, .otiq .otiq-rep { font-size: 13px; }
.otiq .otiq-seg i { height: 7px; }
.otiq .otiq-ans p { font-size: 15px; line-height: 1.55; }
.otiq .otiq-ans-h { font-size: 12.5px; }
.otiq .otiq-ans-w { color: #A9BBD8; }

@container otiq (max-width: 680px) {
  .otiq-grid2 { grid-template-columns: 1fr; }
  .otiq-hint { display: none; }
  .otiq-head { flex-wrap: wrap; row-gap: 4px; }
  .otiq .otiq-opt { font-size: 16px; padding: 14px 8px 14px 10px; gap: 10px; }
  .otiq-nav .otiq-link-btn { flex: 1; text-align: left; }
  .otiq-nav .otiq-link-btn:last-child { text-align: right; }
  .otiq-nav .otiq-btn, .otiq-nav .otiq-go { flex: 1 1 100%; justify-content: center; }
  .otiq-result { grid-template-columns: 1fr; gap: 12px; }
  .otiq-rg { grid-template-columns: 1fr; gap: 8px; }
  .otiq-rg > span:last-child { flex-wrap: wrap; }
  .otiq .otiq-cat span { display: inline; }
  .otiq-crow { grid-template-columns: minmax(0, 1fr) auto auto; row-gap: 6px; column-gap: 12px; }
  .otiq-crow .otiq-cat { grid-column: 1 / -1; }
  .otiq-crow .otiq-ok, .otiq-crow .otiq-rep { text-align: right; }
  .otiq-actions { flex-direction: column; align-items: stretch; gap: 6px; }
  .otiq-actions .otiq-btn { margin: 8px 0 0; justify-content: center; }
  .otiq-actions .otiq-link-btn { text-align: left; }
}
