/* Progress lives beside the music, in the same quiet studio palette. */
.mastery-overview {
  margin: 0 0 24px;
  padding: 0 0 22px;
  border-bottom: 1px solid var(--line);
}
.mastery-overview-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.mastery-overview-copy { min-width: 0; }
.mastery-overview-copy h3 { margin: 0; font: 400 25px/1.2 var(--serif); letter-spacing: -.035em; color: var(--paper); }
.mastery-overview-copy p { max-width: 46ch; margin: 8px 0 0; font-size: 12px; line-height: 1.65; color: var(--muted); }
.mastery-count { flex-shrink: 0; display: grid; gap: 5px; text-align: right; }
.mastery-count > strong { color: var(--paper); font: 400 28px/1.1 var(--serif); font-variant-numeric: tabular-nums; white-space: nowrap; }
.mastery-count > strong > span { font-size: 18px; color: var(--muted); }
.mastery-count > span { color: var(--muted); font-size: 10px; line-height: 1.4; }
.mastery-confidence { margin: 16px 0 0; font-size: 12px; color: var(--match); line-height: 1.5; }
.mastery-confidence > span { margin-right: 6px; }
.mastery-explanation { margin-top: 10px; }
.mastery-explanation > summary { display: flex; align-items: center; gap: 8px; width: fit-content; min-height: 44px; color: var(--muted); cursor: pointer; font-size: 11px; list-style: none; border-radius: 4px; }
.mastery-explanation > summary::-webkit-details-marker { display: none; }
.mastery-explanation > summary::after { content: '+'; color: var(--match); font-size: 15px; }
.mastery-explanation[open] > summary::after { content: '−'; }
.mastery-explanation > summary:hover { color: var(--paper); }
.mastery-explanation > p { max-width: 68ch; margin: 0 0 8px; color: var(--muted); font-size: 12px; line-height: 1.7; }
.mastery-review { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 18px; margin-top: 14px; padding: 20px; border: 1px solid #dac18d3b; border-radius: 10px; background: #dac18d06; }
.mastery-review-copy h4 { margin: 0; color: var(--gold-2); font: 400 21px/1.25 var(--serif); letter-spacing: -.02em; }
.mastery-review-copy p { margin: 7px 0 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.mastery-review-actions { display: grid; grid-template-columns: minmax(140px, 1fr) auto; gap: 8px; align-items: center; min-width: 0; }
.mastery-review-label { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.mastery-review-choice { width: 100%; min-width: 0; min-height: 44px; border: 1px solid var(--line); border-radius: 7px; padding: 10px 28px 10px 12px; color: var(--paper); background-color: var(--bg-2); font: 400 12px/1.5 var(--sans); text-overflow: ellipsis; }
.mastery-review-button { display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 44px; padding: 10px 14px; border: 1px solid #a5d8b94d; border-radius: 7px; color: var(--match); background: transparent; cursor: pointer; font: 500 12px/1.5 var(--sans); white-space: nowrap; }
.mastery-review-button:hover { background: #a5d8b915; border-color: var(--match); }
.mastery-card-progress { border-top: 1px solid var(--line); padding: 13px 12px 14px; }
.mastery-card-caption { margin: 0 3px 10px; color: var(--muted); font-size: 10px; line-height: 1.5; }
.mastery-skills { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; align-items: stretch; }
.mastery-skill { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 7px; min-width: 0; min-height: 76px; padding: 10px 7px; border: 1px solid transparent; border-radius: 6px; text-align: left; background: transparent; color: var(--paper); cursor: pointer; font-family: var(--sans); transition: background-color .15s ease, border-color .15s ease; }
.mastery-skill:hover { background: #a5d8b90c; border-color: #a5d8b934; }
.mastery-skill:active { background: #a5d8b91d; }
.mastery-skill-name { font-size: 12px; line-height: 1.2; font-weight: 500; }
.mastery-marks { display: flex; width: 100%; max-width: 60px; gap: 3px; }
.mastery-mark { flex: 1; height: 3px; border-radius: 2px; background: #a5d8b91f; }
.mastery-mark-filled { background: var(--match); }
.mastery-skill-level { color: var(--muted); font-size: 10px; line-height: 1.3; }
.mastery-skill-review { color: var(--gold-2); font-size: 10px; line-height: 1.3; }
.mastery-skill-due .mastery-skill-name::after { content: ''; display: inline-block; width: 4px; height: 4px; margin: 0 0 2px 5px; background: var(--gold); border-radius: 50%; }
.mastery-skill:focus-visible, .mastery-review-button:focus-visible, .mastery-review-choice:focus-visible, .mastery-explanation > summary:focus-visible { outline: 2px solid var(--match); outline-offset: 3px; }
@media (max-width: 400px) {
  .mastery-overview-head { align-items: flex-start; gap: 15px; }
  .mastery-overview-copy h3 { font-size: 22px; max-width: 12ch; }
  .mastery-count > strong { font-size: 25px; }
  .mastery-review { padding: 16px; }
  .mastery-review-actions { width: 100%; grid-template-columns: minmax(0, 1fr); }
  .mastery-review-button { justify-content: space-between; }
}
@media (min-width: 720px) {
  .mastery-overview { padding-bottom: 26px; margin-bottom: 28px; }
  .mastery-overview-copy h3 { font-size: 28px; }
  .mastery-overview-copy p { font-size: 13px; }
  .mastery-count > strong { font-size: 34px; }
  .mastery-count > span { font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) { .mastery-skill { transition: none; } }
