/* 504 Essential Words module. Loaded only on /504/ pages. */

/* ---- module home --------------------------------------------------------------------- */

/* Three destinations as one list (rows on phones, columns on desktop), not nested cards. */
.destinations { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); }
.destinations li + li { border-top: 1px solid var(--line); }
.destinations a { display: flex; align-items: center; gap: 14px; min-height: 72px; padding: 12px 18px; }
.destinations a:hover { background: var(--canvas); }
.destination-icon { display: grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 12px; background: var(--module-soft); color: var(--module-accent); }
.destination-text { flex: 1; display: grid; min-width: 0; }
.destination-text strong { font-size: 1.0625rem; line-height: 1.5; }
.destination-text span { color: var(--muted); font-size: 0.875rem; }
.destination-arrow { color: var(--muted); }
@media (min-width: 900px) {
  .destinations { display: grid; grid-template-columns: repeat(3, 1fr); }
  .destinations li + li { border-top: 0; border-inline-start: 1px solid var(--line); }
  .destinations a { height: 100%; }
}

.method { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-top: 28px; }
.method-title { color: var(--muted); font-size: 0.9375rem; }
/* Phones: the title gets its own line, so the steps never wrap differently once the web font
   replaces the fallback (that re-wrap was a layout shift). */
@media (max-width: 599px) { .method-title { flex-basis: 100%; } }
.method-steps { display: flex; flex-wrap: wrap; gap: 8px; counter-reset: step; }
.method-steps li { display: inline-flex; align-items: center; gap: 8px; padding-block: 4px; padding-inline: 4px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-size: 0.9375rem; font-weight: 700; counter-increment: step; }
.method-steps li::before { content: counter(step, persian); display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--brand-soft); color: var(--brand-ink); font-size: 0.8125rem; }

/* The course page link stays secondary to the learning actions. */
.course-note { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px; margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--text); font-size: 0.9375rem; }
.course-note p { flex: 1 1 320px; }
.course-note strong { margin-inline-end: 4px; color: var(--ink); }
.course-note .text-link { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; }
.course-note .text-link .icon { width: 16px; height: 16px; }

/* ---- search -------------------------------------------------------------------------- */

.search { position: relative; }
.search-field { position: relative; }
.search-field > .icon { position: absolute; top: 50%; inset-inline-start: 14px; translate: 0 -50%; color: var(--muted); pointer-events: none; }
.search-field .input { padding-inline-start: 44px; }
.search-field .input::-webkit-search-cancel-button { cursor: pointer; }
.search-results {
  position: absolute; z-index: 30; top: calc(100% + 6px); inset-inline: 0;
  max-height: min(60vh, 440px); overflow: auto; padding: 6px;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-pop);
}
/* Vocabulary pairs: English word on the LEFT, Persian meaning (and lesson) on the RIGHT, set
   explicitly so the page's RTL direction never swaps them. First grid column = right in RTL. */
.search-result { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: 'meaning word' 'lesson word'; align-items: center; gap: 0 12px; min-height: 56px; padding: 8px 12px; border-radius: 10px; }
.search-result:hover, .search-result:focus-visible { background: var(--canvas); }
.search-word { grid-area: word; justify-self: end; font-weight: 700; font-size: 1.0625rem; line-height: 1.5; text-align: left; overflow-wrap: anywhere; }
.search-meaning { grid-area: meaning; color: var(--text); font-size: 0.9375rem; line-height: 1.6; }
.search-lesson { grid-area: lesson; justify-self: start; color: var(--accent-strong); font-size: 0.8125rem; font-weight: 700; }
.search-empty { padding: 14px 12px; color: var(--muted); font-size: 0.9375rem; }

/* ---- lessons index ------------------------------------------------------------------- */

.words-toolbar { margin-bottom: 24px; max-width: 640px; }
.lesson-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); }
.lesson-card { display: grid; gap: 4px; align-content: start; min-height: 100px; height: 100%; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); transition: border-color 0.15s, box-shadow 0.15s; }
.lesson-card:hover { border-color: var(--accent-line); box-shadow: var(--shadow); }
.lesson-card.is-last { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.lesson-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.lesson-card-title { font-size: 1.0625rem; }
.lesson-card-status { min-height: 1.6em; padding: 0 8px; border-radius: 999px; color: var(--muted); font-size: 0.75rem; font-weight: 700; }
.lesson-card-status[data-state='mastered'] { background: var(--brand-soft); color: var(--brand-ink); }
.lesson-card-status[data-state='practiced'] { background: var(--accent-soft); color: var(--accent-strong); }
.lesson-card-words { color: var(--muted); font-size: 0.875rem; line-height: 1.6; text-align: right; }

/* ---- lesson page --------------------------------------------------------------------- */

.lesson-toolbar { display: grid; gap: 10px; margin-bottom: 16px; }
.lesson-stepper { position: relative; display: flex; align-items: center; gap: 6px; }
.step-link {
  display: inline-grid; place-items: center; width: 48px; height: 48px; flex: none;
  border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface); color: var(--text);
}
.step-link:hover { border-color: var(--module-accent); color: var(--module-accent-strong); }
.step-link[aria-disabled='true'] { opacity: 0.4; pointer-events: none; }
.lesson-menu { flex: 1; }
.lesson-menu summary {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  min-height: 48px; padding: 8px 16px; list-style: none; cursor: pointer;
  border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface); font-weight: 700; white-space: nowrap;
}
.lesson-menu summary::-webkit-details-marker { display: none; }
.lesson-menu summary .icon { color: var(--module-accent); transition: rotate 0.2s; }
.lesson-menu[open] summary .icon { rotate: 180deg; }
.lesson-menu-panel {
  position: absolute; z-index: 30; top: calc(100% + 6px); inset-inline: 0;
  padding: 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-pop);
}
.lesson-menu-panel p { margin-bottom: 8px; color: var(--muted); font-size: 0.875rem; font-weight: 700; }
.lesson-menu-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
.lesson-menu-grid a { display: grid; place-items: center; min-height: 44px; border: 1px solid var(--line); border-radius: 10px; font-weight: 700; }
.lesson-menu-grid a:hover { border-color: var(--module-accent); color: var(--module-accent-strong); }
.lesson-menu-grid a[aria-current] { border-color: var(--module-accent); background: var(--module-accent); color: #fff; }
@media (min-width: 760px) {
  .lesson-toolbar { grid-template-columns: minmax(0, 1fr) 300px; }
  .lesson-menu-panel { inset-inline: auto 0; width: 380px; }
}

.word-list { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); }
/* Visual order (RTL): Persian meaning on the right, then the English word and its number on
   the left, while the DOM keeps the reading order number → word → meaning. */
.word {
  display: grid; grid-template-columns: minmax(0, 1fr) fit-content(55%) 28px; align-items: center; gap: 10px;
  min-height: 64px; padding: 8px 14px; border-bottom: 1px solid #edf1f5;
  scroll-margin-top: calc(var(--topbar-h) + 16px);
}
.word:last-child { border-bottom: 0; }
.word-number { grid-area: 1 / 3; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--module-soft); color: var(--module-accent-strong); font-size: 0.8125rem; font-weight: 700; }
.word-term { grid-area: 1 / 2; font-size: 1.0625rem; font-weight: 700; line-height: 1.35; overflow-wrap: break-word; text-align: left; }
.word-meaning { grid-area: 1 / 1; color: var(--text); font-size: 1rem; line-height: 1.6; }
.word:target { background: var(--brand-soft); box-shadow: inset 0 0 0 2px var(--brand); animation: word-flash 1.4s var(--ease); }
@keyframes word-flash { 0%, 100% { background: var(--surface); } 30% { background: var(--brand-soft); } }
@media (min-width: 900px) {
  .word-list { display: grid; grid-auto-flow: column; grid-template-columns: 1fr 1fr; grid-template-rows: repeat(6, auto); }
  .word:nth-child(6) { border-bottom: 0; }
  .word:nth-child(n + 7) { border-right: 1px solid #edf1f5; }
  .word:target { animation: none; }
}

.practice-cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-top: 20px; padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); }
.practice-cta h2 { font-size: 1.125rem; }
.practice-cta p { color: var(--text); font-size: 0.9375rem; }

.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.pager a { display: flex; align-items: center; gap: 10px; min-height: 64px; padding: 10px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); font-weight: 700; }
.pager a:hover { border-color: var(--accent-line); }
.pager small { display: block; color: var(--muted); font-size: 0.8125rem; font-weight: 400; }
.pager .pager-next { grid-column: 2; justify-content: flex-end; text-align: left; }

/* ---- practice ------------------------------------------------------------------------ */

.practice { max-width: 680px; margin-inline: auto; }
.practice-head, .practice-setup { text-align: center; }
.identity-line { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px 8px; margin-top: 14px; color: var(--text); font-size: 0.9375rem; }
.setup-form { display: grid; gap: 18px; margin-top: 18px; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); text-align: start; }
.setup-status { min-height: 1.75em; color: var(--muted); font-size: 0.875rem; text-align: center; }
.setup-status[data-state='error'] { color: var(--danger); font-weight: 700; }
.best { margin-top: 12px; color: var(--muted); font-size: 0.875rem; }
.segmented--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
/* Challenge modes: icon and name, the time limit below; the chosen mode's multiplier sits
   beside the legend. */
.challenge-hint { color: var(--muted); font-size: 0.8125rem; font-weight: 400; }
.challenge-modes label > span { flex-wrap: wrap; gap: 0 4px; line-height: 1.3; }
.challenge-modes .icon { width: 16px; height: 16px; flex: none; }
/* Peyda's space nearly vanishes between a Persian digit and "ثانیه". */
.challenge-modes small { flex-basis: 100%; color: var(--muted); font-size: 0.75rem; font-weight: 400; word-spacing: 0.12em; }
.challenge-modes input:checked + span small { color: inherit; }
/* Phones: the start button must sit above the bottom navigation without scrolling. */
@media (max-width: 599px) {
  .practice-setup .lead { margin-top: 4px; font-size: 1rem; }
  .identity-line { margin-top: 8px; }
  .setup-form { gap: 14px; margin-top: 12px; padding: 16px; }
}
/* Short phones: drop the intro sentence (the status line repeats "۱۲ پرسش"), put the lesson
   label beside its select and tighten the form, so the start button stays above the bottom
   navigation. */
@media (max-width: 599px) and (max-height: 740px) {
  .practice-setup .lead { display: none; }
  .identity-line { margin-top: 0; }
  .setup-form { gap: 12px; margin-top: 8px; padding: 14px; }
  .setup-form > .field:first-child { grid-template-columns: auto minmax(0, 1fr); align-items: center; column-gap: 14px; }
  .setup-form .select { min-height: 44px; }
}
/* The shortest phones (320×568): a smaller heading and tighter fields. */
@media (max-width: 599px) and (max-height: 600px) {
  .practice-head .page-title { font-size: 1.375rem; }
  .identity-line .link-button { min-height: 28px; }
  .setup-form { gap: 10px; }
  .setup-form .field { gap: 4px; }
  .setup-form .field > legend { line-height: 1.4; }
}
/* Very narrow phones: segment labels wrap to two lines; keep those lines tight. */
@media (max-width: 359px) {
  .setup-form .segmented label > span { padding: 4px; font-size: 0.8125rem; line-height: 1.3; }
  .challenge-modes .icon { display: none; }
}

.quiz { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; max-width: 680px; margin-inline: auto; padding-bottom: calc(16px + var(--safe-bottom)); }
.quiz-bar { display: flex; align-items: center; gap: 10px; height: 64px; flex: none; }
.quiz-progress { --value: 0%; flex: 1; height: 10px; overflow: hidden; border-radius: 999px; background: #e7ecf2; }
.quiz-progress > span { display: block; width: var(--value); height: 100%; border-radius: inherit; background: var(--brand); transition: width 0.3s var(--ease); }
.quiz-body { display: flex; flex-direction: column; flex: 1; padding-top: 8px; }
.question-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.counter { color: var(--module-accent-strong); font-size: 0.9375rem; }
.mode-label { color: var(--muted); font-size: 0.8125rem; }

/* Lesson clock: "N ثانیه باقی‌مانده" beside the question counter and a thin bar that empties as the
   lesson's time runs down; the warning colour for the last five seconds. */
.challenge-time { color: var(--text); font-size: 0.9375rem; font-weight: 700; font-variant-numeric: tabular-nums; word-spacing: 0.12em; }
.challenge-time[data-state='warning'], .challenge-time[data-state='expired'] { color: var(--danger); }
.challenge-bar { --time: 1; height: 6px; margin: -2px 0 10px; overflow: hidden; border-radius: 999px; background: var(--line); }
.challenge-bar > span { display: block; height: 100%; border-radius: inherit; background: var(--module-accent); transform: scaleX(var(--time)); transform-origin: 100% 50%; transition: transform 0.2s linear, background-color 0.2s; }
.challenge-bar[data-state='warning'] > span, .challenge-bar[data-state='expired'] > span { background: var(--danger); }
.question-card {
  display: grid; place-items: center; align-content: center; gap: 8px;
  min-height: clamp(128px, 22dvh, 230px); padding: 18px 20px;
  border: 1px solid var(--accent-line); border-radius: var(--radius-lg); background: var(--surface); text-align: center;
}
.question-card.is-entering { animation: pop-in 0.22s var(--ease); }
.question-prompt { color: var(--muted); font-size: 1rem; }
/* Always two lines tall (the longest Persian meanings wrap to two), so the card and the answers
   below keep their place from question to question, including the automatic advance after a
   timeout, which has no user input to excuse a layout shift. */
.question-value { display: grid; align-content: center; max-width: 100%; min-height: 2.6em; font-size: clamp(1.875rem, 1.2rem + 3.6vw, 3.25rem); font-weight: 700; line-height: 1.3; overflow-wrap: anywhere; }
.choices { display: grid; gap: 10px; margin-top: 14px; }
.choice {
  min-height: clamp(56px, 8.2dvh, 76px); padding: 10px 18px;
  border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface); color: var(--ink);
  font-size: clamp(1.0625rem, 0.95rem + 1vw, 1.3125rem); font-weight: 700; line-height: 1.4; overflow-wrap: anywhere; text-align: center;
  transition: border-color 0.15s, background-color 0.15s, transform 0.12s;
}
.choice:hover:not(:disabled) { border-color: var(--module-accent); background: #fbfaff; }
.choice:active:not(:disabled) { transform: scale(0.985); }
.choice:disabled { cursor: default; }
.choice.is-correct { border-color: var(--brand-ink); background: var(--brand-soft); box-shadow: inset 0 0 0 1px var(--brand-ink); animation: answer-correct 0.38s ease; }
.choice.is-wrong { border-color: var(--danger); background: var(--danger-soft); color: var(--danger-ink); animation: answer-wrong 0.34s ease; }
.feedback { display: grid; place-items: center; min-height: 40px; margin-top: 8px; font-weight: 700; text-align: center; }
.feedback[data-state='good'] { color: var(--brand-ink); }
.feedback[data-state='bad'] { color: var(--danger); }
.next { margin-top: 6px; visibility: hidden; }
.next.is-visible { visibility: visible; }
@keyframes answer-correct { 50% { transform: scale(1.018); } }
@keyframes answer-wrong { 25% { transform: translateX(4px); } 50% { transform: translateX(-4px); } 75% { transform: translateX(2px); } }
@media (min-width: 600px) {
  .choices { grid-template-columns: 1fr 1fr; }
  .quiz-body { justify-content: center; padding-bottom: 48px; }
  /* Room for two-line answers, so the vertically centred block keeps its place between
     questions (the short-screen rules below still take precedence). */
  .choice { min-height: max(clamp(56px, 8.2dvh, 76px), calc(2.8em + 20px)); }
}
@media (max-height: 640px) {
  .quiz-bar { height: 52px; }
  .question-card { min-height: 112px; padding-block: 10px; }
  .choices { gap: 8px; margin-top: 10px; }
  .choice { min-height: 50px; }
  .feedback { min-height: 32px; margin-top: 4px; }
}
/* Very short screens (e.g. 320×568): sized for the longest content — a two-line Persian
   question and four long options — so a question never makes the page scroll. */
@media (max-height: 600px) {
  .quiz-bar { height: 48px; }
  .question-meta { margin-bottom: 6px; }
  .question-card { min-height: 96px; padding: 8px 14px; gap: 4px; }
  .question-prompt { font-size: 0.875rem; }
  .question-value { font-size: 1.625rem; }
  .choices { gap: 6px; margin-top: 8px; }
  .choice { min-height: 46px; padding: 6px 12px; font-size: 1rem; }
  .feedback { min-height: 28px; margin-top: 2px; font-size: 0.875rem; }
  .next { min-height: 44px; margin-top: 2px; }
}
/* Phones in landscape: question beside a 2×2 grid of answers, feedback and next below. */
@media (orientation: landscape) and (max-height: 440px) {
  .quiz { padding-bottom: calc(8px + var(--safe-bottom)); }
  .quiz-bar { height: 44px; }
  .quiz-body {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
    grid-template-areas: 'meta meta' 'time time' 'card choices' 'feedback feedback' 'next next';
    column-gap: 12px; padding: 0; justify-content: stretch;
  }
  .question-meta { grid-area: meta; margin-bottom: 4px; }
  .challenge-bar { grid-area: time; margin: 0 0 6px; }
  .question-card { grid-area: card; min-height: 0; padding: 8px 12px; gap: 4px; }
  .question-prompt { font-size: 0.8125rem; }
  .question-value { font-size: 1.5rem; }
  .choices { grid-area: choices; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 0; }
  .choice { min-height: 44px; padding: 6px 10px; font-size: 0.9375rem; }
  .feedback { grid-area: feedback; min-height: 26px; margin-top: 4px; font-size: 0.875rem; }
  .next { grid-area: next; min-height: 44px; margin-top: 2px; }
}

.result { max-width: 680px; margin-inline: auto; }
.result-card { position: relative; overflow: hidden; padding: 28px 20px 24px; border: 1px solid var(--accent-line); border-radius: var(--radius-lg); background: var(--surface); text-align: center; }
.result-card::before { content: ''; position: absolute; inset: 0 0 auto; height: 6px; background: var(--brand); }
.result-card:focus { outline: none; }
.result-logo { display: block; margin: 6px auto 18px; }
.result-logo svg { width: auto; height: 44px; margin-inline: auto; }
.result-label { color: var(--module-accent-strong); font-size: 0.875rem; font-weight: 700; }
.result-heading { margin-top: 4px; font-size: 1.625rem; line-height: 1.4; }
.result-emoji { font-size: 0.9em; }
.result-meta { margin-top: 2px; color: var(--muted); font-size: 0.875rem; }
.result-badge { display: inline-flex; align-items: center; gap: 10px; margin-top: 16px; padding: 8px 18px 8px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-strong); text-align: start; }
.result-badge-icon { display: grid; place-items: center; width: 38px; height: 38px; flex: none; border-radius: 50%; background: var(--surface); color: var(--module-accent); }
.result-badge-icon .icon { width: 20px; height: 20px; }
.result-badge-text strong { display: block; font-size: 1.0625rem; line-height: 1.4; }
.result-badge-text small { display: block; color: var(--muted); font-size: 0.75rem; }
.result-badge[data-rarity='legendary'] { background: var(--brand-soft); color: var(--brand-ink); }
.result-badge[data-rarity='legendary'] .result-badge-icon { color: var(--brand-ink); }
.result-xp { margin-top: 14px; font-size: 3.25rem; font-weight: 700; line-height: 1.1; }
.result-xp small { color: var(--muted); font-family: var(--font-latin); font-size: 1.25rem; }
.result-level { margin-top: 6px; color: var(--module-accent-strong); font-weight: 700; }
.result-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 20px; }
.result-stats div { padding: 12px; border-radius: var(--radius); background: var(--canvas); }
.result-stats dt { color: var(--muted); font-size: 0.8125rem; }
.result-stats dd { font-size: 1.25rem; font-weight: 700; word-spacing: 0.12em; }
.result-records { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 16px; }
.result-records li { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-ink); font-size: 0.8125rem; font-weight: 700; }
.result-records .icon { width: 16px; height: 16px; }
.review-note { display: block; color: var(--muted); font-size: 0.75rem; }
@media (min-width: 600px) {
  .result-stats--4 { grid-template-columns: repeat(4, 1fr); }
}
.result-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
.result-actions > :first-child { grid-column: 1 / -1; }
.result-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 20px; margin-top: 14px; }
.review { margin-top: 28px; scroll-margin-top: 16px; }
.review h3 { margin-bottom: 10px; font-size: 1.0625rem; }
.review-list { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.review-item { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: 'meaning word'; align-items: center; gap: 16px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.review-item:last-child { border-bottom: 0; }
.review-word { grid-area: word; justify-self: end; font-weight: 700; text-align: left; }
.review-meaning { grid-area: meaning; }
.review-empty { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 16px; color: var(--brand-ink); font-weight: 700; }
@media (min-width: 600px) {
  .result-actions { grid-template-columns: repeat(3, 1fr); }
  .result-actions > :first-child { grid-column: auto; }
}

/* ---- progress ------------------------------------------------------------------------ */

.progress-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.lesson-progress { display: grid; justify-items: center; align-content: center; gap: 2px; min-height: 76px; padding: 8px 6px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); text-align: center; }
.lesson-progress:hover { border-color: var(--accent-line); }
.lesson-progress-name { color: var(--muted); font-size: 0.8125rem; font-weight: 700; }
.lesson-score { color: var(--muted); font-size: 1.125rem; font-weight: 700; }
.lesson-progress[data-state='mastered'] { border-color: #9be8cc; background: var(--brand-soft); }
.lesson-progress[data-state='mastered'] .lesson-score { color: var(--brand-ink); }
.lesson-progress[data-state='practiced'] { border-color: var(--accent-line); background: var(--accent-soft); }
.lesson-progress[data-state='practiced'] .lesson-score { color: var(--accent-strong); }
.lesson-progress[data-state='viewed'] { border-style: dashed; border-color: var(--line-strong); }
.legend { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 12px; color: var(--muted); font-size: 0.8125rem; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 14px; height: 14px; border-radius: 4px; border: 1px solid var(--line-strong); }
.legend .is-mastered { background: var(--brand-soft); border-color: #9be8cc; }
.legend .is-practiced { background: var(--accent-soft); border-color: var(--accent-line); }
.legend .is-viewed { border-style: dashed; }
