:root {
  color-scheme: light;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #131938;
  background: #edf1ff;
  --ink: #131938;
  --muted: #4d5878;
  --line: #d9e0f6;
  --blue: #293dd4;
  --blue-hover: #2131b1;
  --paper: #fff;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  min-width: 280px;
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(ellipse at 22% 0%, #fafbff, transparent 46%), #edf1ff;
}

button, input { font: inherit; }
a { color: inherit; }

:focus-visible {
  outline: 3px solid #596afb;
  outline-offset: 4px;
}

.site {
  width: min(1100px, 100% - 72px);
  margin: 0 auto;
}

.masthead {
  height: 92px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 740;
  letter-spacing: -.02em;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: var(--blue);
  color: white;
  font-size: 19px;
}

.demo {
  padding: 6px 11px;
  border: 1px solid #cdd6f2;
  border-radius: 30px;
  color: var(--muted);
  font-size: .875rem;
  font-weight: 650;
}

.view {
  display: grid;
  align-items: start;
  min-height: min(550px, 68vh);
}

.panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 30px;
  box-shadow: 0 18px 55px #283e8410;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  min-height: 520px;
  gap: 16px;
  padding: 16px;
}

.intro {
  padding: clamp(28px, 4.4vw, 60px);
  align-self: center;
}

h1, h2 { margin: 0; line-height: 1.06; letter-spacing: -.055em; text-wrap: balance; }
h1 { font-size: clamp(2rem, 4.2vw, 3.5rem); font-weight: 790; }
.intro h1 { font-size: clamp(2.5rem, 5.6vw, 4.45rem); }
h2 { font-size: clamp(1.4rem, 2.7vw, 1.9rem); }
p { margin: 0; line-height: 1.55; }
.muted { color: var(--muted); }
.lead { margin-top: 18px; max-width: 37ch; font-size: 1.0625rem; }

.art {
  position: relative;
  display: grid;
  place-items: center;
  isolation: isolate;
  overflow: hidden;
  min-height: 360px;
  border-radius: 22px;
  color: #fff;
  background: #293dd4;
  background-image: radial-gradient(ellipse at 66% 18%, #5263ee 0, transparent 55%);
}

.art::before, .art::after {
  content: "";
  position: absolute;
  z-index: -1;
  width: min(100% - 36px, 370px);
  aspect-ratio: 1;
  border: 1px solid #afbbff60;
  border-radius: 50%;
}
.art::after { width: min(100% - 70px, 310px); }

.art-date {
  position: absolute;
  left: 22px;
  top: 22px;
  padding: 8px 13px;
  border-radius: 40px;
  background: #e6e9ff;
  color: #222c93;
  font-size: .9375rem;
  font-weight: 750;
}

.art-question {
  display: grid;
  place-items: center;
  width: min(42%, 172px);
  aspect-ratio: .78;
  border-radius: 26px;
  transform: rotate(-12deg);
  background: #ffac60;
  color: #201e40;
  box-shadow: 16px 16px 0 #182795;
  font-size: clamp(5rem, 10vw, 9rem);
  font-weight: 830;
  line-height: 1;
}

.art-spark {
  position: absolute;
  color: #fff2c6;
  font-size: 3rem;
  line-height: 1;
}
.art-spark.top { top: 18%; right: 13%; }
.art-spark.bottom { bottom: 16%; left: 14%; font-size: 1.75rem; }

.compact {
  width: min(100%, 720px);
  margin-inline: auto;
  padding: clamp(24px, 5vw, 52px);
}

form {
  display: grid;
  gap: 10px;
  margin-top: 26px;
}
.intro form, .login-form { max-width: 360px; }
label { width: fit-content; font-weight: 630; }

input[type="text"], input[type="password"] {
  min-height: 52px;
  width: 100%;
  border: 1px solid #bcc7e8;
  border-radius: 12px;
  padding: 10px 14px;
  color: var(--ink);
  background: #f8faff;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  width: fit-content;
  padding: 11px 19px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: var(--blue);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}
form > .button { margin-top: 6px; }
.button:hover:enabled { background: var(--blue-hover); }
.button:disabled { cursor: default; opacity: .54; }

.button.secondary {
  border-color: var(--line);
  background: #f4f6ff;
  color: #27377f;
}
.button.secondary:hover:enabled { background: #e9edff; }

.error {
  color: #9b2147;
  font-size: .9375rem;
}
.error:empty { display: none; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 20px; }

.question-count {
  margin-bottom: 10px;
  color: var(--muted);
  font-size: .9375rem;
  font-weight: 690;
}

.progress {
  display: block;
  width: 100%;
  height: 7px;
  margin-bottom: 25px;
  border: 0;
  border-radius: 20px;
  appearance: none;
  overflow: hidden;
  background: #e9edfa;
  color: var(--blue);
}
.progress::-webkit-progress-bar { background: #e9edfa; }
.progress::-webkit-progress-value { background: var(--blue); border-radius: 20px; }
.progress::-moz-progress-bar { background: var(--blue); border-radius: 20px; }

.options { display: grid; gap: 10px; margin-top: 25px; }
.options:first-child { margin-top: 0; }

.option {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 55px;
  width: 100%;
  padding: 12px 15px;
  border: 1px solid var(--line);
  border-radius: 13px;
  font-weight: 570;
  cursor: pointer;
}
.option:hover { background: #f5f7ff; }
.option:has(:checked) { border-color: #596afb; background: #edf0ff; }
.option input { width: 18px; height: 18px; margin: 0; accent-color: var(--blue); flex: 0 0 auto; }
.options + .error { margin-top: 12px; }

.state-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  background: #e9edff;
  color: var(--blue);
  border-radius: 16px;
  font-size: 1.5rem;
  font-weight: 750;
  margin-bottom: 20px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 24px 0;
}
.stat {
  display: grid;
  gap: 4px;
  padding: 15px;
  border-radius: 15px;
  background: #f0f3ff;
  color: var(--muted);
}
.stat strong { color: var(--blue); font-size: 2.2rem; font-variant-numeric: tabular-nums; }

.result-banner {
  position: relative;
  isolation: isolate;
  display: grid;
  align-content: center;
  min-height: 205px;
  overflow: hidden;
  padding: clamp(20px, 5vw, 36px);
  border-radius: 20px;
  color: #fff;
  background: radial-gradient(ellipse at 95% 10%, #6546dd, transparent 60%), #232e9e;
}

.result-greeting {
  margin-bottom: 8px;
  color: #ffdeac;
  font-weight: 750;
}

.result-banner h1 {
  max-width: 14ch;
  font-size: clamp(1.9rem, 5vw, 3.35rem);
}

.result-decoration {
  position: absolute;
  z-index: -1;
  inset: 0 0 0 auto;
  width: 34%;
  color: #ffb86e;
  background:
    radial-gradient(circle at 18% 14%, #ffdeac 3px, transparent 4px),
    radial-gradient(circle at 73% 16%, #f7a8ce 2px, transparent 3px),
    radial-gradient(circle at 88% 39%, #ffdeac 3px, transparent 4px),
    radial-gradient(circle at 13% 63%, #acb5ff 2px, transparent 3px),
    radial-gradient(circle at 35% 85%, #f7a8ce 3px, transparent 4px),
    radial-gradient(circle at 85% 88%, #ffdeac 2px, transparent 3px);
}
.result-decoration span { position: absolute; line-height: 1; }
.result-decoration span:nth-child(1) { top: 26%; right: 26%; font-size: clamp(2.1rem, 6vw, 4.6rem); }
.result-decoration span:nth-child(2) { bottom: 17%; right: 16%; color: #ffdeac; font-size: clamp(1.3rem, 4vw, 2.5rem); }
.result-decoration span:nth-child(3) { top: 61%; left: 22%; color: #f7a8ce; font-size: 1.05rem; }

.result-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0 0;
}
.result-metrics div {
  min-width: 76px;
  padding: 8px 14px;
  border: 1px solid #ffffff55;
  border-radius: 12px;
  background: #ffffff16;
}
.result-metrics dt { color: #e6e6ff; font-size: .875rem; }
.result-metrics dd { margin: 2px 0 0; font-size: 1.125rem; font-weight: 760; }

.standings { width: 100%; border-collapse: collapse; margin-top: 22px; }
.standings td, .standings th {
  padding: 11px 7px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}
.standings th { color: var(--muted); font-size: .875rem; }
.standings td:first-child { width: 3.3rem; color: var(--muted); }
.standings td:last-child, .standings th:last-child { text-align: right; }
.standings td:nth-child(2) { overflow-wrap: anywhere; }
.standings .own { background: #eef1ff; font-weight: 700; }
.standing-place {
  display: inline-grid;
  place-items: center;
  min-width: 28px;
  height: 28px;
  border-radius: 9px;
  font-variant-numeric: tabular-nums;
}
.standing-place.winner { color: #663707; background: #ffe6b6; font-weight: 750; }

.discussion {
  margin-top: 24px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #f7f9ff;
}
.discussion summary {
  padding: 14px 16px;
  color: #27377f;
  font-weight: 700;
  cursor: pointer;
}
.discussion-list { margin: 0; padding: 0 16px 8px 44px; }
.discussion-list li { padding: 10px 0; border-top: 1px solid var(--line); }
.discussion-list li::marker { color: var(--muted); font-variant-numeric: tabular-nums; }
.discussion-question { font-weight: 650; }
.discussion-answer { margin-top: 4px; color: #27377f; }

.footer {
  padding: 22px 0 28px;
  text-align: right;
  color: var(--muted);
  font-size: .875rem;
}
.footer a { text-underline-offset: 4px; }

@media (max-width: 760px) {
  .site { width: min(100% - 36px, 520px); }
  .masthead { height: 72px; }
  .hero { grid-template-columns: 1fr; padding: 12px; gap: 12px; min-height: 0; }
  .intro { padding: 24px 14px; }
  .art { min-height: 220px; border-radius: 18px; }
  .art::before { width: 210px; }
  .art::after { width: 174px; }
  .art-date { top: 13px; left: 13px; }
  .art-question { width: 94px; border-radius: 17px; }
  .art-spark.top { top: 17%; right: 16%; font-size: 2rem; }
  .art-spark.bottom { left: 18%; }
  .results-panel { padding: 16px; }
  .result-decoration { width: 28%; }
  .result-decoration span:nth-child(1) { top: 19%; right: 17%; }
  .footer { padding-top: 16px; }
}

@media (max-width: 380px) {
  .site { width: calc(100% - 24px); }
  .intro { padding-inline: 9px; }
}
