/* =====================================================================
   a lesson of the path on a desktop (web/drill/index.tsx)

   Owned by the drill pass. The rest of the lesson's look (glass cards,
   colours, the verdict strip) lives in the drill section of profile.css;
   this sheet only lays the lesson out on a wide screen, where the phone's
   full-height column left the exercise floating in big empty bands.

   On a desktop the exercise and its strip are one centred stage: a soft
   glass panel of ~800px, the question and choices at a size meant for a
   screen read from arm's length, and the Check / Continue strip anchored
   to the panel's foot instead of the window's.

   The panel is one fixed box (720px, or the window when that is shorter),
   the same on every step: sized to its exercise it re-centred itself on
   each step, so its top edge and the Check / Continue strip jumped under
   the progress bar. The exercise is centred inside the box instead.

   On a phone nothing changes: the stage is display: contents, so the
   screen's grid (top bar, main, strip) is exactly what it was.
   ===================================================================== */

.dr-stage { display: contents; }

@media (min-width: 1024px) {
  .dr-screen {
    --dr-w: min(800px, 100% - 48px);
    --dr-pad: 44px;
    grid-template-rows: auto minmax(0, 1fr);
    justify-items: center;
    padding-bottom: 28px;
  }

  /* The bar over the stage, on the stage's two edges. */
  .dr-screen .dr-top { width: var(--dr-w); padding: 22px 0 16px; }

  .dr-stage {
    display: flex; flex-direction: column; overflow: hidden;
    width: var(--dr-w); height: min(720px, 100%); align-self: center;
    border-radius: var(--au-r-hero);
    background-color: color-mix(in srgb, var(--au-glass-flat) 45%, transparent);
    box-shadow: inset 0 1px 0 var(--au-highlight), inset 0 0 0 1px var(--line), var(--au-drop);
  }

  .dr-stage .dr-main {
    flex: 1 1 auto; min-height: 0; width: 100%; margin: 0;
    padding: 40px var(--dr-pad) 36px; gap: 24px; justify-content: safe center;
  }
  .dr-stage .dr-main.k-intro { padding-top: 34px; gap: 18px; }

  /* ---- the question ---- */
  .dr-stage .dr-ask { font-size: 40px; line-height: 1.1; }
  .dr-stage .dr-ask-card.au-hero { padding: 26px 32px; gap: 22px; }
  .dr-stage .dr-ask-card .dr-ask { font-size: 36px; }
  .dr-stage .dr-ask-card .dr-ask-pg { margin: -6px 0 -10px; }
  .dr-stage .dr-retry { font-size: 13px; }
  .dr-stage .dr-bubble { padding: 18px 22px; font-size: 22px; }
  .dr-stage .dr-bubble small { font-size: 15px; }
  .dr-stage .dr-bubble-emoji { font-size: 36px; }

  /* ---- choices: pictures and words two by two, larger ---- */
  .dr-stage .dr-grid { gap: 16px; }
  .dr-stage .dr-card { font-size: 20px; padding: 40px 18px 26px; }
  .dr-stage .dr-grid.words .dr-card { min-height: 148px; font-size: 25px; }
  .dr-stage .dr-card-emoji { font-size: 72px; }
  .dr-stage .dr-card-emoji .pic { width: 84px; height: 84px; }

  /* A list of short answers goes two by two too; a sentence keeps a row. */
  .dr-stage .dr-list { gap: 12px; }
  .dr-stage .dr-list.short { grid-template-columns: 1fr 1fr; gap: 14px; }
  .dr-stage .dr-opt { min-height: 64px; padding: 16px 20px; gap: 14px; font-size: 19px; }
  .dr-stage .dr-list.short .dr-opt { min-height: 84px; font-size: 21px; }
  .dr-stage .dr-opt kbd { flex: none; font-size: 12px; }

  /* Pairs. */
  .dr-stage .dr-match { gap: 16px; }
  .dr-stage .dr-match-col { gap: 12px; }
  .dr-stage .dr-match-o { min-height: 72px; font-size: 20px; }

  /* Tiles and typing. */
  .dr-stage .dr-line { min-height: 72px; gap: 10px; }
  .dr-stage .dr-bank { gap: 10px; }
  .dr-stage .dr-tile { padding: 12px 18px; font-size: 19px; }
  .dr-stage .dr-bank.spell .dr-tile, .dr-stage .dr-line.spell .dr-tile { width: 56px; height: 62px; font-size: 26px; }
  .dr-stage .dr-slot { width: 56px; height: 62px; }
  .dr-stage .dr-input.input { min-height: 66px; padding: 18px 20px; font-size: 22px; }

  /* Listening. */
  .dr-stage .dr-speakers.big .dr-speak:not(.slow) { width: 128px; height: 128px; }
  .dr-stage .dr-speakers.big .dr-speak:not(.slow) .i { width: 56px; height: 56px; }

  /* A new word: its card across the stage. */
  .dr-stage .dr-intro { gap: 14px; }
  .dr-stage .dr-intro .dr-intro-card.au-hero { justify-self: stretch; width: auto; gap: 8px; padding: 24px 36px 22px; }
  .dr-stage .dr-intro .dr-emoji { font-size: 80px; }
  .dr-stage .dr-intro .dr-emoji .pic { width: 96px; height: 96px; }
  .dr-stage .dr-intro .dr-emoji.none { width: 96px; height: 96px; }
  .dr-stage .dr-intro .dr-intro-word { margin-top: 4px; font-size: 48px; }
  .dr-stage .dr-intro .dr-intro-mean { font-size: 26px; }
  .dr-stage .dr-intro .dr-reading { font-size: 17px; }
  .dr-stage .dr-intro .dr-intro-ex { max-width: 640px; justify-self: center; font-size: 17px; }

  /* The grammar. */
  .dr-stage .dr-tip { padding: 28px 32px; gap: 18px; }
  .dr-stage .dr-tip-head b { font-size: 26px; }
  .dr-stage .dr-tip ul { font-size: 18px; line-height: 1.5; }

  /* ---- the strip: the stage's foot, not the window's ---- */
  .dr-stage .dr-foot {
    flex: none; border-radius: 0;
    background: none; box-shadow: inset 0 1px 0 var(--line);
  }
  .dr-stage .dr-foot-in { width: 100%; min-height: 96px; padding: 18px var(--dr-pad) 22px; }
  /* Pairs end on their own: no button, so no empty strip either. */
  .dr-stage .dr-foot:has(> .dr-foot-in:empty) { display: none; }
  .dr-stage .dr-go.btn { min-width: 220px; font-size: 18px; }
  /* How it went: the whole foot of the stage takes the verdict's tint. */
  .dr-stage .dr-foot:is(.right, .close, .wrong) {
    background-color: transparent;
    background-image: linear-gradient(180deg, color-mix(in srgb, var(--fb) 18%, transparent), color-mix(in srgb, var(--fb) 9%, transparent));
    box-shadow: inset 0 1px 0 color-mix(in srgb, var(--fb) 40%, transparent);
  }
  .dr-stage .dr-foot-t > b { font-size: 24px; }
  .dr-stage .dr-foot-t span { font-size: 16px; }
}

/* A short laptop screen (720-760px tall): the same stage, a notch tighter,
   so a new word's card still fits without scrolling. */
@media (min-width: 1024px) and (max-height: 780px) {
  .dr-screen { padding-bottom: 20px; }
  .dr-screen .dr-top { padding: 16px 0 12px; }
  .dr-stage .dr-main { padding-top: 30px; padding-bottom: 26px; gap: 20px; }
  .dr-stage .dr-main.k-intro { padding-top: 24px; gap: 14px; }
  .dr-stage .dr-ask { font-size: 34px; }
  .dr-stage .dr-ask-card .dr-ask { font-size: 32px; }
  .dr-stage .dr-grid.words .dr-card { min-height: 132px; }
  .dr-stage .dr-intro .dr-intro-card.au-hero { padding: 20px 32px 18px; }
  .dr-stage .dr-intro .dr-emoji { font-size: 64px; }
  .dr-stage .dr-intro .dr-emoji .pic, .dr-stage .dr-intro .dr-emoji.none { width: 76px; height: 76px; }
  .dr-stage .dr-intro .dr-intro-word { margin-top: 0; font-size: 42px; }
  .dr-stage .dr-intro .dr-intro-mean { font-size: 23px; }
  .dr-stage .dr-intro .dr-speakers { margin: 0; }
  .dr-stage .dr-foot-in { min-height: 84px; padding-top: 14px; padding-bottom: 18px; }
}
