:root {
  color-scheme: dark;
  --bg: #071427;
  --panel: #101f34;
  --panel-2: #162840;
  --line: rgba(116, 211, 157, 0.28);
  --text: #f6fbff;
  --muted: #a8b8ca;
  --emerald: #74d39d;
  --blue: #2e6be6;
  --lime: #c9ff4a;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(46, 107, 230, 0.28), transparent 34rem),
    linear-gradient(135deg, #071427, #10213a 55%, #06111f);
  color: var(--text);
}

button,
input,
a {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

.shell {
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: 28px;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.site-hero {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 28vh;
}

.site-hero img {
  width: 128px;
  height: 128px;
  object-fit: contain;
}

.site-hero p {
  color: var(--lime);
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.apps-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.app-card {
  min-height: 180px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(16, 31, 52, 0.86);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.2);
}

.app-card span {
  display: block;
  font-size: 30px;
  font-weight: 900;
}

.app-card small {
  display: block;
  margin-top: 12px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.45;
}

.brand,
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.brand {
  justify-content: flex-start;
  margin-top: 10vh;
}

.brand img {
  width: 92px;
  height: 92px;
  object-fit: contain;
  border-radius: 24px;
  background: #071427;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.24);
}

p,
h1 {
  margin: 0;
}

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

h1 {
  margin-top: 4px;
  font-size: clamp(30px, 5vw, 54px);
  line-height: 1;
  letter-spacing: 0;
}

.panel,
.choice-card,
.student-card {
  border: 1px solid var(--line);
  background: rgba(16, 31, 52, 0.86);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.2);
}

.panel {
  max-width: 520px;
  padding: 22px;
  border-radius: 18px;
}

label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-weight: 700;
}

input {
  width: 100%;
  height: 54px;
  border: 1px solid rgba(168, 184, 202, 0.3);
  border-radius: 12px;
  padding: 0 14px;
  background: #08172a;
  color: var(--text);
  outline: none;
  text-transform: uppercase;
}

input:focus {
  border-color: var(--emerald);
}

button {
  cursor: pointer;
  border: 0;
  color: var(--text);
}

form button,
.primary {
  width: 100%;
  min-height: 52px;
  margin-top: 14px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--emerald), #27b6d6);
  color: #06111f;
  font-weight: 900;
}

.ghost {
  min-height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.message {
  margin-top: 12px;
  font-size: 14px;
}

.home-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.choice-card {
  min-height: 180px;
  padding: 22px;
  border-radius: 18px;
  text-align: left;
}

.choice-card span {
  display: block;
  font-size: 28px;
  font-weight: 900;
}

.choice-card small {
  display: block;
  margin-top: 12px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.45;
}

.room-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.student-card {
  min-height: 150px;
  padding: 12px;
  border-radius: 16px;
  display: grid;
  grid-template-columns: 84px 1fr;
  align-items: center;
  gap: 10px;
}

.student-card img {
  width: 84px;
  height: 84px;
  object-fit: contain;
}

.student-card strong {
  display: block;
  font-size: 18px;
}

.student-card span {
  display: block;
  margin-top: 8px;
  color: var(--lime);
  font-weight: 900;
}

.task-list {
  display: grid;
  gap: 12px;
}

.task-item {
  width: 100%;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(16, 31, 52, 0.9);
  text-align: left;
}

.task-item strong {
  display: block;
  font-size: 20px;
}

.task-item span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
}

.timer {
  font-size: 34px;
  color: var(--lime);
}

.test-panel {
  max-width: none;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.actions button {
  min-height: 46px;
  padding: 0 16px;
  border-radius: 12px;
  background: var(--panel-2);
  border: 1px solid var(--line);
}

.question-workspace {
  margin-top: 18px;
}

.question-navigator {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(48px, 1fr));
  gap: 8px;
  margin-bottom: 16px;
}

.question-number {
  min-width: 48px;
  min-height: 48px;
  border: 1px solid rgba(168, 184, 202, 0.45);
  border-radius: 6px;
  background: #162840;
  color: var(--text);
  font-weight: 900;
}

.question-number.answered {
  border-color: var(--emerald);
  background: var(--emerald);
  color: #06111f;
}

.question-number.current {
  outline: 3px solid #65b7ff;
  outline-offset: 2px;
}

.question-stage {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(7, 20, 39, 0.72);
}

.question-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.question-heading strong {
  font-size: 22px;
}

.question-heading span {
  color: var(--muted);
  text-align: right;
}

.question-media {
  display: grid;
  place-items: center;
  min-height: 220px;
  overflow: hidden;
  border-radius: 6px;
  background: #fff;
}

.question-media img {
  display: block;
  width: 100%;
  max-height: 58vh;
  object-fit: contain;
}

.question-unavailable {
  padding: 24px;
  color: #6c2431;
  text-align: center;
  font-weight: 800;
}

.answer-choices {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.answer-choice {
  min-height: 54px;
  border: 1px solid rgba(168, 184, 202, 0.45);
  border-radius: 6px;
  background: var(--panel-2);
  font-size: 20px;
  font-weight: 900;
}

.answer-choice.selected {
  border-color: var(--emerald);
  background: var(--emerald);
  color: #06111f;
}

.question-controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
}

.question-controls button {
  min-height: 50px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel-2);
  font-weight: 800;
}

.question-controls button:disabled {
  cursor: default;
  opacity: 0.4;
}

@media (max-width: 720px) {
  .shell {
    padding: 18px;
  }

  .brand {
    margin-top: 4vh;
  }

  .site-hero {
    min-height: 22vh;
  }

  .site-hero img {
    width: 96px;
    height: 96px;
  }

  .apps-grid,
  .home-grid,
  .room-grid {
    grid-template-columns: 1fr;
  }

  .student-card {
    min-height: 128px;
  }

  .answer-choices {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .question-heading {
    align-items: flex-start;
    flex-direction: column;
  }
}
