:root {
  --ink: #252633;
  --muted: #686a78;
  --paper: #fff;
  --ground: #f6f5f8;
  --line: #e6e3ea;
  --pink: #c62670;
  --pink-dark: #98194f;
  --violet: #7051a6;
  --green: #277653;
  --green-bg: #edf8f1;
  --red: #b84a57;
  --red-bg: #fff1f2;
  --blue: #3578a9;
  --sans: "Segoe UI", Arial, sans-serif;
  --mono: Consolas, "Courier New", monospace;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-height: 100vh;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--sans);
}
button,
input,
select {
  font: inherit;
}
button {
  cursor: pointer;
}
.app-shell {
  max-width: 1180px;
  min-height: 100vh;
  margin: auto;
  padding: 25px 40px 30px;
  display: flex;
  flex-direction: column;
}
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 17px;
  border-bottom: 1px solid var(--line);
}
.topbar p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}
.brand {
  font-weight: 800;
  letter-spacing: 0.05em;
  text-decoration: none;
  color: var(--ink);
  font-size: 0.88rem;
}
.brand span {
  color: var(--pink);
  margin-right: 7px;
}
.text-button {
  border: 0;
  background: none;
  color: var(--muted);
  padding: 7px;
}
.text-button:hover {
  color: var(--pink);
}
.progress-wrap {
  margin: 24px 0 9px;
}
.progress-meta {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}
.progress-track {
  height: 5px;
  border-radius: 9px;
  background: #e5e2e8;
  margin-top: 9px;
  overflow: hidden;
}
.progress-track i {
  display: block;
  height: 100%;
  width: 12.5%;
  background: var(--pink);
  border-radius: inherit;
  transition: width 0.3s ease;
}
.stage {
  flex: 1;
  display: flex;
  align-items: center;
  padding: 22px 0;
}
.stage-content {
  width: 100%;
  animation: enter 0.28s ease both;
}
.eyebrow {
  margin: 0 0 10px;
  color: var(--pink);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.13em;
}
.headline {
  margin: 0;
  max-width: 880px;
  font-size: clamp(2.05rem, 4.3vw, 4.25rem);
  line-height: 1.04;
  letter-spacing: -0.045em;
}
.lead {
  max-width: 720px;
  margin: 15px 0 0;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.55;
}
.center {
  text-align: center;
}
.center .headline,
.center .lead {
  margin-left: auto;
  margin-right: auto;
}
.grid {
  display: grid;
  gap: 24px;
  align-items: center;
  margin-top: 27px;
}
.grid.two {
  grid-template-columns: 1fr 1fr;
}
.grid.three {
  grid-template-columns: repeat(3, 1fr);
}
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 22px;
  box-shadow: 0 2px 9px #20152909;
}
.glass-wrap {
  text-align: center;
}
.glass {
  width: 230px;
  height: 284px;
  margin: auto;
  overflow: hidden;
  position: relative;
  border: 3px solid #b7bac4;
  border-top: 0;
  border-radius: 0 0 31px 31px;
  background: #fff;
}
.glass:before {
  content: "";
  position: absolute;
  z-index: 4;
  top: -7px;
  left: -13px;
  width: 244px;
  height: 14px;
  border: 3px solid #b7bac4;
  border-radius: 50%;
  background: #fff;
}
.glass:after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #fff8, transparent 46%, #c9cad733);
  z-index: 3;
  pointer-events: none;
}
.fill {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: var(--fill);
  background: #f3bfd5;
  transition: height 0.45s ease;
}
.glass.empty .fill {
  background: #f4f2f5;
}
.glass-value {
  position: absolute;
  z-index: 5;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  font: 700 clamp(1.4rem, 3vw, 2.1rem) var(--mono);
  overflow-wrap: anywhere;
}
.glass.empty .glass-value {
  color: #989aa3;
  font: 700 1rem var(--sans);
  letter-spacing: 0.13em;
}
.glass-meta {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.07em;
}
.glass-meta b {
  display: block;
  margin-top: 5px;
  color: var(--ink);
  font-size: 0.97rem;
  letter-spacing: 0;
}
.small .glass {
  transform: scale(0.75);
  margin: -33px auto -24px;
}
.value-string {
  color: var(--pink-dark);
}
.value-number {
  color: var(--blue);
}
.value-boolean {
  color: var(--violet);
}
.info-list {
  display: grid;
  gap: 14px;
  text-align: left;
}
.info-row {
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
}
.info-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}
.info-row span {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  margin-bottom: 5px;
}
.choice-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 9px;
  margin-top: 19px;
}
.choice,
.answer,
.toggle {
  border: 1px solid #d9d5df;
  border-radius: 8px;
  background: #fff;
  padding: 10px 14px;
  font-weight: 700;
}
.choice:hover,
.choice.active,
.answer:hover,
.toggle.active {
  border-color: var(--pink);
  background: #fff7fa;
  color: var(--pink-dark);
}
.answer {
  min-width: 78px;
}
.expression {
  margin: 18px 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fbfafc;
  text-align: center;
  font: 700 clamp(1.08rem, 2.4vw, 1.7rem) var(--mono);
}
.result {
  color: var(--green);
  font-weight: 800;
}
.teacher-prompt {
  margin: 19px 0 0;
  color: var(--violet);
  font-style: italic;
}
.note,
.feedback {
  margin-top: 16px;
  padding: 13px 15px;
  border-left: 3px solid var(--violet);
  border-radius: 0 8px 8px 0;
  background: #faf8fd;
  line-height: 1.5;
  text-align: left;
}
.feedback.good {
  border-color: var(--green);
  background: var(--green-bg);
}
.feedback.bad {
  border-color: var(--red);
  background: var(--red-bg);
}
.control-card {
  text-align: center;
}
.toggle-set {
  display: flex;
  justify-content: center;
  gap: 10px;
}
.access {
  margin-top: 14px;
  padding: 13px;
  border-radius: 8px;
  font-weight: 800;
  letter-spacing: 0.08em;
}
.access.yes {
  background: var(--green-bg);
  color: var(--green);
  border: 1px solid #bfe5cc;
}
.access.no {
  background: var(--red-bg);
  color: var(--red);
  border: 1px solid #efc9ce;
}
.comparison-layout {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 22px;
  margin-top: 20px;
}
.versus {
  color: var(--muted);
  font-weight: 800;
}
.operator-tabs {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 20px 0;
}
.operator-tabs button {
  min-width: 54px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 9px 18px;
  font: 700 1.05rem var(--mono);
}
.operator-tabs button.active {
  border-color: var(--violet);
  background: #f8f5fc;
  color: var(--violet);
}
.select-control {
  display: block;
  width: 100%;
  margin-top: 7px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font-family: var(--mono);
}
.id-image {
  display: block;
  width: min(100%, 300px);
  max-height: 220px;
  object-fit: contain;
  margin: 18px auto 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}
.challenge-list {
  display: grid;
  gap: 13px;
  margin-top: 22px;
}
.challenge {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: center;
  text-align: left;
}
.challenge code {
  font: 1rem var(--mono);
  line-height: 1.55;
}
.final-score {
  margin: 18px 0 0;
  color: var(--violet);
  font-weight: 800;
}
.navigation {
  display: flex;
  justify-content: space-between;
  margin-top: 20px;
}
.nav-button {
  border: 1px solid var(--pink);
  border-radius: 8px;
  background: var(--pink);
  color: #fff;
  padding: 11px 18px;
  font-weight: 800;
}
.nav-button:hover {
  background: var(--pink-dark);
}
.nav-button.secondary {
  border-color: var(--line);
  background: #fff;
  color: var(--muted);
}
.nav-button.secondary:hover {
  border-color: var(--pink);
  color: var(--pink);
}
.nav-button:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}
a {
    text-decoration: none;
}
@keyframes enter {
  from {
    opacity: 0;
    transform: translateY(7px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@media (max-width: 720px) {
  .app-shell {
    padding: 20px;
  }
  .topbar p {
    display: none;
  }
  .grid.two,
  .grid.three,
  .comparison-layout {
    grid-template-columns: 1fr;
  }
  .versus {
    padding: 4px;
  }
  .glass {
    transform: scale(0.88);
    margin: -17px auto;
  }
  .small .glass {
    transform: scale(0.7);
  }
  .challenge {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 430px) {
  .progress-meta {
    font-size: 0.62rem;
  }
  .headline {
    font-size: 2.25rem;
  }
  .choice,
  .answer {
    padding: 9px 11px;
  }
}
