:root {
  --asphalt: #24282C;
  --asphalt-soft: #5A6168;
  --paper: #F4F6F6;
  --surface: #FFFFFF;
  --line: #D5DADD;
  --plate: #1F4FA3;
  --plate-dark: #173C7D;
  --warn: #F2B705;
  --stop: #C8102E;
  --stop-bg: #FBEBEE;
  --go: #1E7B4F;
  --go-bg: #E6F3EC;
  --radius-control: 10px;
  --radius-plate: 6px;
  --font: 'Mukta', system-ui, -apple-system, 'Noto Sans', 'Noto Sans KR', 'Apple SD Gothic Neo', sans-serif;
  --ko: system-ui, -apple-system, 'Noto Sans KR', 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--asphalt);
  font-family: var(--font);
  font-size: 18px;
  line-height: 1.55;
}
img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--warn); outline-offset: 2px; }

.app {
  max-width: 560px;
  margin: 0 auto;
  padding: 20px 16px 48px;
}
.loading { text-align: center; color: var(--asphalt-soft); padding: 40px 16px; }

/* progress: a road strip that fills with the yellow centre line */
.progress {
  position: sticky; top: 0; z-index: 5;
  height: 6px; background: var(--asphalt);
}
.progress-fill {
  height: 100%; width: 0; background: var(--warn);
  transition: width .3s ease;
}

/* ---------- landing ---------- */
.landing h1 {
  font-size: 34px; line-height: 1.2; font-weight: 800;
  margin: 28px 0 12px;
  letter-spacing: -0.01em;
}
.landing .lede { font-size: 19px; margin: 0 0 28px; color: var(--asphalt); }
.landing .facts { margin: 0 0 28px; padding: 0; list-style: none; }
.landing .facts li { padding: 10px 0; border-top: 1px solid var(--line); }
.landing .facts li:last-child { border-bottom: 1px solid var(--line); }
.landing .demo-label { font-size: 16px; color: var(--asphalt-soft); margin: 0 0 10px; }
.landing .start { display: grid; gap: 12px; margin: 32px 0 20px; }
.source-note { font-size: 14px; color: var(--asphalt-soft); line-height: 1.5; }

/* ---------- buttons ---------- */
.btn {
  display: block; width: 100%;
  min-height: 54px; padding: 12px 18px;
  border: 0; border-radius: var(--radius-control);
  font-size: 19px; font-weight: 700; text-align: center;
  cursor: pointer;
}
.btn-primary { background: var(--plate); color: #fff; }
.btn-primary:active { background: var(--plate-dark); }
.btn-secondary { background: var(--surface); color: var(--plate); border: 2px solid var(--plate); }
.btn-quiet { background: none; color: var(--asphalt-soft); font-weight: 500; text-decoration: underline; min-height: 44px; }

/* ---------- term plate: the road-sign plate used for Korean exam words ---------- */
.plate {
  display: inline-flex; flex-direction: column;
  background: var(--plate); color: #fff;
  border-radius: var(--radius-plate);
  box-shadow: inset 0 0 0 3px var(--plate), inset 0 0 0 5px #fff;
  padding: 10px 16px 9px;
  min-width: 0;
}
.plate .ko { font-family: var(--ko); font-size: 22px; font-weight: 700; line-height: 1.25; }
.plate .meaning { font-size: 16px; line-height: 1.35; opacity: .95; }
.plates { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; }
.plates .plate .ko { font-size: 19px; }
.plates .plate .meaning { font-size: 15px; }

/* ---------- quiz ---------- */
.q-head {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 16px; color: var(--asphalt-soft); margin: 4px 0 10px;
}
.lang-switch { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--surface); }
.lang-switch button {
  border: 0; background: none; padding: 4px 10px; min-height: 36px;
  font-size: 15px; cursor: pointer; color: var(--asphalt-soft);
}
.lang-switch button[aria-pressed="true"] { background: var(--asphalt); color: #fff; }
.lang-switch button.ko-btn { font-family: var(--ko); }

.q-figure { margin: 6px 0 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-control); overflow: hidden; }
.q-figure.sign { display: flex; justify-content: center; padding: 16px; }
.q-figure.sign img { max-height: 130px; width: auto; }
.situation { margin: 0 0 14px; padding: 10px 14px; background: var(--surface); border-left: 4px solid var(--warn); list-style: none; font-size: 16px; }
.situation li { padding: 2px 0; }

.q-text { font-size: 21px; font-weight: 700; line-height: 1.4; margin: 0 0 6px; }
.q-text.ko, .choice .ko-t { font-family: var(--ko); }
[lang="ko"] { word-break: keep-all; overflow-wrap: anywhere; }
.pick-hint { font-size: 15px; color: var(--asphalt-soft); margin: 0 0 10px; }

.choices { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 10px; }
.choice {
  display: flex; gap: 12px; align-items: flex-start;
  width: 100%; text-align: left;
  background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius-control);
  padding: 12px 14px; min-height: 54px; font-size: 17px; line-height: 1.45; cursor: pointer;
}
.choice .num {
  flex: none; width: 28px; height: 28px; border-radius: 50%;
  border: 2px solid currentColor; display: grid; place-items: center;
  font-size: 15px; font-weight: 700; margin-top: 1px;
}
.choice[aria-pressed="true"] { border-color: var(--plate); }
.choice[aria-pressed="true"] .num { background: var(--plate); color: #fff; border-color: var(--plate); }
.choice:disabled { cursor: default; color: var(--asphalt); }
.choice.is-correct { border-color: var(--go); background: var(--go-bg); }
.choice.is-correct .num { background: var(--go); border-color: var(--go); color: #fff; }
.choice.is-wrong { border-color: var(--stop); background: var(--stop-bg); }
.choice.is-wrong .num { background: var(--stop); border-color: var(--stop); color: #fff; }

.feedback { margin: 18px 0 0; padding: 16px 0 0; border-top: 2px solid var(--asphalt); }
.verdict { font-size: 22px; font-weight: 800; margin: 0 0 6px; }
.verdict.ok { color: var(--go); }
.verdict.no { color: var(--stop); }
.explain { margin: 0; font-size: 17px; }
.terms-label { font-size: 15px; color: var(--asphalt-soft); margin: 16px 0 0; }
.next { margin-top: 22px; }

/* ---------- checkpoint, results, full access ---------- */
.screen h2 { font-size: 28px; line-height: 1.25; font-weight: 800; margin: 24px 0 10px; }
.screen p { margin: 0 0 14px; }
.score-line { font-size: 48px; font-weight: 800; line-height: 1.1; margin: 8px 0 4px; }
.score-sub { color: var(--asphalt-soft); margin: 0 0 20px; }
.pass-bar { position: relative; height: 14px; background: var(--line); border-radius: 7px; margin: 18px 0 26px; }
.pass-bar .fill { height: 100%; background: var(--plate); border-radius: 7px; }
.pass-bar .mark { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--asphalt); }
.pass-legend { display: flex; gap: 18px; font-size: 15px; color: var(--asphalt-soft); margin: -18px 0 18px; }
.actions { display: grid; gap: 12px; margin-top: 24px; }

.offer { background: var(--surface); border-top: 6px solid var(--warn); padding: 20px 18px; margin: 20px 0 0; }
.offer h2 { margin-top: 0; }
.offer ul { margin: 0 0 18px; padding-left: 20px; }
.offer li { margin: 4px 0; }
.price { font-size: 30px; font-weight: 800; margin: 0; }
.price-sub { color: var(--asphalt-soft); margin: 0 0 18px; }

.waitlist-frame { width: 100%; min-height: 560px; border: 0; background: var(--surface); }
.notice { background: var(--surface); border: 1px dashed var(--asphalt-soft); padding: 14px; font-size: 16px; }

.review { list-style: none; padding: 0; margin: 12px 0 0; }
.review li { padding: 12px 0; border-top: 1px solid var(--line); font-size: 16px; }
.review .r-q { font-weight: 700; }
.review .r-a { color: var(--go); }

@media (min-width: 600px) {
  .landing h1 { font-size: 42px; }
}
@media (prefers-reduced-motion: reduce) {
  .progress-fill { transition: none; }
}

/* save-and-exit: quiet, below the question so it never competes with the answers */
.exit-bar { margin-top: 28px; padding-top: 14px; border-top: 1px solid var(--line); text-align: center; }
.exit-bar .btn-quiet { width: auto; display: inline-block; padding: 8px 12px; }
.saved-note { font-size: 14px; color: var(--asphalt-soft); margin: 4px 0 0; }

.form-link { text-align: center; font-size: 15px; margin: 10px 0 0; }
.form-link a { color: var(--plate); }

/* translation report: small and secondary, sits between the explanation and Next */
.report { margin: 14px 0 0; font-size: 15px; }
.report-btn { background: none; border: 0; padding: 6px 0; color: var(--asphalt-soft); text-decoration: underline; cursor: pointer; font-size: 15px; min-height: 36px; }
.report.done { color: var(--go); }
