/* The mock exam (js/jpn/exam.js): the start card, the part under way with its clock, the questions, the results */

.exstart,
.exres {
  display: grid;
  gap: 14px;
  justify-items: start;
}
.exparts {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
  width: 100%;
}
.exparts li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2px 12px;
  padding: 10px 14px;
  border: 1px solid var(--rule);
  border-radius: 10px;
  background: var(--surface);
}
.exparts li small {
  grid-column: 1 / -1;
  color: var(--ink-2);
}

/* the part under way */
.exrun {
  display: grid;
  gap: 14px;
}
.exhead {
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.exhead small,
.excount {
  color: var(--ink-2);
}
.exclock {
  margin-left: auto;
  font: 600 1.05rem/1 var(--f-mono, monospace);
  padding: 6px 10px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--accent) 10%, var(--surface));
  color: var(--ink);
}
.exclock.low {
  background: color-mix(in srgb, #d23 18%, var(--surface));
}
.exdots {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.exdot {
  min-width: 2.2rem;
  height: 2.2rem;
  border: 1px solid var(--rule);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink-2);
  font-weight: 600;
}
/* every question on that page answered ("done": the site's own .full stretches a box to the whole width) */
.exdot.done {
  background: color-mix(in srgb, var(--accent) 14%, var(--surface));
  color: var(--ink);
}
.exdot.on {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
  color: var(--ink);
}

/* a page of questions: the section's title and what to do, then the questions */
.expage {
  display: grid;
  gap: 12px;
}
.expage h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
}
.exins {
  margin: -4px 0 0;
  color: var(--ink-2);
}
/* no furigana while the exam runs, as on the real test; the review afterwards keeps it */
.exrun rt {
  display: none;
}
.expas {
  padding: 14px 16px;
  border: 1px solid var(--rule);
  border-radius: 10px;
  background: var(--surface);
  font-size: 1.08rem;
  line-height: 2;
}
.exq {
  display: grid;
  gap: 8px;
  padding: 12px 0;
  border-top: 1px solid var(--rule);
}
.exstem {
  margin: 0;
  font-size: 1.12rem;
  line-height: 2.1;
}
.exstem u {
  text-underline-offset: 0.3em;
}
.exn {
  display: inline-grid;
  place-items: center;
  min-width: 1.6rem;
  height: 1.6rem;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--surface);
  font: 600 0.82rem/1 var(--f-body);
  vertical-align: 0.15em;
}
.exslot {
  display: inline-block;
  min-width: 2.6em;
  border-bottom: 1.5px solid var(--ink);
  text-align: center;
  line-height: 1.2;
}
.exslot.star {
  color: var(--accent);
}
.exgap {
  display: inline-grid;
  place-items: center;
  min-width: 2.2em;
  margin: 0 2px;
  border: 1.5px solid var(--ink);
  font: 600 0.85rem/1.5 var(--f-body);
}
.exopts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
/* options that are whole sentences, one to a line */
.exopts.long {
  grid-template-columns: minmax(0, 1fr);
}
.exo {
  min-height: 46px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border: 1px solid var(--rule);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  font-size: 1.05rem;
  text-align: left;
  line-height: 1.8;
}
.exo kbd {
  flex: none;
  font: 600 0.78rem/1 var(--f-body);
  color: var(--ink-2);
  background: none;
  border: 0;
  padding: 0;
}
.exo.on {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, var(--surface));
  box-shadow: 0 0 0 1px var(--accent);
}
.exo.right {
  border-color: var(--ok, #2a8a4a);
  background: color-mix(in srgb, var(--ok, #2a8a4a) 14%, var(--surface));
}
.exo.wrong {
  border-color: var(--bad, #c0392b);
  background: color-mix(in srgb, var(--bad, #c0392b) 12%, var(--surface));
}
.exo.dim {
  opacity: 0.6;
}
.exo[disabled] {
  cursor: default;
}
.exwhy {
  margin: 0;
  color: var(--ink-2);
  line-height: 1.7;
}
.exwhy [lang="ja"] {
  color: var(--ink);
}
.extr {
  display: block;
}
.exmiss {
  color: var(--bad, #c0392b);
  font-weight: 600;
}
.exnav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.exconfirm {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--rule);
  border-radius: 10px;
  background: color-mix(in srgb, var(--mark) 40%, var(--surface));
}
.exconfirm p {
  margin: 0;
  flex: 1 1 100%;
}

/* the results */
.exscore {
  display: flex;
  align-items: baseline;
  gap: 12px;
}
.exscore b {
  font-size: 2.6rem;
  line-height: 1;
}
.exscore.good span {
  color: var(--ok, #2a8a4a);
  font-weight: 600;
}
.exscore.near span {
  color: var(--ink);
  font-weight: 600;
}
.exscore.low span {
  color: var(--bad, #c0392b);
  font-weight: 600;
}
.exrevh {
  margin: 24px 0 0;
  padding-top: 12px;
  border-top: 2px solid var(--rule);
}
.exhist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 4px;
}
.exhist li {
  display: grid;
  grid-template-columns: 3rem minmax(0, 1fr) auto;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid var(--rule);
}

@media (max-width: 520px) {
  .exopts {
    grid-template-columns: minmax(0, 1fr);
  }
}
