/* ================================================================
   HOME.CSS — the Learner Home.

   1. The onboarding course question (#page-course-pick,
      practice/course-pick.js). It borrowed the retired placement set-up's
      tiles (2026-09-26) and keeps their `placement-*` class names.
   2. The idle card: one screen, two columns (Seth, 2026-09-26: "simplify
      it to fit onto a single page"). Measured learning, the multiplier and
      the Continue button on the left (styles/xp-panel.css styles what
      practice/xp-panel.js paints into it); daily XP above knowledge toward
      the course on the right.
   ================================================================ */

/* ---- 1. THE COURSE QUESTION ------------------------------------------- */
.placement-page { max-width: 880px; padding-bottom: 64px; padding-top: 44px; }
.diagnostic-eyebrow { color: var(--accent-text); font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.diagnostic-card { border-radius: 14px; margin-top: 0; padding: 22px 24px; }

.placement-step { animation: placement-step-in .18s ease-out; }
@keyframes placement-step-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .placement-step { animation: none; } }
.placement-step-q { color: var(--text); font-size: 22px; font-weight: 700; letter-spacing: -0.01em; line-height: 1.25; margin: 0 0 6px; }
.placement-step-hint { color: var(--muted); font-size: 14px; line-height: 1.5; margin: 0 0 20px; max-width: 62ch; }
.placement-step-loading { color: var(--muted); font-size: 13px; margin: 0; }

/* A course is "a big button you pick". */
.placement-focus-tile {
  align-items: flex-start;
  background: rgb(var(--well-rgb) / calc(0.14 * var(--well-k)));
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  cursor: pointer;
  display: flex;
  font: inherit;
  gap: 12px;
  padding: 14px 16px;
  text-align: left;
  transition: border-color .12s ease, background .12s ease, opacity .12s ease;
}
.placement-focus-tile:hover { border-color: rgb(var(--info-rgb) / 0.6); }
.placement-focus-tile.is-selected {
  background: rgb(var(--info-rgb) / 0.08);
  border-color: var(--info);
  box-shadow: inset 0 0 0 1px var(--info);
}
.placement-focus-tile:focus-visible { outline: 2px solid var(--info); outline-offset: 2px; }
.placement-focus-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.placement-focus-check {
  border: 1.5px solid var(--muted-dim);
  border-radius: 6px;
  flex: none;
  height: 18px;
  margin-top: 1px;
  position: relative;
  width: 18px;
}
.is-selected > .placement-focus-check { background: var(--info); border-color: var(--info); }
.is-selected > .placement-focus-check::after {
  border: solid var(--bg);
  border-width: 0 2px 2px 0;
  content: "";
  height: 9px;
  left: 5px;
  position: absolute;
  top: 1.5px;
  transform: rotate(45deg);
  width: 4px;
}
.placement-focus-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.placement-focus-name { font-size: 15px; font-weight: 650; }
.placement-focus-blurb { color: var(--muted); font-size: 12.5px; line-height: 1.45; }
.placement-focus-count { color: var(--muted); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.placement-focus-count.is-warning { color: rgb(var(--warn-rgb)); }

/* The note on the left, Continue on the right. */
.placement-wizard-nav {
  align-items: center;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-top: 26px;
  padding-top: 18px;
}
.placement-forward-btn {
  background: var(--info);
  border: 1px solid var(--info);
  border-radius: 10px;
  color: var(--bg);
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  padding: 11px 22px;
}
.placement-forward-btn:hover:not(:disabled) { background: rgb(var(--info-rgb) / 0.85); border-color: rgb(var(--info-rgb) / 0.85); }
.placement-forward-btn:disabled { cursor: not-allowed; opacity: .4; }
.placement-forward-btn.hidden { display: none; }

@media (max-width: 620px) {
  .placement-step-q { font-size: 19px; }
  .placement-focus-grid { grid-template-columns: 1fr; }
}

/* ---- 2. THE IDLE CARD -------------------------------------------------- */
/* Off screen whenever a question is on the clock (styles/practice/timer.css).
   `.practice-container` is a flex COLUMN that scrolls when idle
   (styles/practice/layout.css): the card says its width out loud and never
   shrinks, or it would be squashed into the viewport. */
.session-setup {
  --home-rule: var(--border);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 1px 0 rgb(var(--tint-rgb) / calc(0.04 * var(--tint-k))) inset, 0 18px 48px -28px rgb(0 0 0 / 0.55);
  box-sizing: border-box;
  display: grid;
  flex-shrink: 0;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 380px);
  margin: 28px auto;
  max-width: 1120px;
  overflow: hidden;
  position: relative;
  width: calc(100% - 48px);
}
/* No XP to show (a guest, or the read failed): just the way back in. */
.session-setup:has(.home-graphs.is-empty) {
  grid-template-columns: minmax(0, 1fr);
  max-width: 420px;
}
.session-setup:has(.home-graphs.is-empty) .home-main { display: none; }
.session-setup:has(.home-graphs.is-empty) .home-choice { border-left: 0; }
/* LEFT: the course and its percentage, the week's XP, the bars under it
   (Seth, 2026-09-29). The XP line sits right on its bars: no gap. */
.home-main {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
  padding: 24px 30px 26px;
}
.home-graphs {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}
.home-graphs.is-empty { display: none; }
/* RIGHT: Practice with AI, the concepts to choose from, the multiplier. */
.home-choice {
  border-left: 1px solid var(--home-rule);
  display: flex;
  flex-direction: column;
  gap: 22px;
  min-width: 0;
  padding: 28px 26px 24px;
}

/* The button that hands every choice to the algorithm, and what the last
   block said. */
.session-go {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.session-clock-scale {
  align-items: center;
  border-top: 1px solid var(--home-rule);
  margin-top: auto;
  padding-top: 16px;
  color: var(--muted);
  cursor: text;
  display: flex;
  flex-wrap: wrap;
  font-size: 12.5px;
  gap: 6px 8px;
}
.session-clock-scale-label { color: var(--text); font-weight: 600; }
.session-clock-scale-x { color: var(--muted); }
.session-clock-scale-input {
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  padding: 4px 8px;
  text-align: center;
  width: 60px;
}
.session-clock-scale-input:focus { border-color: var(--accent); outline: none; }
.session-clock-scale-hint { color: var(--muted-dim); flex-basis: 100%; font-size: 11.5px; }
.session-continue-btn {
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.005em;
  min-height: 46px;
  width: 100%;
}
/* Voice mode for Practice with AI (practice/session-idle.js): the Courses
   tab's switch (styles/courses/catalog.css), under the button. */
.session-voice-toggle { align-self: center; }
.session-voice-toggle[hidden] { display: none; }

@media (max-width: 860px) {
  .session-setup,
  .session-setup:has(.home-graphs.is-empty) {
    grid-template-columns: minmax(0, 1fr);
    margin: 16px auto;
    width: calc(100% - 32px);
  }
  /* On a phone the way in comes first; the graph and the numbers follow. */
  .home-choice { border-left: 0; order: -1; padding: 22px 18px 20px; }
  .home-main { border-top: 1px solid var(--home-rule); padding: 20px 18px; }
}
