*{
  box-sizing:border-box;
}

:root{
  --fondo:#f3f0ea;
  --superficie:#fffdf9;
  --texto:#263238;
  --texto-suave:#68706f;
  --borde:#d8d2c8;
  --principal:#334e4a;
  --principal-oscuro:#263f3c;
  --acento:#8a6d4f;
  --verde:#5f7868;
  --advertencia:#fff4df;
  --advertencia-borde:#d8b476;
  --error:#f8e8e5;
  --error-borde:#c98577;
  --codigo:#20282d;
  --codigo-texto:#f3f1ec;
  --sombra:0 6px 20px rgba(48,43,37,.08);
}

html{
  -webkit-text-size-adjust:100%;
  scroll-behavior:smooth;
}

body{
  margin:0;
  min-height:100vh;
  font-family:"Segoe UI",Roboto,Arial,sans-serif;
  background:var(--fondo);
  color:var(--texto);
  line-height:1.5;
}

.hero{
  background:var(--principal);
  color:#fff;
  padding:28px clamp(18px,5vw,72px);
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:24px;
  border-bottom:5px solid var(--acento);
}

.hero h1{
  margin:4px 0 8px;
  font-size:clamp(27px,4vw,43px);
  line-height:1.12;
  font-weight:750;
  letter-spacing:-.02em;
}

.hero p{
  margin:0;
  opacity:.93;
}

.kicker{
  text-transform:uppercase;
  letter-spacing:.1em;
  font-size:12px;
  font-weight:700;
  opacity:.8;
}

.top-tools{
  display:flex;
  align-items:stretch;
  gap:12px;
  flex:0 0 auto;
}

.author-box,
.timer-box{
  min-width:180px;
  border:1px solid rgba(255,255,255,.28);
  border-radius:12px;
  padding:12px 15px;
  background:rgba(255,255,255,.07);
}

.author-box{
  text-align:right;
}

.author-box span,
.timer-box span{
  display:block;
  font-size:11px;
  text-transform:uppercase;
  letter-spacing:.06em;
  opacity:.78;
}

.author-box strong{
  font-size:14px;
  line-height:1.35;
}

.timer-box strong{
  display:block;
  margin-top:2px;
  font-size:23px;
  letter-spacing:.04em;
}

.timer-box strong.urgent{
  color:#ffe3b4;
  animation:pulse 1s infinite;
}

@keyframes pulse{
  50%{opacity:.55}
}

.wrap{
  width:min(1040px,calc(100% - 32px));
  margin:24px auto 48px;
}

.card,
.step{
  background:var(--superficie);
  border:1px solid var(--borde);
  border-radius:14px;
  padding:22px;
  box-shadow:var(--sombra);
}

.login-card{
  max-width:650px;
  margin:0 auto;
}

.instructions-card{
  max-width:900px;
  margin:0 auto;
}

.datos{
  margin-bottom:18px;
}

.card h2,
.step h2{
  color:var(--principal-oscuro);
}

label{
  color:var(--texto);
}

select,
.password-input{
  width:100%;
  padding:12px 13px;
  border:1px solid #c8c1b6;
  border-radius:9px;
  background:#fff;
  color:var(--texto);
  font:inherit;
  outline:none;
}

select{
  margin-top:8px;
}

.password-input{
  margin-top:8px;
}

select:focus,
.password-input:focus,
.codeblock input:focus{
  border-color:var(--principal);
  box-shadow:0 0 0 3px rgba(51,78,74,.12);
}

.block-label{
  display:block;
  margin-top:18px;
}

.help,
.warning{
  color:var(--texto-suave);
  font-size:14px;
  line-height:1.55;
}

.login-btn{
  width:100%;
  margin-top:20px;
}

.exam-alert{
  margin-top:14px;
  padding:12px 14px;
  border-radius:9px;
  background:var(--advertencia);
  border:1px solid var(--advertencia-borde);
  color:#664b27;
  font-size:14px;
  line-height:1.55;
}

.security-msg{
  display:none;
  margin:12px 0;
  padding:12px 14px;
  border-radius:9px;
  background:var(--error);
  border:1px solid var(--error-borde);
  color:#7e3c32;
  font-weight:650;
  font-size:14px;
}

.instructions-list{
  padding-left:24px;
  line-height:1.65;
}

.instructions-list li{
  margin-bottom:8px;
}

.instruction-actions{
  display:flex;
  justify-content:space-between;
  gap:12px;
  margin-top:20px;
}

.progress-shell{
  display:flex;
  align-items:center;
  gap:12px;
  margin:18px 2px;
}

.progress{
  height:8px;
  flex:1;
  background:#ddd8cf;
  border-radius:999px;
  overflow:hidden;
}

.progress div{
  height:100%;
  width:10%;
  background:var(--principal);
  transition:width .2s ease;
}

.progress-shell span{
  font-size:13px;
  font-weight:700;
  color:var(--texto-suave);
  white-space:nowrap;
}

.step{
  display:none;
}

.step.active{
  display:block;
}

.section-title{
  display:flex;
  align-items:center;
  gap:12px;
  border-bottom:1px solid var(--borde);
  padding-bottom:14px;
  margin-bottom:16px;
}

.section-title span{
  flex:0 0 auto;
  background:#e7ece8;
  color:var(--principal-oscuro);
  border:1px solid #cfd8d2;
  border-radius:999px;
  padding:6px 10px;
  font-size:12px;
  font-weight:750;
}

.section-title h2{
  margin:0;
  font-size:20px;
}

.codeblock{
  white-space:pre-wrap;
  overflow-x:auto;
  -webkit-overflow-scrolling:touch;
  font-family:Consolas,"Courier New",monospace;
  background:var(--codigo);
  color:var(--codigo-texto);
  padding:18px;
  border-radius:10px;
  line-height:2.05;
  font-size:14px;
  border:1px solid #171d21;
}

.codeblock input{
  font:inherit;
  width:92px;
  max-width:100%;
  padding:5px 7px;
  border-radius:6px;
  border:1px solid #8e989d;
  background:#fffdf9;
  color:#1f2529;
  outline:none;
}

.codeblock input.wide{
  width:160px;
}

.codeblock input.textwide{
  width:210px;
}

.nav{
  display:flex;
  justify-content:space-between;
  gap:12px;
  margin-top:18px;
}

.btn{
  display:inline-flex;
  justify-content:center;
  align-items:center;
  min-height:44px;
  border:0;
  border-radius:9px;
  padding:12px 18px;
  font:inherit;
  font-weight:700;
  text-decoration:none;
  cursor:pointer;
  transition:transform .12s ease,opacity .12s ease,background .12s ease;
}

.btn:hover{
  transform:translateY(-1px);
}

.btn:disabled{
  opacity:.45;
  cursor:not-allowed;
  transform:none;
}

.primary{
  background:var(--principal);
  color:#fff;
}

.primary:hover{
  background:var(--principal-oscuro);
}

.secondary{
  background:#e4dfd7;
  color:#3f4545;
}

.success{
  background:var(--verde);
  color:#fff;
}

.warning{
  text-align:center;
  margin-top:14px;
}

footer{
  text-align:center;
  padding:22px 16px 28px;
  color:#5c625f;
  font-size:14px;
}

/* Tabletas */
@media (max-width:900px){
  .hero{
    align-items:flex-start;
    flex-direction:column;
  }

  .top-tools{
    width:100%;
  }

  .author-box,
  .timer-box{
    flex:1;
    text-align:left;
  }

  .wrap{
    width:min(100% - 24px,900px);
  }
}

/* Teléfonos */
@media (max-width:650px){
  .hero{
    padding:22px 16px;
    gap:18px;
  }

  .hero h1{
    font-size:30px;
  }

  .top-tools{
    flex-direction:column;
  }

  .author-box,
  .timer-box{
    width:100%;
    min-width:0;
  }

  .wrap{
    width:calc(100% - 20px);
    margin:14px auto 34px;
  }

  .card,
  .step{
    padding:16px;
    border-radius:11px;
  }

  .section-title{
    align-items:flex-start;
  }

  .section-title h2{
    font-size:18px;
  }

  .progress-shell{
    align-items:flex-start;
    flex-direction:column;
    gap:7px;
  }

  .progress{
    width:100%;
  }

  .codeblock{
    padding:14px;
    font-size:12.5px;
    line-height:2.2;
  }

  .codeblock input{
    width:78px;
  }

  .codeblock input.wide{
    width:125px;
  }

  .codeblock input.textwide{
    width:150px;
  }

  .nav,
  .instruction-actions{
    flex-direction:column;
  }

  .nav .btn,
  .instruction-actions .btn{
    width:100%;
  }

  .instructions-list{
    padding-left:20px;
  }
}

/* Teléfonos pequeños */
@media (max-width:420px){
  .hero h1{
    font-size:26px;
  }

  .hero p{
    font-size:14px;
  }

  .card,
  .step{
    padding:13px;
  }

  .codeblock{
    margin-left:-2px;
    margin-right:-2px;
    padding:12px;
    font-size:11.5px;
  }

  .codeblock input{
    width:70px;
    padding:4px 5px;
  }

  .codeblock input.wide{
    width:110px;
  }

  .codeblock input.textwide{
    width:135px;
  }

  .btn{
    min-height:46px;
  }
}

/* Pantallas grandes */
@media (min-width:1400px){
  .wrap{
    width:1100px;
  }

  .codeblock{
    font-size:14.5px;
  }
}

/* Móviles en horizontal */
@media (max-height:500px) and (orientation:landscape){
  .hero{
    padding-top:14px;
    padding-bottom:14px;
  }

  .hero h1{
    font-size:25px;
  }

  .timer-box,
  .author-box{
    padding:9px 12px;
  }
}
