:root {
  --navy: #183c64;
  --navy-dark: #0e2947;
  --navy-soft: #eaf1f8;
  --gold: #bd8f24;
  --gold-soft: #fbf3dc;
  --ink: #17212c;
  --soft: #4d5a68;
  --muted: #6b7785;
  --line: #ccd6e0;
  --paper: #ffffff;
  --reading: #fffefa;
  --bg: #edf1f5;
  --green: #23734f;
  --red: #a93440;
  --shadow: 0 12px 30px rgba(20, 40, 65, .08);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
body.session-open { user-select: none; -webkit-user-select: none; }
body.security-hidden .security-cover { display: grid; }
.container { width: min(980px, 100%); margin: auto; padding: 24px 18px 110px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 20px; }
.logos { display: flex; align-items: center; gap: 11px; }
.logos img { height: 38px; width: auto; }
.divider { width: 1px; height: 28px; background: var(--line); }
.back { display: inline-flex; align-items: center; gap: 7px; padding: 9px 14px; border: 1px solid var(--line); border-radius: 5px; background: #fff; color: var(--navy); font-size: 12px; font-weight: 800; text-decoration: none; }
.login-section { display: flex; justify-content: center; padding: 35px 0; }
.login-card { width: min(440px, 100%); padding: 32px; border: 1px solid var(--line); border-radius: 7px; background: var(--paper); box-shadow: var(--shadow); }
.eyebrow { display: inline-block; margin-bottom: 12px; padding: 5px 9px; border: 1px solid #cfdae7; background: var(--navy-soft); color: var(--navy); font-size: 10px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.login-card h1 { margin-bottom: 8px; font: 800 25px/1.2 Outfit, sans-serif; }
.login-card p { margin-bottom: 20px; color: var(--soft); font-size: 13px; line-height: 1.6; }
label { display: block; margin-bottom: 7px; font-size: 12px; font-weight: 800; }
input, textarea { width: 100%; padding: 13px 14px; border: 1.5px solid var(--line); border-radius: 5px; background: #fff; color: var(--ink); font: 500 14px Inter; }
input:focus, textarea:focus { outline: 3px solid var(--navy-soft); border-color: var(--navy); }
textarea { min-height: 100px; resize: vertical; line-height: 1.55; }
.hint { margin-top: 6px; color: var(--muted); font-size: 11px; }
.btn { display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 5px; padding: 13px 18px; background: var(--navy); color: #fff; font: 800 14px Inter; cursor: pointer; }
.btn:hover { background: var(--navy-dark); }
.btn:disabled { background: #718096; cursor: default; }
.login-card .btn { width: 100%; margin-top: 18px; }
.error { display: none; margin: 12px 0; padding: 10px 12px; border-left: 4px solid var(--red); background: #fff0f1; color: var(--red); font-size: 12px; }
.error.show { display: block; }
.session { display: none; }
.welcome { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; padding: 14px 18px; border: 1px solid var(--line); background: #fff; }
.welcome h2 { font: 700 16px Outfit; }
.welcome p { margin-top: 2px; color: var(--muted); font-size: 11px; }
.course { padding: 5px 9px; background: var(--navy-soft); color: var(--navy); font-size: 10px; font-weight: 800; }
.logout { margin-top: 5px; border: 0; background: none; color: var(--muted); font-size: 11px; font-weight: 700; cursor: pointer; }
.hero { padding: 29px; border-top: 7px solid var(--gold); background: var(--navy); color: #fff; }
.hero h1 { max-width: 800px; margin: 8px 0 12px; font: 800 29px/1.2 Outfit; }
.hero p { max-width: 800px; color: #dbe7f2; font-size: 13px; line-height: 1.65; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 15px; }
.hero-meta span { padding: 5px 9px; border: 1px solid rgba(255, 255, 255, .24); font-size: 10px; font-weight: 800; }
.card { margin-top: 18px; padding: 24px; border: 1px solid var(--line); border-radius: 7px; background: #fff; box-shadow: var(--shadow); }
.card-title { margin-bottom: 13px; color: var(--navy); font: 800 19px Outfit; }
.lead { color: var(--soft); font-size: 13px; line-height: 1.65; }
.instructions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 16px; }
.instruction { padding: 14px; border-left: 3px solid var(--navy); background: #f7f9fb; }
.instruction strong { display: block; margin-bottom: 5px; font-size: 12px; }
.instruction span { color: var(--soft); font-size: 11px; line-height: 1.5; }
.strategy { overflow: hidden; padding: 0; }
.strategy-head { padding: 20px 23px; border-bottom: 1px solid #ead8a4; background: var(--gold-soft); }
.strategy-head h2 { color: #47330d; font: 800 20px Outfit; }
.strategy-head p { margin-top: 5px; color: #655329; font-size: 12px; }
.strategy-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.strategy-step { min-height: 178px; padding: 20px 17px; border-right: 1px solid var(--line); }
.strategy-step:last-child { border-right: 0; }
.strategy-step .num { display: grid; place-items: center; width: 31px; height: 31px; margin-bottom: 12px; border-radius: 50%; background: var(--navy); color: #fff; font: 800 12px Outfit; }
.strategy-step h3 { color: var(--navy); font: 800 14px Outfit; }
.strategy-step p { margin-top: 6px; color: var(--soft); font-size: 11.5px; line-height: 1.55; }
.model { margin: 0 20px 20px; padding: 16px; border-left: 5px solid var(--gold); background: #fffdf6; }
.model strong { display: block; margin-bottom: 7px; color: #5e470d; font-size: 12px; }
.model p { color: var(--soft); font-size: 12px; line-height: 1.6; }
.model .answer { margin-top: 9px; color: var(--navy); font-weight: 700; }
.reading-block { margin-top: 27px; }
.reading-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 13px 17px; border: 1px solid var(--line); border-bottom: 0; background: #fff; }
.reading-head strong { color: var(--navy); font: 800 14px Outfit; }
.reading-head span { color: var(--muted); font-size: 10px; font-weight: 700; text-transform: uppercase; }
.attention { padding: 14px 18px; border: 1px solid var(--line); border-bottom: 0; background: var(--gold-soft); color: #5d4a18; font-size: 11.5px; line-height: 1.55; }
.attention strong { color: #47330d; }
.reading { padding: 29px 35px; border: 1px solid var(--line); border-left: 5px solid var(--navy); background: var(--reading); }
.reading h2 { margin-bottom: 5px; font: 800 24px/1.25 Outfit; }
.reading .type { margin-bottom: 20px; color: var(--muted); font-size: 11px; font-style: italic; }
.reading p { margin-bottom: 14px; color: #262b33; font: 400 15px/1.88 Lora, Georgia, serif; text-align: justify; }
.reading .target { padding: 0 .12em; border-bottom: 2px solid #d6b761; background: #fff2b8; font-weight: 600; }
.reading .source { margin: 18px 0 0; padding-top: 12px; border-top: 1px solid var(--line); color: var(--muted); font: italic 11px/1.5 Inter; }
.questions { border: 1px solid var(--line); border-top: 0; background: #fff; }
.question { padding: 22px 25px; border-top: 1px solid var(--line); }
.question:first-child { border-top: 0; }
.qline { display: flex; align-items: flex-start; gap: 12px; }
.qnum { display: grid; flex: 0 0 31px; place-items: center; height: 31px; background: var(--navy); color: #fff; font: 800 12px Outfit; }
.qtext { padding-top: 3px; font-size: 14px; font-weight: 700; line-height: 1.5; }
.qtags { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 10px 43px; }
.qtags span { padding: 3px 7px; background: var(--navy-soft); color: var(--navy); font-size: 9px; font-weight: 800; }
.options { margin-left: 43px; list-style: none; }
.option { display: flex; align-items: flex-start; gap: 11px; margin-top: 8px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 4px; background: #fff; cursor: pointer; transition: .12s; }
.option:hover { border-color: #91a6bc; background: #f8fafc; }
.option.selected { padding: 10px 11px; border: 2px solid var(--navy); background: var(--navy-soft); }
.option.correct { border-color: var(--green); background: #edf8f2; }
.option.wrong { border-color: var(--red); background: #fff0f1; }
.letter { display: grid; flex: 0 0 25px; place-items: center; height: 25px; border: 1px solid #aab5c1; border-radius: 50%; font-size: 11px; font-weight: 800; }
.option.selected .letter { border-color: var(--navy); background: var(--navy); color: #fff; }
.option.correct .letter { border-color: var(--green); background: var(--green); color: #fff; }
.feedback { display: none; margin: 10px 0 0 43px; padding: 11px 13px; border-left: 3px solid var(--navy); background: #f4f7fa; color: var(--soft); font-size: 11.5px; line-height: 1.55; }
.feedback.show { display: block; }
.written-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.written-item span { display: block; margin-bottom: 7px; color: var(--soft); font-size: 12px; line-height: 1.5; }
.counter { margin-top: 5px; color: var(--muted); font-size: 10px; text-align: right; }
.delivery { position: sticky; z-index: 20; bottom: 12px; display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 26px; padding: 16px 18px; border: 1px solid #c8d2de; background: rgba(255, 255, 255, .97); box-shadow: 0 16px 40px rgba(10, 25, 45, .17); }
.delivery-info { color: var(--muted); font-size: 11px; }
.delivery-info strong { color: var(--ink); font-size: 13px; }
.saved { margin-right: 9px; color: var(--green); font-weight: 800; }
.delivery .btn { min-width: 190px; }
.confirmation { display: none; margin-top: 13px; padding: 14px; border-left: 4px solid var(--green); background: #edf8f2; color: #174c32; font-size: 12px; line-height: 1.55; }
.confirmation.show { display: block; }
.confirmation a { color: var(--navy); font-weight: 800; }
.result { display: none; margin-top: 18px; padding: 24px; background: var(--navy); color: #fff; }
.result.show { display: block; }
.result strong { font: 800 28px Outfit; }
.result p { margin-top: 6px; color: #dbe7f2; font-size: 12px; }
.modal { display: none; position: fixed; inset: 0; z-index: 1000; place-items: center; padding: 20px; background: rgba(10, 18, 29, .74); }
.modal.show { display: grid; }
.modal-card { width: min(480px, 100%); padding: 26px; border-top: 6px solid var(--green); background: #fff; box-shadow: 0 24px 60px rgba(0, 0, 0, .25); }
.modal-card h2 { color: var(--navy); font: 800 22px Outfit; }
.modal-card p { margin: 10px 0 18px; color: var(--soft); font-size: 13px; line-height: 1.6; }
.modal-card .btn { width: 100%; }
.security-cover { display: none; position: fixed; inset: 0; z-index: 2000; place-items: center; padding: 25px; background: #e9edf2; text-align: center; }
.security-cover div { max-width: 500px; padding: 26px; border-top: 7px solid var(--navy); background: #fff; box-shadow: var(--shadow); }
.security-cover h2 { font: 800 20px Outfit; }
.security-cover p { margin-top: 8px; color: var(--soft); font-size: 12px; }
.watermark { display: none; position: fixed; right: 12px; bottom: 7px; z-index: 5; color: rgba(23, 59, 99, .18); font-size: 10px; font-weight: 800; pointer-events: none; }
body.session-open .watermark { display: block; }

@media (max-width: 760px) {
  .container { padding: 14px 10px 92px; }
  .logos img { height: 31px; }
  .instructions, .strategy-grid, .written-grid { grid-template-columns: 1fr; }
  .strategy-step { min-height: 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .hero { padding: 22px 19px; }
  .hero h1 { font-size: 23px; }
  .reading { padding: 22px 18px; }
  .reading p { font-size: 14.5px; text-align: left; }
  .question { padding: 19px 14px; }
  .qtags, .options, .feedback { margin-left: 0; }
  .delivery { align-items: stretch; flex-direction: column; bottom: 6px; }
  .delivery .btn { width: 100%; }
  .reading-head { align-items: flex-start; flex-direction: column; }
  .back { font-size: 0; }
  .back::after { content: 'Volver'; font-size: 12px; }
}
