@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Unbounded:wght@500;600;700&display=swap');

:root {
  --bg: #f6f6f9;
  --card: #ffffff;
  --ink: #191922;
  --muted: #71717d;
  --accent: #5b5bd6;
  --accent-2: #8b5cf6;
  --grad: linear-gradient(135deg, #5b5bd6 0%, #8b5cf6 100%);
  --grad-dark: linear-gradient(135deg, #232355 0%, #4b3fae 60%, #6d4fd0 100%);
  --good: #0eaa6e;
  --good-bg: #e7f8f0;
  --warn: #d97c00;
  --warn-bg: #fff4e0;
  --bad: #e5484d;
  --bad-bg: #fdecec;
  --line: #e9e9f0;
  --shadow: 0 1px 2px rgba(23, 23, 34, .04), 0 10px 28px rgba(23, 23, 34, .07);
  --shadow-hover: 0 2px 4px rgba(23, 23, 34, .05), 0 16px 40px rgba(23, 23, 34, .12);
  --r: 18px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Inter", -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 15.5px;
  background:
    radial-gradient(900px 400px at 85% -10%, rgba(139, 92, 246, .07), transparent 60%),
    radial-gradient(700px 380px at -5% 0%, rgba(91, 91, 214, .06), transparent 55%),
    var(--bg);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
.app { max-width: 880px; margin: 0 auto; padding: 22px 18px 80px; }
.hidden { display: none !important; }
::selection { background: rgba(139, 92, 246, .22); }

h1, h2 { font-family: "Unbounded", "Inter", sans-serif; letter-spacing: -0.01em; }
h1 { font-size: 26px; font-weight: 600; margin: 0 0 8px; line-height: 1.25; }
h2 { font-size: 17px; font-weight: 600; margin: 0 0 14px; }
.muted { color: var(--muted); font-size: 14px; }

/* ---------- карточки, кнопки, поля ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 26px 28px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--grad);
  color: #fff;
  border: none;
  border-radius: 13px;
  padding: 13px 26px;
  font-size: 15px; font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(91, 91, 214, .28);
  transition: transform .15s, box-shadow .15s, filter .15s;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(91, 91, 214, .36); filter: brightness(1.05); }
.btn:active { transform: translateY(0); }
.btn:disabled { background: #c9c9e2; box-shadow: none; cursor: default; transform: none; }
.btn-outline {
  background: #fff; color: var(--accent);
  border: 1.5px solid #d9d9f2;
  box-shadow: none;
}
.btn-outline:hover { border-color: var(--accent); box-shadow: 0 4px 14px rgba(91, 91, 214, .14); }
.btn-ghost {
  background: transparent; color: var(--muted);
  border: 1.5px solid var(--line);
  box-shadow: none;
}
.btn-ghost:hover { color: var(--ink); border-color: #cfcfd9; box-shadow: none; }
.btn-sm { padding: 8px 14px; font-size: 13.5px; border-radius: 10px; }
.btn-danger { background: var(--bad-bg); color: var(--bad); box-shadow: none; }
.btn-danger:hover { background: #fbdcdd; box-shadow: none; }
.btn-light { background: rgba(255,255,255,.14); color:#fff; box-shadow:none; backdrop-filter: blur(6px); }
.btn-light:hover { background: rgba(255,255,255,.22); box-shadow:none; }

input[type="text"], input[type="password"], select {
  font-family: inherit;
  font-size: 16px;
  padding: 13px 16px;
  border: 1.5px solid var(--line);
  border-radius: 13px;
  width: 100%;
  outline: none;
  background: #fbfbfd;
  transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(91, 91, 214, .12); background: #fff; }

/* ---------- шапка ---------- */
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-bottom: 22px;
}
.brand { display: flex; align-items: center; gap: 12px; cursor: pointer; user-select: none; }
.brand-mark {
  width: 42px; height: 42px;
  background: var(--grad);
  color: #fff;
  border-radius: 13px;
  display: flex; align-items: center; justify-content: center;
  font-family: "Unbounded", sans-serif; font-weight: 700; font-size: 19px;
  box-shadow: 0 6px 16px rgba(91, 91, 214, .3);
}
.brand-name { font-weight: 700; font-size: 15px; letter-spacing: .01em; }
.brand-sub { font-size: 12.5px; color: var(--muted); margin-top: 1px; }

.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 13px;
  border-radius: 999px;
  font-size: 13px; font-weight: 600;
}
.badge-green { background: var(--good-bg); color: var(--good); }
.badge-navy { background: #eceafd; color: var(--accent); }
.badge-gray { background: #f0f0f4; color: var(--muted); }

/* ---------- вход ---------- */
.login-box { max-width: 420px; margin: 48px auto 0; text-align: center; padding: 44px 36px 38px; }
.login-logo {
  width: 64px; height: 64px; margin: 0 auto 18px;
  background: var(--grad); color: #fff;
  border-radius: 19px;
  display: flex; align-items: center; justify-content: center;
  font-family: "Unbounded", sans-serif; font-size: 28px; font-weight: 700;
  box-shadow: 0 10px 26px rgba(91, 91, 214, .35);
}
.login-box p { margin: 0 0 24px; }
.login-box input { text-align: center; letter-spacing: 10px; font-size: 24px; font-weight: 600; margin-bottom: 14px; padding: 14px; }
.error-msg { color: var(--bad); font-size: 14px; margin-top: 12px; min-height: 20px; font-weight: 500; }

/* ---------- hero трека ---------- */
.hero {
  position: relative;
  background: var(--grad-dark);
  color: #fff;
  border-radius: 22px;
  padding: 30px 32px 28px;
  margin-bottom: 18px;
  overflow: hidden;
  box-shadow: 0 14px 34px rgba(35, 35, 85, .35);
}
.hero::after {
  content: "";
  position: absolute; right: -70px; top: -90px;
  width: 280px; height: 280px;
  background: radial-gradient(circle, rgba(255,255,255,.16), transparent 65%);
  pointer-events: none;
}
.hero-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; flex-wrap: wrap; }
.hero h1 { color: #fff; margin-bottom: 4px; }
.hero .muted { color: rgba(255,255,255,.72); }
.hero-progress { margin-top: 20px; }
.progress-wrap { background: rgba(255,255,255,.18); border-radius: 999px; height: 10px; overflow: hidden; }
.progress-bar {
  background: linear-gradient(90deg, #8ef0c3, #5eead4);
  height: 100%; border-radius: 999px;
  transition: width .4s;
  box-shadow: 0 0 12px rgba(94, 234, 212, .6);
}
.hero-progress .muted { margin-top: 8px; display: block; }
.hero-badge { background: rgba(255,255,255,.16); color: #fff; border: 1px solid rgba(255,255,255,.28); }

/* ---------- карточки дней ---------- */
.day-card {
  display: flex; align-items: center; gap: 18px;
  cursor: pointer;
  padding: 20px 24px;
  transition: transform .18s, box-shadow .18s, border-color .18s;
  position: relative;
  overflow: hidden;
}
.day-card::before {
  content: "";
  position: absolute; left: 0; top: 0; bottom: 0; width: 5px;
  background: var(--line);
}
.day-card.done::before { background: linear-gradient(180deg, #0eaa6e, #34d399); }
.day-card.open::before { background: var(--grad); }
.day-card.final::before { background: linear-gradient(180deg, #0f766e, #2dd4bf); }
.day-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); border-color: #dcdcf0; }
.day-card.locked { opacity: .6; cursor: default; }
.day-card.locked:hover { transform: none; box-shadow: var(--shadow); border-color: var(--line); }

.day-num {
  min-width: 50px; height: 50px;
  border-radius: 15px;
  display: flex; align-items: center; justify-content: center;
  font-family: "Unbounded", sans-serif; font-weight: 600; font-size: 18px;
  background: #f1f1f6; color: var(--muted);
  transition: background .2s;
}
.day-card.done .day-num { background: var(--good-bg); color: var(--good); }
.day-card.open .day-num { background: var(--grad); color: #fff; box-shadow: 0 6px 16px rgba(91, 91, 214, .3); }
.day-card.final .day-num { background: #d9f6f1; color: #0f766e; }
.day-info { flex: 1; min-width: 0; }
.day-title { font-weight: 700; font-size: 16.5px; letter-spacing: -0.01em; }
.day-meta { font-size: 13.5px; color: var(--muted); margin-top: 3px; }
.day-status { display: flex; align-items: center; gap: 7px; font-size: 13.5px; font-weight: 600; white-space: nowrap; }
.day-status .dot { width: 8px; height: 8px; border-radius: 50%; }
.day-status.s-done { color: var(--good); }
.day-status.s-done .dot { background: var(--good); }
.day-status.s-practice { color: #b7791f; }
.day-status.s-practice .dot { background: #e8a33d; box-shadow: 0 0 0 4px rgba(232, 163, 61, .18); }
.day-status.s-final { color: #0f766e; }
.day-status.s-final .dot { background: #14b8a6; box-shadow: 0 0 0 4px rgba(20, 184, 166, .18); }
.day-status.s-optional { color: #64748b; }
.day-status.s-optional .dot { background: #94a3b8; box-shadow: 0 0 0 4px rgba(148, 163, 184, .18); }
.day-status.s-open { color: var(--accent); }
.day-status.s-open .dot { background: var(--accent-2); box-shadow: 0 0 0 4px rgba(139, 92, 246, .18); }
.day-status.s-locked { color: var(--muted); }
.day-status.s-locked .dot { background: #c4c4cf; }

/* ---------- день ---------- */
.back-link {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--muted);
  font-size: 14px; font-weight: 500;
  margin-bottom: 14px;
  cursor: pointer;
  transition: color .15s;
}
.back-link:hover { color: var(--accent); }

.lesson { padding: 0; overflow: hidden; }
.lesson-summary {
  display: flex; align-items: center; gap: 14px;
  padding: 17px 22px;
  cursor: pointer;
  font-weight: 600;
  font-size: 15.5px;
  color: var(--ink);
  transition: background .15s;
  user-select: none;
}
.lesson-summary:hover { background: #faf9ff; }
.lesson-summary .l-num {
  min-width: 30px; height: 30px;
  border-radius: 10px;
  background: #f1f1f6; color: var(--muted);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700;
  transition: background .2s, color .2s;
}
.lesson.open .l-num { background: var(--grad); color: #fff; }
.lesson-summary .arrow { margin-left: auto; color: #b9b9c6; transition: transform .25s; font-size: 11px; }
.lesson.open .lesson-summary { background: #faf9ff; }
.lesson.open .arrow { transform: rotate(90deg); color: var(--accent); }
.lesson-body {
  padding: 4px 24px 24px;
  border-top: 1px solid var(--line);
  animation: slideDown .25s ease;
}
@keyframes slideDown { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

.block-text { margin: 14px 0; color: #2b2b35; }
.block-list { margin: 14px 0; padding-left: 22px; }
.block-list li { margin: 7px 0; }
.block-list li::marker { color: var(--accent-2); font-weight: 700; }

.block-quote {
  background: linear-gradient(135deg, #f4f3ff, #f8f5ff);
  border-left: 4px solid var(--accent-2);
  padding: 14px 18px;
  border-radius: 0 14px 14px 0;
  margin: 16px 0;
  font-style: italic;
  color: #3d3a5c;
}
.block-note {
  background: var(--warn-bg);
  border-left: 4px solid #f5a623;
  padding: 13px 18px;
  border-radius: 0 14px 14px 0;
  margin: 16px 0;
  font-size: 14.5px;
  color: #6b4a00;
}
.block-table { width: 100%; border-collapse: separate; border-spacing: 0; margin: 16px 0; font-size: 14px; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.block-table th { background: #f4f4f8; color: var(--ink); font-weight: 700; text-align: left; }
.block-table td, .block-table th { border-bottom: 1px solid var(--line); padding: 10px 13px; vertical-align: top; }
.block-table tr:last-child td { border-bottom: none; }
.block-table tr:nth-child(even) td { background: #fbfbfd; }

/* карточки цифр и логотипы (презентация о компании) */
.block-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin: 18px 0;
}
.stat-card {
  background: linear-gradient(160deg, #f8f7ff, #fdfcff);
  border: 1px solid #e6e3fb;
  border-radius: 16px;
  padding: 18px 16px 15px;
  text-align: center;
}
.stat-num {
  font-family: "Unbounded", sans-serif;
  font-weight: 700;
  font-size: 24px;
  line-height: 1.15;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 6px;
}
.stat-label { font-size: 13px; color: var(--muted); line-height: 1.4; }

.block-logos {
  background: #fbfbfd;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px 20px;
  margin: 18px 0;
}
.block-logos .logos-title {
  font-size: 12.5px; font-weight: 800;
  text-transform: uppercase; letter-spacing: .08em;
  color: var(--muted);
  margin-bottom: 12px;
}
.block-logos .logos-row { display: flex; flex-wrap: wrap; gap: 8px; }
.logo-chip {
  display: inline-block;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 16px;
  font-weight: 700;
  font-size: 14px;
  color: #33333f;
  box-shadow: 0 1px 3px rgba(23, 23, 34, .05);
}

.block-catalog { margin: 16px 0; }
.block-catalog .cat-title {
  font-size: 12.5px; font-weight: 800;
  text-transform: uppercase; letter-spacing: .08em;
  color: var(--accent);
  margin-bottom: 10px;
}
.block-catalog .cat-row { display: flex; flex-wrap: wrap; gap: 8px; }
.course-chip {
  display: inline-block;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 14px;
  font-weight: 600;
  font-size: 13.5px;
  color: #2e2e3a;
  box-shadow: 0 1px 3px rgba(23, 23, 34, .04);
}
a.course-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  transition: border-color .15s, color .15s, box-shadow .15s, transform .15s;
}
a.course-chip svg { opacity: .45; flex: none; }
a.course-chip:hover {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 2px 8px rgba(91, 91, 214, .15);
  transform: translateY(-1px);
}
a.course-chip:hover svg { opacity: 1; }

.block-links { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0; }
.block-audience {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 12px;
  margin: 14px 0;
}
.aud-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px 18px;
  box-shadow: 0 1px 3px rgba(23, 23, 34, .04);
}
.aud-head { display: flex; align-items: center; gap: 9px; margin-bottom: 6px; }
.aud-icon {
  width: 32px; height: 32px; flex: none;
  border-radius: 10px;
  background: linear-gradient(135deg, #eef0ff, #f6edff);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 16px;
}
.aud-title { font-weight: 700; font-size: 14.5px; color: #23233a; }
.aud-who {
  font-size: 12.5px;
  color: #77778c;
  line-height: 1.5;
  margin-bottom: 12px;
}
.aud-label {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #8a8aa3;
  margin: 10px 0 3px;
}
.aud-quote {
  font-style: italic;
  color: #4a4a63;
  font-size: 13.5px;
  line-height: 1.5;
}
.aud-list {
  margin: 0;
  padding-left: 16px;
  font-size: 13px;
  line-height: 1.55;
  color: #44445a;
}
.aud-list li { margin-bottom: 3px; }
.aud-courses {
  font-weight: 600;
  font-size: 13px;
  color: var(--accent);
  line-height: 1.5;
}
.aud-closing li { color: #3d3d55; }
.aud-plan-link { margin-top: 12px; }
.cell-link {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid rgba(91, 91, 214, .3);
}
.cell-link:hover { border-bottom-color: var(--accent); }

.block-examples { display: flex; flex-direction: column; gap: 10px; margin: 14px 0; }
.ex-card {
  background: #fbfbfe;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 0 12px 12px 0;
  padding: 12px 16px;
}
.ex-tag {
  display: inline-block;
  background: #eef0ff;
  color: var(--accent);
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  border-radius: 999px;
  padding: 2px 10px;
  margin-bottom: 6px;
}
.ex-text { font-size: 14px; line-height: 1.55; color: #2e2e3a; }

.block-script {
  margin: 14px 0;
  padding: 16px 18px;
  background: #fbfbfd;
  border: 1px solid var(--line);
  border-radius: 14px;
}
.script-label {
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #1e3a5f;
  margin-bottom: 10px;
}
.script-subhead {
  font-size: 12.5px;
  font-weight: 700;
  color: #5a5a6e;
  margin: 12px 0 6px;
}
.chat-note {
  background: var(--warn-bg);
  border-left: 3px solid #f5a623;
  border-radius: 0 10px 10px 0;
  padding: 9px 13px;
  margin: 8px 0;
  font-size: 12.5px;
  line-height: 1.55;
  color: #6b4a00;
}
.script-client { margin: 6px 0 10px 18px; }
.script-who {
  font-size: 12px;
  font-weight: 700;
  color: #5a5a6e;
  margin-bottom: 4px;
}
.sc-blue {
  background: #eaf4fd;
  border-left: 3px solid #2563a8;
  border-radius: 0 10px 10px 0;
  padding: 10px 14px;
  font-size: 13.5px;
  line-height: 1.55;
  color: #1f2e40;
  margin: 6px 0;
}
.sc-gray {
  background: #f3f3f6;
  border-left: 3px solid #9a9aa8;
  border-radius: 0 10px 10px 0;
  padding: 10px 14px;
  font-size: 13.5px;
  line-height: 1.55;
  color: #3a3a4a;
}
.block-audio {
  margin: 14px 0;
  padding: 16px 18px;
  background: #fbfbfd;
  border: 1px solid var(--line);
  border-radius: 14px;
}
.block-video {
  margin: 14px 0;
  padding: 16px 18px;
  background: #fbfbfd;
  border: 1px solid var(--line);
  border-radius: 14px;
}
.block-image { margin: 14px 0; }
.block-image img {
  width: 100%;
  display: block;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.img-caption {
  margin-top: 7px;
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.5;
}
.video-title {
  font-size: 14px;
  font-weight: 700;
  color: #1e3a5f;
  margin-bottom: 10px;
}
.video-frame {
  position: relative;
  padding-top: 56.25%;
  border-radius: 10px;
  overflow: hidden;
  background: #000;
}
.video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}
.audio-title {
  font-size: 14px;
  font-weight: 700;
  color: #1e3a5f;
  margin-bottom: 10px;
}
.block-audio audio {
  width: 100%;
  height: 40px;
  display: block;
}
.audio-hint {
  margin-top: 10px;
  font-size: 13px;
  line-height: 1.55;
  color: #5a5a6e;
}
.link-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: #fff;
  border: 1.5px solid #d9d9f2;
  border-radius: 12px;
  padding: 10px 16px;
  font-size: 14px; font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.link-btn:hover { border-color: var(--accent); box-shadow: 0 4px 14px rgba(91, 91, 214, .16); transform: translateY(-1px); }
.link-btn svg { opacity: .7; }

/* диалоги */
.dialog { margin: 18px 0; }
.dialog-manager {
  background: #f4f3ff;
  border: 1px solid #e3e0fb;
  border-left: 4px solid var(--accent);
  border-radius: 4px 16px 16px 4px;
  padding: 14px 18px;
  color: #2e2b4f;
}
.dialog-manager .who {
  font-size: 11px; font-weight: 800; color: var(--accent);
  text-transform: uppercase; letter-spacing: .1em; margin-bottom: 5px;
}
.branch {
  margin: 10px 0 10px 30px;
  padding: 12px 16px;
  border-radius: 4px 14px 14px 4px;
  font-size: 14.5px;
}
.branch .cond { font-weight: 700; display: block; margin-bottom: 4px; font-size: 13px; }
.branch.green { background: var(--good-bg); border-left: 4px solid var(--good); color: #14532d; }
.branch.green .cond { color: var(--good); }
.branch.yellow { background: var(--warn-bg); border-left: 4px solid #f5a623; color: #57400a; }
.branch.yellow .cond { color: var(--warn); }
.branch.gray { background: #f3f3f6; border-left: 4px solid #b3b3c0; color: #41414b; }
.branch.gray .cond { color: var(--muted); }

/* ---------- чек-лист и тест ---------- */
.check-case {
  background: #eaf4fd;
  border: 1px solid #cfe4f7;
  border-radius: 12px;
  padding: 13px 16px;
  margin: 4px 0 8px;
  font-size: 14px;
  line-height: 1.6;
  color: #1f2e40;
}
.cc-label {
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #2563a8;
  margin-bottom: 6px;
}
.check-item {
  display: flex; gap: 13px; align-items: flex-start;
  padding: 12px 2px;
  border-bottom: 1px dashed var(--line);
  cursor: pointer;
}
.check-item:last-child { border-bottom: none; }
.check-item input[type="checkbox"] {
  width: 20px; height: 20px; margin-top: 2px; cursor: pointer;
  accent-color: var(--accent); flex-shrink: 0;
}
.check-item.done-text span { text-decoration: line-through; color: var(--muted); }

.check-row { border-bottom: 1px dashed var(--line); padding-bottom: 8px; }
.check-row:last-child { border-bottom: none; }
.check-row .check-item { border-bottom: none; }
.check-hint {
  margin: 0 0 8px 33px;
  font-size: 12.5px;
  line-height: 1.5;
  color: #6d6d82;
}
.check-client {
  margin: 10px 0 10px 20px;
}
.check-answer {
  display: block;
  box-sizing: border-box;
  margin: 0 0 4px 33px;
  width: calc(100% - 33px);
  padding: 10px 12px;
  border: 1.5px solid #d9d9f2;
  border-radius: 10px;
  font: inherit;
  font-size: 13.5px;
  line-height: 1.5;
  color: #2e2e3a;
  background: #fdfdff;
  resize: vertical;
  min-height: 44px;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.check-answer:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(91, 91, 214, .12);
}
.check-answer.saved {
  border-color: #34a853;
  box-shadow: 0 0 0 3px rgba(52, 168, 83, .12);
}
.check-answer:disabled {
  opacity: .55;
  cursor: not-allowed;
}
.practice-locked {
  background: #fdf1f1;
  border: 1px solid #f3caca;
  border-radius: 12px;
  padding: 12px 15px;
  margin: 14px 0 4px;
  font-size: 13.5px;
  line-height: 1.55;
  color: #6d2b2b;
}
.check-answer.bad {
  border-color: #d64545;
  box-shadow: 0 0 0 3px rgba(214, 69, 69, .12);
}
.check-answer.good {
  border-color: #34a853;
}
.answer-review {
  margin: 6px 0 10px 33px;
  padding: 11px 14px;
  background: #fdf1f1;
  border: 1px solid #f3caca;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.55;
  color: #6d2b2b;
}
.answer-review b { font-weight: 700; }
.answer-review .ar-better {
  margin-top: 7px;
  padding-top: 7px;
  border-top: 1px dashed #ecc7c7;
  color: #1d5c33;
}
.practice-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 16px;
  flex-wrap: wrap;
}
.review-status { font-size: 13px; color: var(--muted); }
.review-status.bad { color: #c0392b; font-weight: 600; }
.review-status.ok { color: #1d8a3e; font-weight: 600; }
.practice-rule {
  margin-top: 6px;
  font-size: 12.5px;
  color: var(--muted);
}
.rp-chat {
  background: #fbfbfd;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
  margin: 4px 0 12px;
  max-height: 480px;
  overflow-y: auto;
}
.rp-msg { margin: 8px 0; }
.rp-msg.rp-m { text-align: right; }
.rp-msg.rp-c { text-align: left; }
.rp-bub {
  display: inline-block;
  padding: 10px 14px;
  font-size: 13.5px;
  line-height: 1.55;
  border-radius: 12px;
  max-width: 88%;
  text-align: left;
}
.rp-m .rp-bub.blue {
  background: #eaf4fd;
  border-right: 3px solid #2563a8;
  border-radius: 12px 0 0 12px;
  color: #1f2e40;
}
.rp-c .rp-bub.gray {
  background: #f3f3f6;
  border-left: 3px solid #9a9aa8;
  border-radius: 0 12px 12px 0;
  color: #3a3a4a;
}
.rp-who { font-size: 12px; font-weight: 700; color: #5a5a6e; margin-bottom: 4px; }
.rp-empty { color: var(--muted); font-size: 13.5px; padding: 6px 0; }
.rp-input { display: flex; gap: 10px; align-items: flex-end; }
.rp-input textarea {
  flex: 1;
  padding: 10px 12px;
  border: 1.5px solid #d9d9f2;
  border-radius: 10px;
  font: inherit;
  font-size: 13.5px;
  line-height: 1.5;
  color: #2e2e3a;
  background: #fdfdff;
  resize: vertical;
  min-height: 46px;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.rp-input textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(91, 91, 214, .12);
}
.rp-review { margin-top: 4px; }
.rp-strengths ul {
  margin: 6px 0 0 18px;
  font-size: 13.5px;
  color: #1d5c33;
  line-height: 1.55;
}

.test-result-banner {
  padding: 18px 22px;
  border-radius: 16px;
  margin-bottom: 16px;
  font-weight: 700;
  font-size: 16.5px;
  display: flex; align-items: center; gap: 12px;
}
.test-result-banner.pass { background: var(--good-bg); color: var(--good); border: 1.5px solid #b5e8d0; }
.test-result-banner.fail { background: var(--bad-bg); color: var(--bad); border: 1.5px solid #f5c6c8; }
.test-result-banner.warn { background: #fdf3e0; color: #9a6b12; border: 1.5px solid #efd9a8; font-size: 14.5px; line-height: 1.5; }

.q-item { margin-bottom: 24px; }
.q-text { font-weight: 700; margin-bottom: 10px; font-size: 15.5px; }
.q-opt {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 13px 16px;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  margin: 8px 0;
  cursor: pointer;
  transition: border-color .13s, background .13s, transform .13s;
  background: #fbfbfd;
}
.q-opt:hover { border-color: #c7c7ec; transform: translateX(2px); }
.q-opt.sel { border-color: var(--accent); background: #f4f3ff; box-shadow: 0 0 0 3px rgba(91, 91, 214, .1); }
.q-opt input { accent-color: var(--accent); margin-top: 4px; }

.review-item { border: 1.5px solid var(--line); border-radius: 16px; padding: 16px 18px; margin-bottom: 12px; }
.review-item.ok { border-left: 5px solid var(--good); background: #fcfffd; }
.review-item.bad { border-left: 5px solid var(--bad); background: #fffbfb; }
.review-q { font-weight: 700; margin-bottom: 8px; }
.review-verdict { font-size: 12.5px; font-weight: 800; margin-bottom: 6px; text-transform: uppercase; letter-spacing: .06em; }
.review-item.ok .review-verdict { color: var(--good); }
.review-item.bad .review-verdict { color: var(--bad); }
.review-ans { font-size: 14.5px; margin: 4px 0; }

.attempts-history { font-size: 13px; color: var(--muted); margin-top: 12px; }
.attempts-history span { margin-right: 14px; display: inline-block; }

/* ---------- админка ---------- */
.admin-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.admin-table th {
  text-align: left; background: #f4f4f8; color: var(--muted);
  padding: 11px 13px; border-bottom: 1.5px solid var(--line);
  font-size: 12.5px; text-transform: uppercase; letter-spacing: .05em;
}
.admin-table td { padding: 13px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr.inactive td { opacity: .45; }
.admin-table tr.ready td { background: #f8f6ff; }

.pill-day {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 28px; height: 28px;
  border-radius: 9px;
  font-size: 12.5px; font-weight: 700;
  margin-right: 5px;
}
.pill-done { background: var(--good-bg); color: var(--good); }
.pill-practice { background: #fdf3e0; color: #9a6b12; box-shadow: inset 0 0 0 1.5px #efd9a8; }
.pill-optional { background: #eef2f7; color: #64748b; }
.optional-note {
  margin-top: 12px;
  padding: 11px 14px;
  background: #eef2f7;
  border-left: 4px solid #94a3b8;
  border-radius: 0 12px 12px 0;
  font-size: 13.5px;
  line-height: 1.55;
  color: #475569;
}
.final-status {
  padding: 22px 24px;
  border-radius: 16px;
  text-align: center;
}
.final-status.waiting { background: #fbf7ee; box-shadow: inset 0 0 0 1.5px #ecd9b0; }
.final-status.allowed { background: var(--good-bg); box-shadow: inset 0 0 0 1.5px #b4e6cf; }
.fs-title {
  display: flex; align-items: center; justify-content: center; gap: 9px;
  font-family: "Unbounded", sans-serif; font-weight: 600; font-size: 19px;
  margin-bottom: 6px;
}
.final-status.waiting .fs-title { color: #9a6b15; }
.final-status.allowed .fs-title { color: var(--good); }
.pill-open { background: #f1eeff; color: var(--accent); box-shadow: inset 0 0 0 1.5px #d9d4f8; }
.pill-locked { background: #f0f0f4; color: #b3b3c0; }
.pill-final { background: #d9f6f1; color: #0f766e; box-shadow: inset 0 0 0 1.5px #a7e8df; }

.stats-wrap { max-height: 60vh; overflow-y: auto; margin: 8px 0; }
.stats-day { margin-bottom: 14px; }
.stats-day-title { font-weight: 700; font-size: 14px; margin-bottom: 6px; }
.stats-row { display: flex; justify-content: space-between; align-items: baseline; gap: 14px;
  padding: 7px 0; border-bottom: 1px dashed var(--line); }
.stats-q { font-size: 13.5px; line-height: 1.4; }
.stats-num { font-size: 13px; font-weight: 700; white-space: nowrap; }
.stats-num.bad { color: #c0392b; }
.stats-num.warn { color: #b7791f; }
.stats-num.ok { color: var(--good); }
.stats-num .muted { font-weight: 400; }

.user-actions { display: flex; flex-wrap: wrap; gap: 7px; }
.code-show {
  font-family: "SF Mono", Consolas, monospace;
  background: #f4f3ff;
  border: 1px solid #e3e0fb;
  padding: 3px 10px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 13.5px;
  color: var(--accent);
}

.attempt-rows { margin-top: 10px; font-size: 13px; color: var(--muted); background: #fbfbfd; border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; }

.admin-form { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.admin-form input { max-width: 300px; }

/* ---------- модалка ---------- */
.modal {
  position: fixed; inset: 0;
  background: rgba(25, 25, 34, .5);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  z-index: 50;
  animation: fadeIn .18s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal-card {
  background: #fff;
  border-radius: 22px;
  padding: 30px 32px;
  max-width: 460px;
  width: calc(100% - 40px);
  box-shadow: 0 24px 70px rgba(25, 25, 34, .3);
  animation: pop .2s ease;
}
@keyframes pop { from { opacity: 0; transform: scale(.96) translateY(8px); } to { opacity: 1; transform: none; } }

@media (max-width: 640px) {
  .app { padding: 14px 10px 40px; }
  .card { padding: 18px; }
  .hero { padding: 22px 20px; }
  .day-card { flex-wrap: wrap; padding: 16px 18px; }
}
