:root {
  color-scheme: light dark;
  --text: #15171a;
  --muted: #525c66;
  --primary: #0666eb;
  --ground: #ffffff;
  --hairline: #e9ecef;
  --outline: #dfe2e6;
  --button: #15171a;
  --on-button: #ffffff;
  --button-subtle: #f1f3f5;
  --success: #1b7f1b;
  --success-text: #145c14;
  --success-tint: #eaf6ea;
  --error: #c4281b;
  --error-text: #9e2016;
  --error-tint: #fdecea;
  --highlight: rgb(6 102 235 / 0.05);
  --gutter: 1.5rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --text: #f5f7fa;
    --muted: #acb5bf;
    --primary: #5d9eff;
    --ground: #121418;
    --hairline: #2a2f36;
    --outline: #3a4048;
    --button: #f5f7fa;
    --on-button: #121418;
    --button-subtle: #1d2025;
    --success: #3fb24a;
    --success-text: #7ddb7d;
    --success-tint: #16301a;
    --error: #f0574a;
    --error-text: #ff9086;
    --error-tint: #3b1b18;
    --highlight: rgb(93 158 255 / 0.14);
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--ground);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

h1,
h2,
h3,
p,
ul,
dl,
dd,
blockquote,
address {
  margin: 0;
}

ul {
  padding: 0;
  list-style: none;
}

img,
svg {
  display: block;
}

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.page {
  max-width: 40rem;
  margin-inline: auto;
  padding-bottom: 2.5rem;
}

.topbar {
  display: flex;
  align-items: center;
  height: 3rem;
  margin-top: 0.25rem;
  padding-inline: var(--gutter);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  color: inherit;
  font-weight: 500;
  text-decoration: none;
}

.brand img {
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 0.4375rem;
}

.stores {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

.stores a {
  display: block;
  border-radius: 0.5rem;
}

.stores img {
  width: auto;
  height: 2.75rem;
}

.pitch {
  padding: 1.25rem var(--gutter) 0;
}

.pitch h1 {
  font-size: clamp(1.75rem, calc(13.33vw - 18px), 2.125rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.lead {
  margin-top: 0.75rem;
  color: var(--muted);
}

.avatar {
  display: grid;
  flex: none;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  background: var(--button-subtle);
}

.avatar svg {
  width: 1.8125rem;
  height: 1.8125rem;
  fill: currentColor;
}

.avatar .glyph-plane {
  width: 1.9375rem;
  height: 1.9375rem;
}

.quiz {
  display: flex;
  flex-direction: column;
  margin-top: 2.5rem;
  scroll-margin-top: 1rem;
}

.quiz-bar {
  display: grid;
  place-items: center;
  height: 3rem;
  font-size: 0.9375rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

html:not(.js) .quiz-bar {
  display: none;
}

.quiz-scroll {
  display: contents;
}

.quiz .actions {
  order: 1;
}

.quiz .explain {
  order: 2;
}

.quiz-again,
.quiz.done .quiz-why,
.quiz.done .quiz-next,
.sheet {
  display: none;
}

.quiz.done .quiz-again {
  display: block;
  flex: 1;
}

.quiz.done .actions {
  margin-top: auto;
}

.result {
  padding-top: 1.25rem;
}

.result .stores {
  margin-top: 0;
  padding: 1.5rem var(--gutter) 0;
}

.progress {
  --slot: calc((100% - (var(--count, 5) - 1) * 4px) / var(--count, 5));
  position: relative;
  display: flex;
  align-items: center;
  gap: 4px;
  height: 24px;
  margin-inline: var(--gutter);
}

.segment {
  flex: 1;
  height: 4px;
  border-radius: 2px;
  background: var(--hairline);
}

.segment.right {
  background: var(--success);
}

.segment.wrong {
  background: var(--error);
}

.segment.skipped {
  background: var(--muted);
}

.segment.current {
  background: transparent;
}

.plane {
  position: absolute;
  top: 0;
  left: calc((100% - var(--slot)) * var(--percent, 0) / 100);
  display: grid;
  place-items: center;
  width: var(--slot);
  height: 24px;
}

.plane svg {
  width: 24px;
  height: 24px;
  fill: var(--primary);
  transform: rotate(45deg);
}

.quiz.done .plane {
  display: none;
}

@media (prefers-reduced-motion: no-preference) {
  .plane {
    transition: left 300ms cubic-bezier(0.645, 0.045, 0.355, 1);
  }
}

.js .q {
  display: none;
}

.js .q.current {
  display: block;
}

.q-meta {
  padding: 1.75rem var(--gutter) 0;
  font-size: 0.875rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.q-text {
  padding: 0.5rem var(--gutter) 1.5rem;
  font-size: 1.375rem;
  font-weight: 500;
  line-height: 1.25;
  outline: none;
}

.answers {
  border-bottom: 1px solid var(--hairline);
}

.answer {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 1.125rem var(--gutter);
  border: 0;
  border-top: 1px solid var(--hairline);
  border-radius: 0;
  background: var(--ground);
  color: inherit;
  font: inherit;
  line-height: 1.25;
  text-align: left;
  cursor: pointer;
}

.answer span {
  flex: 1;
}

.answer:focus-visible {
  outline-offset: -2px;
}

.mark {
  flex: none;
  width: 1.25rem;
  height: 1.25rem;
  fill: currentColor;
  visibility: hidden;
}

@media (hover: hover) {
  .js .q:not(.answered) .answer:hover {
    background: var(--button-subtle);
  }
}

.js .q:not(.answered) .answer:active {
  background: var(--button-subtle);
}

.q.answered .answer {
  color: var(--muted);
  cursor: default;
}

.q.answered .answer[data-correct],
html:not(.js) .answer[data-correct] {
  background: var(--success-tint);
  color: var(--success-text);
}

.q.answered .answer.chosen:not([data-correct]) {
  background: var(--error-tint);
  color: var(--error-text);
}

.q.answered .answer[data-correct] .mark,
.q.answered .answer.chosen .mark,
html:not(.js) .answer[data-correct] .mark {
  visibility: visible;
}

.why,
.explain {
  padding: 1.5rem var(--gutter) 0;
}

.js .why,
.explain[hidden] {
  display: none;
}

.prose {
  line-height: 1.3;
}

.prose p + p,
.prose p + blockquote,
.prose blockquote + p {
  margin-top: 1rem;
}

.prose > * + * {
  margin-top: 1rem;
}

.prose strong {
  font-weight: 700;
}

.prose a {
  color: var(--primary);
}

.prose ul,
.prose ol {
  padding-left: 1.25rem;
}

.prose ul {
  list-style: disc;
}

.prose li + li {
  margin-top: 0.5rem;
}

.prose img {
  max-width: 100%;
  height: auto;
  border-radius: 0.5rem;
}

.pitch .kicker {
  display: block;
  margin-bottom: 0.75rem;
  font-size: 1.0625rem;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0;
  color: var(--muted);
}

.prose code {
  padding: 2px 4px;
  border-radius: 4px;
  background: var(--highlight);
  color: var(--primary);
  font: inherit;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.prose blockquote {
  padding-left: 1rem;
  border-left: 2px solid var(--primary);
  font-style: italic;
  opacity: 0.8;
}

.actions {
  display: flex;
  gap: 0.5rem;
  padding: 2.25rem var(--gutter) 0;
}

html:not(.js) .actions,
.actions[hidden],
.result[hidden] {
  display: none;
}

.button {
  height: 3.5rem;
  padding: 0 1.25rem;
  border: 0;
  border-radius: 1rem;
  background: none;
  color: var(--text);
  font: inherit;
  font-weight: 500;
  cursor: pointer;
}

.button.outline {
  border: 1px solid var(--outline);
}

.button.secondary {
  background: var(--button-subtle);
}

.button.primary {
  background: var(--button);
  color: var(--on-button);
  font-weight: 600;
}

.quiz-next {
  flex: 1;
}

.result-score {
  padding: 0.5rem var(--gutter) 0;
  font-size: 3.5rem;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  outline: none;
}

.result-note {
  padding: 0.75rem var(--gutter) 0;
}

.app,
.exam,
.study,
.subject,
.others,
.close {
  margin-top: 5rem;
}

.app h2,
.exam h2,
.study h2,
.subject h2,
.others h2 {
  padding-inline: var(--gutter);
  font-size: 1.875rem;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

.exams {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  padding: 2rem var(--gutter) 0;
}

.exams li {
  display: grid;
  justify-items: start;
  gap: 0.3125rem;
  line-height: 1.2;
}

.exams .avatar {
  margin-bottom: 0.5rem;
}

.exams b {
  font-weight: 500;
}

.exams li > span:last-child {
  font-size: 0.875rem;
  color: var(--muted);
}

.modes {
  display: grid;
  gap: 1.25rem;
  padding: 3rem var(--gutter) 0;
}

.modes li {
  display: grid;
  grid-template-columns: 1.5rem minmax(0, 1fr);
  column-gap: 0.875rem;
  align-items: start;
}

.modes svg {
  width: 1.5rem;
  height: 1.5rem;
}

.modes b {
  font-weight: 600;
}

.app .aside {
  padding: 1.5rem var(--gutter) 0;
  font-size: 0.9375rem;
  color: var(--muted);
}

.figures {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2rem 1.5rem;
  padding: 2rem var(--gutter) 0;
}

.figures strong {
  display: block;
  font-size: 2.5rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.045em;
}

.figures span {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.9375rem;
  color: var(--muted);
}

.exam-intro {
  padding: 3.5rem var(--gutter) 1.5rem;
}

.exam-notes {
  padding: 1.25rem var(--gutter) 0;
  font-size: 0.9375rem;
  color: var(--muted);
}

.exam-next {
  padding: 3rem var(--gutter) 0;
}

.exam-next .next {
  margin: 0 0 1.25rem;
}

.exam-dates {
  text-wrap: balance;
}

.exam-notes a,
.exam-dates a,
.fine nav a,
.legal a,
.schedule a {
  color: var(--primary);
  text-decoration: none;
}

.topics {
  display: grid;
  gap: 2rem;
  padding: 2.5rem var(--gutter) 0;
}

.topics h3 {
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.3;
}

.topics p {
  margin-top: 0.5rem;
}

.subject-text {
  display: grid;
  gap: 1rem;
  padding: 3rem var(--gutter) 0;
}

.subject-discord {
  color: var(--muted);
}

.subject-discord a,
.others-dates a,
.exam .table th a {
  color: var(--primary);
  text-decoration: none;
}

.others ul {
  margin-top: 2rem;
  border-bottom: 1px solid var(--hairline);
}

.others a {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 1.125rem var(--gutter);
  border-top: 1px solid var(--hairline);
  color: inherit;
  line-height: 1.25;
  text-decoration: none;
}

.others a span:last-child {
  flex: none;
  font-size: 0.9375rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.others .others-dates {
  padding: 1.5rem var(--gutter) 0;
}

.others .others-dates a {
  display: inline;
  padding: 0;
  border: 0;
  color: var(--primary);
}

.table {
  width: 100%;
  border-bottom: 1px solid var(--hairline);
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}

.table th,
.table td {
  padding: 1.125rem 0;
  border-top: 1px solid var(--hairline);
  font-weight: 400;
  line-height: 1.25;
  text-align: right;
  vertical-align: baseline;
}

.table th:first-child {
  padding-right: 0.75rem;
  padding-left: var(--gutter);
  text-align: left;
}

.table th:nth-child(2),
.table td:nth-child(2) {
  width: 4.5rem;
}

.table th:last-child,
.table td:last-child {
  width: 5.25rem;
  padding-right: var(--gutter);
}

.table thead th {
  padding-block: 0 0.75rem;
  border-top: 0;
  font-size: 0.875rem;
  color: var(--muted);
}

.table tfoot th,
.table tfoot td {
  font-weight: 600;
}

.close {
  padding-inline: var(--gutter);
}

.close-line {
  font-size: 1.375rem;
  font-weight: 500;
  line-height: 1.25;
}

.close-sign {
  margin-top: 0.5rem;
  color: var(--muted);
}

.fine {
  padding: 3.5rem var(--gutter) 0;
  font-size: 0.875rem;
  color: var(--muted);
}

.fine nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
  font-size: 0.9375rem;
  font-weight: 500;
}

.fine p + nav,
.fine nav + p {
  margin-top: 1rem;
}

.legal {
  max-width: 40rem;
  padding: 1.25rem var(--gutter) 0;
}

.legal h1 {
  font-size: 1.875rem;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.015em;
}

.legal-date {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: var(--muted);
}

.legal-lead {
  margin-top: 1.5rem;
  color: var(--muted);
}

.legal h2 {
  margin-top: 2.5rem;
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.25;
}

.legal h3 {
  margin-top: 1.5rem;
  font-size: 1.0625rem;
  font-weight: 600;
}

.legal article p,
.legal address,
.legal article ul {
  margin-top: 0.75rem;
}

.legal address {
  font-style: normal;
}

.legal article ul {
  padding-left: 1.25rem;
  list-style: disc;
}

.legal li + li {
  margin-top: 0.5rem;
}

.schedule {
  padding-top: 1.25rem;
}

.schedule-head {
  padding-inline: var(--gutter);
}

.schedule h1 {
  font-size: 1.875rem;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

.next {
  display: grid;
  justify-items: start;
  gap: 0.5rem;
  margin-top: 2.5rem;
}

.next[hidden] {
  display: none;
}

.next span {
  color: var(--muted);
}

.next strong {
  font-size: 2.5rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.schedule-table {
  margin-top: 2.5rem;
}

.sessions .past {
  color: var(--muted);
}

.sessions th:nth-child(2),
.sessions td:nth-child(2) {
  width: 6.5rem;
}

.sessions th:last-child,
.sessions td:last-child {
  width: 8rem;
}

.schedule-note,
.booking-note,
.source {
  padding: 1.25rem var(--gutter) 0;
  font-size: 0.9375rem;
  color: var(--muted);
}

.booking {
  margin-top: 4rem;
}

.booking h2 {
  padding-inline: var(--gutter);
  font-size: 1.375rem;
  font-weight: 600;
  line-height: 1.2;
  text-wrap: balance;
}

.steps {
  display: grid;
  gap: 1.25rem;
  margin: 0;
  padding: 1.5rem var(--gutter) 0;
  list-style: none;
  counter-reset: step;
}

.steps li {
  display: grid;
  grid-template-columns: 1.5rem minmax(0, 1fr);
  column-gap: 0.875rem;
  counter-increment: step;
}

.steps li::before {
  content: counter(step);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.booking-note {
  padding-top: 1.5rem;
}

.source {
  padding-top: 2.5rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

@media (min-width: 62rem) {
  .page {
    max-width: 72rem;
    padding: 0 3rem 3rem;
  }

  .topbar {
    height: 3.5rem;
  }

  .hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: 5rem;
    align-items: center;
    padding-top: 1rem;
  }

  .pitch {
    max-width: 36.5rem;
    padding-top: 0;
  }

  .pitch h1 {
    font-size: 3.25rem;
    line-height: 1.05;
    letter-spacing: -0.025em;
  }

  .lead {
    margin-top: 1rem;
  }

  .pitch > .stores {
    margin-top: 1.75rem;
  }

  .pitch > .stores img {
    height: 3rem;
  }

  .exams {
    max-width: 30rem;
  }

  .quiz {
    position: relative;
    width: 24.5rem;
    height: clamp(36rem, calc(100vh - 6rem), 46rem);
    margin-top: 0;
    border: 1px solid var(--outline);
    border-radius: 2.75rem;
    overflow: hidden;
  }

  .quiz-bar {
    margin-top: 0.75rem;
  }

  .quiz-scroll {
    display: block;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    scrollbar-width: none;
  }

  .quiz-scroll::-webkit-scrollbar {
    display: none;
  }

  .quiz .explain {
    padding-bottom: 1.5rem;
  }

  .quiz .actions,
  .sheet-foot {
    padding: 0.75rem var(--gutter) 1.5rem;
  }

  .sheet {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    background: var(--ground);
  }

  .sheet[hidden] {
    display: none;
  }

  .sheet-title {
    display: grid;
    place-items: center;
    height: 3rem;
    margin-top: 0.75rem;
    font-weight: 500;
  }

  .sheet-body {
    flex: 1;
    min-height: 0;
    padding: 1rem var(--gutter) 2.5rem;
    overflow-y: auto;
    scrollbar-width: none;
    -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 2.5rem), transparent);
    mask-image: linear-gradient(to bottom, #000 calc(100% - 2.5rem), transparent);
  }

  .sheet-body::-webkit-scrollbar {
    display: none;
  }

  .sheet-foot .button {
    width: 100%;
  }

  .app,
  .exam,
  .close,
  .fine {
    grid-column: 1 / -1;
  }

  .app,
  .exam {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 30rem;
    column-gap: 6rem;
    align-items: start;
    margin-top: 8rem;
  }

  .exam {
    grid-template-rows: auto auto auto auto 1fr;
  }

  .app h2,
  .exam h2 {
    font-size: 2.25rem;
    line-height: 1.1;
    letter-spacing: -0.02em;
  }

  .app {
    grid-template-rows: auto auto 1fr;
  }

  .app h2 {
    grid-area: 1 / 1;
  }

  .app .exams {
    grid-area: 2 / 1;
    padding-top: 2.5rem;
  }

  .modes {
    grid-area: 1 / 2 / span 3;
    padding-top: 0.375rem;
  }

  .app .aside {
    grid-area: 4 / 2;
  }

  .exam h2,
  .figures {
    grid-column: 1 / -1;
  }

  .study,
  .subject,
  .others {
    grid-column: 1 / -1;
    margin-top: 8rem;
  }

  .topics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 3rem;
    padding-top: 3rem;
  }

  .study h2,
  .subject h2,
  .others h2 {
    font-size: 2.25rem;
    line-height: 1.1;
    letter-spacing: -0.02em;
  }

  .subject-text {
    max-width: 40rem;
    padding-top: 4rem;
  }

  .others ul {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 3rem;
    margin-top: 3rem;
    padding-inline: var(--gutter);
    border-bottom: 0;
  }

  .others li {
    border-bottom: 1px solid var(--hairline);
  }

  .others li:nth-child(-n + 2) {
    border-top: 1px solid var(--hairline);
  }

  .others a {
    padding-inline: 0;
    border-top: 0;
  }

  .figures {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 3rem;
    padding-top: 3rem;
  }

  .figures strong {
    font-size: 3.5rem;
  }

  .figures span {
    max-width: 13rem;
    font-size: 1.0625rem;
  }

  .exam-intro {
    grid-area: 3 / 1;
    padding-top: 5rem;
    padding-bottom: 0;
  }

  .exam .table {
    grid-area: 3 / 2 / span 3;
    margin-top: 5rem;
  }

  .exam-notes {
    grid-area: 4 / 1;
    max-width: 26rem;
    padding-top: 1rem;
  }

  .exam-next {
    grid-area: 5 / 1;
  }

  .close {
    margin-top: 8rem;
  }

  .close-line {
    font-size: 2.25rem;
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: -0.02em;
  }

  .close-sign {
    margin-top: 1rem;
  }

  .fine p {
    max-width: 40rem;
  }

  .legal {
    padding-top: 4.5rem;
  }

  .legal h1 {
    font-size: 2.5rem;
    letter-spacing: -0.02em;
  }

  .schedule {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 30rem;
    grid-template-rows: auto auto 1fr;
    column-gap: 6rem;
    align-items: start;
    padding-top: 4.5rem;
  }

  .schedule h1 {
    font-size: 2.5rem;
    letter-spacing: -0.02em;
  }

  .next {
    margin-top: 3rem;
  }

  .next strong {
    font-size: 3rem;
  }

  .schedule-table {
    grid-area: 1 / 2 / span 3;
    margin-top: 0;
  }

  .booking {
    grid-area: 2 / 1;
  }

  .booking h2 {
    font-size: 1.625rem;
  }

  .source {
    grid-area: 3 / 1;
    max-width: 30rem;
  }
}

.exam-report {
  margin-top: 1rem;
  font-size: 0.9375rem;
  color: var(--muted);
}

.exam-report b {
  font-weight: 600;
  color: var(--text);
}

.exam-report a {
  color: var(--primary);
  text-decoration: none;
}

.table.compare th:nth-child(2),
.table.compare td:nth-child(2),
.table.compare th:last-child,
.table.compare td:last-child {
  width: auto;
  padding-left: 0.75rem;
  white-space: nowrap;
}

@media (min-width: 30rem) {
  .table.compare td,
  .table.compare thead th:not(:first-child) {
    padding-left: 1.25rem;
  }
}

.compare .was {
  color: var(--muted);
}

.subject-text .exam-report {
  margin-top: 0;
}
