/* /practice-exams: the paper that marks itself. On css/flashcards.css and
   css/feature-pages.css (which holds the stage). Here: the paper in its
   three states (drafted, being sat, marked), the page of notes it comes
   from, the deck its misses go to, and the samples further down. */

/* ---- the paper ------------------------------------------------------------ */
.paper { display: flex; flex-direction: column; min-height: 566px; outline: none; }
.paper-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 18px 20px 12px; }
.paper-head h2 { font-size: 19px; font-weight: 600; letter-spacing: -.02em; line-height: 1.25; }
.paper-head span { font-size: 14px; color: var(--ink-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.paper-view { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.paper-view > .foot { margin-top: auto; }

/* Drafted: the questions, one to a ruled line. */
/* The four lines share the sheet between them, so the paper is full whichever state it is in. */
.q-list { flex: 1; list-style: none; margin: 0 20px; padding: 0; border-top: 1px solid var(--rule-ink); display: grid; grid-auto-rows: 1fr; }
.q-list li { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 10px; align-items: baseline; align-content: center; min-height: 84px; padding: 12px 0; font-size: 16.5px; font-weight: 500; letter-spacing: -.012em; line-height: 1.35; }
.q-list small { display: block; margin-top: 4px; font-size: 13.5px; font-weight: 400; letter-spacing: 0; line-height: 1.4; color: var(--ink-3); }
.q-list li + li { border-top: 1px solid var(--rule); }
.q-list .n { font-size: 13.5px; font-weight: 600; color: var(--ink-3); }
.q-list .t { transition: opacity .3s var(--ease); }
.q-list .is-blank .t { opacity: 0; }
.q-list .is-blank .n { color: var(--ink-4); }

/* Being sat: how far through, the question, its four answers. */
.sit-top { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 2px 20px 0; font-size: 13.5px; color: var(--ink-3); }
.wave { display: block; width: 100%; height: 14px; overflow: visible; }
.wave path { fill: none; stroke-width: 2; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.wave .track { stroke: var(--rule-2); }
.wave .done { stroke: var(--ink); stroke-dasharray: var(--done, 0) 1; transition: stroke-dasharray var(--spring-glide-t) var(--spring-glide); }
.sit-q { padding: 18px 20px 0; min-height: 5.6em; font-size: 19px; font-weight: 500; line-height: 1.32; letter-spacing: -.015em; }
.sit-opts { margin: 12px 20px 0; }
.sit-opts .opt { grid-template-columns: 22px minmax(0, 1fr); min-height: 50px; }
.sit-opts .opt[aria-pressed="true"] { box-shadow: inset 0 0 0 1.5px var(--ink); font-weight: 500; }
.sit-opts .opt[aria-pressed="true"] .k { color: var(--ink); font-weight: 600; }
.sit-nav { display: flex; justify-content: space-between; gap: 8px; margin: 16px 20px 0; }
.sit-hint { margin: auto 20px 16px; padding-top: 12px; font-size: 13px; color: var(--ink-3); text-align: center; }

/* Marked: the score in the red pen's ring, then each question. */
.res-top { display: flex; align-items: center; gap: 14px; padding: 0 20px 12px; }
.paper .score-wrap { flex: none; padding: 12px 26px 10px; }
.paper .score { font-size: 54px; }
.paper .ring path { stroke-dashoffset: 0; }
.res-line { font-size: 16.5px; font-weight: 600; letter-spacing: -.014em; line-height: 1.3; }
.res-note { margin-top: 2px; font-size: 14px; color: var(--ink-2); }
.marked-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 20px; padding: 10px 0 8px; border-bottom: 1px solid var(--rule-ink); font-size: 15px; font-weight: 600; letter-spacing: -.01em; }
.marked-head span:last-child { font-size: 13.5px; font-weight: 400; color: var(--ink-3); }
.marked { list-style: none; margin: 0; padding: 0 20px; }
.marked li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 2px 10px; padding: 10px 0; font-size: 15px; line-height: 1.4; }
.marked li + li { border-top: 1px solid var(--rule); }
.marked .ico { grid-row: span 2; width: 16px; height: 16px; margin-top: 3px; stroke-width: 2; color: var(--ink); }
.marked .is-right .ico { color: var(--ok); }
.marked b { font-weight: 500; letter-spacing: -.01em; }
.marked small { grid-column: 2; font-size: 13.5px; color: var(--ink-2); }
.marked del { text-decoration-color: var(--ink-3); text-decoration-thickness: 1.5px; color: var(--ink-3); }
.marked strong { color: var(--ink); font-weight: 600; }
.marked .is-carded b::after { content: " · in the deck"; font-weight: 400; font-size: 13px; color: var(--ink-3); }
.paper .foot { gap: 6px 10px; }
.foot-acts { display: inline-flex; gap: 6px; margin-left: auto; }

/* ---- where it comes from, and where the misses go ------------------------- */
.page-note { grid-column: 1 / -1; padding: 14px 16px 12px; font-size: 13.5px; line-height: 1.45; }
.page-note b { font-size: 15.5px; margin-bottom: 6px; }
.page-note p { display: block; position: relative; margin: 0; padding: 6px 0 6px 0; border-top: 1px solid var(--rule); color: var(--ink-2); transition: color .25s var(--ease); }
.page-note p.is-read { color: var(--ink-3); }
.page-note::after { display: none; }
.pile-deck { --h: .1; grid-column: 1 / -1; display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: var(--r-md); background: var(--sheet); transform: rotate(var(--rot)); font-size: 14px;
  box-shadow: 0 0 0 1px var(--rule), 0 3px 0 -1px var(--sheet), 0 3px 0 0 var(--rule), 0 6px 0 -2px var(--sheet), 0 6px 0 -1px var(--rule), 0 calc(8px + 18px * var(--h)) calc(10px + 40px * var(--h)) calc(-6px - 12px * var(--h)) rgb(var(--shade) / calc((.1 + .12 * var(--h)) * var(--shade-k))); }
.pile-deck .ico { width: 22px; height: 22px; color: var(--ink-3); }
.pile-deck span { display: grid; min-width: 0; }
.pile-deck b { font-weight: 600; letter-spacing: -.012em; line-height: 1.3; }
.pile-deck small { font-size: 13px; color: var(--ink-3); }
/* Empty, it is only the place a deck will be. */
.pile-deck.is-empty { background: none; box-shadow: none; outline: 1.5px dashed var(--rule-2); outline-offset: -1px; }
.pile-deck.is-empty b { color: var(--ink-2); font-weight: 500; }
.chip-ghost { padding: 8px 12px; border-radius: var(--r-sm); background: var(--sheet); font-size: 13.5px; line-height: 1.35; color: var(--ink);
  box-shadow: 0 0 0 1px var(--rule), 0 19px 42px -14px rgb(var(--shade) / calc(.19 * var(--shade-k))), 0 4px 8px rgb(var(--shade) / calc(.07 * var(--shade-k))); }

/* ---- further down: a marked question, the attempts, a scoreboard ---------- */
.sample-q, .history, .board { border-radius: var(--r-lg); }
.sample-q-body { padding: 18px 20px 20px; display: grid; gap: 14px; }
.sample-q-text { font-size: 19px; font-weight: 500; line-height: 1.32; letter-spacing: -.015em; }
.answers { margin: 0; border-top: 1px solid var(--rule-ink); }
.answers div { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--rule); font-size: 16px; }
.answers dt { font-size: 14px; color: var(--ink-3); }
.answers dd { margin: 0; }
.answers del { color: var(--ink-3); text-decoration-thickness: 1.5px; }
.why { font-size: 15.5px; line-height: 1.5; color: var(--ink-2); }
.sample-q .acts { display: flex; }
.pill { display: inline-flex; align-items: center; min-height: 34px; padding: 0 12px; border-radius: var(--r-sm); background: var(--sheet); box-shadow: inset 0 0 0 1px var(--rule-2); font-size: 14px; font-weight: 500; }
.attempts, .scores { list-style: none; margin: 0; padding: 4px 20px; }
.attempts li { display: grid; grid-template-columns: 76px minmax(0, 1fr) auto; align-items: baseline; gap: 12px; padding: 13px 0; font-size: 15px; }
.attempts li + li, .scores li + li { border-top: 1px solid var(--rule); }
.att-score { font-family: var(--serif); font-size: 30px; line-height: 1; letter-spacing: -.02em; }
.att-when { color: var(--ink-2); }
.att-pc { color: var(--ink-3); font-size: 14px; }
.att-pc i { font-style: normal; margin-left: 6px; padding: 2px 7px; border-radius: 6px; background: var(--wash-2); color: var(--ink); font-size: 12.5px; font-weight: 500; }
.scores li { display: grid; grid-template-columns: 22px minmax(0, 1fr) 44px 44px; align-items: center; gap: 10px; min-height: 46px; font-size: 15px; color: var(--ink-2); }
.scores li > span:first-child { color: var(--ink-3); font-size: 13.5px; }
.scores b { font-weight: 500; color: var(--ink); }
.scores li > span:nth-child(n+3) { text-align: right; }
.scores .is-you b, .scores .is-you span { font-weight: 600; color: var(--ink); }
.tips { min-width: 0; }
.tips-head { font-size: 15px; font-weight: 600; letter-spacing: -.01em; padding-bottom: 10px; }
.tips .ticks { margin-top: 0; }

/* ---- motion: only what was asked for, arriving ---------------------------- */
@media (prefers-reduced-motion: no-preference) {
  .q-list .landed .n { animation: land var(--spring-catch-t) var(--spring-catch) backwards; }
  .paper-view.arrive { animation: ink-in .3s ease-out backwards; }
  .marked-now .score { animation: ink-in .45s ease-out backwards; }
  .marked-now .ring path { animation: ring-on .8s var(--pen-ease) .3s backwards, ring-dry .5s ease-out 1.1s backwards; }
  .marked-now .marked li { animation: ink-in .3s calc(.5s + var(--i) * 90ms) ease-out backwards; }
}

@media (min-width: 560px) {
  .page-note { padding: 16px 18px 14px; }
}
@media (min-width: 860px) {
  .loose { align-content: start; }
}
@media (min-width: 960px) {
  .split-s { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); }
  .split-s.rev { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
}
@media (min-width: 1180px) {
  .loose .page-note, .loose .pile-deck { width: 304px; }
}
@media (max-width: 559px) {
  .paper { min-height: 540px; }
  .res-top { gap: 8px; }
  .paper .score { font-size: 46px; }
  .paper .score-wrap { padding: 10px 20px 8px; }
  .answers div { grid-template-columns: 96px minmax(0, 1fr); }
}
