/* ==========================================================================
   Generador de exámenes con IA — estilos propios (solo en /herramientas/generador-de-examenes/ y /examenes/).
   Usa los tokens de critical.css; se carga después de main.css. La hoja del examen es siempre clara (como el papel).
   ========================================================================== */

/* ---------- Fórmulas ---------- */
.ex-math svg { display: inline-block; max-width: none; overflow: visible; }
.ex-math-block { display: block; margin: .5em 0; text-align: center; overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; padding: 2px 0; }
.ex-math-block svg { display: inline-block; max-width: none; }
.ex-tex-raw { font-family: var(--font-mono); font-size: .88em; padding: 1px 4px; border-radius: 4px; background: color-mix(in srgb, var(--error) 8%, transparent); color: inherit; overflow-wrap: anywhere; }
.ex-blank { display: inline-block; min-width: 5.5em; border-bottom: 1.5px solid currentColor; color: #5d6b76; font-size: .85em; padding: 0 4px; }
.ex-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Presentación ---------- */
.ex-hero .hero__title { max-width: 18ch; }
.ex-mock { position: relative; height: 100%; min-height: 360px; display: grid; place-items: center; }
.ex-mock__sheet { position: relative; width: min(100%, 380px); padding: 22px 22px 18px; border-radius: 14px; background: #fff; color: #17232d; box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .65); font-size: .88rem; }
.ex-mock__sheet--back { position: absolute; transform: rotate(5deg) translate(28px, -14px); height: 86%; opacity: .55; display: flex; justify-content: flex-end; align-items: flex-start; }
.ex-mock__top { display: flex; justify-content: space-between; align-items: center; margin: 0 0 4px; font-size: .7rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #0e5a6b; }
.ex-mock__ver { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; background: #0e5a6b; color: #fff; font-size: 1.05rem; letter-spacing: 0; }
.ex-mock__title { font-family: var(--font-head); font-weight: 750; font-size: 1.12rem; margin: 0 0 12px; padding-bottom: 8px; border-bottom: 2px solid #0e5a6b; }
.ex-mock__q { display: grid; grid-template-columns: 20px 1fr; gap: 4px; margin-bottom: 10px; line-height: 1.5; }
.ex-mock__q > span { font-weight: 800; color: #0e5a6b; }
.ex-mock__opts { display: flex; gap: 8px; margin: 6px 0 0; }
.ex-mock__opts i { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid #4b5d69; font-style: normal; font-size: .72rem; font-weight: 700; }
.ex-mock__opts i.is-on { background: #17232d; color: #fff; border-color: #17232d; }
.ex-mock__grid { display: grid; grid-template-columns: repeat(9, 1fr); gap: 3px; width: 60%; margin: 8px auto 0; }
.ex-mock__grid b { aspect-ratio: 1; border: 1px solid transparent; }
.ex-mock__grid b.on { border-color: #4b5d69; background: #fff; }
@media (prefers-reduced-motion: no-preference) {
  .ex-mock__sheet:not(.ex-mock__sheet--back) { animation: ex-in .7s var(--ease) both .15s; }
  .ex-mock__sheet--back { animation: ex-in-back .9s var(--ease) both; }
}
@keyframes ex-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes ex-in-back { from { opacity: 0; transform: rotate(0) translate(0, 0); } to { opacity: .55; transform: rotate(5deg) translate(28px, -14px); } }

.ex-typecloud { list-style: none; margin: 18px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.ex-typecloud li { padding: 9px 16px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-weight: 650; font-size: .95rem; box-shadow: var(--shadow-sm); }
.ex-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); }
.ex-steps__item { position: relative; padding: 24px 22px 20px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.ex-steps__item p { margin: 0; color: var(--muted); }
.ex-steps__n { display: inline-grid; place-items: center; width: 44px; height: 44px; margin-bottom: 14px; border-radius: 14px; background: var(--grad); color: #fff; font-family: var(--font-head); font-weight: 800; font-size: 1.2rem; }
.ex-steps__title { font-size: var(--step-1); margin-bottom: .35em; }
.ex-split { display: grid; gap: 28px; }
@media (min-width: 900px) { .ex-split { grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; } }
.ex-latex-card { padding: clamp(20px, 4vw, 32px); border-radius: var(--radius-lg); background: #fff; color: #17232d; border: 1px solid var(--line); box-shadow: var(--shadow); line-height: 1.6; }
.ex-latex-card__label { margin: 0 0 10px; font-size: .75rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: #0e5a6b; }
.ex-latex-card__q + .ex-latex-card__q { margin-top: 14px; padding-top: 14px; border-top: 1px dashed #c9d6db; }
.ex-final { display: grid; justify-items: center; text-align: center; gap: 6px; padding: clamp(32px, 6vw, 64px) 24px; border-radius: var(--radius-lg); color: #e9eeff; background: linear-gradient(135deg, #0e1730 0%, #0b3b47 60%, #0E5A6B 100%); box-shadow: var(--shadow-lg); }
.ex-final__title { color: #fff; font-size: var(--step-3); max-width: 22ch; }
.ex-final p { color: #c3d6dc; max-width: 52ch; }
.ex-actions--center { justify-content: center; }

/* ---------- Precios ---------- */
.ex-pricing { display: grid; gap: 18px; margin-top: 28px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); align-items: stretch; }
.ex-price { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 26px 22px 22px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.ex-price--popular { border: 2px solid var(--action); box-shadow: var(--shadow); }
.ex-price__badge { position: absolute; top: -13px; left: 22px; margin: 0; padding: 3px 12px; border-radius: 999px; background: var(--action); color: var(--on-action); font-size: .75rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.ex-price__name { font-family: var(--font-body); font-size: 1rem; font-weight: 800; color: var(--brand-strong); margin: 0; letter-spacing: 0; }
.ex-price__amount { font-family: var(--font-head); font-size: var(--step-3); font-weight: 800; letter-spacing: -.03em; line-height: 1.05; margin: 4px 0 0; font-variant-numeric: tabular-nums; }
.ex-price__unit { font-size: .9rem; color: var(--muted); margin: 0 0 12px; }
.ex-price__list { list-style: none; margin: 0 0 18px; padding: 14px 0 0; border-top: 1px solid var(--line); display: grid; gap: 8px; flex: 1; align-content: start; }
.ex-price__list li { display: flex; gap: 8px; align-items: flex-start; font-size: .95rem; line-height: 1.4; }
.ex-price__list .icon { flex: none; width: 18px; height: 18px; margin-top: 1px; color: var(--ok); }
.ex-pricing__note { display: flex; gap: 10px; align-items: flex-start; margin: 18px 0 0; padding: 14px 16px; border-radius: var(--radius); background: color-mix(in srgb, var(--action) 9%, var(--surface)); border: 1px solid color-mix(in srgb, var(--action) 30%, transparent); font-size: .95rem; }
.ex-pricing__note .icon { flex: none; width: 20px; height: 20px; color: var(--action-hover); margin-top: 2px; }

/* ---------- Barra de la aplicación ---------- */
.ex-bar { background: var(--surface); border-bottom: 1px solid var(--line); }
.ex-bar__inner { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; min-height: 58px; padding-block: 8px; }
.ex-bar__brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-head); font-weight: 750; font-size: 1.05rem; color: var(--text); text-decoration: none; }
.ex-bar__brand:hover { color: var(--text); }
.ex-bar__mark { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 11px; background: linear-gradient(135deg, #2350f0, #0E5A6B); color: #fff; }
.ex-bar__mark .icon { width: 19px; height: 19px; }
.ex-bar__nav { order: 3; flex: 1 1 100%; display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; margin-inline: -6px; }
.ex-bar__nav::-webkit-scrollbar { display: none; }
.ex-bar__nav a { flex: none; padding: 8px 12px; border-radius: 10px; color: var(--muted); font-weight: 650; font-size: .95rem; text-decoration: none; white-space: nowrap; }
.ex-bar__nav a:hover { color: var(--text); background: var(--surface-2); }
.ex-bar__nav a[aria-current="page"] { color: var(--brand-strong); background: var(--brand-soft); }
.ex-bar__out { margin-left: auto; display: flex; align-items: center; gap: 10px; min-width: 0; }
.ex-bar__email { font-size: .85rem; color: var(--muted); max-width: 22ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: none; }
.ex-bar__logout { border: 1px solid var(--line); background: var(--surface); color: var(--text); border-radius: 10px; padding: 6px 12px; font-weight: 650; font-size: .9rem; cursor: pointer; }
.ex-bar__logout:hover { border-color: var(--brand); color: var(--brand); }
@media (min-width: 560px) { .ex-bar__email { display: inline; } }
@media (min-width: 1000px) { .ex-bar__nav { order: 0; flex: 0 1 auto; margin-inline: 12px 0; } }

/* ---------- Estructura ---------- */
.ex-page { padding-block: clamp(24px, 4vw, 48px) clamp(40px, 6vw, 72px); }
.ex-title { font-size: var(--step-3); margin-bottom: .3em; }
.ex-title--sm { font-size: var(--step-2); }
.ex-h2 { font-size: var(--step-2); margin: 40px 0 16px; }
.ex-head-page { margin-bottom: 20px; }
.ex-head-page .lead { margin-bottom: 0; }
.ex-flash { max-width: 72ch; }
.ex-panel { padding: clamp(20px, 3.5vw, 32px); border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.ex-panel__title { font-size: var(--step-1); margin-bottom: .5em; }
.ex-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.ex-actions .icon, .ex-exam__actions .icon, .ex-access .btn .icon, .ex-aibox .icon { width: 20px; height: 20px; }
.btn .icon { flex: none; }
.ex-muted { color: var(--muted); }
.ex-small { font-size: var(--step--1); }
.ex-warn { color: color-mix(in srgb, var(--action-hover) 70%, var(--text)); font-weight: 600; }
.ex-danger { color: var(--error) !important; }
.ex-badge { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; font-size: .72rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; background: color-mix(in srgb, var(--ok) 16%, var(--surface)); color: var(--ok); vertical-align: middle; }
.ex-spinner { display: inline-block; flex: none; width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid color-mix(in srgb, var(--brand) 25%, transparent); border-top-color: var(--brand); animation: ex-spin .8s linear infinite; }
@keyframes ex-spin { to { transform: rotate(360deg); } }
.ex-pending-note { display: flex; align-items: center; gap: 12px; margin-top: 18px; }
.ex-checklist { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 10px; }
.ex-checklist li { display: flex; gap: 10px; align-items: center; font-weight: 600; }
.ex-checklist .icon { flex: none; width: 22px; height: 22px; padding: 3px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-strong); }
.ex-tip { display: flex; gap: 8px; align-items: flex-start; margin: 14px 0 0; font-size: .9rem; color: var(--muted); }
.ex-tip .icon { flex: none; width: 18px; height: 18px; margin-top: 3px; color: var(--brand); }
.ex-tipbox { padding: 16px 18px; border-radius: var(--radius); background: var(--surface-2); font-size: .95rem; }
.ex-tipbox p { margin-bottom: 8px; }
.ex-tipbox--wide { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 18px; margin-top: 18px; }
.ex-tipbox--wide p { margin: 0; }
.ex-numbered { margin: 0 0 12px; padding-left: 1.3em; display: grid; gap: 6px; }
.ex-howbuy { margin-top: 24px; }

/* Acceso */
.ex-access { display: grid; gap: 28px; }
.ex-access__card { align-self: start; }
.ex-access__card .form { margin-block: 0; }
.ex-access__demo { margin-top: 18px; }
.ex-sent { text-align: center; }
.ex-sent__icon { display: inline-grid; place-items: center; width: 64px; height: 64px; margin-bottom: 10px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-strong); }
.ex-sent__icon .icon { width: 30px; height: 30px; }
.ex-admin-entry { display: grid; gap: 8px; margin-bottom: 14px; }
.ex-admin-entry p { margin: 0; }
@media (min-width: 900px) { .ex-access { grid-template-columns: 1.1fr 1fr; gap: 56px; align-items: center; padding-top: clamp(32px, 5vw, 64px); } }
.ex-consent { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--radius); background: var(--surface-2); margin: 14px 0 18px; }
.ex-consent input { flex: none; margin-top: 3px; }
.ex-consent label { margin: 0; font-weight: 500; line-height: 1.5; }

/* Panel */
.ex-dash { display: grid; gap: 24px; align-items: start; }
@media (min-width: 900px) { .ex-dash { grid-template-columns: 1fr 340px; gap: 40px; } }
.ex-dash__side { display: grid; gap: 14px; }
.ex-meter { padding: 20px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.ex-meter__head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 10px; align-items: baseline; }
.ex-meter__title { margin: 0; font-weight: 800; font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--brand); }
.ex-meter__date { display: inline-flex; align-items: center; gap: 5px; margin: 0; font-size: .85rem; color: var(--muted); }
.ex-meter__date .icon { width: 16px; height: 16px; }
.ex-meter__nums { display: flex; align-items: baseline; gap: 10px; margin: 8px 0 10px; }
.ex-meter__nums strong { font-family: var(--font-head); font-size: var(--step-3); font-weight: 800; line-height: 1; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.ex-meter__nums span { color: var(--muted); font-size: .92rem; }
.ex-meter__bar { height: 8px; border-radius: 4px; background: var(--surface-3); overflow: hidden; }
.ex-meter__bar span { display: block; height: 100%; border-radius: inherit; background: var(--grad); }
.ex-meter--empty .ex-meter__bar span { background: var(--action); }
.ex-meter__limits { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 6px; font-size: .9rem; }
.ex-meter__limits li { display: flex; gap: 8px; align-items: center; }
.ex-meter__limits .icon { flex: none; width: 17px; height: 17px; color: var(--accent-strong); }
.ex-meter__note { margin: 12px 0 10px; font-size: .92rem; }
.ex-meter__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.ex-meter__link { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; font-weight: 700; text-decoration: none; }
.ex-meter__link .icon { width: 17px; height: 17px; transition: transform .25s var(--ease); }
.ex-meter__link:hover .icon { transform: translateX(3px); }
.ex-history { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.ex-history__link { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); color: var(--text); text-decoration: none; transition: border-color .2s, transform .2s var(--ease), box-shadow .2s; }
.ex-history__link:hover { color: var(--text); border-color: color-mix(in srgb, var(--brand) 40%, var(--line)); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.ex-history__badge { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 13px; background: var(--brand-soft); color: var(--brand-strong); font-weight: 800; font-size: .9rem; }
.ex-history__body { flex: 1; min-width: 0; display: grid; }
.ex-history__name { font-weight: 750; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ex-history__meta { font-size: .88rem; color: var(--muted); }
.ex-status { flex: none; padding: 3px 10px; border-radius: 999px; font-size: .78rem; font-weight: 750; background: var(--surface-2); color: var(--muted); }
.ex-status--done { background: color-mix(in srgb, var(--ok) 14%, var(--surface)); color: var(--ok); }
.ex-status--error { background: color-mix(in srgb, var(--error) 12%, var(--surface)); color: var(--error); }
.ex-status--pending { background: var(--brand-soft); color: var(--brand-strong); }
@media (max-width: 480px) { .ex-status { display: none; } }
.ex-empty { display: flex; gap: 16px; align-items: center; padding: 22px; border-radius: var(--radius-lg); border: 1.5px dashed var(--line); color: var(--muted); }
.ex-empty p { margin: 0; }
.ex-empty__icon { flex: none; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: var(--surface-2); }

/* ---------- Formularios ---------- */
.ex-form .form__row { gap: 2px; }
.ex-form .form__row .form-note { margin: 0 0 6px; }
.ex-form label { margin-bottom: 4px; }
.ex-label { font-weight: 700; margin: 0 0 6px; padding: 0; }
.ex-req, .ex-opt-tag { font-size: .72rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: 2px 7px; border-radius: 6px; vertical-align: 1px; margin-left: 4px; }
.ex-req { background: color-mix(in srgb, var(--action) 14%, var(--surface)); color: color-mix(in srgb, var(--action-hover) 75%, var(--text)); }
.ex-opt-tag { background: var(--accent-soft); color: var(--accent-strong); }
.ex-form textarea { line-height: 1.55; }
.ex-form [aria-invalid="true"] { border-color: var(--error); }
.ex-field-error { color: var(--error); font-weight: 650; font-size: .9rem; margin: 6px 0 0; }
.ex-grid { display: grid; gap: 14px 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.ex-grid__wide { grid-column: 1 / -1; }
.ex-counter { margin: 4px 0 0; font-size: .8rem; color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; min-height: 1.2em; }
.ex-counter.is-near { color: var(--action-hover); font-weight: 700; }
.ex-ideas { margin: 8px 0 0; padding-left: 1.2em; font-size: .88rem; color: var(--muted); display: grid; gap: 2px; }
.ex-checks { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 16px; align-items: center; }
.ex-check { display: inline-flex; gap: 8px; align-items: center; margin: 0; font-weight: 600; cursor: pointer; }
.ex-check input { width: 18px; height: 18px; }

/* Tipos de pregunta */
.ex-types { display: grid; gap: 8px; }
.ex-type { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 14px; background: var(--surface); transition: border-color .2s, background-color .2s; }
.ex-type.is-on { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 6%, var(--surface)); }
.ex-type.is-off { opacity: .5; }
.ex-type__text { flex: 1; min-width: 0; }
.ex-type__label { display: block; margin: 0; font-weight: 750; line-height: 1.3; }
.ex-type__hint { margin: 2px 0 0; font-size: .85rem; color: var(--muted); line-height: 1.4; }
.ex-num { flex: none; display: flex; align-items: center; gap: 4px; }
.ex-num input { width: 3.6em; text-align: center; padding-inline: 4px; font-weight: 750; font-variant-numeric: tabular-nums; -moz-appearance: textfield; appearance: textfield; }
.ex-num input::-webkit-outer-spin-button, .ex-num input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.ex-num__btn { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); color: var(--text); cursor: pointer; }
.ex-num__btn:hover { border-color: var(--brand); color: var(--brand); }
.ex-num__btn .icon { width: 18px; height: 18px; }
@media (max-width: 420px) { .ex-type { flex-wrap: wrap; } .ex-num { margin-left: auto; } }
.ex-total { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 24px; margin-top: 14px; padding: 14px 16px; border-radius: var(--radius); background: var(--surface-2); }
.ex-total p { margin: 0; font-weight: 650; }
.ex-total strong { font-family: var(--font-head); font-size: var(--step-2); color: var(--brand-strong); font-variant-numeric: tabular-nums; margin-left: 4px; }
.ex-total__opts { margin: 0; min-width: 180px; }

/* Versiones y modo */
.ex-modes { border: 0; margin: 14px 0 0; padding: 0; display: grid; gap: 10px; }
@media (min-width: 700px) { .ex-modes { grid-template-columns: 1fr 1fr; } .ex-modes .ex-label { grid-column: 1 / -1; } }
.ex-mode { position: relative; display: flex; gap: 12px; margin: 0; padding: 16px; border: 1.5px solid var(--line); border-radius: 14px; background: var(--surface); cursor: pointer; font-weight: 500; }
.ex-mode:has(input:checked) { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 7%, var(--surface)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 14%, transparent); }
.ex-mode:has(input:focus-visible) { outline: 3px solid var(--brand); outline-offset: 2px; }
.ex-mode input { flex: none; margin-top: 3px; }
.ex-mode__body { display: grid; gap: 4px; }
.ex-mode__title { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; }
.ex-mode__title .icon { width: 20px; height: 20px; color: var(--brand); }
.ex-mode__text { font-size: .9rem; color: var(--muted); line-height: 1.45; }
.ex-modes--static .ex-mode { cursor: default; }
.ex-unique { margin: 14px 0 0; padding: 12px 14px; border-radius: var(--radius); background: var(--brand-soft); color: var(--brand-strong); font-weight: 650; }
.ex-unique:empty { display: none; }
.ex-unique.is-over { background: color-mix(in srgb, var(--error) 12%, var(--surface)); color: var(--error); }

/* Papel */
.ex-papers { border: 0; margin: 18px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.ex-papers .ex-label { width: 100%; }
.ex-paperopt { display: grid; justify-items: center; gap: 6px; width: 120px; margin: 0; padding: 12px 8px; border: 1.5px solid var(--line); border-radius: 14px; background: var(--surface); cursor: pointer; text-align: center; font-size: .82rem; font-weight: 650; line-height: 1.3; }
.ex-paperopt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.ex-paperopt:has(input:checked) { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 7%, var(--surface)); }
.ex-paperopt:has(input:focus-visible) { outline: 3px solid var(--brand); outline-offset: 2px; }
.ex-paperopt__shape { display: block; width: 34px; border: 2px solid var(--muted); border-radius: 3px; background: var(--surface); }
.ex-paperopt--carta .ex-paperopt__shape { height: 44px; }
.ex-paperopt--oficio .ex-paperopt__shape { height: 52px; }
.ex-paperopt--media_carta .ex-paperopt__shape { width: 26px; height: 34px; }
.ex-paperopt:has(input:checked) .ex-paperopt__shape { border-color: var(--brand); background: var(--brand-soft); }

/* ---------- Asistente ---------- */

ol.ex-stepper { list-style: none; margin: 0 0 18px; padding: 0; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
ol.ex-stepper::-webkit-scrollbar { display: none; }
ol.ex-stepper li { flex: 1 0 auto; }
.ex-stepper__item { width: 100%; display: flex; align-items: center; gap: 8px; padding: 8px 12px 8px 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--muted); font-weight: 650; font-size: .88rem; cursor: pointer; white-space: nowrap; transition: all .2s var(--ease); }
.ex-stepper__item:hover { color: var(--text); border-color: color-mix(in srgb, var(--brand) 40%, var(--line)); }
.ex-stepper__n { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: var(--surface-2); font-weight: 800; font-size: .82rem; }
.ex-stepper__item.is-done .ex-stepper__n { background: var(--accent-soft); color: var(--accent-strong); }
.ex-stepper__item[aria-current="step"] { color: var(--brand-strong); border-color: var(--brand); background: var(--brand-soft); }
.ex-stepper__item[aria-current="step"] .ex-stepper__n { background: var(--brand); color: var(--on-brand); }
@media (max-width: 759px) { .ex-stepper__item:not([aria-current="step"]) .ex-stepper__label { display: none; } ol.ex-stepper li { flex: 0 0 auto; } ol.ex-stepper li:has([aria-current="step"]) { flex: 1 0 auto; } }
.ex-draft-banner { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; }
.ex-wizard__form { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; }
.ex-step { margin: 0; min-width: 0; padding: clamp(18px, 3.5vw, 32px); border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-sm); }
.ex-step > * + * { margin-top: 16px; }
.ex-step__title { display: flex; align-items: center; gap: 12px; float: left; width: 100%; padding: 0; font-family: var(--font-head); font-size: var(--step-2); font-weight: 750; letter-spacing: -.02em; line-height: 1.1; }
.ex-step__title + * { clear: both; margin-top: 0; padding-top: 10px; }
.ex-step__n { flex: none; display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; background: var(--brand-soft); color: var(--brand-strong); font-size: 1rem; font-weight: 800; }
.ex-step__lead { color: var(--muted); }
.js [data-ex-wizard].is-steps .ex-step:not(.is-current) { display: none; }
.js [data-ex-wizard].is-steps .ex-step.is-current { animation: ex-in .35s var(--ease) both; }
@media (prefers-reduced-motion: reduce) { .js [data-ex-wizard].is-steps .ex-step.is-current { animation: none; } }
.ex-wizard__nav { position: sticky; bottom: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px; border-radius: 16px; background: color-mix(in srgb, var(--surface) 88%, transparent); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border: 1px solid var(--line); box-shadow: var(--shadow); }
.ex-wizard__nav .icon { width: 20px; height: 20px; }
.ex-wizard__count { min-width: 0; font-size: .88rem; color: var(--muted); font-weight: 650; text-align: center; }
@media (max-width: 420px) { .ex-wizard__nav .btn { padding-inline: 12px; gap: 4px; } .ex-wizard__count { font-size: .8rem; } }
.ex-wizard__nav [hidden] { display: inline-flex !important; visibility: hidden; }
html:not(.js) .ex-wizard__nav { display: none; }
.ex-review { display: grid; gap: 10px; }
.ex-review__step { padding: 14px 16px; border-radius: var(--radius); background: var(--surface-2); }
.ex-review__head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 6px; }
.ex-review__title { margin: 0; font-weight: 800; font-size: .95rem; }
.ex-review dl { margin: 0; display: grid; gap: 4px; }
.ex-review dl div { display: grid; grid-template-columns: minmax(110px, 34%) 1fr; gap: 10px; font-size: .9rem; }
.ex-review dt { color: var(--muted); font-weight: 600; }
.ex-review dd { margin: 0; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.ex-review .is-missing { color: var(--error); font-weight: 650; }
.ex-usage-note { display: flex; gap: 10px; align-items: flex-start; margin: 16px 0 0; font-size: .95rem; }
.ex-usage-note .icon { flex: none; width: 20px; height: 20px; margin-top: 2px; color: var(--brand); }
.ex-submit { width: 100%; }
.ex-submit .icon { width: 22px; height: 22px; }
@media (min-width: 600px) { .ex-submit { width: auto; } }
.ex-locked, .ex-failed { text-align: center; display: grid; justify-items: center; gap: 6px; }
.ex-locked__icon { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 18px; background: var(--brand-soft); color: var(--brand); margin-bottom: 6px; }
.ex-locked__icon .icon { width: 30px; height: 30px; }
.ex-locked p, .ex-failed p { max-width: 58ch; }
.ex-locked .ex-actions, .ex-failed .ex-actions { justify-content: center; }

/* ---------- Progreso ---------- */
.ex-progress { display: grid; place-items: center; min-height: 60vh; }
.ex-progress__card { width: min(100%, 560px); text-align: center; padding: clamp(28px, 5vw, 48px) clamp(20px, 4vw, 40px); border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-lg); }
.ex-progress__sheet { width: 78px; height: 98px; margin: 0 auto 18px; padding: 12px 10px; border-radius: 8px; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow); display: grid; gap: 7px; align-content: start; }
.ex-progress__sheet i { display: block; height: 6px; border-radius: 3px; background: color-mix(in srgb, #0e5a6b 30%, #fff); transform-origin: left; }
.ex-progress__sheet i:nth-child(2) { width: 80%; }
.ex-progress__sheet i:nth-child(3) { width: 60%; }
.ex-progress__sheet i:nth-child(4) { width: 90%; }
.ex-progress__sheet i:nth-child(5) { width: 50%; }
@media (prefers-reduced-motion: no-preference) {
  .ex-progress__sheet i { animation: ex-write 2.4s var(--ease) infinite; }
  .ex-progress__sheet i:nth-child(2) { animation-delay: .3s; }
  .ex-progress__sheet i:nth-child(3) { animation-delay: .6s; }
  .ex-progress__sheet i:nth-child(4) { animation-delay: .9s; }
  .ex-progress__sheet i:nth-child(5) { animation-delay: 1.2s; }
}
@keyframes ex-write { 0% { transform: scaleX(0); } 40%, 100% { transform: scaleX(1); } }
.ex-progress__title { font-family: var(--font-head); font-size: var(--step-2); font-weight: 750; letter-spacing: -.02em; line-height: 1.1; margin: 0 0 .4em; }
.ex-progress__lead { color: var(--muted); }
.ex-progress__msg { min-height: 1.6em; margin: 18px 0 12px; font-weight: 700; color: var(--brand-strong); transition: opacity .3s; }
.ex-progress__msg.is-fading { opacity: 0; }
.ex-progress__bar { height: 8px; border-radius: 4px; background: var(--surface-3); overflow: hidden; }
.ex-progress__bar span { display: block; height: 100%; width: 4%; border-radius: inherit; background: var(--grad); transition: width 1s linear; }
.ex-progress__time { margin: 12px 0 0; font-size: .88rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.ex-progress__refresh { margin: 16px 0 0; }
.js .ex-progress__refresh { display: none; }
.ex-progress--overlay { position: fixed; inset: 0; z-index: 200; min-height: 0; padding: 16px; background: color-mix(in srgb, var(--bg) 82%, transparent); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }

/* ---------- Examen ---------- */
.ex-exam__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.ex-exam__head > div:first-child { flex: 1 1 380px; min-width: 0; }
.ex-exam__head .eyebrow a { display: inline-flex; align-items: center; gap: 4px; text-decoration: none; }
.ex-exam__head .eyebrow .icon { width: 16px; height: 16px; }
.ex-exam__meta { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 0; color: var(--muted); font-size: .92rem; }
.ex-exam__meta span { display: inline-flex; align-items: center; gap: 6px; }
.ex-exam__meta .icon { width: 17px; height: 17px; }
.ex-exam__actions { display: flex; flex-wrap: wrap; gap: 10px; }
@media (max-width: 599px) { .ex-exam__actions .btn { flex: 1 1 auto; } }
.ex-exam__foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px 24px; margin-top: 24px; font-size: .92rem; }
.ex-exam__foot .ex-danger { display: inline-flex; align-items: center; gap: 6px; }
.ex-exam__foot .icon { width: 18px; height: 18px; }
.ex-tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 0 14px; padding-bottom: 2px; }
.ex-tabs::-webkit-scrollbar { display: none; }
.ex-tab { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 9px 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); font: inherit; font-weight: 700; font-size: .92rem; text-decoration: none; cursor: pointer; white-space: nowrap; }
.ex-tab:hover { color: var(--text); border-color: color-mix(in srgb, var(--brand) 40%, var(--line)); }
.ex-tab[aria-current="page"] { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.ex-tab--key { margin-left: auto; }
.ex-tab .icon { width: 17px; height: 17px; }
.ex-preview { min-width: 0; }

/* Hoja (siempre clara) */
.ex-paper { position: relative; overflow: hidden; max-width: 820px; margin: 0 auto; padding: clamp(18px, 5vw, 56px) clamp(14px, 5.5vw, 60px); background: #fff; color: #17232d; border-radius: 6px; box-shadow: 0 1px 2px rgba(0, 0, 0, .08), 0 24px 48px -20px rgba(15, 30, 50, .35); line-height: 1.55; font-size: 1rem; }
.ex-paper--media_carta { max-width: 560px; font-size: .94rem; }
.ex-paper--big { font-size: 1.12rem; }
.ex-paper a { color: #0e5a6b; }
.ex-paper__demo { position: absolute; top: 40%; left: 50%; transform: translate(-50%, -50%) rotate(-32deg); font-family: var(--font-head); font-weight: 800; font-size: clamp(5rem, 22vw, 11rem); letter-spacing: .08em; color: rgba(190, 30, 30, .09); pointer-events: none; user-select: none; z-index: 0; white-space: nowrap; }
.ex-paper > :not(.ex-paper__demo) { position: relative; z-index: 1; }
.ex-head { display: flex; align-items: stretch; border: 1.5px solid #0e5a6b; border-radius: 4px; overflow: hidden; margin-bottom: 12px; }
.ex-head__logo { flex: none; width: 64px; height: auto; object-fit: contain; padding: 8px; border-right: 1px solid #b9cdd3; }
.ex-head__main { flex: 1; min-width: 0; padding: 10px 14px; }
.ex-head__inst { margin: 0; font-size: .75rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #0e5a6b; }
.ex-head__title { margin: 2px 0; font-family: var(--font-head); font-weight: 750; font-size: 1.25em; line-height: 1.15; color: #17232d; }
.ex-head__meta { margin: 0; font-size: .82rem; color: #42525e; }
.ex-head__ver { flex: none; display: grid; place-content: center; justify-items: center; min-width: 70px; margin: 0; padding: 8px; background: #0e5a6b; color: #fff; }
.ex-head__ver span { font-size: .62rem; letter-spacing: .12em; text-transform: uppercase; }
.ex-head__ver strong { font-family: var(--font-head); font-size: 2rem; line-height: 1; }
.ex-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); gap: 6px 18px; margin: 0 0 12px; font-size: .88rem; }
.ex-fields div { display: flex; align-items: flex-end; gap: 6px; min-width: 0; }
.ex-fields__wide { grid-column: 1 / -1; }
.ex-fields dt { flex: none; color: #33424e; }
.ex-fields dd { flex: 1; margin: 0; min-height: 1.3em; border-bottom: 1px solid #8796a1; padding: 0 2px; color: #17232d; }
.ex-fields__total { float: right; color: #42525e; }
.ex-instr { margin: 0 0 14px; padding: 8px 12px; border: 1px solid #c9d6db; background: #f3f8f9; border-radius: 4px; font-size: .9rem; }
.ex-instr strong { color: #0e5a6b; }
.ex-sec { margin-top: 16px; }
.ex-sec__title { margin: 0 0 2px; padding-bottom: 3px; border-bottom: 1.5px solid #0e5a6b; font-family: var(--font-body); font-size: 1.02em; font-weight: 800; color: #0e5a6b; letter-spacing: 0; }
.ex-sec__hint { margin: 0 0 10px; font-size: .84rem; font-style: italic; color: #42525e; }
.ex-q { display: grid; grid-template-columns: 2em minmax(0, 1fr); gap: 2px; margin: 0 0 14px; scroll-margin-top: calc(var(--header-h) + 16px); }
.ex-q__n { font-weight: 800; color: #0e5a6b; }
.ex-q__stem { overflow-wrap: break-word; }
.ex-q__pts { font-size: .78rem; color: #6a7782; white-space: nowrap; }
.ex-opts { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 4px 18px; }
@media (min-width: 560px) { .ex-opts--two { grid-template-columns: 1fr 1fr; } }
.ex-opt { display: flex; gap: 6px; align-items: baseline; padding: 2px 6px; border-radius: 6px; }
.ex-opt__l { flex: none; font-weight: 800; color: #0e5a6b; }
.ex-opt.is-correct { background: #e3f6ea; box-shadow: inset 3px 0 0 #1f8a4c; }
.ex-tf { margin: 6px 0 0; font-size: .92rem; }
.ex-bubble { display: inline-grid; place-items: center; width: 1.7em; height: 1.7em; border-radius: 50%; border: 1.5px solid #4b5d69; font-size: .8em; font-weight: 700; margin-right: 2px; }
.ex-bubble + .ex-bubble { margin-left: 12px; }
.ex-bubble.is-correct { background: #17232d; border-color: #17232d; color: #fff; }
.ex-line { margin: 8px 0 0; display: flex; gap: 8px; align-items: flex-end; }
.ex-fill { flex: 1; max-width: 360px; border-bottom: 1px solid #8796a1; min-height: 1.3em; }
.ex-key-inline { margin: 6px 0 0; color: #1f6e3f; font-weight: 700; }
.ex-match { display: grid; gap: 10px 22px; margin-top: 8px; }
@media (min-width: 560px) { .ex-match { grid-template-columns: 1fr 1fr; } }
.ex-match__h { margin: 0 0 4px; font-weight: 800; font-size: .88rem; color: #33424e; }
.ex-match__list { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; counter-reset: m; }
.ex-match__list li { display: flex; gap: 8px; align-items: baseline; }
ol.ex-match__list li::before { counter-increment: m; content: counter(m) "."; font-weight: 700; order: 1; }
ol.ex-match__list li > :last-child { order: 2; }
.ex-box { flex: none; display: inline-grid; place-items: center; width: 1.9em; height: 1.6em; border: 1.5px solid #4b5d69; border-radius: 3px; font-weight: 800; color: #1f6e3f; }
.ex-order { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; }
.ex-order li { display: flex; gap: 8px; align-items: baseline; }
.ex-work { margin-top: 8px; height: 9em; border: 1px dashed #a8b4bd; border-radius: 4px; padding: 4px 8px; font-size: .75rem; color: #8a96a0; }
.ex-lines { margin-top: 6px; display: grid; }
.ex-lines i { display: block; height: 1.9em; border-bottom: 1px solid #b6c1c9; }
.ex-cw-wrap { overflow-x: auto; margin: 10px 0; -webkit-overflow-scrolling: touch; }
.ex-cw, .ex-ws { border-collapse: collapse; margin: 0 auto; }
.ex-cw td { position: relative; width: 1.75em; height: 1.75em; padding: 0; text-align: center; vertical-align: middle; }
.ex-cw td.on { border: 1.2px solid #33424e; background: #fff; }
.ex-cw__n { position: absolute; top: 1px; left: 2px; font-size: .5em; line-height: 1; color: #33424e; }
.ex-cw__l { font-weight: 800; font-size: .85em; }
.ex-ws { border: 1.5px solid #33424e; }
.ex-ws td { width: 1.7em; height: 1.7em; padding: 0; text-align: center; vertical-align: middle; font-family: var(--font-mono); font-weight: 700; font-size: .92em; }
.ex-ws td.hit { background: #ffe08a; }
.ex-clues { display: grid; gap: 8px 22px; font-size: .9rem; }
@media (min-width: 560px) { .ex-clues { grid-template-columns: 1fr 1fr; } }
.ex-clues ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.ex-wordlist { text-align: center; font-family: var(--font-mono); font-size: .85rem; letter-spacing: .03em; }

/* Solucionario en pantalla */
.ex-key { max-width: 920px; margin: 0 auto; }
.ex-key__title { font-size: var(--step-2); margin-bottom: 12px; }
.ex-key__sub { font-size: var(--step-1); margin: 28px 0 10px; }
.ex-key__grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); }
.ex-key__card { padding: 14px 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.ex-key__ver { margin: 0 0 8px; font-weight: 800; color: var(--brand-strong); }
.ex-key__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: .92rem; }
.ex-key__list li { display: grid; grid-template-columns: 2.2em 1fr; gap: 6px; align-items: baseline; }
.ex-key__n { font-weight: 800; color: var(--muted); text-align: right; }
.ex-key__a { overflow-wrap: anywhere; }
.ex-table-wrap { overflow-x: auto; }
.ex-table { border-collapse: collapse; font-size: .92rem; min-width: 260px; }
.ex-table th, .ex-table td { padding: 6px 12px; border: 1px solid var(--line); text-align: center; }
.ex-table th { background: var(--surface-2); }
.ex-sols { display: grid; gap: 8px; }
.ex-sol { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.ex-sol > summary { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; padding: 12px 14px; cursor: pointer; list-style: none; }
.ex-sol > summary::-webkit-details-marker { display: none; }
.ex-sol > summary::after { content: ""; margin-left: auto; width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); align-self: center; }
.ex-sol[open] > summary::after { transform: rotate(-135deg); }
.ex-sol__n { font-weight: 800; color: var(--brand-strong); }
.ex-sol__type { font-weight: 700; }
.ex-sol__skill { flex-basis: 100%; font-size: .85rem; color: var(--muted); }
.ex-sol > :not(summary) { margin-inline: 14px; }
.ex-sol > :last-child { margin-bottom: 14px; }
.ex-sol .ex-q { padding: 12px; border-radius: 8px; background: #fff; color: #17232d; }
.ex-sol__text { margin: 8px 14px; line-height: 1.6; }
.ex-rubric { margin: 4px 14px 14px; padding-left: 1.2em; }

/* ---------- Editor ---------- */
.ex-aibox { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; margin-bottom: 16px; padding: 16px 18px; border-radius: var(--radius-lg); background: linear-gradient(135deg, color-mix(in srgb, var(--brand) 9%, var(--surface)), color-mix(in srgb, var(--accent) 9%, var(--surface))); border: 1px solid color-mix(in srgb, var(--brand) 25%, var(--line)); }
.ex-aibox__text { flex: 1 1 320px; }
.ex-aibox__text p { margin: 0; }
.ex-aibox__title { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; }
.ex-aibox__title .icon { color: var(--brand); }
.ex-hdform { margin-bottom: 16px; }
.ex-hdform__summary { display: flex; align-items: center; gap: 8px; font-weight: 800; cursor: pointer; list-style: none; }
.ex-hdform__summary::-webkit-details-marker { display: none; }
.ex-hdform__summary .icon { width: 20px; height: 20px; color: var(--brand); }
.ex-hdform[open] .ex-hdform__summary { margin-bottom: 16px; }
.ex-eslots { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.ex-eslot { padding: 16px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); scroll-margin-top: calc(var(--header-h) + 16px); }
.ex-eslot__head { display: flex; gap: 12px; align-items: flex-start; }
.ex-eslot__n { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; background: var(--brand-soft); color: var(--brand-strong); font-weight: 800; }
.ex-eslot__info { flex: 1; min-width: 0; }
.ex-eslot__info p { margin: 0; }
.ex-eslot__type { font-weight: 750; }
.ex-eslot__skill { font-size: .86rem; color: var(--muted); }
.ex-eslot__tools { flex: none; display: flex; gap: 6px; }
.ex-eslot__tools form { margin: 0; }
.ex-eslot__tools .icon { width: 17px; height: 17px; }
@media (max-width: 520px) { .ex-eslot__head { flex-wrap: wrap; } .ex-eslot__tools { width: 100%; justify-content: flex-end; } }
.ex-eslot__preview { margin: 10px 0 0; padding: 10px 12px; border-radius: 8px; background: #fff; color: #17232d; border: 1px solid #e3e9ec; overflow-wrap: break-word; }
.ex-eslot__edit { margin-top: 10px; }
.ex-eslot__edit > summary { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--brand-strong); cursor: pointer; list-style: none; }
.ex-eslot__edit > summary::-webkit-details-marker { display: none; }
.ex-eslot__edit > summary .icon { width: 17px; height: 17px; }
.ex-eslot__edit[open] > summary { margin-bottom: 12px; }
.ex-eslot__edit .ex-form { display: grid; gap: 12px; }
.ex-points { max-width: 160px; }
.ex-variant { margin: 0; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); display: grid; gap: 10px; min-width: 0; }
.ex-variant__title { padding: 0 6px; font-weight: 800; color: var(--brand-strong); }
.ex-eopts { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.ex-eopts li { display: flex; gap: 8px; align-items: center; }
.ex-eopts input[type="text"] { flex: 1; min-width: 0; }
.ex-eopts input[type="radio"], .ex-eopts input[type="checkbox"] { flex: none; width: 20px; height: 20px; }
.ex-livepreview { margin: 6px 0 0; padding: 8px 10px; border-radius: 8px; background: #fff; color: #17232d; border: 1px dashed #c9d6db; font-size: .95rem; }
.ex-livepreview:empty { display: none; }
.ex-preview-btn { align-self: flex-start; }

/* Diálogo de IA */
.ex-dialog { width: min(100% - 24px, 620px); max-height: calc(100vh - 32px); padding: 0; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); color: var(--text); box-shadow: var(--shadow-lg); }
.ex-dialog::backdrop { background: rgba(10, 18, 30, .55); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.ex-dialog .ex-form { padding: clamp(18px, 4vw, 28px); display: grid; gap: 12px; }
.ex-dialog.is-busy .ex-form { opacity: .75; pointer-events: none; }
.ex-ai-status { margin: 0; min-height: 1.3em; font-weight: 650; color: var(--brand-strong); }
.ex-ai-status.is-error { color: var(--error); }

/* ---------- Simulador ---------- */
.ex-demo__grid { display: grid; gap: 22px; align-items: start; }
@media (min-width: 1100px) { .ex-demo__grid { grid-template-columns: 420px minmax(0, 1fr); gap: 32px; } .ex-demo__form { position: sticky; top: calc(var(--header-h) + 12px); max-height: calc(100vh - var(--header-h) - 24px); overflow: auto; } }
.ex-demo__form { display: grid; gap: 10px; padding: 18px; }
.ex-fold { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.ex-fold > summary { display: flex; align-items: center; gap: 10px; padding: 12px 14px; font-weight: 800; cursor: pointer; list-style: none; }
.ex-fold > summary::-webkit-details-marker { display: none; }
.ex-fold > summary::after { content: ""; margin-left: auto; width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); }
.ex-fold[open] > summary::after { transform: rotate(-135deg); }
.ex-fold > :not(summary) { margin: 0 14px 14px; }
.ex-fold .ex-step__n { width: 28px; height: 28px; border-radius: 8px; font-size: .85rem; }
.ex-demo__note { display: flex; gap: 8px; align-items: flex-start; margin: 4px 0 0; font-size: .88rem; color: var(--muted); }
.ex-demo__note .icon { flex: none; width: 18px; height: 18px; margin-top: 2px; color: var(--brand); }
.ex-demo__topic { display: flex; gap: 8px; align-items: flex-start; margin: 0 0 12px; font-size: .92rem; color: var(--muted); }
.ex-demo__topic .icon { flex: none; width: 18px; height: 18px; margin-top: 2px; color: var(--accent-strong); }
.ex-demo__cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; margin-top: 22px; padding: 18px 20px; border-radius: var(--radius-lg); background: var(--surface-2); }
.ex-demo__cta p { margin: 0; flex: 1 1 300px; font-weight: 600; }
.ex-demo .ex-types { gap: 6px; }
.ex-demo .ex-type { padding: 8px 10px; }
.ex-demo .ex-type__hint { display: none; }
.ex-demo .ex-num__btn { width: 34px; height: 34px; }

/* Perfil */
.ex-logo { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.ex-logo__preview { display: grid; place-items: center; width: 96px; height: 96px; border-radius: 14px; border: 1px dashed var(--line); background: var(--surface-2); overflow: hidden; color: var(--muted); }
.ex-logo__preview img { max-width: 100%; max-height: 100%; object-fit: contain; }
.ex-logo__preview .icon { width: 30px; height: 30px; }
.ex-eslot__edit textarea, .ex-eopts input[type="text"] { font-family: var(--font-mono); font-size: .92rem; }
/* El botón de WhatsApp no tapa la navegación fija del asistente ni las acciones del editor. */
body:has([data-ex-wizard]) .whatsapp-float, body:has(.ex-dialog[open]) .whatsapp-float { bottom: calc(96px + env(safe-area-inset-bottom)); }
.ex-demo__jump { margin: 10px 0 0; }
.ex-demo__jump a { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; text-decoration: none; }
.ex-demo__jump .icon { width: 18px; height: 18px; }
@media (min-width: 1100px) { .ex-demo__jump { display: none; } }
.ex-demo__preview { scroll-margin-top: calc(var(--header-h) + 12px); }
