/* Mock Tests: readiness and what to revise, then the papers in Learn's
   banners and buttons, with the shuffle below. */
/* No top padding: row one carries its own 15px, so the controls sit at the
   same height here as on every other tab. */
#practice {
  padding: 0 20px calc(110px + var(--safe-area-inset-bottom, env(safe-area-inset-bottom, 0px)));
}
#practice .pinner {
  max-width: 600px;
}
/* .mock-library-heading is the shared controls row declared in progress.css. Its
   title is for screen readers only, as on Learn, so the four header buttons
   are the whole row. */
/* Readiness leads: the page's real question is "am I ready", and sixteen
   identical tiles cannot answer it. The meter and its thresholds come from
   features/mock/mock-readiness.js. */
/* The meter, its verdict and the corgi that reports the same state, with what
   to revise on its own full-width line below them. */
.mock-readiness {
  margin-bottom: 26px;
}
.mock-readiness-state {
  display: flex;
  align-items: center;
  gap: 10px;
}
.mock-readiness-say {
  flex: 1;
  min-width: 0;
}
/* With the corgi beside it there is no room for the pass mark on the same
   line as the score, so on a phone it takes its own. */
@media (max-width: 520px) {
  #practice .readiness-line {
    flex-wrap: wrap;
  }
  #practice .readiness-line span {
    width: 100%;
    margin-left: 0;
  }
}
.mock-readiness-corgi {
  flex: none;
  width: 64px;
  height: 64px;
  object-fit: contain;
}
@media (min-width: 960px) {
  .mock-readiness-state {
    gap: 24px;
  }
  .mock-readiness-corgi {
    width: 104px;
    height: 104px;
  }
}
.mock-readiness-empty {
  margin: 0;
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.5;
}
/* Shuffling is the choice you make when you have no reason to prefer a paper,
   so it sits under the grid rather than above it. */
.mock-shuffle {
  display: block;
  width: 100%;
  padding: 12px;
  border-radius: 12px;
  color: var(--brand-ink);
  font-size: 14px;
  font-weight: 800;
}
.mock-shuffle:hover {
  background: var(--panel);
}
/* What to revise, from the topic scores the newest sitting kept. One line and
   its button: spacing holds them together, not a box. */
/* The verdict is the last line of the block; the corgi beside it sets the height. */
#practice .readiness-verdict {
  margin-bottom: 0;
}
.mock-revise-next {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 24px 0 0;
  padding: 0;
}
.mock-revise-next p {
  flex: 1;
  min-width: 0;
  margin: 0;
  color: var(--ink);
  line-height: 1.3;
}
.mock-revise-next span {
  display: block;
  color: var(--ink-2);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.65px;
  text-transform: uppercase;
}
.mock-revise-next b {
  display: block;
  margin-top: 2px;
  font-size: 16px;
  font-weight: 900;
}
.mock-revise-next small {
  display: block;
  margin-top: 2px;
  color: var(--ink-2);
  font-size: 12.5px;
  font-weight: 700;
}
.mock-revise-go {
  flex: none;
  min-height: 44px;
  padding: 0 16px;
  border: 2px solid var(--line-2);
  border-radius: 12px;
  background: var(--paper);
  color: var(--brand-ink);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  box-shadow: 0 3px 0 var(--line-2);
}
.mock-revise-go:active {
  transform: translateY(3px);
  box-shadow: none;
}

/* ---------- the papers, drawn as Learn draws lessons ---------- */
/* Each group opens with Learn's section banner. The held papers take the
   first section's blue from [data-section="values"], dark mode included. */
.mock-group {
  margin-top: 26px;
}
.mock-group-format {
  margin: 10px 0 0;
  color: var(--ink-2);
  font-size: 12.5px;
  font-weight: 750;
}
/* .mock-banner-title takes the shared banner-title tier from today.css. */
/* The full course is the Unlock tab's gold, pale so its locked papers stay
   quieter than a gold passed paper. */
.mock-group.is-full-course .mock-banner {
  border: 2px solid #ffc21b;
  background: #fff6d1;
}
.mock-group.is-full-course .today-unit {
  color: #8a5a00;
}
.mock-group.is-full-course .mock-banner-title {
  color: #5c3a00;
}
.mock-banner-coin {
  flex: none;
  width: 44px;
  height: 44px;
  object-fit: contain;
}
[data-theme="dark"] .mock-group.is-full-course .mock-banner {
  border-color: #b88a12;
  background: #2b2410;
}
[data-theme="dark"] .mock-group.is-full-course .today-unit {
  color: #f5c451;
}
[data-theme="dark"] .mock-group.is-full-course .mock-banner-title {
  color: #ffe08a;
}

#practice .mockgrid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px 8px;
  padding: 22px 0 4px;
}
#practice .mocktile {
  --node-face: var(--topic-node, #1cb0f6);
  --node-lip: var(--topic-lip, #1899d6);
  --node-ink: #fff;
  --node-gloss: #ffffff35;
  --node-radius: clamp(10px, 1.7vw, 14px);
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 0 0 4px;
  -webkit-user-select: none;
  user-select: none;
  border-radius: 16px;
  color: var(--ink);
  text-align: center;
}
/* The same 60 by 52 rounded square and 6px lip as a lesson on the path. */
#practice .mocktile .mock-node-wrap {
  position: relative;
  display: block;
  flex: none;
  width: 60px;
  height: 52px;
}
#practice .mocktile .mock-square {
  position: relative;
  display: grid;
  place-items: center;
  isolation: isolate;
  width: 60px;
  height: 52px;
  border-radius: var(--node-radius);
  background: var(--node-face);
  color: var(--node-ink);
  box-shadow:
    0 6px 0 var(--node-lip),
    inset 0 2px 0 var(--node-gloss);
  transform-origin: center bottom;
  transition:
    transform 0.1s var(--ease),
    box-shadow 0.1s var(--ease);
}
#practice .mocktile .mock-number {
  position: relative;
  z-index: 1;
  font-size: 24px;
  font-weight: 900;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
#practice .mocktile .mock-score {
  display: block;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.25;
}
#practice .mocktile .mock-score:empty {
  display: none;
}
#practice .mocktile .mock-score b {
  display: block;
  font-size: 13px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}
#practice .mocktile .mock-score small {
  display: block;
  margin-top: 2px;
  color: var(--ink-2);
  font-size: 11.5px;
  font-weight: 700;
}
/* Sat and not passed: the path's pale resting face, done but not done with.
   The score beneath says how far off, without a warning colour. */
#practice .mocktile.fail {
  --node-face: var(--topic-rest, #ddf4ff);
  --node-lip: var(--topic-rest-lip, #b3e5fc);
  --node-ink: var(--topic-icon, #1899d6);
  --node-gloss: #ffffff05;
}
/* Passed: gold, with the finished face a completed lesson wears — a lighter
   inner surface and one light band across it — and the path's trophy. */
#practice .mocktile.pass {
  --node-face: #e9ac23;
  --node-lip: #cb8e13;
  --node-ink: #5c3a00;
  --node-gloss: #ffffff40;
}
#practice .mocktile.pass .mock-square::before,
#practice .mocktile.pass .mock-square::after {
  content: "";
  position: absolute;
  inset: 4px 4px 6px;
  border-radius: calc(var(--node-radius) - 4px);
  pointer-events: none;
}
#practice .mocktile.pass .mock-square::before {
  background: color-mix(in srgb, var(--node-face) 88%, #fff);
}
#practice .mocktile.pass .mock-square::after {
  background: linear-gradient(115deg, transparent 0 40%, #ffffff40 40% 52%, transparent 52%);
  background-size: 250% 100%;
  background-position: 50% 0;
  transition: background-position 0.55s cubic-bezier(0.2, 0.7, 0.2, 1);
}
#practice .mocktile.pass .mock-number {
  text-shadow: 0 1px 0 rgb(255 255 255 / 25%);
}
#practice .mocktile.pass .mock-score small {
  color: var(--amber-ink);
}
#practice .mocktile .mock-trophy {
  position: absolute;
  top: -9px;
  right: -9px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--paper);
  color: #e9ac23;
  box-shadow: 0 0 0 2px #e9ac23;
}
#practice .mocktile .mock-trophy svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}
/* Locked: Learn's light-grey locked lesson. */
#practice .mocktile.locked {
  --node-face: #e5e5e5;
  --node-lip: #cfcfcf;
  --node-ink: #777777;
  --node-gloss: transparent;
}
#practice .mocktile.locked[aria-disabled="true"] {
  cursor: default;
}
[data-theme="dark"] #practice .mocktile.locked {
  --node-face: #36404b;
  --node-lip: #262e37;
  --node-ink: #8f9aa8;
}
/* The paper to sit next: Learn's grey ring and breathing START callout. */
#practice .mocktile.is-start-row {
  padding-top: 56px;
  gap: 24px;
}
#practice .mocktile.is-next .mock-node-wrap::after {
  content: "";
  position: absolute;
  inset: -12px -11px -17px;
  border: 6px solid var(--line-2);
  border-radius: calc(var(--node-radius) + 12px);
  pointer-events: none;
}
#practice .mocktile .mock-start {
  position: absolute;
  bottom: calc(100% + 19px);
  left: 50%;
  z-index: 3;
  transform: translateX(-50%);
  padding: 6px 10px;
  border: 2px solid var(--topic-rest-lip, #b3e5fc);
  border-radius: 10px;
  background: var(--paper);
  color: var(--topic-icon, #147daf);
  white-space: nowrap;
  font-size: 12px;
  font-weight: 950;
  line-height: 1.2;
  letter-spacing: 0.75px;
  animation: start-bob 1.9s ease-in-out infinite;
}
#practice .mocktile .mock-start::after {
  content: "";
  position: absolute;
  left: calc(50% - 5px);
  bottom: -6px;
  width: 9px;
  height: 9px;
  border-right: 2px solid var(--topic-rest-lip, #b3e5fc);
  border-bottom: 2px solid var(--topic-rest-lip, #b3e5fc);
  background: var(--paper);
  transform: rotate(45deg);
}
#practice .mocktile:focus-visible {
  outline: 2px solid var(--brand-ink);
  outline-offset: 5px;
}
@media (hover: hover) and (pointer: fine) {
  /* Hover is a light press, exactly as on the path. No colour change. */
  #practice .mocktile:hover .mock-square {
    transform: translateY(2px);
    box-shadow:
      0 4px 0 var(--node-lip),
      inset 0 2px 0 var(--node-gloss);
  }
  #practice .mocktile.pass:hover .mock-square::after {
    background-position: 12% 0;
  }
}
/* A press, not a squash: the face sinks the depth of its lip. */
#practice .mocktile.is-pressed .mock-square {
  transform: translateY(5px);
  box-shadow:
    0 1px 0 var(--node-lip),
    inset 0 2px 0 var(--node-gloss);
}
@media (prefers-reduced-motion: reduce) {
  #practice .mocktile .mock-square,
  #practice .mocktile .mock-square::after {
    transition: none;
  }
  #practice .mocktile .mock-start {
    animation: none;
  }
  #practice .mocktile.is-pressed .mock-square {
    transform: none;
    filter: brightness(0.92);
  }
}
.mock-locked-note {
  margin: 18px 0 0;
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.45;
  color: var(--ink-2);
}
/* The offer label runs long; it stays on one line rather than wrapping "once". */
.mock-locked-actions {
  margin-top: 12px;
}
/* White at 15px bold needs 4.5:1, and the brand blue gives a filled button
   2.1:1. This one takes a deeper blue that clears it on both themes. The app's
   other .big buttons have the same problem; that is a brand decision, not a
   decision for this page. */
.mock-locked-actions .big.caps {
  background: #0a76b3;
  color: #fff;
  white-space: nowrap;
  font-size: 15px;
  padding-inline: 12px;
}
.mock-extras {
  margin-top: 30px;
  padding-top: 25px;
  border-top: 1px solid var(--line-2);
}
@media (max-width: 359px) {
  #practice {
    padding-left: 16px;
    padding-right: 16px;
  }
  #practice .mockgrid {
    gap: 22px 4px;
  }
  .mock-locked-actions .big.caps {
    font-size: 13px;
  }
}
@media (min-width: 960px) {
  /* Centred under the full-width banner, as Learn centres its path. */
  #practice .mockgrid {
    max-width: 540px;
    margin-inline: auto;
    gap: 28px 18px;
  }
  .mock-locked-note,
  .mock-locked-actions {
    max-width: 540px;
    margin-inline: auto;
  }
  #practice .mocktile .mock-node-wrap,
  #practice .mocktile .mock-square {
    width: 68px;
    height: 60px;
  }
  #practice .mocktile .mock-number {
    font-size: 27px;
  }
  #practice .mocktile .mock-score b {
    font-size: 14px;
  }
  #practice .mocktile .mock-score small {
    font-size: 12px;
  }
}
