:root {
  font-family: "Trebuchet MS", Arial, sans-serif;
  color: #24234d;
  background: #f8f7ff;
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: radial-gradient(#e6e2fa 1px, transparent 1px);
  background-size: 23px 23px;
  min-height: 100vh;
}
header {
  max-width: 1200px;
  margin: auto;
  padding: 25px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  color: #5542bd;
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 35px;
  text-decoration: none;
}
.brand span {
  font-size: 13px;
  letter-spacing: 3px;
  line-height: 1.1;
}
.brand b {
  font-size: 23px;
  letter-spacing: 4px;
}
.academy {
  font-size: 11px;
  letter-spacing: 3px;
  font-weight: bold;
  color: #767191;
}
main {
  max-width: 1120px;
  margin: auto;
  padding: 35px 24px;
}
.screen {
  min-height: 570px;
}
.hidden {
  display: none !important;
}
#welcome {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  align-items: center;
  gap: 35px;
}
.badge {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 1.5px;
  font-weight: bold;
  color: #6250af;
  background: #eeebfc;
  padding: 10px 14px;
  border-radius: 30px;
}
h1 {
  font-size: clamp(36px, 5vw, 62px);
  line-height: 1.06;
  letter-spacing: -2px;
  margin: 23px 0;
}
em {
  font-style: normal;
  color: #6b4de2;
}
p {
  color: #716d8c;
  line-height: 1.65;
  font-size: 17px;
}
button {
  font: inherit;
  cursor: pointer;
  transition:
    transform 0.15s,
    box-shadow 0.15s;
}
button:hover {
  transform: translateY(-2px);
}
button:active {
  transform: translateY(2px);
}
button:focus-visible,
a:focus-visible,
summary:focus-visible {
  outline: 3px solid #eea82d;
  outline-offset: 5px;
}
.modes {
  display: grid;
  gap: 15px;
  max-width: 445px;
  margin-top: 28px;
}
.mode {
  border-radius: 18px;
  border: 2px solid #6250c7;
  box-shadow: 0 5px 0 #453495;
  padding: 19px;
  display: flex;
  align-items: center;
  text-align: left;
  gap: 15px;
}
.mode strong {
  display: block;
  font-size: 20px;
}
.mode small {
  display: block;
  font-size: 13px;
  margin-top: 5px;
  opacity: 0.8;
}
.mode b {
  margin-left: auto;
  font-size: 25px;
}
.purple {
  background: #7052df;
  color: white;
}
.cream {
  background: #fff5d8;
  color: #514172;
  border-color: #e4cc86;
  box-shadow: 0 5px 0 #d4bd7d;
}
.icon {
  font-size: 30px;
}
.tiny {
  font-size: 12px;
  color: #827b9c;
  margin-top: 25px;
}
.art {
  height: 470px;
  position: relative;
  display: grid;
  place-items: center;
}
.orbit {
  position: absolute;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  background: #eae3ff;
  border: 25px solid #f1edff;
}
.robot {
  position: relative;
  transform: rotate(-8deg);
  filter: drop-shadow(0 18px 10px #b8a9da66);
}
.face {
  width: 205px;
  height: 150px;
  border: 6px solid #534495;
  background: #b6a2f2;
  border-radius: 46px;
  position: relative;
  z-index: 2;
}
.visor {
  background: #302953;
  border: 5px solid #8370bb;
  border-radius: 27px;
  margin: 25px 15px 0;
  padding: 17px;
  display: flex;
  justify-content: space-between;
}
.visor i {
  width: 22px;
  height: 22px;
  background: #a2f2d0;
  border-radius: 50%;
  box-shadow: 0 0 12px #8df7c9;
}
.smile {
  width: 25px;
  height: 12px;
  border-bottom: 4px solid #514181;
  border-radius: 50%;
  margin: 8px auto;
}
.antenna {
  width: 7px;
  height: 35px;
  background: #584592;
  position: absolute;
  top: -33px;
  left: 100px;
}
.antenna:before {
  content: "";
  position: absolute;
  width: 22px;
  height: 22px;
  background: #ffd575;
  border: 4px solid #584592;
  border-radius: 50%;
  top: -10px;
  left: -7px;
}
.bodybot {
  background: #7960c6;
  border: 6px solid #534495;
  border-radius: 30px;
  width: 140px;
  height: 110px;
  margin: -8px auto 0;
  text-align: center;
  color: #ffde88;
  font-size: 58px;
}
.secret {
  position: absolute;
  bottom: 35px;
  left: 5px;
  transform: rotate(-10deg);
  background: #fff4d4;
  border: 3px solid #dfc380;
  border-radius: 13px;
  box-shadow: 0 8px 0 #e6d8b8;
  padding: 18px 24px;
  font-size: 10px;
  letter-spacing: 3px;
  color: #9b7850;
}
.secret b {
  display: block;
  color: #4b3d65;
  font-size: 26px;
  letter-spacing: 4px;
  margin: 8px 0;
}
.secret span {
  font-size: 8px;
}
.pill {
  position: absolute;
  bottom: 15px;
  right: 0;
  background: #c9f0dd;
  border: 2px solid #9bd5bb;
  padding: 14px 18px;
  border-radius: 30px;
  font-size: 13px;
  font-weight: bold;
  transform: rotate(6deg);
}
.float {
  position: absolute;
  font-weight: bold;
}
.star {
  top: 20px;
  right: 30px;
  font-size: 70px;
  color: #efb84e;
  transform: rotate(12deg);
}
.question {
  top: 60px;
  left: 20px;
  font-size: 60px;
  color: #9b83dc;
  transform: rotate(-18deg);
}
.step {
  font-size: 11px;
  letter-spacing: 2px;
  font-weight: bold;
  color: #827799;
}
.ciphercards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 35px;
}
.tile {
  border: 2px solid #c7b8ef;
  border-radius: 24px;
  background: #eee7ff;
  padding: 30px 24px;
  text-align: left;
  color: #423366;
  box-shadow: 0 6px 0 #cbbde7;
  display: flex;
  flex-direction: column;
  gap: 15px;
}
.tileicon {
  font-size: 32px;
  font-weight: bold;
  padding: 25px 0;
}
.tile strong {
  font-size: 28px;
}
.tile span:not(.tileicon) {
  font-size: 15px;
}
.tile small {
  opacity: 0.75;
}
.tile b {
  margin-top: 18px;
}
.pink {
  background: #fce8ee;
  border-color: #edbecd;
  box-shadow: 0 6px 0 #ecc5d1;
}
.mint {
  background: #e0f5ec;
  border-color: #b3dccc;
  box-shadow: 0 6px 0 #b5decd;
}
.narrow {
  max-width: 690px;
  margin: 0 auto;
}
.centred {
  text-align: center;
}
.box {
  background: #fff;
  border: 2px solid #e5dff3;
  border-radius: 23px;
  padding: 27px;
  margin: 20px 0;
  box-shadow: 0 5px 0 #eeebf7;
}
label {
  display: block;
  font-size: 16px;
  font-weight: bold;
  margin: 22px 0 10px;
}
input,
textarea,
select {
  font:
    17px "Trebuchet MS",
    Arial;
  width: 100%;
  border: 2px solid #ddd4ef;
  border-radius: 12px;
  background: #fcfbff;
  color: #353052;
  padding: 15px;
}
input:focus,
textarea:focus,
select:focus {
  outline: 3px solid #d0c1fa;
  border-color: #8f70e8;
}
textarea {
  height: 100px;
  resize: vertical;
}
input[type="checkbox"] {
  width: auto;
}
.helper {
  font-size: 13px;
}
.primary {
  border: 2px solid #5a3ec2;
  background: #7052df;
  color: white;
  border-radius: 14px;
  font-weight: bold;
  padding: 17px 26px;
  box-shadow: 0 5px 0 #4c319e;
  font-size: 18px;
}
.wide {
  width: 100%;
  margin: 12px 0;
}
.small {
  background: white;
  border: 2px solid #e0d9f1;
  border-radius: 12px;
  padding: 12px 17px;
  color: #61527f;
  font-weight: bold;
  font-size: 13px;
}
.textbtn {
  background: none;
  border: 0;
  color: #79668f;
  padding: 20px 0;
  font-size: 14px;
}
details {
  margin-top: 24px;
  color: #786a90;
  font-size: 13px;
}
summary {
  cursor: pointer;
  padding: 8px 0;
}
.tip {
  padding: 20px;
  border-radius: 15px;
  background: #fff4d7;
  color: #665634;
  line-height: 1.6;
}
.bigicon {
  font-size: 85px;
  margin: 20px;
}
.playtop {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.clock {
  font-size: 24px;
  color: #6d59a0;
  font-variant-numeric: tabular-nums;
  background: #eeebfa;
  border-radius: 13px;
  padding: 10px 15px;
}
.code {
  background: #eee8ff;
  border: 2px solid #d2c2f1;
  border-radius: 20px;
  padding: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 17px;
  justify-content: center;
  font: bold 26px monospace;
  min-height: 100px;
  align-items: center;
}
.word {
  display: inline-flex;
  gap: 8px;
  flex-wrap: wrap;
}
.code svg,
.keygrid svg {
  width: 30px;
  height: 30px;
}
.helps {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin: 22px 0;
}
.feedback {
  font-size: 14px;
  color: #685080;
  line-height: 1.5;
  margin-top: 15px;
}
.keygrid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 18px 8px;
}
.keygrid div {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  font: 16px monospace;
}
h2 {
  overflow-wrap: anywhere;
  font-size: 29px;
  color: #58429b;
}
.scoreline {
  padding: 10px;
  background: #f2effc;
  border-radius: 10px;
  margin: 8px 0;
  font-weight: bold;
}
footer {
  text-align: center;
  font-size: 12px;
  color: #9387a6;
  margin: 50px 0 15px;
}
#error {
  color: #b04565;
  font-size: 14px;
  margin-top: 15px;
}
@media (max-width: 740px) {
  #welcome {
    grid-template-columns: 1fr;
  }
  .art {
    height: 320px;
    order: -1;
  }
  .orbit {
    width: 260px;
    height: 260px;
  }
  .robot {
    transform: scale(0.78) rotate(-8deg);
  }
  .secret {
    bottom: 8px;
    left: 10%;
    padding: 10px;
  }
  .secret b {
    font-size: 18px;
  }
  .pill {
    bottom: 0;
    right: 3%;
    font-size: 11px;
    padding: 10px;
  }
  .star {
    top: 0;
    font-size: 45px;
  }
  .question {
    top: 35px;
    left: 12%;
    font-size: 40px;
  }
  main {
    padding-top: 10px;
  }
  .academy {
    display: none;
  }
  .intro {
    text-align: center;
  }
  .modes {
    margin: 24px auto;
  }
  .ciphercards {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .tile {
    padding: 20px;
    display: grid;
    grid-template-columns: 90px 1fr;
    gap: 10px;
  }
  .tileicon {
    grid-row: span 4;
    align-self: center;
    font-size: 22px;
  }
  .tile b {
    margin: 0;
  }
  .tile strong {
    font-size: 23px;
  }
  h1 {
    letter-spacing: -1px;
  }
  .box {
    padding: 20px;
  }
  .screen {
    min-height: unset;
  }
  header {
    padding: 20px 24px;
  }
  .keygrid {
    grid-template-columns: repeat(5, 1fr);
  }
  .helps {
    flex-wrap: wrap;
  }
}
@media (prefers-reduced-motion: reduce) {
  button {
    transition: none;
  }
}
.writer {
  font-weight: bold;
  color: #5542bd;
  margin: 14px 0 0;
}
.clock.urgent {
  color: #b04565;
  background: #fce8ee;
}
.rule {
  font-size: 14px;
  margin: 14px 0 0;
}
#handoff .rule {
  max-width: 460px;
  margin: 0 auto 24px;
}
.hintwords {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px 22px;
  font-family: monospace;
  font-size: 17px;
  font-weight: bold;
  vertical-align: middle;
}
