:root {
  --bg: #050505;
  --panel: #151515;
  --panel-soft: #1e1e1e;
  --text: #f4f4f4;
  --muted: #b8b8b8;
  --muted-2: #8f8f8f;
  --gold: #c9a24d;
  --gold-soft: #e2c878;
  --wrong: #d45a5a;
  --right: #5cc586;
  --border: rgba(201, 162, 77, 0.35);
  --white-soft: rgba(255, 255, 255, 0.08);
  --shadow: 0 28px 80px rgba(0,0,0,.45);
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(201, 162, 77, 0.17), transparent 34%),
    radial-gradient(circle at top right, rgba(255,255,255,0.055), transparent 30%),
    linear-gradient(135deg, #030303, #101010 56%, #000);
  color: var(--text);
  line-height: 1.6;
}

.page {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 38px 0 150px;
}

.hero {
  border: 1px solid var(--border);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.035), transparent 42%),
    rgba(16, 16, 16, 0.94);
  border-radius: 28px;
  padding: 34px;
  margin-bottom: 24px;
  box-shadow: var(--shadow);
}

.card,
.info-card,
.question,
.results {
  width: 100%;
  max-width: 100%;
  border: 1px solid var(--border);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.025), transparent 42%),
    rgba(17, 17, 17, 0.94);
  border-radius: 26px;
  padding: 26px;
  margin-bottom: 22px;
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.28);
}

.info-card {
  margin-bottom: 0;
  border-color: rgba(255,255,255,0.12);
}

.eyebrow {
  color: var(--gold-soft);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.75rem;
  font-weight: 900;
  margin-bottom: 10px;
}

h1 {
  margin: 0 0 14px;
  font-size: clamp(2.45rem, 4.6vw, 4.45rem);
  line-height: 1.02;
  font-weight: 900;
  letter-spacing: -0.055em;
}

h2 {
  margin: 0 0 18px;
  color: var(--gold-soft);
  font-size: 1.36rem;
  letter-spacing: -0.02em;
}

p {
  color: var(--muted);
}

.hero-description {
  max-width: 880px;
  font-size: 1.02rem;
  margin-bottom: 28px;
}

.intro-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(330px, 0.75fr);
  gap: 20px;
  align-items: stretch;
}

.instruction-list {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.instruction-step {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 12px;
  border-radius: 16px;
  background: rgba(255,255,255,0.045);
  border: 1px solid rgba(255,255,255,0.075);
}

.instruction-step span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: rgba(201,162,77,.18);
  border: 1px solid rgba(201,162,77,.38);
  color: var(--gold-soft);
  font-weight: 900;
}

.instruction-step p {
  margin: 1px 0 0;
}

.formula-note {
  margin-top: 16px;
  border-left: 4px solid var(--gold);
  padding: 14px 16px;
  background: rgba(255,255,255,.06);
  border-radius: 14px;
  color: var(--text);
  font-weight: 700;
}

.student-box,
.student-box.two-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px;
  margin-top: 18px;
  width: 100%;
}

.student-box > div {
  min-width: 0;
}

label {
  display: block;
  font-size: 0.9rem;
  color: var(--gold-soft);
  margin-bottom: 7px;
  font-weight: 800;
}

input[type="text"] {
  display: block;
  width: 100%;
  max-width: 100%;
  padding: 14px 15px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.16);
  background: #080808;
  color: #fff;
  font-size: 1rem;
  outline: none;
}

input[type="text"]:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201,162,77,.12);
}

input:disabled {
  opacity: 0.72;
  cursor: not-allowed;
}

.start-button {
  width: 100%;
  margin-top: 16px;
}

.question {
  border-color: rgba(255,255,255,0.12);
}

.question-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}

.question h3 {
  margin: 0;
  font-size: 1.14rem;
  color: #fff;
  letter-spacing: -0.02em;
}

.points {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  color: var(--gold-soft);
  background: rgba(201, 162, 77, 0.12);
  border: 1px solid rgba(201, 162, 77, 0.32);
  font-size: .78rem;
  font-weight: 900;
}

.question-text {
  color: var(--text);
  margin-bottom: 16px;
  max-width: 100%;
  overflow-wrap: anywhere;
  font-weight: 700;
}

.options {
  display: grid;
  gap: 12px;
  width: 100%;
  max-width: 100%;
}

.option {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  width: 100%;
  max-width: 100%;
  background: rgba(255,255,255,0.055);
  padding: 14px 15px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.075);
  cursor: pointer;
  color: var(--text);
  overflow: hidden;
  transition: border-color .15s ease, background .15s ease, transform .15s ease;
}

.option:hover {
  border-color: rgba(201, 162, 77, 0.52);
  background: rgba(255,255,255,0.075);
  transform: translateY(-1px);
}

.option input {
  width: 16px;
  height: 16px;
  margin: 5px 0 0 0;
  flex: none;
}

.option span {
  display: block;
  min-width: 0;
  max-width: 100%;
  color: var(--gold-soft);
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.45;
  font-family: Consolas, Monaco, monospace;
  font-size: .96rem;
  font-weight: 700;
}

.open-input {
  margin-top: 10px;
  font-family: Consolas, Monaco, monospace;
}

.actions {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  z-index: 999;
  width: min(720px, calc(100% - 32px));
  display: flex;
  gap: 12px;
  justify-content: center;
  padding: 14px;
  background: rgba(7, 7, 7, 0.90);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(201,162,77,0.30);
  border-radius: 999px;
  box-shadow: 0 18px 60px rgba(0,0,0,.58);
}

button {
  border: 0;
  border-radius: 999px;
  padding: 13px 21px;
  font-weight: 900;
  cursor: pointer;
  font-size: 0.95rem;
  transition: transform .15s ease, background .15s ease;
}

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

.primary {
  background: var(--gold);
  color: #111;
}

.secondary {
  background: rgba(255,255,255,0.1);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.16);
}

.results {
  display: none;
}

.score {
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 900;
  color: var(--gold-soft);
  margin: 10px 0;
}

.correction-item {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 16px 0;
}

.correct {
  color: var(--right);
  font-weight: 800;
}

.incorrect {
  color: var(--wrong);
  font-weight: 800;
}

.small,
.saved-status {
  color: var(--muted);
  font-size: 0.94rem;
}

.saved-status {
  margin-top: 13px;
}

.warning {
  display: none;
  padding: 15px 16px;
  border-radius: 16px;
  background: rgba(212, 90, 90, 0.15);
  border: 1px solid rgba(212, 90, 90, 0.4);
  color: #ffd6d6;
  margin-bottom: 18px;
  font-weight: 700;
}

.locked-notice {
  display: none;
  padding: 15px 16px;
  border-radius: 16px;
  background: rgba(92, 197, 134, 0.13);
  border: 1px solid rgba(92, 197, 134, 0.4);
  color: #d8ffe6;
  margin-bottom: 18px;
  font-weight: 700;
}

@media (max-width: 920px) {
  .intro-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .page {
    width: min(100% - 24px, 1120px);
    padding: 24px 0 170px;
  }

  .hero,
  .card,
  .info-card,
  .question,
  .results {
    padding: 22px;
    border-radius: 22px;
  }

  h1 {
    font-size: 2.45rem;
  }

  .student-box,
  .student-box.two-fields {
    grid-template-columns: 1fr;
  }

  .actions {
    flex-direction: column;
    border-radius: 24px;
    bottom: 12px;
  }

  button {
    width: 100%;
  }
}


.timer-display {
  color: var(--gold-soft);
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 900;
  line-height: 1;
  margin: 12px 0;
}

.timer-card {
  border-color: rgba(201,162,77,.34);
}

.timer-warning {
  border-color: rgba(217,139,117,.55) !important;
  background:
    linear-gradient(180deg, rgba(217,139,117,.08), transparent 42%),
    rgba(17,17,17,.94) !important;
}

.timer-warning .timer-display {
  color: #ffd8ce;
}
