/* Дизайн-система «09/10» (см. design.md) — светлый холст, один индиго-акцент,
   заливка вместо линий/теней, без градиентов и текстур. Заменяет прежний
   тёмный бренд «Asphalt Ember». Названия CSS-классов не менялись при переносе
   токенов — меняются только значения и часть структурных правил (тени,
   границы, шрифты, анимация входа). */
:root {
  --bg: oklch(99.3% 0.002 250);
  --text: oklch(16% 0.006 260);
  --hint: oklch(52% 0.01 260);
  --link: var(--accent);
  --btn: var(--accent);
  --btn-text: var(--accent-ink);
  --secondary-bg: oklch(97% 0.005 250);
  --elevated-bg: oklch(0% 0 0 / 7%);
  --radius: 16px;
  --radius-chip: 999px;
  /* Алиасы для переменных, на которые уже ссылался app.js без определения
     (var(--muted)/var(--card-bg)/var(--border) молча схлопывались в наследуемое) */
  --muted: var(--hint);
  --card-bg: var(--secondary-bg);
  --border: oklch(0% 0 0 / 8%);
  --ease-spring: cubic-bezier(.2,.8,.2,1);

  /* Акцент — один индиго на всё приложение. */
  --accent: oklch(50% 0.14 266);
  --accent-dim: oklch(92% 0.026 266);
  --accent-ink: oklch(99% 0 0);
  --focus: oklch(20% 0.02 266);
  --good: oklch(46% 0.1 150);
  --good-dim: oklch(91% 0.03 150);
  --warn: oklch(55% 0.14 40);
  --warn-dim: oklch(94% 0.03 40);

  /* Шкала серьёзности ошибок — только для данных (карта ошибок, тренд),
     никогда не смешивается с брендовым --accent. */
  --sev-low: oklch(48% 0.09 150);
  --sev-low-soft: oklch(91% 0.03 150);
  --sev-mid: oklch(60% 0.12 75);
  --sev-mid-soft: oklch(92% 0.038 75);
  --sev-high: oklch(52% 0.13 28);
  --sev-high-soft: oklch(91% 0.035 28);

  /* Один системный sans на всё — ни серифа, ни отдельного mono-дисплея для
     цифр (см. design.md). Крупные числа используют tabular-nums вместо
     смены гарнитуры. */
  --font-display: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.5;
  min-height: 100vh;
}

/* Bottom Tab Bar — плоская, без blur/grain, активная вкладка — пилюля
   accent-soft/accent, без верхней полоски-индикатора. */
.tabs {
  display: flex;
  gap: 4px;
  padding: 6px;
  background: var(--bg);
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding-bottom: calc(6px + env(safe-area-inset-bottom, 0px));
}
.tab-btn {
  flex: 1;
  padding: 8px 4px 7px;
  border: none;
  border-radius: var(--radius-chip);
  background: transparent;
  color: var(--hint);
  font-size: 10px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  transition: background .15s var(--ease-spring), color .15s var(--ease-spring);
  -webkit-tap-highlight-color: transparent;
}
.tab-btn .tab-icon {
  width: 22px;
  height: 22px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.tab-btn .tab-icon svg { width: 21px; height: 21px; }
.tab-btn.active { color: var(--accent); font-weight: 600; background: var(--accent-dim); }

/* Panels */
.panel { display: none; padding: 16px; padding-top: calc(16px + var(--tg-safe-area-inset-top, 0px) + var(--tg-content-safe-area-inset-top, 0px)); padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px)); }
.panel.active { display: block; }
/* Уходящая вкладка гаснет за 140мс, а не пропадает мгновенным display:none. */
.panel.leaving { transition: opacity 140ms var(--ease-spring); opacity: 0; }
@media (prefers-reduced-motion: reduce) {
  .panel.leaving { transition: none; }
}

/* Cards — заливка вместо линий: цвет фона отличает карточку, не обводка и не тень. */
.card {
  background: var(--secondary-bg);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: transform .15s var(--ease-spring);
}
.card:active { transform: scale(0.98); }
.card-title { font-family: var(--font-display); font-weight: 600; margin-bottom: 4px; }
.card-sub { color: var(--hint); font-size: 13px; }
/* ===== Единый чип — раньше это были 6 независимо родившихся почти одинаковых
   плашек (card-badge, pill, status-варианты, level-pill, hw-status-варианты) с разным радиусом
   и паддингом на один и тот же смысл "маленький цветной лейбл". Сведено в
   одну форму + 4 смысловых тона (нейтральный/акцент/успех/предупреждение).
   Классы в разметке (app.js) не переименовывались — только сами правила. */
.card-badge,
.level-pill,
.pill,
.hw-status {
  display: inline-flex;
  align-items: center;
  border-radius: var(--radius-chip);
  padding: 3px 10px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  background: var(--elevated-bg);
  color: var(--text);
}
.card-badge { margin-left: 6px; background: var(--elevated-bg); color: var(--hint); }
.level-pill { letter-spacing: 0.2px; background: var(--accent-dim); color: var(--accent); }
.pill { background: var(--accent-dim); color: var(--accent); font-weight: 600; }

/* Avatars */
.avatar {
  width: 52px; height: 52px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 19px; color: var(--accent-ink);
  flex-shrink: 0;
}

/* Button */
.btn {
  display: block;
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: var(--radius);
  background: var(--btn);
  color: var(--btn-text);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 12px;
  transition: transform .15s var(--ease-spring), filter .15s;
}
.btn:active { transform: scale(0.98); filter: brightness(0.94); }
.btn:disabled { opacity: 0.4; cursor: default; }
.btn-secondary {
  background: var(--secondary-bg);
  color: var(--text);
}
.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
}

/* Form */
label { display: block; margin-bottom: 4px; font-size: 13px; color: var(--hint); }
input, select, textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--secondary-bg);
  color: var(--text);
  font-size: 15px;
  margin-bottom: 12px;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); }
input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

/* Wizard steps */
.step { display: none; }
.step.active { display: block; }
.step-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}
.back-btn {
  background: none;
  border: none;
  color: var(--accent);
  font-weight: 600;
  font-size: 22px;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}
.step-title { font-family: var(--font-display); font-size: 17px; font-weight: 700; }

/* Checkbox list */
.check-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: var(--secondary-bg);
  border-radius: var(--radius);
  margin-bottom: 8px;
  cursor: pointer;
}
.check-item input[type=checkbox] { width: 18px; height: 18px; cursor: pointer; accent-color: var(--accent); }
.check-label { flex: 1; }
.check-counts { font-size: 12px; color: var(--hint); margin-top: 2px; }
/* Кастомный чекбокс (мастер выдачи ДЗ, мокап «подтемы») — залитый квадрат
   вместо нативного input, повторяет mock-checkbox из макета. */
.checkbox-box {
  width: 20px; height: 20px;
  border-radius: 7px;
  border: 2px solid var(--hint);
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  color: var(--accent-ink);
}
.check-item.is-checked .checkbox-box { background: var(--accent); border-color: var(--accent); }
.check-item.is-checked { background: var(--accent-dim); }

/* Slot list */
.slot-item {
  background: var(--secondary-bg);
  border-radius: var(--radius);
  padding: 10px 14px;
  margin-bottom: 8px;
  font-size: 13px;
}

/* Empty state — одна круглая плашка accent-soft с line-иконкой, переиспользуется везде. */
.empty {
  text-align: center;
  color: var(--hint);
  padding: 30px 16px;
}
.empty-icon {
  margin: 0 auto 14px;
  width: 60px;
  height: 60px;
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--accent-dim);
}
.empty-title { font-family: var(--font-display); font-size: 14px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.empty-sub { font-size: 12px; color: var(--hint); max-width: 240px; margin: 0 auto; line-height: 1.45; }

/* Заголовок вкладки */
.page-title {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--text);
}

/* Toast */
#toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: var(--text);
  color: var(--bg);
  padding: 10px 20px;
  border-radius: var(--radius-chip);
  font-size: 14px;
  transition: transform 0.3s;
  z-index: 999;
  white-space: nowrap;
}
#toast.show { transform: translateX(-50%) translateY(0); }

/* Loading */
.spinner {
  display: inline-block;
  width: 20px; height: 20px;
  border: 2px solid var(--elevated-bg);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin: 20px auto;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading { text-align: center; padding: 20px; }
@media (prefers-reduced-motion: reduce) {
  .spinner { animation-duration: 1.4s; }
}

/* Submission thumbnails */
.submissions-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.submission-thumb {
  border-radius: 12px;
  overflow: hidden;
  background: var(--accent-dim);
  cursor: zoom-in;
  position: relative;
}
.submission-thumb img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
}
.thumb-placeholder {
  width: 100%;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-dim);
}
.submission-thumb .thumb-date {
  font-size: 10px;
  color: var(--hint);
  text-align: center;
  padding: 3px 4px;
}
.submission-thumb.thumb-error::after {
  content: "⚠️";
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1;
  font-size: 24px;
}

/* ========== CheckFlow ==========
   Полноэкранный тёмный просмотрщик фото — намеренно вне общей светлой
   системы (для мокапов этого экрана не делали, тёмный фон уместен для
   просмотра фотографий решений как в фото-вьюере). */

.cf-seg {
  height: 3px;
  flex: 1;
  background: rgba(255,255,255,0.3);
  border-radius: 2px;
  transition: background 0.2s;
}
.cf-seg.done { background: rgba(255,255,255,0.6); }
.cf-seg.active { background: #fff; }

#cf-action-bar {
  display: flex;
  gap: 8px;
  padding: 12px;
  padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(0,0,0,0.55);
  border-top: 1px solid rgba(255,255,255,0.08);
}
.cf-action-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 4px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 12px;
  color: #fff;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  -webkit-tap-highlight-color: transparent;
}
.cf-action-btn:active { transform: scale(0.93); }
.cf-action-btn.cf-action-active {
  background: rgba(255,255,255,0.28);
  border-color: rgba(255,255,255,0.55);
}
.cf-btn-icon { display: flex; align-items: center; justify-content: center; }
.cf-btn-label { font-size: 11px; color: rgba(255,255,255,0.75); }

#cf-tags-sheet {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  z-index: 10;
  background: #1c1c1e;
  border-radius: 16px 16px 0 0;
  padding: 16px;
  padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  max-height: 65vh;
  overflow-y: auto;
}
.cf-sheet-handle {
  width: 36px; height: 4px;
  background: rgba(255,255,255,0.2);
  border-radius: 2px;
  margin: 0 auto 16px;
}
.cf-tags-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 4px;
}
.cf-tag-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 20px;
  color: #fff;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.cf-tag-item input[type=checkbox] { display: none; }
.cf-tag-item:has(input:checked) {
  background: rgba(255,255,255,0.22);
  border-color: rgba(255,255,255,0.6);
}

.cf-summary-stats {
  display: flex;
  gap: 20px;
}
.cf-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

/* Schedule (Расписание) — заливка вместо линий: пустые слоты не закрашены,
   видны только занятые (цвет ученика) и сегодняшняя колонка (accent-soft). */
.sched-grid {
  display: grid;
  column-gap: 2px;
  row-gap: 0;
  min-width: 480px;
}
.sched-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 10px;
  padding: 1px;
  min-height: 19px;
  font-variant-numeric: tabular-nums;
}
.sched-head, .sched-slot { border-radius: 4px; }
.sched-head {
  font-weight: 700;
  color: var(--hint);
  min-height: auto;
  flex-direction: column;
  padding: 4px 2px 5px;
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--secondary-bg);
  border-radius: 10px;
}
.sched-today { background: var(--accent-dim); color: var(--accent); }
.sched-free {
  font-size: 9px;
  font-weight: 400;
  color: var(--hint);
  opacity: 0.8;
  margin-top: 2px;
}
.sched-hour {
  color: var(--hint);
  font-size: 10px;
  opacity: 0.7;
}
.sched-hour-full {
  color: var(--text);
  font-size: 11px;
  font-weight: 700;
  opacity: 1;
}
.sched-slot { cursor: pointer; }
.sched-slot-full, .sched-hour-full {
  border-top: 1px solid var(--border);
}
.sched-busy {
  color: #fff;
  font-weight: 700;
}
.sched-busy-start { border-radius: 5px 5px 0 0; }
.sched-busy-mid { border-radius: 0; }
.sched-busy-end { border-radius: 0 0 5px 5px; }

/* Generic bottom sheet */
.sheet {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: var(--bg);
  border-radius: 16px 16px 0 0;
  padding: 16px;
  padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  max-height: 65vh;
  overflow-y: auto;
}
.sheet-handle {
  width: 36px; height: 4px;
  background: var(--hint);
  opacity: 0.3;
  border-radius: 2px;
  margin: 0 auto 16px;
}

/* Materials sub-tabs (Файлы / Повторение) и фильтр-чипы (карта ошибок) */
.seg-btn {
  flex: 1;
  padding: 10px;
  border: none;
  border-radius: var(--radius-chip);
  background: var(--secondary-bg);
  color: var(--hint);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.seg-btn.active { background: var(--btn); color: var(--btn-text); }

/* Formula quiz ("Повторение") */
.fq-option-btn {
  display: block;
  width: 100%;
  padding: 12px;
  margin-bottom: 8px;
  border: none;
  border-radius: var(--radius);
  background: var(--secondary-bg);
  color: var(--text);
  font-size: 15px;
  cursor: pointer;
  text-align: center;
  transition: transform .15s var(--ease-spring);
}
.fq-option-btn:active { transform: scale(0.98); }
.fq-option-btn.disabled { cursor: default; }
.fq-option-btn.correct { background: var(--good-dim); color: var(--good); font-weight: 700; }
.fq-option-btn.incorrect { background: var(--elevated-bg); color: var(--hint); text-decoration: line-through; }

/* ========== Экран "Мои ДЗ" ученика ========== */

.hw-greeting {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.hw-greeting-avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 17px;
  flex-shrink: 0;
}
.hw-greeting-name { font-size: 17px; font-weight: 700; }
.hw-greeting-level { font-size: 13px; color: var(--hint); margin-top: 2px; }

.hw-next-lesson {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--secondary-bg);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-bottom: 14px;
  cursor: pointer;
  transition: transform .15s var(--ease-spring);
}
.hw-next-lesson:active { transform: scale(0.98); }
.hw-next-lesson-icon { width: 22px; height: 22px; flex-shrink: 0; color: var(--accent); display: flex; align-items: center; justify-content: center; }
.hw-next-lesson-icon svg { width: 22px; height: 22px; }
.hw-next-lesson-body { flex: 1; min-width: 0; }
.hw-next-lesson-title { font-size: 13px; font-weight: 600; color: var(--hint); }
.hw-next-lesson-sub { font-size: 14px; font-weight: 600; margin-top: 1px; }
.hw-next-lesson-chevron { color: var(--hint); font-size: 18px; flex-shrink: 0; }

.hw-list { display: flex; flex-direction: column; gap: 10px; }

.hw-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: var(--secondary-bg);
  border-radius: var(--radius);
  padding: 14px 16px;
  cursor: pointer;
  transition: transform .15s var(--ease-spring);
}
.hw-card:active { transform: scale(0.98); }

/* ===== Общий язык экранов: крупная цифра → рельс карточек → секции.
   Одни и те же классы у репетитора и ученика, чтобы вкладки читались как одна
   система, а не как отдельно свёрстанные страницы. ===== */
.hero-label { font-size: 13px; color: var(--hint); margin-bottom: 2px; }
.hero-row { display: flex; align-items: baseline; gap: 12px; margin: 2px 0 20px; }
.hero-num {
  font-family: var(--font-display);
  font-size: 44px;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.hero-num-sm { font-size: 30px; }
.hero-meta { font-size: 12.5px; color: var(--hint); line-height: 1.4; }
.hero-meta b { display: block; color: var(--accent); font-weight: 700; }

.stat-rail {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  margin: 0 -16px 22px;
  padding: 2px 16px 4px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.stat-rail::-webkit-scrollbar { display: none; }

/* Рельс разделов тренажёра формул ("Повторение") — листается свайпом внутри
   себя, не двигая всю страницу (было: .seg-btn { flex:1 } без overflow-x
   растягивал контейнер шире экрана и скроллилась вся вкладка). */
.chip-rail {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  margin: 0 -16px 12px;
  padding: 2px 16px 4px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.chip-rail::-webkit-scrollbar { display: none; }
.chip-rail .seg-btn { flex: 0 0 auto; white-space: nowrap; }
.stat-card {
  flex: 0 0 132px;
  min-height: 84px;
  border-radius: 14px;
  background: var(--secondary-bg);
  padding: 12px 13px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
  transition: transform .15s var(--ease-spring);
}
.stat-card:active { transform: scale(0.97); }
/* Вариант для «рельса» с процентами (прогресс по темам) — акцентная заливка
   вместо нейтральной, как в мокапе mock-progress-card. */
.stat-card--accent { background: var(--accent-dim); }
.stat-card--accent .stat-pct { color: var(--accent); }
.stat-card--accent .stat-bar { background: rgba(255,255,255,0.5); }
.stat-card--wide { flex-basis: 190px; }
.stat-card--wide .stat-value { font-size: 30px; }
.stat-name { font-size: 12px; font-weight: 600; line-height: 1.25; min-height: 30px; }
.stat-value { font-family: var(--font-display); font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
.stat-pct { font-family: var(--font-display); font-size: 19px; font-weight: 700; font-variant-numeric: tabular-nums; }
.stat-bar {
  height: 4px;
  background: var(--elevated-bg);
  border-radius: 2px;
  overflow: hidden;
}
.stat-bar i { display: block; height: 100%; background: var(--accent); border-radius: 2px; }

.section-head { display: flex; align-items: center; justify-content: space-between; margin: 18px 0 10px; }
.section-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--hint);
}
.hw-card-title { font-family: var(--font-display); font-size: 15px; font-weight: 700; }
.topic-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  margin-right: 8px;
  padding: 0 6px;
  border-radius: 7px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  vertical-align: 1px;
}
.hw-card-footer {
  display: flex;
  align-items: center;
  gap: 8px;
}
.hw-card-meta {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  color: var(--hint);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hw-card-num {
  display: inline-block;
  background: var(--elevated-bg);
  color: var(--hint);
  border-radius: 6px;
  padding: 1px 6px;
  font-size: 11px;
  font-weight: 700;
}

.hw-status { flex-shrink: 0; }
.hw-status-none    { background: var(--elevated-bg); color: var(--hint); }
.hw-status-pending { background: var(--accent-dim); color: var(--accent); }
.hw-status-redo    { background: var(--warn-dim); color: var(--warn); }
.hw-status-done    { background: var(--good-dim); color: var(--good); }
/* Вариант чипа без текста (только иконка) — фиксированный квадрат 26x26 +
   radius:50%, а не авто-ширина через padding: так форма гарантированно
   круглая независимо от intrinsic-размера SVG внутри inline-flex. */
.hw-status-icon { width: 26px; height: 26px; padding: 0; justify-content: center; border-radius: 50%; }

/* ========== Материалы: иконка файла ========== */
.material-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--accent-dim);
  color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

/* Interface states — интерактивные переходы ≤150ms на hover/active,
   без ступенчатой анимации входа (см. design.md, motion stance). Card/button
   :active уже покрыты выше через transform; фокус — только через
   :focus-visible (input/select/textarea/button, см. правило выше). */
@media (hover: hover) {
  .card:hover, .hw-card:hover, .stat-card:hover, .hw-next-lesson:hover { filter: brightness(0.98); }
  .btn:hover { filter: brightness(1.06); }
}
