/* ============================================================
   Онлайн-курс «ИИ-агенты для начинающих»
   Дизайн-система LaunchLab (vendor/launchlab/design-system.css):
   токены, сайдбар, топбар, кнопки, карточки, алерты - 1:1.
   Адаптация: размеры читабельного контента увеличены
   (аудитория 40-60 лет), карточки уроков = task-card паттерн.
   ============================================================ */

/* ===== 1. TOKENS (LaunchLab, без изменений) ===== */
:root {
  --bg: #F7F8FB;
  --surface: #FFFFFF;
  --surface-2: #F1F3F8;
  --border: #E6E9F0;
  --border-strong: #D5DAE4;

  --text: #1A2236;
  --text-2: #4A5578;
  --text-3: #6C7592;
  --text-muted: #8A92A8;

  --sidebar-bg: #1E2A4A;
  --sidebar-bg-2: #18213A;
  --sidebar-text: #B8C0D9;
  --sidebar-text-active: #FFFFFF;
  --sidebar-hover: #28345A;

  --accent: #14B8A6;
  --accent-soft: #CCFBF1;
  --accent-text: #0F766E;
  --accent-2: #3B82F6;

  --success:      #10B981;
  --success-soft: #D1FAE5;
  --success-text: #065F46;
  --warning:      #F59E0B;
  --warning-soft: #FEF3C7;
  --warning-text: #92540C;
  --danger:       #EF4444;
  --danger-soft:  #FEE2E2;
  --danger-text:  #B91C1C;

  --shadow-sm:   0 1px 2px rgba(26, 34, 54, .04);
  --shadow-md:   0 2px 8px rgba(26, 34, 54, .06), 0 1px 2px rgba(26, 34, 54, .04);
  --shadow-lg:   0 10px 30px rgba(26, 34, 54, .08), 0 4px 8px rgba(26, 34, 54, .04);

  --overlay-bg: rgba(15, 23, 42, .42);

  --radius-sm: 6px;
  --radius:    10px;
  --radius-lg: 14px;
  --radius-xl: 20px;

  --sidebar-w: 236px;
  --sidebar-w-collapsed: 64px;
  --topbar-h: 64px;

  --ease: cubic-bezier(.4, .2, .2, 1);
  --t-fast: .12s ease;
  --t-base: .22s var(--ease);
}

/* ===== 2. BASE ===== */
* { box-sizing: border-box; margin: 0; padding: 0; }

/* Страница зафиксирована по горизонтали: прокручивается только body
   и только по вертикали (touch-action: pan-y). */
html {
  -webkit-text-size-adjust: 100%;
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
}
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: none;
  overflow-wrap: break-word;
  touch-action: pan-y;
}
a { color: var(--accent-text); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ===== 3. APP SHELL: Sidebar + Topbar + Main (LaunchLab) ===== */
.app {
  min-height: 100vh;
  padding-left: var(--sidebar-w);
  transition: padding-left var(--t-base);
}
.app.sidebar-collapsed { padding-left: var(--sidebar-w-collapsed); }

.sidebar {
  background: var(--sidebar-bg);
  color: var(--sidebar-text);
  display: flex;
  flex-direction: column;
  position: fixed;
  left: 0; top: 0;
  width: var(--sidebar-w);
  height: 100vh;
  height: 100dvh;
  overflow-y: auto;
  overflow-x: hidden;
  transition: width var(--t-base);
  z-index: 15;
}

/* Кнопка-кружок на границе сайдбара (LaunchLab). Position: fixed -
   внутри .sidebar overflow-x: hidden обрезал бы выступающую кнопку.
   Класс свернутости на body (.app-collapsed) переключает её позицию. */
.sidebar-toggle {
  position: fixed;
  top: 26px;
  left: calc(var(--sidebar-w) - 11px);
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-2);
  cursor: pointer;
  display: grid;
  place-items: center;
  box-shadow: var(--shadow-sm);
  z-index: 20;
  transition: left var(--t-base), color var(--t-fast), border-color var(--t-fast), box-shadow var(--t-fast);
  padding: 0;
}
body.app-collapsed .sidebar-toggle { left: calc(var(--sidebar-w-collapsed) - 11px); }
body.app-collapsed .sidebar-toggle svg { transform: rotate(180deg); }
.sidebar-toggle:hover { color: var(--text); border-color: var(--border-strong); box-shadow: var(--shadow-md); }
.sidebar-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sidebar-toggle svg { transition: transform var(--t-base); }

/* Свёрнутый сайдбар: остаются логотип, номера уроков и аватар.
   Все правила только для десктопа - на мобильном сайдбар живёт бургером. */
@media (min-width: 769px) {
  .sidebar.collapsed { width: var(--sidebar-w-collapsed); }
  .sidebar.collapsed .sidebar-brand { padding: 18px 0; justify-content: center; gap: 0; }
  .sidebar.collapsed .sidebar-brand > div:last-child { display: none; }
  .sidebar.collapsed .sidebar-section-label { display: none; }
  .sidebar.collapsed .nav-item { padding: 10px 0; justify-content: center; gap: 0; }
  .sidebar.collapsed .nav-item > span:not(.nav-num):not(.nav-done) { display: none; }
  .sidebar.collapsed .nav-num {
    width: auto; text-align: center;
    font-size: 12.5px; opacity: .8; padding-top: 0;
  }
  .sidebar.collapsed .nav-done {
    position: absolute; top: 3px; right: 9px;
    margin: 0; font-size: 10px; padding-top: 0;
  }
  .sidebar.collapsed .sidebar-foot { padding: 16px 0; justify-content: center; }
  .sidebar.collapsed .foot-meta { display: none; }
}
.sidebar-brand {
  padding: 20px 22px 22px;
  display: flex; align-items: center; gap: 10px;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.brand-mark {
  width: 30px; height: 30px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: grid; place-items: center;
  color: white; font-weight: 700; font-size: 13px;
  letter-spacing: -.02em;
  box-shadow: 0 4px 10px rgba(20, 184, 166, .3);
  flex-shrink: 0;
}
.brand-name { font-weight: 600; font-size: 15px; color: white; letter-spacing: -.01em; }
.brand-sub { font-size: 11px; color: var(--sidebar-text); opacity: .6; letter-spacing: .04em; text-transform: uppercase; }

.sidebar nav { flex: 1; padding-bottom: 12px; }
.sidebar-section-label {
  padding: 18px 22px 8px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  opacity: .5;
}
.nav-item {
  padding: 9px 22px;
  display: flex; align-items: flex-start; gap: 10px;
  cursor: pointer;
  color: var(--sidebar-text);
  font-size: 13.5px;
  line-height: 1.35;
  font-family: inherit;
  transition: background var(--t-fast), color var(--t-fast);
  position: relative;
  background: transparent;
  border: none;
  width: 100%;
  text-align: left;
  text-decoration: none;
}
.nav-item:hover { background: var(--sidebar-hover); color: var(--sidebar-text-active); text-decoration: none; }
.nav-item:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.nav-item.active { background: var(--sidebar-hover); color: var(--sidebar-text-active); font-weight: 500; }
.nav-item.active::before {
  content: ""; position: absolute; left: 0; top: 6px; bottom: 6px; width: 3px;
  background: var(--accent); border-radius: 0 3px 3px 0;
}
.nav-item.locked { opacity: .45; cursor: default; }
.nav-item.locked:hover { background: transparent; color: var(--sidebar-text); }
.nav-num {
  flex-shrink: 0; width: 18px;
  font-size: 11.5px; font-weight: 600;
  color: var(--sidebar-text); opacity: .55;
  font-variant-numeric: tabular-nums;
  padding-top: 1px;
}
.nav-num svg { display: block; margin-top: 2px; }
.nav-item.active .nav-num { color: var(--sidebar-text-active); opacity: .8; }
.nav-done {
  margin-left: auto; flex-shrink: 0;
  color: var(--accent); font-weight: 700; font-size: 12px;
  padding-top: 1px;
}

.sidebar-foot {
  margin-top: auto;
  padding: 16px 22px;
  border-top: 1px solid rgba(255,255,255,.06);
  display: flex; align-items: center; gap: 10px;
  font-size: 12.5px;
}
.user-avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: white; font-weight: 600; font-size: 12px;
  display: grid; place-items: center; flex-shrink: 0;
}
.foot-meta-name { color: white; font-weight: 500; line-height: 1.25; }
.foot-meta-role { font-size: 11px; opacity: .6; }

.main { min-height: 100vh; display: flex; flex-direction: column; }

.topbar {
  height: var(--topbar-h);
  display: flex; align-items: center;
  padding: 0 24px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 10;
  gap: 16px;
}
.topbar-title { font-size: 16px; font-weight: 600; color: var(--text); }
.topbar-spacer { flex: 1; }
.topbar-chip {
  padding: 6px 12px;
  background: var(--accent-soft);
  color: var(--accent-text);
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 500;
  white-space: nowrap;
}

.content { padding: 32px 40px 64px; max-width: 1080px; width: 100%; }
.content.view-lesson, .content.view-quiz { max-width: 780px; }
.content.view-welcome { max-width: 780px; }

.mobile-burger {
  display: none;
  width: 36px; height: 36px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-2);
  border-radius: var(--radius-sm);
  cursor: pointer;
  align-items: center; justify-content: center;
  flex-shrink: 0;
}
.mobile-burger:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.mobile-overlay {
  display: none;
  position: fixed; inset: 0; z-index: 14;
  background: var(--overlay-bg);
}
.mobile-overlay.open { display: block; }

/* ===== 4. TYPOGRAPHY ===== */
h1 { font-size: 28px; font-weight: 700; letter-spacing: -.02em; line-height: 1.25; margin: 0 0 12px; color: var(--text); }
h2 { font-size: 21px; font-weight: 600; letter-spacing: -.01em; margin: 0 0 12px; color: var(--text); }
p { margin: 0 0 12px; }
.muted { color: var(--text-2); }
.small { font-size: 13.5px; color: var(--text-3); }
.sub { color: var(--text-2); font-size: 16px; line-height: 1.55; margin-bottom: 16px; max-width: 640px; }
.kicker {
  font-size: 11.5px; color: var(--text-3);
  text-transform: uppercase; letter-spacing: .08em;
  font-weight: 600; margin-bottom: 8px;
}
.section-label {
  font-size: 11.5px; color: var(--text-3);
  text-transform: uppercase; letter-spacing: .08em;
  font-weight: 600; margin: 32px 0 12px;
}

/* ===== 5. BUTTONS (LaunchLab) ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 20px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  text-align: center;
  transition: background var(--t-fast), border-color var(--t-fast), color var(--t-fast), transform var(--t-fast), filter var(--t-fast);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.btn:hover { background: var(--surface-2); border-color: var(--border-strong); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn:disabled, .btn[disabled] { opacity: .5; cursor: not-allowed; }

.btn-primary {
  background: var(--accent);
  color: white;
  border-color: transparent;
  box-shadow: 0 1px 2px rgba(20, 184, 166, .2);
  font-weight: 600;
}
.btn-primary:hover { filter: brightness(1.05); background: var(--accent); border-color: transparent; }
.btn-primary:disabled, .btn-primary[disabled] { background: var(--text-muted); box-shadow: none; opacity: 1; }

.btn-secondary {
  background: var(--accent-soft);
  color: var(--accent-text);
  border-color: transparent;
  font-weight: 600;
}
.btn-secondary:hover { background: #B5F5E8; border-color: transparent; }
.btn-secondary:disabled, .btn-secondary[disabled] { background: var(--surface-2); color: var(--text-muted); opacity: 1; }

.btn-ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text-2);
}
.btn-ghost:hover { background: var(--surface-2); color: var(--text); }

.btn + .btn { margin-top: 10px; }

/* Кнопки в потоке экранов курса - блочные, на мобиле во всю ширину */
#app .btn { display: flex; width: 100%; }

/* ===== 6. PROGRESS ===== */
.topbar-row { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.progressbar { height: 6px; background: var(--border); border-radius: 6px; overflow: hidden; flex: 1; }
.progressbar > div { height: 100%; background: var(--accent); border-radius: 6px; transition: width .4s ease; }
.progress-label { font-size: 12.5px; color: var(--text-3); white-space: nowrap; font-variant-numeric: tabular-nums; }
.topbar.topbar-row, #app .topbar {
  height: auto; position: static; background: transparent; border: none; padding: 0;
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px; gap: 12px;
}
.back-link {
  color: var(--accent-text); font-weight: 500; cursor: pointer;
  background: none; border: none; font-size: 14px; font-family: inherit;
  padding: 6px 8px 6px 0;
}
.back-link:hover { text-decoration: underline; }

/* ===== 7. ШАПКА ГЛАВНОЙ ===== */
.home-head { margin-bottom: 24px; }
.home-head .topbar { max-width: 420px; margin-bottom: 0; margin-top: 14px; }

/* Баннер «Продолжить» - inline alert с кнопкой */
.resume-card {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 16px 18px;
  border-radius: var(--radius-lg);
  background: var(--accent-soft);
  border: 1px solid rgba(20, 184, 166, .25);
  margin-bottom: 20px;
}
.resume-body { flex: 1; min-width: 220px; }
.resume-card .kicker { color: var(--accent-text); margin-bottom: 2px; }
.resume-title { font-weight: 600; font-size: 15.5px; color: var(--text); margin: 0; }
#app .resume-card .btn { width: auto; flex: 0 0 auto; margin: 0; }

/* ===== 8. КАРТА КУРСА: task-card паттерн ===== */
.map { display: grid; grid-template-columns: 1fr; gap: 10px; }

.map-step {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px 12px 19px;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  position: relative;
  transition: transform var(--t-fast), box-shadow var(--t-fast), border-color var(--t-fast);
  -webkit-tap-highlight-color: transparent;
}
.map-step:hover { box-shadow: var(--shadow-md); border-color: var(--border-strong); transform: translateY(-1px); }
.map-step::before {
  content: ""; position: absolute; left: 0; top: 12px; bottom: 12px;
  width: 3px; background: var(--accent); border-radius: 0 3px 3px 0;
}
.map-step.done::before { background: var(--success); }
.map-step.exam-step::before { background: var(--warning); }
.map-step.exam-step.done::before { background: var(--success); }
.map-step.locked { opacity: .55; cursor: default; }
.map-step.locked:hover { box-shadow: var(--shadow-sm); border-color: var(--border); transform: none; }

.step-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.step-time { font-size: 11.5px; color: var(--text-3); font-variant-numeric: tabular-nums; margin-left: auto; }
.step-title { font-size: 15px; font-weight: 500; color: var(--text); margin: 2px 0 6px; line-height: 1.4; }
.step-foot { display: flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 11.5px; color: var(--text-3); }
.status-dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.status-dot.s-todo { background: var(--text-muted); }
.status-dot.s-done { background: var(--success); }
.status-dot.s-locked { background: var(--warning); }

/* Вехи между уроками */
.map-divider {
  display: flex; align-items: center; gap: 14px;
  margin: 10px 0 4px;
  color: var(--accent-text);
  font-weight: 500; font-size: 12.5px; text-align: center;
}
.map-divider::before, .map-divider::after {
  content: ""; flex: 1; height: 1px; background: var(--border);
}
.map-divider span { max-width: 80%; }

.milestone {
  text-align: center; font-size: 13.5px; color: var(--accent-text);
  font-weight: 500; margin: 14px 0; padding: 0 10px;
}

.page-foot {
  margin-top: 36px; padding-top: 14px;
  border-top: 1px solid var(--border);
  color: var(--text-3); font-size: 12.5px;
}

/* ===== 9. БЕЙДЖИ И ЧИПЫ (LaunchLab) ===== */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  background: var(--surface-2);
  color: var(--text-2);
  letter-spacing: .01em;
  white-space: nowrap;
}
.badge-accent  { background: var(--accent-soft);  color: var(--accent-text); }
.badge-success { background: var(--success-soft); color: var(--success-text); }
.badge-warning { background: var(--warning-soft); color: var(--warning-text); }

.badge-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.badge-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px;
  background: var(--accent-soft);
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--accent-text);
}
.badge-chip.off { background: var(--surface-2); color: var(--text-3); }

.stat-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.stat-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px;
  background: var(--surface-2);
  border-radius: 999px;
  font-size: 12.5px;
  color: var(--text-2);
}

/* ===== 10. КАРТОЧКИ ===== */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-sm);
}
.center { text-align: center; }

/* ===== 11. УРОК: контент на фоне ===== */
.lesson-meta { color: var(--text-3); font-size: 13.5px; margin-bottom: 24px; }
.lesson { font-size: 18px; line-height: 1.65; max-width: 700px; }
.lesson h3 {
  font-size: 20px; font-weight: 600; letter-spacing: -.01em;
  margin: 30px 0 10px; color: var(--text);
}
.lesson h3:first-child { margin-top: 0; }
.lesson p { margin-bottom: 14px; }
.lesson ul, .lesson ol { margin: 0 0 14px 22px; }
.lesson li { margin-bottom: 8px; }
.lesson table {
  width: 100%; border-collapse: collapse; margin: 16px 0;
  font-size: 14px; line-height: 1.5;
  display: block; overflow-x: auto;
  touch-action: pan-x pan-y; /* внутри таблицы листать вбок можно */
}
.lesson th, .lesson td {
  border: 1px solid var(--border); padding: 9px 11px; text-align: left;
  vertical-align: top;
}
.lesson td { background: var(--surface); }
.lesson th { background: var(--surface-2); font-weight: 600; color: var(--text); }
.lesson img { max-width: 100%; height: auto; }
.lesson .takeaway {
  background: var(--accent-soft);
  border: 1px solid rgba(20, 184, 166, .25);
  border-radius: var(--radius-lg);
  padding: 16px 18px; margin-top: 22px;
  font-size: 16px;
}
.lesson .takeaway p { margin-bottom: 8px; font-weight: 600; color: var(--accent-text); }
.lesson .takeaway ul { margin-bottom: 0; }

.scheme-img {
  width: 100%; max-width: 100%;
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  margin: 14px 0; display: block;
  box-shadow: var(--shadow-sm);
}

.quiz-cta { margin-top: 28px; max-width: 700px; }
.quiz-cta h2 { margin-bottom: 6px; }
.quiz-cta p { color: var(--text-2); font-size: 14.5px; margin-bottom: 16px; }

/* ===== 12. КВИЗ ===== */
.quiz-wrap { margin-top: 4px; max-width: 700px; }
.q-text { font-size: 19px; font-weight: 600; line-height: 1.45; letter-spacing: -.01em; margin-bottom: 16px; color: var(--text); }
.q-review-tag {
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--warning-soft); color: var(--warning-text);
  font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px;
  margin-bottom: 12px;
}
.option {
  display: block; width: 100%; text-align: left;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 13px 14px; margin-bottom: 8px;
  font-size: 15.5px; line-height: 1.45; cursor: pointer;
  font-family: inherit; color: var(--text);
  min-height: 50px;
  box-shadow: var(--shadow-sm);
  transition: border-color var(--t-fast), background var(--t-fast), box-shadow var(--t-fast);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.card .option { background: var(--bg); box-shadow: none; }
.option:hover { border-color: var(--border-strong); background: var(--surface-2); }
.card .option:hover { background: var(--surface-2); }
.option.selected { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 3px rgba(20, 184, 166, .15); }
.option.correct { border-color: var(--success); background: var(--success-soft); }
.option.wrong { border-color: var(--danger); background: var(--danger-soft); }
.option[disabled] { cursor: default; }
.option.selected[disabled], .option.correct[disabled], .option.wrong[disabled] { opacity: 1; }

/* Обратная связь = inline alert */
.feedback {
  padding: 14px 16px;
  border-radius: var(--radius);
  font-size: 14.5px;
  line-height: 1.55;
  margin: 14px 0;
}
.feedback.good { background: var(--success-soft); color: var(--success-text); border: 1px solid rgba(16, 185, 129, .3); }
.feedback.oops { background: var(--warning-soft); color: var(--warning-text); border: 1px solid rgba(245, 158, 11, .35); }
.feedback b { display: block; margin-bottom: 4px; font-weight: 600; }

.quiz-note {
  text-align: center; font-size: 12.5px; color: var(--text-3); margin-bottom: 14px;
}

/* ===== 13. НАГРАДЫ ===== */
.badge-big {
  width: 104px; height: 104px; border-radius: 26px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: flex; align-items: center; justify-content: center;
  font-size: 50px; margin: 16px auto;
  box-shadow: 0 14px 34px rgba(20, 184, 166, .3);
}
.badge-name { text-align: center; font-size: 19px; font-weight: 700; color: var(--accent-text); }

/* ===== 14. ПОЛЯ ВВОДА (LaunchLab) ===== */
.input {
  width: 100%; font-family: inherit; font-size: 15px;
  padding: 11px 13px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  margin-bottom: 12px;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.input:hover { border-color: var(--border-strong); }
.input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(20, 184, 166, .22);
}
.input::placeholder { color: var(--text-muted); }
textarea.input { min-height: 90px; resize: vertical; line-height: 1.5; }

/* ===== 15. ДИПЛОМ ===== */
.diploma {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 32px 24px 26px;
  text-align: center; margin-bottom: 16px;
  position: relative;
  overflow: hidden;
}
.diploma::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}
.diploma .d-name { font-size: 24px; font-weight: 700; letter-spacing: -.01em; color: var(--text); margin: 8px 0; }
.diploma .d-title { font-size: 15.5px; color: var(--text-2); }
.diploma .badge-row { justify-content: center; }

.exam-summary-item { padding: 12px 0; border-bottom: 1px solid var(--border); font-size: 14.5px; }
.exam-summary-item:last-child { border-bottom: none; }
.exam-summary-item .small { font-size: 13px; }

/* ===== 16. КОНСПЕКТ-СПИСКИ ===== */
.summary-list { list-style: none; }
.summary-list li {
  padding: 10px 0 10px 26px; position: relative;
  border-bottom: 1px solid var(--border); font-size: 14.5px;
}
.summary-list li:last-child { border-bottom: none; }
.summary-list li::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  position: absolute; left: 6px; top: 18px;
}

/* ===== 17. КОНФЕТТИ ===== */
.confetti {
  position: fixed; width: 9px; height: 13px; top: -20px; z-index: 99;
  pointer-events: none; border-radius: 2px;
  animation: fall linear forwards;
}
@keyframes fall {
  to { transform: translateY(105vh) rotate(720deg); opacity: .9; }
}

/* ===== 18. ВЕЛКОМ ===== */
.hero { padding-top: 6px; margin-bottom: 22px; }
.hero h1 { font-size: 30px; }

/* ===== 19. МОБИЛЬНАЯ ВЕРСИЯ ===== */
@media (max-width: 768px) {
  .app, .app.sidebar-collapsed { padding-left: 0; }
  .sidebar { transform: translateX(-100%); transition: transform var(--t-base); z-index: 16; }
  .sidebar.mobile-open { transform: translateX(0); }
  .sidebar-toggle { display: none; }
  .topbar { padding: 0 16px; }
  .mobile-burger { display: inline-flex; }
  .content { padding: 20px 16px 48px; }

  /* Читабельность на телефоне: контент крупнее */
  body { font-size: 17px; }
  h1 { font-size: 26px; }
  .lesson { font-size: 18.5px; }
  .q-text { font-size: 19px; }
  .option { font-size: 16.5px; padding: 14px; min-height: 54px; }
  .btn { padding: 13px 20px; font-size: 16px; }
  .step-title { font-size: 16px; }
  .step-foot { font-size: 12.5px; }
  .resume-title { font-size: 16px; }
  #app .resume-card .btn { width: 100%; }
}

/* ===== 20. ДЕСКТОП: карта в две колонки ===== */
@media (min-width: 900px) {
  .map { grid-template-columns: 1fr 1fr; gap: 12px 14px; }
  .map .map-divider { grid-column: 1 / -1; }
  .map .exam-step { grid-column: 1 / -1; }

  #app .btn { display: inline-flex; width: auto; min-width: 260px; }
  #app .btn + .btn { margin-top: 0; margin-left: 10px; }
  .lesson h3 { font-size: 21px; }
}
