/* SpacedCube: practice view and progress rail. */
/* Practice */
.practice { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.trainer { display: grid; gap: 18px; padding: 22px; }
.newflag {
  background: var(--accent-soft); color: var(--ink); border-radius: 9px; padding: 9px 12px; font-size: 14px;
  border-left: 3px solid var(--accent);
}
.scramble {
  margin: 0; font-family: var(--font-mono); font-weight: 500;
  font-size: clamp(22px, 3.4vw, 34px); line-height: 1.5;
  display: flex; flex-wrap: wrap; gap: 2px .75em;
}
.scramble span { min-width: 2ch; }
.hint { margin: -6px 0 0; color: var(--muted); font-size: 13px; }
.answer {
  border: 1.5px dashed var(--line); border-radius: var(--radius); min-height: 150px;
  display: grid; place-items: center; padding: 16px;
}
.answer.open { border-style: solid; background: var(--surface-2); place-items: stretch; }
.reveal {
  border: 0; background: transparent; color: var(--accent); font-weight: 600; font-size: 15px;
  display: inline-flex; gap: 10px; align-items: center; padding: 14px 6px;
}
.hintbox { display: grid; gap: 8px; justify-items: center; text-align: center; }
.hintlink { border: 0; background: none; color: var(--muted); font-size: 13px; padding: 4px 6px; display: inline-flex; gap: 8px; align-items: center; text-decoration: underline; text-underline-offset: 2px; }
.hintlink kbd { font-size: 10px; }
.hintask { display: grid; gap: 8px; font-size: 13px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.case-only { justify-content: center; text-align: left; }
.case-only .info { flex: 0 1 auto; }
.hintbox .alg { justify-self: center; }
.case-show { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.case-show .info { display: grid; gap: 6px; min-width: 0; flex: 1; }
.case-title { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.case-title b { font-family: var(--font-display); font-stretch: 112%; font-weight: 800; font-size: 24px; }
.case-title span { color: var(--muted); }
.alg {
  font-family: var(--font-mono); font-size: 17px; font-weight: 500; background: var(--surface);
  border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; justify-self: start; overflow-wrap: anywhere;
}
.alg-note { font-size: 12px; color: var(--muted); }
.grades { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grade {
  border-radius: 12px; padding: 16px 12px; font-size: 17px; font-weight: 600;
  display: inline-flex; justify-content: center; align-items: center; gap: 10px;
  border: 1.5px solid;
}
.grade.miss { background: var(--bad-soft); border-color: color-mix(in srgb, var(--bad) 45%, transparent); color: var(--bad); }
.grade.hit { background: var(--good); border-color: var(--good); color: #fff; }
:root[data-theme="dark"] .grade.hit { color: #07150d; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .grade.hit { color: #07150d; } }
.grade:active { transform: translateY(1px); }
.last { font-size: 13px; color: var(--muted); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; min-height: 24px; }
.last .ok { color: var(--good); font-weight: 600; }
.last .ko { color: var(--bad); font-weight: 600; }
.linkbtn { border: 0; background: none; color: var(--accent); padding: 0; font-weight: 500; text-decoration: underline; text-underline-offset: 2px; }

.rail { display: grid; gap: 16px; }
.stats3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 12px 0 14px; }
.stats3 div { display: grid; }
.stats3 b { font-family: var(--font-display); font-stretch: 110%; font-size: 28px; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stats3 span { font-size: 12px; color: var(--muted); }
.strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(24px, 1fr)); gap: 4px; }
.strip button {
  aspect-ratio: 1; border-radius: 3px; border: 1.5px solid transparent; padding: 0;
  background: transparent; border-color: var(--sticker-off);
}
.strip button.on { border-color: transparent; }
.strip button:hover { outline: 2px solid var(--ink); outline-offset: 1px; }
.legend { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 10px; font-size: 12px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 5px; }
.legend i { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }
.legend i.none { border: 1.5px solid var(--sticker-off); }
.nextcase { display: flex; gap: 14px; align-items: center; margin-top: 12px; }
.nextcase p { margin: 0 0 8px; font-size: 13px; color: var(--muted); }
.nextcase b { color: var(--ink); }
.focus { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 4px; }
.focus li button {
  width: 100%; display: grid; grid-template-columns: 34px 1fr auto; gap: 10px; align-items: center;
  border: 0; background: transparent; padding: 5px 6px; border-radius: 8px; text-align: left;
}
.focus li button:hover { background: var(--surface-2); }
.focus .pct { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.empty { text-align: center; padding: 40px 20px; display: grid; gap: 12px; justify-items: center; }

@media (max-width: 880px) {
  .practice { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: no-preference) {
  .answer.open { animation: pop .18s ease-out; }
  @keyframes pop { from { transform: scale(.985); opacity: .6; } to { transform: none; opacity: 1; } }
}
.card h2.eyebrow { font-family: var(--font-body); font-stretch: normal; font-size: 12px; font-weight: 600; }
.duepill {
  font-size: 13px; font-weight: 600; padding: 2px 10px; border-radius: 99px; white-space: nowrap;
  background: var(--surface-2); color: var(--muted); border: 1px solid var(--line);
}
.duepill.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-size: 14px; }
