/* ===== TutorFlow — дизайн в духе Claude/Anthropic. Тёплая «костяная» база, глина, serif. ===== */
:root {
  --accent: #E0612F;          /* яркий тёплый оранжевый (как было «по-живому») */
  --accent-dark: #C44E22;
  --accent-soft: #F9E7DB;     /* пастельный оранжевый тинт */
  --accent-2: #EE9D72;        /* светлый оранж — второй стоп градиентов */
  --green: #3F6B55;           /* приглушённый лес — success */
  --green-soft: #E6EDE7;
  --ink: #1F1E1D;             /* тёплый почти-чёрный (Anthropic slate) */
  --ink-2: #46423D;           /* вторичный текст */
  --muted: #87817A;           /* тёплый серый */
  --line: #E6E1D7;            /* кремовая граница */
  --paper: #F0EEE6;           /* Anthropic bone / ivory — фон */
  --surface: #FAF9F5;         /* тёплый белый — карточки */
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(60,50,38,.05), 0 14px 40px -22px rgba(60,50,38,.26);
  --shadow-sm: 0 1px 2px rgba(60,50,38,.06);
  --serif: 'Fraunces', Georgia, 'Times New Roman', serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; letter-spacing: -.01em; line-height: 1.1; }

.container { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.ic { display: inline-block; vertical-align: middle; flex-shrink: 0; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--sans); font-weight: 600; font-size: 15px; line-height: 1;
  padding: 12px 20px; border-radius: var(--radius-sm); border: 1px solid transparent;
  cursor: pointer; transition: transform .14s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease;
  white-space: nowrap;
}
.btn--lg { padding: 15px 26px; font-size: 16px; }
.btn--sm { padding: 8px 14px; font-size: 14px; }
.btn--block { width: 100%; }
.btn--primary { background: var(--accent); color: #fff; box-shadow: 0 1px 2px rgba(60,50,38,.12), 0 8px 18px -10px rgba(224,97,47,.5); }
.btn--primary:hover { background: var(--accent-dark); transform: translateY(-1px); }
.btn--ghost { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn--danger { color: #B3361B; }
.btn--danger:hover { border-color: #B3361B; color: #B3361B; }
.btn .ic { width: 18px; height: 18px; }

/* ===== Nav ===== */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(240,238,230,.82); backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav__inner { display: flex; align-items: center; gap: 24px; height: 66px; }
.logo { font-family: var(--serif); font-weight: 600; font-size: 21px; letter-spacing: -.01em; display: flex; align-items: center; gap: 8px; }
.logo__mark { color: var(--accent); }
.logo--sm { font-size: 18px; }
.nav__links { display: none; gap: 26px; margin-left: 8px; font-weight: 500; color: var(--ink-2); }
.nav__links a:hover { color: var(--accent); }
.nav__cta { margin-left: auto; }

/* ===== Hero ===== */
.hero { padding: 52px 0 60px; overflow: hidden; position: relative; }
.hero__glow { position: absolute; top: -180px; right: -120px; width: 620px; height: 620px; border-radius: 50%;
  background: radial-gradient(circle, rgba(224,97,47,.17), rgba(224,97,47,0) 62%); pointer-events: none; z-index: 0; }
.hero__grid { display: grid; gap: 44px; align-items: center; position: relative; z-index: 1; }
/* social proof */
.social-proof { display: flex; align-items: center; gap: 14px; margin-top: 30px; }
.avatars { display: flex; }
.avatars span { width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--paper); color: #fff; font-size: 13px; font-weight: 700; display: flex; align-items: center; justify-content: center; margin-left: -10px; }
.avatars span:first-child { margin-left: 0; }
.social-proof__text { font-size: 13px; color: var(--ink-2); line-height: 1.35; }
.social-proof__text span { display: block; }
.stars { color: #E8A33D; letter-spacing: 1px; font-size: 13px; }
.badge {
  display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; color: var(--green);
  background: var(--green-soft); padding: 7px 14px; border-radius: 999px; margin-bottom: 22px;
}
.hero h1 { font-size: clamp(36px, 8.4vw, 62px); line-height: 1.02; font-weight: 600; letter-spacing: -.02em; }
.hero h1 em { font-style: italic; color: var(--accent); }
.hero__sub { margin-top: 20px; font-size: clamp(16px, 4.4vw, 19px); color: var(--ink-2); max-width: 32ch; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero__trust { list-style: none; display: flex; flex-wrap: wrap; gap: 18px; margin-top: 26px; font-size: 14px; color: var(--muted); font-weight: 500; }
.hero__trust li { display: flex; align-items: center; gap: 6px; }
.hero__trust .ic { width: 16px; height: 16px; color: var(--green); }

/* ===== Phone demo ===== */
.hero__demo { display: flex; flex-direction: column; align-items: center; }
.phone {
  width: 290px; max-width: 80vw; aspect-ratio: 290 / 600;
  background: #21201D; border-radius: 42px; padding: 12px;
  box-shadow: var(--shadow); position: relative;
}
.phone__notch { position: absolute; top: 14px; left: 50%; transform: translateX(-50%); width: 110px; height: 22px; background: #21201D; border-radius: 0 0 14px 14px; z-index: 3; }
.phone__screen { background: #F0EEE6; border-radius: 31px; height: 100%; overflow: hidden; display: flex; flex-direction: column; }
.tg-header { display: flex; align-items: center; gap: 10px; padding: 26px 14px 12px; background: var(--surface); border-bottom: 1px solid var(--line); }
.tg-avatar { width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; font-size: 13px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.tg-name { font-weight: 700; font-size: 14px; }
.tg-status { font-size: 11px; color: var(--accent); }
.tg-chat { flex: 1; padding: 14px 12px; display: flex; flex-direction: column; gap: 9px; overflow: hidden; }
.tg-msg { background: var(--surface); border-radius: 4px 14px 14px 14px; padding: 9px 12px; font-size: 12.5px; line-height: 1.4; box-shadow: var(--shadow-sm); max-width: 92%; }
.tg-link { color: var(--accent); }
.report__title { font-weight: 700; font-size: 13px; margin-bottom: 6px; font-family: var(--sans); }
.tg-msg--report p { margin: 4px 0; font-size: 12px; }
.report__ai { margin-top: 8px; font-size: 11px; color: var(--accent); background: var(--accent-soft); display: inline-flex; align-items: center; gap: 4px; padding: 4px 9px; border-radius: 999px; font-weight: 600; }
.report__ai .ic { width: 12px; height: 12px; }
.tg-typing { background: var(--surface); border-radius: 14px; padding: 11px 14px; width: 56px; display: flex; gap: 4px; box-shadow: var(--shadow-sm); }
.tg-typing span { width: 7px; height: 7px; border-radius: 50%; background: #CDBFAE; animation: blink 1.4s infinite both; }
.tg-typing span:nth-child(2) { animation-delay: .2s; }
.tg-typing span:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .3; } 40% { opacity: 1; } }
.hero__demo-caption { margin-top: 16px; font-size: 13px; color: var(--muted); font-weight: 500; font-style: italic; }

/* ===== Stats band ===== */
.stats { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--surface); }
.stats__grid { display: grid; grid-template-columns: 1fr; gap: 22px; padding: 34px 20px; }
.stat { text-align: center; }
.stat + .stat { border-top: 1px solid var(--line); padding-top: 22px; }
.stat__num { font-family: var(--serif); font-size: 44px; font-weight: 600; color: var(--accent); letter-spacing: -.02em; line-height: 1; }
.stat__label { color: var(--ink-2); font-size: 15px; margin-top: 8px; }

/* ===== Sections ===== */
.section { padding: 66px 0; }
.container--narrow { max-width: 760px; }
.section--alt { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section__title { font-size: clamp(28px, 6vw, 40px); text-align: center; }
.section__lead { text-align: center; color: var(--ink-2); max-width: 52ch; margin: 14px auto 0; font-size: 17px; }

/* Cards */
.cards { display: grid; gap: 18px; margin-top: 44px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 26px; transition: transform .18s ease, box-shadow .18s ease; }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card__icon { width: 48px; height: 48px; border-radius: 13px; background: var(--accent-soft); color: var(--accent); display: flex; align-items: center; justify-content: center; }
.card h3 { margin: 16px 0 8px; font-size: 21px; }
.card p { color: var(--ink-2); font-size: 15px; }
.card b { color: var(--ink); font-weight: 600; }

/* Steps */
.steps { display: grid; gap: 26px; margin-top: 46px; }
.step { text-align: center; padding: 0 8px; }
.step__num { width: 50px; height: 50px; margin: 0 auto 16px; border-radius: 50%; background: var(--paper); border: 1.5px solid var(--accent); color: var(--accent); font-family: var(--serif); font-weight: 600; font-size: 22px; display: flex; align-items: center; justify-content: center; }
.step h3 { font-size: 19px; margin-bottom: 6px; }
.step p { color: var(--ink-2); font-size: 15px; max-width: 28ch; margin: 0 auto; }

/* Pricing */
.plans { display: grid; gap: 18px; margin-top: 46px; }
.plan { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px 26px; display: flex; flex-direction: column; position: relative; }
.plan--featured { border-color: var(--accent); box-shadow: var(--shadow); }
.plan__tag { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: var(--accent); color: #fff; font-size: 12px; font-weight: 600; padding: 4px 13px; border-radius: 999px; }
.plan__name { font-weight: 600; font-size: 14px; color: var(--accent); text-transform: uppercase; letter-spacing: .06em; }
.plan__price { font-family: var(--serif); font-size: 46px; font-weight: 600; letter-spacing: -.02em; margin-top: 6px; }
.plan__price span { font-family: var(--sans); font-size: 16px; font-weight: 500; color: var(--muted); }
.plan__limit { color: var(--ink-2); font-size: 14px; margin-bottom: 20px; }
.plan__feats { list-style: none; display: flex; flex-direction: column; gap: 11px; margin-bottom: 26px; flex: 1; font-size: 15px; }
.plan__feats li { display: flex; align-items: flex-start; gap: 9px; }
.plan__feats .ic { width: 18px; height: 18px; color: var(--green); margin-top: 1px; }
.plan__feats .muted { color: var(--muted); }
.plan__feats .muted .ic { color: var(--muted); opacity: .6; }
.plan__feats b { color: var(--ink); font-weight: 600; }

/* ===== Product showcase ===== */
.showcase { display: grid; gap: 32px; align-items: center; margin-top: 46px; }
.showcase + .showcase { margin-top: 56px; }
.showcase__tag { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; color: var(--accent); background: var(--accent-soft); padding: 6px 13px; border-radius: 999px; margin-bottom: 16px; }
.showcase__tag .ic { width: 16px; height: 16px; }
.showcase__copy h3 { font-size: clamp(23px, 5vw, 30px); }
.showcase__copy p { color: var(--ink-2); font-size: 16px; margin-top: 12px; }
.ticks { list-style: none; margin-top: 18px; display: flex; flex-direction: column; gap: 10px; font-size: 15px; }
.ticks li { display: flex; align-items: center; gap: 9px; }
.ticks .ic { width: 18px; height: 18px; color: var(--green); }

.mock { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.mock__head { display: flex; align-items: center; justify-content: space-between; font-weight: 600; font-size: 14px; margin-bottom: 14px; }
.mock__pill { font-family: var(--sans); font-size: 12px; font-weight: 600; color: #9A5B12; background: #FCE7C8; padding: 4px 10px; border-radius: 999px; }
.mock__row { display: flex; align-items: center; justify-content: space-between; padding: 11px 0; border-top: 1px solid var(--line); }
.mock__who { display: flex; align-items: center; gap: 10px; font-weight: 500; font-size: 14px; }
.mock__av { width: 30px; height: 30px; border-radius: 50%; color: #fff; font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.tag { font-size: 12px; font-weight: 600; padding: 5px 11px; border-radius: 999px; }
.tag--ok { color: var(--green); background: var(--green-soft); }
.tag--debt { color: #9A5B12; background: #FCE7C8; }
/* compose mock */
.mock--compose { display: flex; flex-direction: column; gap: 12px; }
.mock__note { background: var(--paper); border: 1px dashed var(--line); border-radius: 10px; padding: 12px 14px; font-size: 13px; color: var(--ink-2); }
.mock__arrow { align-self: center; display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: #fff; background: var(--accent); padding: 8px 16px; border-radius: 999px; }
.mock__out { border: 1px solid var(--line); border-radius: 10px; padding: 14px; display: grid; gap: 3px; font-size: 13px; }
.mock__out b { font-weight: 600; }
.mock__out span { color: var(--ink-2); margin-bottom: 6px; }

/* ===== Testimonial ===== */
.quote { max-width: 760px; margin: 0 auto; text-align: center; }
.quote blockquote { font-family: var(--serif); font-size: clamp(21px, 4.4vw, 30px); font-weight: 500; line-height: 1.4; letter-spacing: -.01em; }
.quote figcaption { display: inline-flex; align-items: center; gap: 12px; margin-top: 26px; text-align: left; font-size: 14px; color: var(--ink-2); }
.quote__av { width: 44px; height: 44px; border-radius: 50%; background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; font-family: var(--serif); font-weight: 600; font-size: 19px; display: flex; align-items: center; justify-content: center; }
.quote b { color: var(--ink); }

/* ===== FAQ ===== */
.faq-list { margin-top: 38px; display: flex; flex-direction: column; gap: 12px; }
.faq { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.faq summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 20px; font-weight: 600; font-size: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq__plus { position: relative; width: 16px; height: 16px; flex-shrink: 0; }
.faq__plus::before, .faq__plus::after { content: ""; position: absolute; background: var(--accent); border-radius: 2px; transition: transform .2s ease; }
.faq__plus::before { top: 7px; left: 0; width: 16px; height: 2px; }
.faq__plus::after { top: 0; left: 7px; width: 2px; height: 16px; }
.faq[open] .faq__plus::after { transform: scaleY(0); }
.faq p { padding: 0 20px 18px; color: var(--ink-2); font-size: 15px; margin-top: -2px; }

/* Final CTA */
.cta-final { background: var(--ink); color: #fff; text-align: center; padding: 74px 0; }
.cta-final h2 { font-size: clamp(30px, 6vw, 44px); color: #fff; }
.cta-final p { margin: 16px auto 30px; opacity: .82; max-width: 46ch; font-size: 17px; }
.cta-final .btn--primary { background: #fff; color: var(--ink); box-shadow: 0 12px 30px -12px rgba(0,0,0,.45); }
.cta-final .btn--primary:hover { background: #fff; color: var(--accent); transform: translateY(-1px); }

/* Footer */
.footer { border-top: 1px solid var(--line); padding: 34px 0; }
.footer__inner { display: flex; flex-direction: column; gap: 14px; align-items: center; text-align: center; color: var(--muted); font-size: 14px; }
.footer__links { display: flex; gap: 20px; }
.footer__links a:hover { color: var(--accent); }

/* ===== Reveal on scroll ===== */
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .tg-typing span { animation: none; }
}

/* ===== Auth (/signup) ===== */
.auth { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.auth__card { width: 100%; max-width: 410px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 42px 34px; box-shadow: var(--shadow); text-align: center; }
.auth__logo { justify-content: center; margin-bottom: 24px; }
.auth__title { font-size: 30px; }
.auth__sub { color: var(--ink-2); font-size: 15px; margin: 12px 0 28px; }
.auth__google { background: var(--surface); color: var(--ink); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.auth__google:hover { background: var(--surface); border-color: var(--accent); }
.auth__notice { background: var(--accent-soft); color: var(--ink-2); font-size: 13px; text-align: left; padding: 14px 16px; border-radius: 12px; line-height: 1.5; }
.auth__notice code { background: var(--surface); padding: 1px 6px; border-radius: 6px; font-size: 12px; }
.auth__error { color: #B3361B; font-size: 14px; margin-top: 14px; }
.auth__legal { color: var(--muted); font-size: 12px; margin-top: 22px; }

/* ===== App nav + dashboard ===== */
.app-nav { border-bottom: 1px solid var(--line); background: var(--surface); position: sticky; top: 0; z-index: 40; }
/* Мобайл-ферст: логотип и профиль в первой строке, ссылки — прокручиваемой полосой во второй. */
.app-nav__inner { display: flex; align-items: center; flex-wrap: wrap; min-height: 56px; column-gap: 10px; }
.app-nav__links { order: 3; width: 100%; display: flex; gap: 5px; margin: 0; padding: 2px 0 8px;
  font-weight: 500; font-size: 14px; color: var(--ink-2); overflow-x: auto; white-space: nowrap;
  -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.app-nav__links::-webkit-scrollbar { display: none; }
.app-nav__links a { flex: none; padding: 6px 11px; border-radius: 999px; background: var(--paper); }
.app-nav__links a:hover { color: var(--accent); }
.app-nav__links a.is-active { color: var(--accent); font-weight: 600; background: var(--accent-soft); }
.app-nav__right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.app-nav__avatar { width: 30px; height: 30px; border-radius: 50%; }
.app-nav__name { font-weight: 600; font-size: 14px; }
.app-nav__logout { padding: 8px 14px; font-size: 14px; }
.app-main { padding: 34px 20px 64px; }
.app-h1 { font-size: clamp(26px, 6vw, 34px); }

.retention { margin: 24px 0 34px; padding: 26px 28px; border-radius: var(--radius); background: var(--green); color: #fff; display: flex; align-items: center; gap: 20px; }
.retention__num { font-family: var(--serif); font-size: 44px; font-weight: 600; letter-spacing: -.02em; line-height: 1; }
.retention__label { font-size: 15px; font-weight: 600; }
.retention__label span { display: block; font-weight: 400; opacity: .85; font-size: 13px; margin-top: 4px; }

.dash-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
/* Одинокая последняя плитка (нечётная) — по центру строки, шириной в одну колонку. */
.dash-tile:last-child:nth-child(odd) { grid-column: 1 / -1; justify-self: center; width: calc(50% - 7px); }
.dash-tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 22px; transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease; }
.dash-tile:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--accent); }
.dash-tile__icon { width: 46px; height: 46px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); display: flex; align-items: center; justify-content: center; }
.dash-tile__title { font-family: var(--serif); font-weight: 600; font-size: 19px; margin: 14px 0 4px; }
.dash-tile__desc { color: var(--muted); font-size: 14px; }
.dash-plan { margin-top: 30px; color: var(--ink-2); font-size: 14px; }
.share { margin-top: 28px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.share__label { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.share__label .ic { width: 16px; height: 16px; color: var(--accent); }
.share__url { display: block; margin-top: 4px; color: var(--accent); font-weight: 600; font-size: 15px; word-break: break-all; }

/* ===== Page head / counter / alerts ===== */
.page-head { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.counter { background: var(--accent-soft); color: var(--accent); font-weight: 600; font-size: 14px; padding: 5px 12px; border-radius: 999px; }
.counter--warn { background: #FCE7C8; color: #9A5B12; }
.alert { padding: 12px 16px; border-radius: 12px; font-size: 14px; margin-bottom: 16px; }
.alert--err { background: #FBE3DC; color: #A23218; }

/* ===== Add / forms ===== */
.add-box { margin-bottom: 28px; }
.add-box__toggle { list-style: none; cursor: pointer; display: inline-flex; }
.add-box__toggle::-webkit-details-marker { display: none; }
details[open] .add-box__toggle { margin-bottom: 14px; }
.form-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow-sm); }
.form-card--inline { margin-top: 12px; box-shadow: none; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field--wide { grid-column: 1 / -1; }
.field span { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.field input, .field select, .field textarea {
  font-family: inherit; font-size: 15px; color: var(--ink);
  border: 1px solid var(--line); border-radius: 10px; padding: 11px 13px; background: var(--paper); width: 100%;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); background: var(--surface); }
.field textarea { resize: vertical; }
.form-card__actions { display: flex; gap: 10px; margin-top: 18px; }

/* ===== Upsell (limit) ===== */
.upsell { display: flex; flex-direction: column; gap: 14px; background: #FFF7E8; border: 1px solid #F3CE86; border-radius: var(--radius); padding: 24px; margin-bottom: 28px; }
.upsell p { color: var(--ink-2); font-size: 14px; margin-top: 4px; }
.upsell b { font-family: var(--serif); font-weight: 600; }

/* ===== Student list ===== */
.stud-list { display: flex; flex-direction: column; gap: 12px; }
.stud { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.stud__row { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.stud__main { display: flex; align-items: center; gap: 14px; min-width: 0; }
.stud__info { min-width: 0; }
.stud__name { overflow-wrap: anywhere; }
.stud__avatar { width: 44px; height: 44px; border-radius: 50%; background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; font-family: var(--serif); font-weight: 600; font-size: 19px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.stud__name { font-weight: 600; font-size: 16px; }
.stud__meta { color: var(--muted); font-size: 14px; margin-top: 2px; }
.stud__side { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.stud__side .btn { white-space: nowrap; }
.stud__edit { margin-top: 4px; }
.stud__edit-toggle { list-style: none; cursor: pointer; display: inline-flex; margin-top: 12px; }
.stud__edit-toggle::-webkit-details-marker { display: none; }
.chip { font-size: 12px; font-weight: 600; color: var(--muted); background: var(--paper); border: 1px solid var(--line); padding: 5px 10px; border-radius: 999px; }
.chip--ok { color: var(--green); background: var(--green-soft); border-color: transparent; }

/* ===== Schedule ===== */
.les-group { font-size: 20px; margin: 30px 0 14px; }
.les-group--muted { color: var(--muted); }
.les-list { display: flex; flex-direction: column; gap: 10px; }
.les { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; display: flex; align-items: center; gap: 16px; }
.les--past { opacity: .72; }
.les__time { text-align: center; flex-shrink: 0; min-width: 56px; }
.les__day { display: block; font-size: 12px; color: var(--muted); font-weight: 600; }
.les__hm { display: block; font-family: var(--serif); font-size: 22px; font-weight: 600; color: var(--accent); line-height: 1.1; }
.les__body { flex: 1; min-width: 0; }
.les__name { font-weight: 600; font-size: 16px; }
.les__meta { color: var(--muted); font-size: 13px; margin-top: 2px; }
.st { font-weight: 600; }
.st--done { color: var(--green); }
.st--cancel { color: #B3361B; }
.st--noshow { color: #9A5B12; }
.st--paid { color: var(--green); }
.les__menu { position: relative; flex-shrink: 0; }
.les__menu summary { list-style: none; cursor: pointer; }
.les__menu summary::-webkit-details-marker { display: none; }
.les__actions { position: absolute; right: 0; top: calc(100% + 6px); z-index: 10; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 6px; display: flex; flex-direction: column; min-width: 168px; }
.act { font-family: var(--sans); text-align: left; background: none; border: none; cursor: pointer; padding: 9px 12px; border-radius: 8px; font-size: 14px; color: var(--ink); width: 100%; }
.act:hover { background: var(--paper); color: var(--accent); }
.act--danger { color: #B3361B; }
.act--danger:hover { color: #B3361B; }

/* ===== Public booking ===== */
.book { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 28px 18px; }
.book__card { width: 100%; max-width: 440px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); padding: 34px 30px; }
.book__head { text-align: center; margin-bottom: 24px; }
.book__av { width: 64px; height: 64px; border-radius: 50%; margin: 0 auto 14px; display: block; object-fit: cover; }
.book__av--ph { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; font-family: var(--serif); font-size: 28px; font-weight: 600; display: flex; align-items: center; justify-content: center; }
.book__name { font-size: 26px; }
.book__sub { color: var(--ink-2); font-size: 15px; margin-top: 8px; }
.book__form { display: flex; flex-direction: column; gap: 14px; }
.book__form .btn { margin-top: 6px; }
.field-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.book__ok { text-align: center; padding: 16px 0; }
.book__ok-ic { width: 56px; height: 56px; border-radius: 50%; background: var(--green-soft); color: var(--green); display: flex; align-items: center; justify-content: center; margin: 0 auto 14px; }
.book__ok h2 { font-size: 23px; }
.book__ok p { color: var(--ink-2); margin-top: 8px; }
.book__foot { text-align: center; margin-top: 24px; font-size: 13px; color: var(--muted); }
.book__foot a { color: var(--accent); font-weight: 600; }

/* ===== Empty state ===== */
.empty { text-align: center; padding: 60px 20px; }
.empty__icon { width: 64px; height: 64px; margin: 0 auto; border-radius: 18px; background: var(--accent-soft); color: var(--accent); display: flex; align-items: center; justify-content: center; }
.empty h2 { margin: 18px 0 8px; font-size: 24px; }
.empty p { color: var(--ink-2); max-width: 42ch; margin: 0 auto; }

/* ===== Desktop ===== */
@media (min-width: 768px) {
  .nav__links { display: flex; }
  .app-nav__inner { flex-wrap: nowrap; height: 62px; min-height: 0; }
  .app-nav__links { order: 0; width: auto; margin-left: 30px; gap: 22px; padding: 0; overflow: visible; }
  .app-nav__links a { padding: 0; border-radius: 0; background: none; }
  .app-nav__links a.is-active { background: none; }
  .cards { grid-template-columns: repeat(3, 1fr); }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .plans { grid-template-columns: repeat(3, 1fr); align-items: start; }
  .plan--featured { transform: scale(1.04); }
  .section { padding: 92px 0; }
  .dash-grid { grid-template-columns: repeat(4, 1fr); }
  .dash-tile:last-child:nth-child(odd) { grid-column: auto; justify-self: stretch; width: auto; }
  .stats__grid { grid-template-columns: repeat(3, 1fr); padding: 40px 20px; }
  .stat + .stat { border-top: none; padding-top: 0; border-left: 1px solid var(--line); }
  .showcase { grid-template-columns: 1.05fr 1fr; gap: 48px; }
  .showcase--rev .showcase__copy { order: 2; }
}
@media (min-width: 960px) {
  .hero { padding: 76px 0 92px; }
  .hero__grid { grid-template-columns: 1.05fr .95fr; gap: 56px; }
  .hero__demo { align-items: flex-end; }
  .phone { width: 320px; }
}

/* ── Оплаты ── */
.app-h2 { font-family: var(--serif); font-size: 21px; font-weight: 600; margin: 30px 0 14px; }
.pay-sum { margin-bottom: 18px; }
.pay-sum__cur { font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 8px; letter-spacing: .04em; }
.pay-cards { display: grid; grid-template-columns: 1fr; gap: 12px; }
.pay-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.pay-card__label { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--ink-2); margin-bottom: 8px; }
.pay-card__num { font-family: var(--serif); font-size: 28px; font-weight: 600; color: var(--ink); }
.pay-card__num span { font-size: 16px; color: var(--muted); font-family: var(--sans); }
.pay-card--owe { background: #FCF3E6; border-color: #F0Dcc0; }
.pay-card--owe .pay-card__num { color: #9A5B12; }
.pay-card--got { background: var(--green-soft); border-color: #CFE0D5; }
.pay-card--got .pay-card__num { color: var(--green); }

.debt-list { display: flex; flex-direction: column; gap: 12px; }
.debt { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.debt__row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.debt__main { display: flex; align-items: center; gap: 12px; }
.debt__name { font-weight: 600; }
.debt__meta { font-size: 13px; color: var(--muted); }
.debt__side { display: flex; align-items: center; gap: 12px; }
.debt__total { font-family: var(--serif); font-weight: 600; font-size: 19px; color: #9A5B12; white-space: nowrap; }
.debt__detail { margin-top: 8px; }
.debt__toggle { cursor: pointer; font-size: 13px; color: var(--accent); list-style: none; padding: 4px 0; }
.debt__toggle::-webkit-details-marker { display: none; }
.debt__lessons { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; padding-top: 8px; border-top: 1px solid var(--line); }
.debt__lesson { display: flex; align-items: center; gap: 12px; }
.debt__when { font-size: 14px; color: var(--ink-2); min-width: 92px; }
.debt__price { font-size: 14px; font-weight: 600; flex: 1; }
.debt__lesson .act { width: auto; padding: 6px 10px; }

.pay-clear { display: flex; align-items: center; gap: 9px; background: var(--green-soft); border: 1px solid #CFE0D5; color: var(--green); border-radius: var(--radius); padding: 14px 18px; font-weight: 500; }

@media (min-width: 720px) {
  .pay-cards { grid-template-columns: 1fr 1fr 1fr; }
}

/* ===== Заметки после урока и AI-отчёт родителю ===== */
.les-wrap { display: flex; flex-direction: column; }
.report { margin-top: 8px; }
.report__toggle { display: inline-flex; align-items: center; gap: 7px; cursor: pointer; list-style: none; font-size: 13.5px; font-weight: 600; color: var(--ink-2); padding: 7px 12px; border: 1px dashed var(--line); border-radius: 10px; background: var(--surface); }
.report__toggle::-webkit-details-marker { display: none; }
.report__toggle:hover { color: var(--accent); border-color: var(--accent); }
.report__toggle .ic { color: var(--accent); }
.report__badge { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); }
.report__badge--sent { background: var(--green-soft); color: var(--green); }
.report__badge--note { background: var(--paper); color: var(--muted); }
.report__body { margin-top: 10px; padding: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.report__form textarea { width: 100%; font-family: var(--sans); font-size: 14px; color: var(--ink); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; resize: vertical; background: var(--paper); box-sizing: border-box; }
.report__form textarea:focus { outline: none; border-color: var(--accent); }
.report__btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.report__btns .ic { vertical-align: -2px; }
.report__hint { margin-top: 10px; font-size: 12.5px; color: var(--muted); }
.report__out { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.report__label { font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.report__text { white-space: pre-wrap; font-size: 14.5px; line-height: 1.55; color: var(--ink); background: var(--accent-soft); border-radius: 12px; padding: 12px 14px; }
.report__send { display: flex; align-items: center; gap: 12px; margin-top: 12px; flex-wrap: wrap; }
.report__sent { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; color: var(--green); font-weight: 600; }
.report__sent .ic { color: var(--green); }
.alert--ok { background: var(--green-soft); color: var(--green); }

/* ===== Настройки ===== */
.settings-card { display: flex; flex-direction: column; gap: 30px; max-width: 680px; }
.settings-sec { display: flex; flex-direction: column; gap: 14px; }
.settings-sec + .settings-sec { border-top: 1px solid var(--line); padding-top: 26px; }
.settings-sec__head { display: flex; gap: 13px; align-items: flex-start; }
.settings-sec__ic { width: 38px; height: 38px; flex-shrink: 0; border-radius: 10px; background: var(--accent-soft); color: var(--accent); display: flex; align-items: center; justify-content: center; }
.settings-sec__title { font-family: var(--serif); font-size: 19px; font-weight: 600; }
.settings-sec__hint { color: var(--ink-2); font-size: 14px; margin-top: 3px; max-width: 52ch; }

/* ===== Админка ===== */
.adm-list { display: flex; flex-direction: column; gap: 12px; }
.adm { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.adm__name { font-weight: 600; font-size: 16px; }
.adm__meta { color: var(--muted); font-size: 13px; margin-top: 2px; word-break: break-all; }
.adm__plan { display: flex; align-items: center; gap: 8px; }
.adm__plan select { font-family: var(--sans); font-size: 14px; color: var(--ink); border: 1px solid var(--line); border-radius: 9px; padding: 8px 10px; background: var(--paper); }

/* ===== Админка: сводка, поиск, карточка ===== */
.adm-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 16px; }
.adm-stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.adm-stat__num { font-family: var(--serif); font-size: 26px; font-weight: 600; color: var(--accent); line-height: 1.1; }
.adm-stat__lbl { color: var(--muted); font-size: 13px; margin-top: 4px; }
.adm-plan-split { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 14px; color: var(--ink-2); margin-bottom: 26px; }
.adm-plan-split b { color: var(--ink); }
.adm-rev { color: var(--green); font-weight: 600; margin-left: auto; }
.adm-listhead { flex-wrap: wrap; gap: 12px; align-items: center; }
.adm-search { display: flex; gap: 8px; margin-left: auto; flex-wrap: wrap; }
.adm-search input, .adm-search select { font-family: var(--sans); font-size: 14px; color: var(--ink); border: 1px solid var(--line); border-radius: 9px; padding: 8px 10px; background: var(--surface); }
.adm--blocked { opacity: .6; }
.adm__name a { color: inherit; }
.adm__name a:hover { color: var(--accent); }
.adm-badge { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; margin-left: 6px; vertical-align: 1px; }
.adm-badge--pro { background: var(--accent-soft); color: var(--accent); }
.adm-badge--blk { background: #FBE3DC; color: #A23218; }
.adm-back { display: inline-block; color: var(--muted); font-size: 14px; margin-bottom: 10px; }
.adm-back:hover { color: var(--accent); }
.adm-controls { display: flex; flex-direction: column; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin: 8px 0 18px; }
.adm-ctl { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.adm-ctl__lbl { font-size: 14px; font-weight: 600; color: var(--ink-2); min-width: 150px; }
.adm-ctl select, .adm-ctl input { font-family: var(--sans); font-size: 14px; color: var(--ink); border: 1px solid var(--line); border-radius: 9px; padding: 8px 10px; background: var(--paper); }
.adm-ctl__hint { font-size: 12px; color: var(--muted); }
.adm-mini { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.adm-mini__row { display: flex; justify-content: space-between; gap: 12px; padding: 11px 16px; flex-wrap: wrap; }
.adm-mini__row + .adm-mini__row { border-top: 1px solid var(--line); }
.adm-mini__name { font-weight: 500; font-size: 14px; }
.adm-mini__meta { color: var(--muted); font-size: 13px; }
@media (min-width: 720px) { .adm-stats { grid-template-columns: repeat(3, 1fr); } }

/* ===== Кнопка-контакт в карточке урока (написать ученику/родителю) ===== */
.les__contact { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.cbtn { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 600; padding: 5px 11px; border-radius: 999px; border: 1px solid var(--line); white-space: nowrap; }
.cbtn .ic { width: 14px; height: 14px; }
.cbtn--tg { background: #229ED9; border-color: #229ED9; color: #fff; }
.cbtn--tg:hover { background: #1c87ba; }
.cbtn--tel { background: var(--surface); color: var(--ink); }
.cbtn--tel:hover { border-color: var(--accent); color: var(--accent); }
.cbtn--text { background: var(--paper); color: var(--muted); font-weight: 500; }

/* ───────── Живой счётчик на лендинге (social proof) ───────── */
.livebar { padding: 28px 0; background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.livebar__lead { text-align: center; color: var(--muted); font-size: 14px; margin: 0 0 12px; letter-spacing: .02em; }
.livebar__row { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: center; gap: 8px 18px; }
.livebar__item { display: flex; flex-direction: column; align-items: center; min-width: 120px; }
.livebar__item b { font-family: var(--serif); font-size: clamp(26px, 5vw, 38px); color: var(--accent); line-height: 1; }
.livebar__item span { color: var(--ink-2); font-size: 13px; margin-top: 4px; }
.livebar__dot { color: var(--line); font-size: 24px; align-self: center; }
@media (max-width: 560px) { .livebar__dot { display: none; } .livebar__row { gap: 14px; } }

/* ───────── Streak-бейдж на дашборде ───────── */
.streak { display: inline-flex; align-items: center; gap: 4px; font-size: .62em; vertical-align: middle;
  background: var(--accent-soft); color: var(--accent-dark); font-weight: 700; font-family: var(--sans);
  padding: 4px 10px; border-radius: 999px; margin-left: 8px; }

/* ───────── Реферальный блок на дашборде ───────── */
.refer { margin-top: 22px; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius);
  background: linear-gradient(135deg, var(--accent-soft), var(--surface)); }
.refer__head { display: flex; gap: 12px; align-items: flex-start; }
.refer__gift { font-size: 26px; line-height: 1; }
.refer__title { font-weight: 700; color: var(--ink); }
.refer__sub { color: var(--ink-2); font-size: 14px; margin-top: 2px; }
.refer__row { display: flex; gap: 8px; margin-top: 14px; }
.refer__link { flex: 1; min-width: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--ink-2); font-size: 13px; font-family: var(--sans); }
@media (max-width: 560px) { .refer__row { flex-direction: column; } }

/* ───────── Лист ожидания: чип ───────── */
.chip--wait { color: var(--accent-dark); background: var(--accent-soft); border-color: transparent; }
.stud__wl { margin-top: 8px; }

/* ───────── Биллинг ───────── */
.bill-now { padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); margin-bottom: 18px; }
.bill-now__plan { font-size: 16px; color: var(--ink); }
.bill-now__exp { color: var(--muted); font-size: 14px; margin-top: 2px; }
.bill-plans { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 560px) { .bill-plans { grid-template-columns: 1fr; } }
.bill-card { position: relative; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.bill-card--current { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.bill-card__name { font-family: var(--serif); font-size: 22px; color: var(--ink); }
.bill-card__price { font-size: 30px; font-weight: 700; color: var(--accent); margin: 4px 0 12px; }
.bill-card__price span { font-size: 15px; color: var(--muted); font-weight: 500; }
.bill-card__feats { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.bill-card__feats li { display: flex; align-items: center; gap: 8px; color: var(--ink-2); font-size: 14px; }
.bill-card__feats svg { color: var(--green); flex: none; }
.bill-card__badge { position: absolute; top: 16px; right: 16px; background: var(--accent); color: #fff; font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; }
.bill-pay { margin-top: 20px; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(135deg, var(--accent-soft), var(--surface)); }
.bill-pay__hint { display: flex; gap: 10px; margin-top: 12px; color: var(--ink-2); font-size: 14px; line-height: 1.5; }
.bill-pay__hint svg { color: var(--accent); flex: none; margin-top: 2px; }
.bill-pay__email { background: var(--paper); border: 1px solid var(--line); border-radius: 6px; padding: 2px 8px; cursor: pointer; font-weight: 600; color: var(--ink); }
.bill-note { color: var(--muted); font-size: 13px; margin-top: 16px; line-height: 1.5; }

/* ───────── Админка: платежи подписок ───────── */
.adm-paylist { display: grid; gap: 10px; }
.adm-pay { display: flex; align-items: flex-start; gap: 14px; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.adm-pay--done { opacity: .7; }
.adm-pay__sum { font-weight: 700; color: var(--accent); font-size: 18px; flex: none; min-width: 90px; }
.adm-pay__body { flex: 1; min-width: 0; }
.adm-pay__comment { color: var(--ink); }
.adm-pay__meta { color: var(--muted); font-size: 12px; margin: 2px 0 8px; }
.adm-pay__form { display: flex; gap: 8px; flex-wrap: wrap; }
.adm-pay__form select { padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--paper); }

/* ───────── Кнопка «Поделиться» на странице записи ───────── */
.book__share { display: flex; justify-content: center; margin-top: 14px; }
.book__foot a { color: var(--accent); }

/* ───────── Подключение бота на странице записи ───────── */
.book__connect { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.book__connect-lead { display: flex; gap: 8px; color: var(--ink-2); font-size: 14px; line-height: 1.5; margin: 0 0 12px; text-align: left; }
.book__connect-lead svg { color: var(--accent); flex: none; margin-top: 2px; }
