body {
  margin: 0;
  font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", sans-serif;
  color: #fafafa;
  background: #09090b;
}

main {
  max-width: 1060px;
  margin: 0 auto;
  padding: 32px 16px;
}

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin: -32px -16px 32px;
  padding: 14px 16px;
  border-bottom: 1px solid #18181b;
  background: #09090b;
}

h1,
h2,
h3 {
  margin: 0 0 12px;
}

h1 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-size: 22px;
  line-height: 1;
}

h2 {
  font-size: 28px;
}

h3 {
  font-size: 16px;
}

nav {
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
}

section,
article {
  background: #18181b;
  border: 1px solid #27272a;
  border-radius: 16px;
  padding: 32px;
  margin-bottom: 24px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.22);
}

label {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
}

.inline {
  display: flex;
  align-items: center;
  gap: 8px;
}

.row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: end;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

input,
select,
textarea,
button {
  font: inherit;
}

.button-link {
  display: inline-block;
  padding: 12px 18px;
  border: 1px solid #6366f1;
  border-radius: 14px;
  color: #fff;
  background: #6366f1;
  font-weight: 700;
}

input,
select,
textarea {
  padding: 12px 14px;
  border: 1px solid #27272a;
  border-radius: 16px;
  color: #fafafa;
  background: #09090b;
}

textarea {
  min-height: 80px;
}

button {
  padding: 12px 18px;
  border: 1px solid #6366f1;
  border-radius: 14px;
  color: #fff;
  background: #6366f1;
  font-weight: 700;
  cursor: pointer;
}

button:disabled {
  cursor: wait;
  opacity: 0.65;
}

a {
  color: #818cf8;
  text-decoration: none;
}

nav a {
  color: #a1a1aa;
  font-weight: 600;
}

nav a.active {
  padding: 10px 12px;
  border-radius: 8px;
  color: #fafafa;
  background: #27272a;
}

p {
  color: #a1a1aa;
  line-height: 1.55;
}

strong {
  color: #fafafa;
}

.brand-mark {
  display: inline-grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 50%;
  color: #18181b;
  background: #6366f1;
}

.answers {
  display: grid;
  gap: 8px;
  margin: 12px 0;
}

.progress-wrap {
  height: 14px;
  margin-top: 16px;
  overflow: hidden;
  border: 1px solid #27272a;
  border-radius: 999px;
  background: #09090b;
}

.progress-bar {
  width: 0%;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #6366f1, #818cf8);
}

.encounter {
  margin-top: 16px;
  padding: 14px 16px;
  border: 1px solid #f0d78c;
  border-radius: 8px;
  background: rgba(240, 215, 140, 0.08);
}

.encounter p {
  margin: 6px 0 0;
}

.ad-box {
  margin: 0 0 16px;
  padding: 12px 16px;
  border: 1px dashed #71717a;
  border-radius: 8px;
  color: #a1a1aa;
  background: #09090b;
}

.skill-bar {
  position: relative;
  height: 34px;
  margin: 20px 0;
  overflow: hidden;
  border: 1px solid #27272a;
  border-radius: 999px;
  background: #09090b;
}

.skill-zone {
  position: absolute;
  top: 0;
  bottom: 0;
  background: rgba(34, 197, 94, 0.45);
}

.skill-marker {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 4px;
  background: #fafafa;
}

.spot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 12px;
  margin: 18px 0;
}

.question-stage {
  position: relative;
  overflow: hidden;
  margin-top: 16px;
  padding: 22px;
  border: 1px solid #27272a;
  border-radius: 16px;
  background: #09090b;
}

.question-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.2;
}

.question-topline {
  position: relative;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  color: #818cf8;
}

.question-prompt {
  position: relative;
  margin: 0 0 14px;
  font-size: 22px;
  line-height: 1.35;
  font-weight: 700;
  color: #fafafa;
}

.question-stage .answers,
.question-stage button {
  position: relative;
}

.theme-science {
  border-color: #14b8a6;
  background: linear-gradient(135deg, #0f1f1e, #09090b);
}

.theme-science::before {
  background:
    radial-gradient(circle at 12% 20%, #2dd4bf 0 4px, transparent 5px),
    radial-gradient(circle at 88% 28%, #2dd4bf 0 3px, transparent 4px),
    linear-gradient(35deg, transparent 0 48%, #2dd4bf 49% 51%, transparent 52%);
  background-size: 90px 90px;
}

.theme-math {
  border-color: #818cf8;
  background: linear-gradient(135deg, #17172f, #09090b);
}

.theme-math::before {
  background:
    linear-gradient(90deg, #3451b2 1px, transparent 1px),
    linear-gradient(#3451b2 1px, transparent 1px);
  background-size: 22px 22px;
}

.theme-history {
  border-color: #f0d78c;
  background: linear-gradient(135deg, #272012, #09090b);
}

.theme-history::before {
  background:
    linear-gradient(90deg, transparent 0 8px, #8a5a22 9px 10px, transparent 11px),
    linear-gradient(#8a5a22 1px, transparent 1px);
  background-size: 80px 26px;
}

.theme-geography {
  border-color: #22c55e;
  background: linear-gradient(135deg, #102016, #09090b);
}

.theme-geography::before {
  background:
    radial-gradient(ellipse at 25% 35%, #2f7d4a 0 12px, transparent 13px),
    radial-gradient(ellipse at 70% 62%, #2f7d4a 0 16px, transparent 17px),
    linear-gradient(45deg, transparent 0 47%, #2f7d4a 48% 49%, transparent 50%);
  background-size: 130px 90px;
}

@media (max-width: 720px) {
  header {
    align-items: flex-start;
    flex-direction: column;
  }

  section,
  article {
    padding: 20px;
  }
}
