:root {
  color-scheme: light dark;
  --paper: #faf8fc;
  --surface: #ffffff;
  --ink: #2a1638;
  --text: #3b3047;
  --muted: #6b6077;
  --rule: #e6e0ec;
  --accent: #6a2c91;
  --gold: #f2b33d;
  --gold-soft: #fcefd2;
  --focus: #2f6fe0;

  --font: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, "PingFang SC", "PingFang TC", "Noto Sans SC",
    "Noto Sans TC", "Microsoft YaHei", sans-serif;
  --measure: 40rem;
  --page: 64rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #17101d;
    --surface: #221829;
    --ink: #f4eef8;
    --text: #dcd2e3;
    --muted: #a797b3;
    --rule: #3a2e44;
    --accent: #d7b4f0;
    --gold: #f5c062;
    --gold-soft: #3e3220;
    --focus: #8ab4ff;
  }
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.wrap {
  width: 100%;
  max-width: calc(var(--page) + 2.5rem);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.wrap.narrow {
  max-width: calc(var(--measure) + 2.5rem);
}

a {
  color: var(--accent);
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
}

a:hover {
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip {
  position: absolute;
  left: -999px;
}

.skip:focus {
  left: 1rem;
  top: 1rem;
  background: var(--paper);
  padding: 0.5rem 0.75rem;
}

.nw {
  white-space: nowrap;
}

/* Header */

.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  padding-top: 1.25rem;
  padding-bottom: 1.25rem;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--ink);
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.wordmark img {
  width: 1.75rem;
  height: 1.75rem;
}

.site-nav ul {
  display: flex;
  gap: 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav a {
  color: var(--muted);
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--ink);
  text-decoration: underline;
}

/* Shared type */

main {
  flex: 1;
}

h1,
h2,
h3 {
  color: var(--ink);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0;
}

h1 {
  font-size: clamp(2.5rem, 7vw, 4rem);
  font-weight: 800;
  letter-spacing: -0.035em;
}

h2 {
  font-size: 1.375rem;
  font-weight: 700;
}

h3 {
  font-size: 1.0625rem;
  font-weight: 700;
}

p,
ul {
  margin: 0;
}

.lede {
  font-size: clamp(1.1875rem, 2.6vw, 1.375rem);
  line-height: 1.5;
  color: var(--ink);
}

.meta {
  color: var(--muted);
  font-size: 0.9375rem;
}

.button {
  display: inline-block;
  padding: 0.75rem 1.25rem;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-weight: 650;
  text-decoration: none;
}

.button:hover {
  text-decoration: underline;
}

/* Home: hero */

.hero .wrap {
  display: grid;
  gap: 3rem;
  align-items: center;
  padding-top: 2.5rem;
  padding-bottom: 4rem;
}

@media (min-width: 52rem) {
  .hero .wrap {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 4rem;
    padding-top: 4rem;
    padding-bottom: 5.5rem;
  }
}

.hero-text {
  max-width: 34rem;
}

.hero-text .lede {
  margin-top: 1.25rem;
}

.hero-text .button {
  margin-top: 2rem;
}

/* Home: phone illustration of one practice question */

.phone {
  justify-self: center;
  width: 17rem;
  margin: 0;
  padding: 0.6rem;
  border-radius: 2.75rem;
  background: var(--ink);
  box-shadow: 0 1.5rem 3rem -1.5rem color-mix(in srgb, var(--ink) 45%, transparent);
  rotate: 3deg;
}

.screen {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  min-height: 28rem;
  padding: 2.25rem 1.1rem 1.25rem;
  border-radius: 2.2rem;
  background: var(--surface);
  color: var(--text);
  font-size: 0.875rem;
  line-height: 1.4;
}

.screen-top {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.8125rem;
}

.screen-top strong {
  color: var(--ink);
}

.progress {
  height: 0.375rem;
  border-radius: 999px;
  background: var(--rule);
  overflow: hidden;
}

.progress span {
  display: block;
  width: 40%;
  height: 100%;
  border-radius: inherit;
  background: var(--gold);
}

.question {
  margin-top: 0.4rem;
  color: var(--ink);
  font-size: 1.1875rem;
  font-weight: 750;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.question-zh {
  color: var(--muted);
  font-size: 0.9375rem;
}

.choices {
  display: grid;
  gap: 0.55rem;
  margin-top: 0.4rem;
  padding: 0;
  list-style: none;
}

.choices li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 0.85rem;
  border: 1.5px solid var(--rule);
  border-radius: 0.9rem;
  color: var(--ink);
}

.choices .zh {
  color: var(--muted);
  font-size: 0.8125rem;
}

/* The one moment of motion: the correct answer is marked after the page loads. */

.choices .correct {
  border-color: var(--gold);
  background: var(--gold-soft);
  animation: mark-correct 420ms cubic-bezier(0.2, 0.8, 0.2, 1) 900ms both;
}

.choices .correct::after {
  content: "✓";
  flex: none;
  display: grid;
  place-items: center;
  width: 1.4rem;
  height: 1.4rem;
  border-radius: 50%;
  background: var(--gold);
  color: #2a1638;
  font-weight: 800;
  font-size: 0.8125rem;
  animation: pop-check 360ms cubic-bezier(0.3, 1.6, 0.5, 1) 1200ms both;
}

.choices .correct .zh {
  margin-left: auto;
}

@keyframes mark-correct {
  from {
    border-color: var(--rule);
    background: transparent;
  }
}

@keyframes pop-check {
  from {
    scale: 0;
  }
}

.screen-next {
  margin-top: auto;
  padding: 0.7rem;
  border-radius: 999px;
  background: var(--ink);
  color: var(--surface);
  text-align: center;
  font-weight: 650;
}

@media (prefers-reduced-motion: reduce) {
  .choices .correct,
  .choices .correct::after {
    animation: none;
  }
}

/* Home: company facts */

.facts {
  border-top: 1px solid var(--rule);
}

.facts .wrap {
  padding-top: 3rem;
  padding-bottom: 3.5rem;
}

.facts dl {
  display: grid;
  gap: 1.5rem 2rem;
  margin: 1.5rem 0 0;
}

@media (min-width: 40rem) {
  .facts dl {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 60rem) {
  .facts dl {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.facts dl div {
  padding-top: 0.9rem;
  border-top: 2px solid var(--gold);
}

.facts dt {
  color: var(--muted);
  font-size: 0.9375rem;
}

.facts dd {
  margin: 0.25rem 0 0;
  color: var(--ink);
  font-weight: 600;
  overflow-wrap: anywhere;
}

.notice {
  max-width: var(--measure);
  margin-top: 2.5rem;
  color: var(--muted);
  font-size: 0.9375rem;
}

/* Text pages: privacy, support, 404 */

.page .wrap {
  padding-top: 2.5rem;
  padding-bottom: 4.5rem;
}

.page h1 {
  font-size: clamp(2.25rem, 6vw, 3rem);
}

.page h1 + .meta,
.page h1 + .lede {
  margin-top: 0.9rem;
}

.page h2 {
  margin-top: 2.5rem;
}

.page h3 {
  margin-top: 1.5rem;
}

.page p,
.page ul {
  margin-top: 0.9rem;
}

.page li + li {
  margin-top: 0.4rem;
}

.contact-list {
  display: grid;
  gap: 1rem;
  margin-top: 1.75rem;
  padding: 0;
  list-style: none;
}

.page .contact-list li + li {
  margin-top: 0;
}

.contact-list li {
  padding: 1.1rem 1.25rem;
  border-radius: 1rem;
  background: var(--surface);
  border: 1px solid var(--rule);
}

.contact-list li:first-child {
  border-color: var(--gold);
  background: var(--gold-soft);
}

.contact-list span {
  display: block;
  color: var(--muted);
  font-size: 0.9375rem;
}

.contact-list a {
  font-size: 1.1875rem;
  font-weight: 650;
}

.callout {
  padding: 1rem 1.25rem;
  border-left: 4px solid var(--gold);
  background: var(--surface);
  border-radius: 0 0.75rem 0.75rem 0;
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.9375rem;
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding-top: 1.5rem;
  padding-bottom: 2rem;
}

.site-footer ul {
  display: flex;
  gap: 1.25rem;
  padding: 0;
  list-style: none;
}

.site-footer a {
  color: var(--muted);
}

@media print {
  .site-nav,
  .skip,
  .phone {
    display: none;
  }
}
