/* Единая светлая дизайн-система для публичных страниц и личных кабинетов. */
:root {
  --background: #f7f7fb;
  --section: #ffffff;
  --section-alt: #f1f0f7;
  --text: #171326;
  --text-muted: #656174;
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --primary-soft: #e9e7ff;
  --border: #e3e1eb;
  --success: #10b981;
  --bg: var(--background);
  --surface: var(--section);
  --surface-2: var(--section-alt);
  --muted: var(--text-muted);
  --line: var(--border);
  --indigo: var(--primary);
  --indigo-hover: var(--primary-hover);
  --indigo-2: var(--text);
  --lavender: var(--primary);
  --lavender-soft: var(--primary-soft);
  --emerald: var(--success);
  --emerald-dark: #047857;
  --danger: #ef4444;
  --shadow: 0 12px 32px rgba(23, 19, 38, .07);
  --radius: 20px;
  --control-radius: 14px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; min-width: 0; }
main { min-width: 0; }
h1, h2, h3, p, b, span {
  overflow-wrap: break-word;
  word-break: normal;
}

.container { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }
.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(16px);
  background: rgba(247, 247, 251, .94);
  border-bottom: 1px solid var(--line);
}
.nav-inner { min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 18px; min-width: 0; position: relative; }
.logo { display: flex; align-items: center; gap: 12px; font-weight: 850; letter-spacing: 0; min-width: 0; }
.logo-mark {
  width: 38px; height: 38px; border-radius: 12px;
  background: var(--indigo);
  box-shadow: 0 8px 20px rgba(79, 70, 229, .2);
  position: relative;
}
.logo-mark:before { content: "F"; color: white; font-size: 24px; font-weight: 900; position: absolute; left: 12px; top: 4px; }
.logo small { display: block; margin-top: 2px; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.nav-links { display: flex; align-items: center; gap: 22px; color: var(--text); font-weight: 700; font-size: 14px; }
.nav-links a { white-space: nowrap; }
.nav-actions { display: flex; align-items: center; gap: 12px; min-width: 0; }
.mobile-menu-panel { display: contents; }
.mobile-menu-btn { display: none; }

.btn {
  border: 0;
  border-radius: var(--control-radius);
  padding: 12px 16px;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary, .btn-indigo { color: white; background: var(--indigo); box-shadow: 0 10px 24px rgba(79,70,229,.2); }
.btn-primary:hover, .btn-indigo:hover { background: var(--indigo-hover); box-shadow: 0 12px 28px rgba(67,56,202,.24); }
.btn-ghost { color: var(--indigo); background: white; border: 1px solid #c9c5ef; }
.btn-soft { color: var(--indigo); background: var(--lavender-soft); }
.btn.full { width: 100%; }
.nav-actions .btn { padding: 10px 14px; border-radius: 13px; font-size: 14px; line-height: 1.2; }

.pill { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 8px; max-width: 100%; white-space: normal; line-height: 1.35; color: var(--indigo); background: var(--lavender-soft); border: 1px solid #d4d0f5; padding: 9px 13px; border-radius: 999px; font-weight: 800; font-size: 14px; }
.section { padding: 88px 0; }
.section-tight { padding: 50px 0; }
.section-title { font-size: clamp(32px, 4vw, 48px); line-height: 1.05; letter-spacing: 0; margin: 0 0 14px; }
.section-lead { color: var(--muted); font-size: 18px; line-height: 1.65; max-width: 680px; margin: 0; }

.hero { padding: 52px 0 70px; background: var(--surface-2); color: var(--text); border-bottom: 1px solid var(--line); }
.hero-grid { display: grid; grid-template-columns: 1.08fr .92fr; gap: 46px; align-items: center; }
.hero h1 { font-size: clamp(42px, 5.8vw, 68px); line-height: 1; letter-spacing: 0; margin: 22px 0 22px; }
.accent { color: var(--lavender); }
.hero-grid > div:first-child { min-width: 0; }
.hero-grid > div:first-child .accent { color: var(--indigo); }
.hero-grid > div:first-child > p { font-size: 19px; color: var(--muted); line-height: 1.65; margin: 0 0 28px; max-width: 630px; }
.hero-features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin: 34px 0; }
.feature-mini { padding: 18px; background: white; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.feature-icon { width: 38px; height: 38px; border-radius: var(--control-radius); background: var(--lavender-soft); color: var(--indigo); display: grid; place-items: center; font-weight: 900; margin-bottom: 13px; }
.feature-mini b { display: block; margin-bottom: 4px; }
.feature-mini span { color: var(--muted); font-size: 14px; line-height: 1.45; }
.hero-card {
  color: var(--text);
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}
.hero-card h2 { font-size: 32px; line-height: 1.05; letter-spacing: 0; margin: 0 0 8px; }
.hero-card p { font-size: 15px; margin: 0 0 22px; color: var(--muted); }
.form-step { margin: 14px 0; }
.form-step label { display: flex; align-items: center; gap: 10px; font-weight: 850; font-size: 14px; margin-bottom: 10px; }
.badge-num { width: 26px; height: 26px; border-radius: 50%; background: var(--indigo); color: white; display: grid; place-items: center; font-size: 13px; }
.options { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.option { border: 1px solid var(--line); background: #fff; border-radius: var(--control-radius); padding: 11px 12px; font-weight: 750; color: var(--text); cursor: pointer; text-align: center; }
.option:hover, .option.active { border-color: var(--indigo); background: var(--lavender-soft); color: var(--indigo-2); box-shadow: 0 0 0 3px rgba(79,70,229,.1); }
.input, select, textarea { width: 100%; border: 1px solid var(--line); background: white; border-radius: var(--control-radius); padding: 12px 14px; outline: none; color: var(--text); }
.input:focus, select:focus, textarea:focus { border-color: var(--indigo); box-shadow: 0 0 0 4px rgba(79,70,229,.1); }
.form-extra { margin: 14px 0; border: 1px solid var(--line); border-radius: var(--control-radius); background: #fff; padding: 0; }
.form-extra summary { list-style: none; cursor: pointer; padding: 13px 14px; color: var(--indigo); font-weight: 850; }
.form-extra summary::-webkit-details-marker { display: none; }
.form-extra summary:after { content: "+"; float: right; font-weight: 900; }
.form-extra[open] summary:after { content: "−"; }
.form-compact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 0 12px 12px; }
.privacy { color: var(--muted); font-size: 12px; text-align: center; margin-top: 12px; }
.launch-note { display: grid; gap: 4px; margin-top: 24px; padding: 16px 18px; border-left: 4px solid var(--indigo); background: var(--lavender-soft); }
.launch-note b { color: var(--indigo); }
.launch-note span { color: var(--muted); line-height: 1.5; }
.disclaimer { margin-top: 22px; font-size: 12px; color: var(--muted); line-height: 1.55; }

.stats-bar { background: white; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); display: grid; grid-template-columns: repeat(4, 1fr); overflow: hidden; }
.stat { padding: 28px; border-right: 1px solid var(--line); }
.stat:last-child { border-right: 0; }
.stat b { display: block; font-size: 30px; letter-spacing: 0; color: var(--indigo-2); }
.stat span { color: var(--muted); font-weight: 650; }

.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.card { min-width: 0; background: white; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; }
.card h3 { margin: 0 0 8px; font-size: 20px; letter-spacing: 0; }
.card p { margin: 0; color: var(--muted); line-height: 1.55; }

.tutors-layout { display: grid; grid-template-columns: 280px 1fr; gap: 24px; align-items: start; }
.filters { position: sticky; top: 96px; }
.filter-group { margin-bottom: 16px; }
.filter-group label { display: block; font-size: 13px; font-weight: 800; margin-bottom: 8px; color: var(--text); }
.tutor-list { display: grid; gap: 16px; }
.tutor-row { display: grid; grid-template-columns: 112px 1fr auto; gap: 22px; align-items: center; background: white; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); cursor: pointer; transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease; }
.tutor-row:hover { transform: translateY(-2px); border-color: #c9c5ef; box-shadow: 0 16px 36px rgba(23,19,38,.1); }
.tutor-row img { width: 112px; height: 112px; object-fit: cover; border-radius: var(--control-radius); }
.tutor-row h3 { margin: 0 0 4px; font-size: 22px; }
.tutor-main { min-width: 0; }
.tutor-heading { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; margin-bottom: 4px; }
.tutor-heading h3 { margin: 0; }
.tutor-meta { color: var(--muted); font-weight: 650; font-size: 14px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 0; }
.tag { background: var(--lavender-soft); color: var(--indigo); padding: 6px 9px; border-radius: 999px; font-size: 12px; font-weight: 850; }
.price { font-weight: 900; font-size: 24px; color: var(--indigo-2); white-space: nowrap; }
.rating { color: var(--text); font-weight: 850; }
.tutor-rating { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; margin-top: 10px; color: var(--text); }
.tutor-rating > span:last-child { color: var(--muted); font-size: 13px; font-weight: 700; }
.rating-stars { color: #f59e0b; font-weight: 900; letter-spacing: 0; white-space: nowrap; }
.tutor-actions { min-width: 132px; text-align: right; }
.tutor-open { margin-top: 14px; color: var(--indigo); font-weight: 900; }

.profile-grid { display: grid; grid-template-columns: 360px minmax(0, 1fr); gap: 28px; align-items: start; width: 100%; min-width: 0; }
.profile-photo { width: 100%; min-width: 0; aspect-ratio: 1 / 1; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); background: white; padding: 10px; border: 1px solid var(--line); }
.profile-photo img { width: 100%; height: 100%; border-radius: var(--control-radius); object-fit: cover; object-position: center top; }
.profile-header, .profile-header > *, #tutorProfile, #profileLead, #profileLead .hero-card, #profileLead form { min-width: 0; max-width: 100%; }
.profile-header { width: 100%; }
.profile-header > .pill { line-height: 1.35; }
.profile-header .section-lead { max-width: 100%; }
.profile-header h1 { font-size: clamp(40px, 5vw, 62px); margin: 0 0 8px; letter-spacing: 0; }
.profile-actions { display: flex; gap: 12px; flex-wrap: wrap; margin: 22px 0; }
.profile-actions > * { min-width: 0; max-width: 100%; text-align: center; white-space: normal; line-height: 1.3; }
.tabs { display: flex; gap: 8px; width: 100%; min-width: 0; max-width: 100%; border-bottom: 1px solid var(--line); margin: 20px 0; }
.tab { padding: 14px 16px; font-weight: 850; color: var(--muted); border: 0; border-bottom: 3px solid transparent; background: transparent; cursor: pointer; }
.tab.active { color: var(--indigo); border-color: var(--indigo); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }
.compact-2 { grid-template-columns: 1fr 1fr; }
.review-list { display: grid; gap: 14px; margin-top: 18px; }
.review-summary { display: grid; grid-template-columns: 180px minmax(220px, 360px); gap: 30px; align-items: center; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: white; box-shadow: var(--shadow); }
.review-score { display: grid; justify-items: start; gap: 5px; }
.review-score > b { font-size: 52px; line-height: 1; color: var(--text); }
.review-score > span:last-child { color: var(--muted); font-size: 14px; }
.rating-distribution { display: grid; gap: 7px; }
.rating-bar { display: grid; grid-template-columns: 14px 1fr 22px; gap: 9px; align-items: center; color: var(--muted); font-size: 13px; }
.rating-bar > div { height: 7px; overflow: hidden; border-radius: 999px; background: #e5e7eb; }
.rating-bar i { display: block; height: 100%; border-radius: inherit; background: #f59e0b; }
.rating-bar em { font-style: normal; text-align: right; }
.review-card { padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: white; box-shadow: var(--shadow); }
.review-author { display: grid; grid-template-columns: 42px 1fr auto; gap: 11px; align-items: center; }
.review-avatar { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; background: var(--lavender-soft); color: var(--indigo); font-weight: 900; }
.review-author b, .review-author span { display: block; }
.review-author span, .review-author time { color: var(--muted); font-size: 13px; }
.review-card-rating { display: flex; flex-wrap: wrap; gap: 9px; align-items: center; margin: 14px 0 8px; }
.review-card p { margin: 0; color: var(--text); line-height: 1.6; }
.review-marker { padding: 5px 8px; border-radius: 7px; font-size: 11px; font-weight: 850; }
.review-marker.verified { background: #d1fae5; color: #047857; }
.review-form { display: grid; gap: 14px; margin-top: 22px; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: white; box-shadow: var(--shadow); }
.review-form h3, .review-form p { margin: 0; }
.review-form p { margin-top: 4px; color: var(--muted); }
.review-form textarea { min-height: 120px; resize: vertical; }
.star-picker { display: flex; flex-direction: row-reverse; justify-content: flex-end; width: fit-content; margin: 0; padding: 0; border: 0; }
.star-picker legend { margin-bottom: 7px; color: var(--text); font-size: 13px; font-weight: 850; }
.star-picker input { position: absolute; opacity: 0; pointer-events: none; }
.star-picker span { display: block; padding: 2px; color: #d1d5db; font-size: 32px; cursor: pointer; }
.star-picker label:hover span, .star-picker label:hover ~ label span, .star-picker input:checked ~ span, .star-picker label:has(input:checked) ~ label span { color: #f59e0b; }
.metric-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 20px 0; }
.metric { background: white; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.metric b { font-size: 28px; display: block; color: var(--indigo-2); }
.check-list { display: grid; gap: 10px; }
.check { display: flex; gap: 10px; align-items: start; color: var(--text); }
.check:before { content: "✓"; background: #d1fae5; color: #047857; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; flex: 0 0 22px; font-weight: 900; }

.pricing { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; align-items: stretch; }
.plan { position: relative; padding: 30px; }
.plan.featured { border-color: #c9c5ef; box-shadow: var(--shadow); transform: translateY(-4px); }
.plan h3 { font-size: 22px; }
.plan-price { font-size: 46px; font-weight: 900; letter-spacing: 0; margin: 12px 0; }
.plan ul { padding: 0; margin: 22px 0; list-style: none; display: grid; gap: 12px; color: var(--text); }
.plan li:before { content: "✓"; color: var(--indigo); font-weight: 900; margin-right: 8px; }
.pricing-list { display: grid; gap: 10px; margin-top: 34px; }
.pricing-row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(170px, .8fr) minmax(260px, 1fr) auto;
  align-items: center;
  gap: 28px;
  min-width: 0;
  padding: 30px 38px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow);
}
.pricing-row.featured { border-color: #c9c5ef; box-shadow: var(--shadow); }
.pricing-title h3 { margin: 0; font-size: 28px; line-height: 1.1; letter-spacing: 0; }
.pricing-title small { display: block; margin-top: 6px; color: var(--muted); font-size: 15px; font-weight: 750; }
.pricing-cost b { font-size: 28px; line-height: 1.1; letter-spacing: 0; }
.pricing-cost s { margin-left: 8px; color: var(--muted); font-weight: 650; }
.pricing-cost p { margin: 6px 0 0; color: var(--text); font-weight: 750; }
.pricing-cost span { display: inline-flex; margin-left: 8px; padding: 7px 10px; border-radius: 8px; background: var(--surface-2); color: var(--indigo-2); font-weight: 850; }
.pricing-ribbon {
  position: absolute;
  left: 30px;
  top: -14px;
  padding: 6px 14px;
  border-radius: 0 12px 12px 0;
  background: var(--lavender-soft);
  color: var(--indigo);
  font-weight: 900;
}
.pricing-ribbon:after {
  content: "";
  position: absolute;
  right: -12px;
  top: 0;
  border-top: 14px solid transparent;
  border-bottom: 14px solid transparent;
  border-left: 12px solid var(--lavender-soft);
}
.tariff-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-top: 34px; align-items: stretch; }
.tariff-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 430px;
  padding: 46px 24px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.tariff-card:before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 6px;
  background: #c9c5ef;
}
.tariff-card.featured { border-color: var(--indigo); box-shadow: var(--shadow); }
.tariff-card.featured:before { height: 7px; background: var(--indigo); }
.tariff-top { min-height: 68px; padding-right: 64px; margin-top: 0; }
.tariff-top h3 { margin: 0; font-size: 25px; line-height: 1.12; letter-spacing: 0; }
.tariff-top > span {
  position: absolute;
  top: 48px;
  right: 24px;
  padding: 7px 9px;
  border-radius: 999px;
  background: var(--lavender-soft);
  color: var(--indigo);
  font-size: 13px;
  font-weight: 900;
}
.tariff-gift { min-height: 24px; margin: 0; color: var(--text); font-weight: 800; }
.tariff-price { margin-top: 18px; min-height: 42px; font-size: 30px; line-height: 1.08; font-weight: 950; letter-spacing: 0; color: var(--indigo-2); }
.tariff-old { margin-top: 7px; color: var(--muted); text-decoration: line-through; font-weight: 750; }
.tariff-lesson { min-height: 52px; margin: 14px 0 22px; padding: 13px 10px; border-radius: var(--control-radius); background: var(--surface-2); color: var(--text); font-size: 14px; font-weight: 850; text-align: center; display: grid; place-items: center; }
.tariff-card .btn { margin-top: auto; min-height: 58px; align-self: stretch; }
.tariff-badge {
  position: absolute;
  top: 18px;
  left: 24px;
  display: inline-flex;
  width: fit-content;
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--lavender-soft);
  color: var(--indigo);
  font-size: 13px;
  font-weight: 900;
}
.tariff-card.featured .tariff-top { min-height: 68px; }
.tariff-features { min-height: 86px; margin: 16px 0 20px; padding: 0; list-style: none; display: grid; align-content: start; gap: 8px; color: var(--text); font-size: 14px; }
.tariff-features li:before { content: "✓"; margin-right: 8px; color: var(--emerald-dark); font-weight: 900; }
.payment-safety { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: start; margin-top: 24px; padding: 18px 20px; border: 1px solid #bbf7d0; border-radius: 16px; background: #ecfdf5; color: #065f46; }
.payment-safety b { display: block; margin-bottom: 3px; }
.payment-safety p { margin: 0; line-height: 1.5; }
.payment-recipient { display: none; gap: 8px; margin-top: 24px; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: white; box-shadow: var(--shadow); }
.payment-recipient:not(:empty) { display: grid; }
.payment-recipient span { color: var(--muted); font-size: 13px; line-height: 1.45; }
.selected-plan { border: 1px solid #bbf7d0; background: #ecfdf5; color: #065f46; border-radius: 16px; padding: 14px 16px; margin-bottom: 16px; line-height: 1.45; }

.auth-wrap { min-height: calc(100vh - 76px); display: grid; place-items: center; padding: 60px 0; }
.auth-card { width: min(480px, 100%); }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; background: var(--surface-2); padding: 6px; border-radius: 16px; margin: 20px 0; }
.auth-tab { border: 0; border-radius: 12px; padding: 12px; background: transparent; font-weight: 850; cursor: pointer; }
.auth-tab.active { background: white; color: var(--indigo); box-shadow: 0 6px 16px rgba(23,19,38,.07); }
.form-grid { display: grid; gap: 12px; }
.field-label { color: var(--text); font-weight: 850; font-size: 13px; margin-bottom: -6px; }
.auth-note { color: var(--muted); font-size: 13px; line-height: 1.5; }
.auth-text-button { border: 0; background: transparent; color: var(--indigo); font: inherit; font-weight: 750; cursor: pointer; padding: 6px; }
.dashboard { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 24px; align-items: start; }
.dashboard > main { width: 100%; min-width: 0; }
.sidebar { position: sticky; top: 96px; }
.sidebar .card { padding: 18px; }
.side-link { display: flex; align-items: center; gap: 10px; padding: 13px 14px; border-radius: var(--control-radius); color: var(--text); font-weight: 800; }
.side-link.active, .side-link:hover { background: var(--lavender-soft); color: var(--indigo); }
.dashboard-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 20px; }
.next-action { display: flex; align-items: center; justify-content: space-between; gap: 20px; background: var(--lavender-soft); border: 1px solid #d4d0f5; border-radius: var(--radius); padding: 24px; margin-bottom: 20px; }
.next-action > div { min-width: 0; }
.next-action h2 { margin: 12px 0 6px; font-size: 30px; letter-spacing: 0; }
.next-action p { margin: 0; color: var(--muted); line-height: 1.5; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 16px; }
.homework-list { display: grid; gap: 12px; min-width: 0; }
.teacher-grid { display: grid; gap: 14px; min-width: 0; }
.teacher-card { display: grid; grid-template-columns: 86px 1fr; gap: 16px; align-items: start; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.teacher-card img { width: 86px; height: 86px; border-radius: var(--control-radius); object-fit: cover; }
.teacher-card h3, .student-card h3 { margin: 0 0 4px; }
.teacher-card p, .student-card p { margin: 0 0 12px; color: var(--muted); }
.teacher-meta { color: var(--muted); font-size: 13px; font-weight: 750; margin-top: 8px; }
.teacher-focus { margin-top: 12px; padding: 12px; border-radius: var(--control-radius); background: var(--surface-2); color: var(--text); line-height: 1.45; }
.student-card { padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.student-card-head { display: flex; justify-content: space-between; align-items: start; gap: 12px; margin-bottom: 4px; }
.progress-line { height: 10px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.progress-line span { display: block; height: 100%; border-radius: inherit; background: var(--emerald); }
.chat-layout { display: grid; gap: 14px; }
.chat-controls { max-width: 420px; display: grid; gap: 8px; }
.chat-thread { display: grid; gap: 10px; max-height: 360px; overflow: auto; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-2); }
.chat-message { width: min(78%, 620px); padding: 12px 14px; border: 1px solid var(--line); border-radius: 16px 16px 16px 6px; background: white; box-shadow: 0 8px 20px rgba(23,19,38,.05); }
.chat-message.me { justify-self: end; border-radius: 16px 16px 6px 16px; background: #eef2ff; border-color: #c7d2fe; }
.chat-message.unread { border-color: #a7f3d0; box-shadow: 0 12px 30px rgba(16,185,129,.12); }
.chat-message p { margin: 6px 0 0; color: var(--text); line-height: 1.45; }
.chat-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; color: var(--muted); font-size: 12px; }
.chat-meta b { color: var(--text); }
.chat-badge { padding: 4px 8px; border-radius: 999px; background: #d1fae5; color: #047857; font-weight: 900; }
.chat-badge.muted { background: #ede9fe; color: var(--indigo); }
.chat-empty { padding: 18px; color: var(--muted); text-align: center; }
.chat-compose { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; }
.payment-card { display: grid; gap: 12px; }
.payment-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.lesson-balance { margin-top: 14px; max-width: 520px; }
.lesson-balance-head { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 8px; font-size: 13px; color: var(--muted); }
.lesson-balance-head b { color: var(--text); }
.lesson-balance-track { height: 12px; border-radius: 999px; background: #eef2ff; border: 1px solid var(--line); overflow: hidden; }
.lesson-balance-track span { display: block; height: 100%; border-radius: inherit; transition: width .2s ease; }
.lesson-balance.ok .lesson-balance-track span { background: var(--emerald); }
.lesson-balance.warn .lesson-balance-track span { background: #f59e0b; }
.lesson-balance.danger .lesson-balance-track span { background: var(--danger); }
.report-source { margin: 14px 0 16px; padding: 16px; border-radius: var(--radius); background: var(--surface-2); border: 1px solid var(--line); }
.report-source > b { display: block; margin-bottom: 10px; }
.report-source-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; color: var(--text); font-size: 13px; line-height: 1.45; }
.report-source-grid span { padding: 12px; border-radius: 14px; background: white; border: 1px solid var(--line); }
.action-panel { display: grid; gap: 14px; }
.feature-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.feature-cards > div, .referral-box { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; background: #fff; }
.feature-cards p, .referral-box p { margin: 6px 0 0; color: var(--muted); line-height: 1.45; }
.rating-row { display: flex; gap: 10px; flex-wrap: wrap; }
.payout-grid, .source-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.source-grid { grid-template-columns: repeat(4, 1fr); }
.referral-box { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.referral-box code { display: inline-block; margin-top: 10px; padding: 8px 10px; border-radius: 12px; background: var(--lavender-soft); color: var(--indigo); font-weight: 800; white-space: normal; }
.topic-map { display: grid; gap: 14px; }
.topic-map-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.topic-progress { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; background: #fff; }
.topic-progress > div:first-child { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.topic-progress span { color: var(--muted); font-weight: 850; }
.topic-progress.ok .lesson-balance-track span { background: var(--emerald); }
.topic-progress.warn .lesson-balance-track span { background: #f59e0b; }
.topic-progress.danger .lesson-balance-track span { background: var(--danger); }
.homework-item { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; text-align: left; width: 100%; color: inherit; }
.homework-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.deadline { color: var(--emerald-dark); font-size: 13px; font-weight: 900; white-space: nowrap; }
.homework-click { cursor: pointer; transition: border-color .18s ease, box-shadow .18s ease; }
.homework-click:hover { border-color: #c9c5ef; box-shadow: 0 12px 28px rgba(23,19,38,.08); }
.homework-detail { display: none; margin-top: 14px; padding: 14px; border-radius: var(--control-radius); background: var(--surface-2); color: var(--text); line-height: 1.5; }
.homework-click.open .homework-detail { display: block; }
.application-card { cursor: pointer; }
.application-detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.application-field { min-width: 0; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.application-field span, .application-notes span { display: block; color: var(--muted); font-size: 12px; font-weight: 850; margin-bottom: 5px; }
.application-field b { display: block; overflow-wrap: anywhere; }
.application-field a { color: var(--indigo); }
.application-notes { margin-top: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.application-notes p { margin: 6px 0 0; color: var(--text); }
.application-edit-form h3 { margin: 0; }
.application-edit-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.application-edit-field { display: grid; gap: 6px; min-width: 0; }
.application-edit-field span { color: var(--muted); font-size: 12px; font-weight: 850; }
.application-edit-field.wide { grid-column: 1 / -1; }
.application-edit-field textarea { min-height: 92px; resize: vertical; }
.application-edit-field.muted input:disabled { color: var(--muted); background: #f8fafc; cursor: not-allowed; }
.catalog-empty { display: grid; gap: 14px; justify-items: start; }
.catalog-empty .btn { margin-top: 4px; }
.compliance-list { display: grid; gap: 16px; }
.compliance-form { display: grid; gap: 14px; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-2); }
.compliance-form p { margin: 4px 0 0; color: var(--muted); }
.verification-checks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.verification-checks label { display: flex; align-items: flex-start; gap: 8px; min-width: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--control-radius); background: white; line-height: 1.35; }
.verification-checks input { flex: 0 0 auto; margin-top: 3px; }
.inline-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.inline-actions .btn { min-height: 40px; padding: 9px 12px; font-size: 13px; white-space: normal; }
.inline-form { display: grid; gap: 10px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.mini-checks { display: flex; flex-wrap: wrap; gap: 8px; }
.mini-check { display: inline-flex; align-items: center; gap: 6px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 999px; background: white; font-weight: 750; font-size: 13px; }
.quick-templates { display: flex; flex-wrap: wrap; gap: 8px; }
.quick-templates .btn { padding: 9px 11px; font-size: 12px; }
.share-panel { margin-top: 14px; }
.share-strip { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.share-link {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,.9);
  color: var(--indigo);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 850;
  padding: 9px 12px;
}
.share-link:hover { border-color: #c9c5ef; background: var(--lavender-soft); }
.topic-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.table-list { display: grid; gap: 12px; min-width: 0; }
audio { width: min(100%, 360px); display: block; margin-top: 8px; }
.status { display: inline-flex; padding: 7px 10px; border-radius: 999px; background: var(--lavender-soft); color: var(--indigo); font-size: 12px; font-weight: 900; }
.status.ok { background: #d1fae5; color: #047857; }
.status.warn { background: #fef3c7; color: #92400e; }
.alert { padding: 14px 16px; border-radius: 16px; margin: 12px 0; font-weight: 750; display: none; }
.alert.show { display: block; }
.alert.ok { background: #d1fae5; color: #065f46; }
.alert.err { background: #fee2e2; color: #991b1b; }

.faq { display: grid; gap: 12px; }
details { background: white; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
summary { font-weight: 900; cursor: pointer; }
details p { color: var(--muted); line-height: 1.6; }

.footer { padding: 42px 0; border-top: 0; background: var(--text); color: #c8c5d0; }
.footer-inner { display: flex; justify-content: space-between; gap: 20px; align-items: start; }
.footer-legal { display: grid; grid-template-columns: minmax(220px, .65fr) minmax(0, 1.35fr); gap: 34px; align-items: start; }
.footer-about, .footer-documents { display: grid; gap: 8px; line-height: 1.5; }
.footer-about b, .footer-documents b { color: white; }
.footer-about a { color: #c9c5ff; font-weight: 750; width: fit-content; }
.footer-doc-list { display: flex; flex-wrap: wrap; gap: 0; margin: 2px 0; }
.footer-doc-list span { display: inline-block; padding: 4px 12px 4px 0; margin: 0 12px 4px 0; border-right: 1px solid rgba(255,255,255,.18); color: #c8c5d0; font-size: 13px; }
.footer-doc-list span:last-child { border-right: 0; }
.footer-documents small { font-size: 12px; color: #a9a5b6; }

@media (max-width: 980px) {
  .mobile-menu-btn {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    margin-left: auto;
    position: relative;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: white;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
  }
  .mobile-menu-btn span {
    display: block;
    position: absolute;
    left: 12px;
    width: 16px;
    height: 2px;
    border-radius: 999px;
    background: var(--indigo);
    transition: transform .18s ease, top .18s ease, opacity .18s ease;
  }
  .mobile-menu-btn span:nth-child(1) { top: 13px; }
  .mobile-menu-btn span:nth-child(2) { top: 19px; }
  .mobile-menu-btn span:nth-child(3) { top: 25px; }
  .nav-inner.mobile-menu-open .mobile-menu-btn span:nth-child(1) { top: 19px; transform: rotate(45deg); }
  .nav-inner.mobile-menu-open .mobile-menu-btn span:nth-child(2) { opacity: 0; }
  .nav-inner.mobile-menu-open .mobile-menu-btn span:nth-child(3) { top: 19px; transform: rotate(-45deg); }
  .mobile-menu-panel {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: min(360px, 100%);
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(255,255,255,.98);
    box-shadow: 0 12px 32px rgba(23,19,38,.1);
    z-index: 30;
  }
  .nav-inner.mobile-menu-open .mobile-menu-panel { display: grid; gap: 10px; }
  .nav-links { display: grid; grid-template-columns: 1fr; gap: 6px; width: 100%; }
  .nav-links a { display: block; padding: 11px 12px; border-radius: 10px; white-space: normal; }
  .nav-links a:hover { background: var(--lavender-soft); color: var(--indigo); }
  .nav-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    width: 100%;
    padding-top: 10px;
    border-top: 1px solid var(--line);
  }
  .nav-actions > *, .nav-actions .btn { width: 100%; max-width: none; }
  .hero-grid, .tutors-layout, .profile-grid, .dashboard { grid-template-columns: minmax(0, 1fr); }
  .hero-features, .stats-bar, .grid-4, .pricing, .tariff-grid, .dashboard-grid, .report-source-grid, .feature-cards, .topic-map-grid, .source-grid, .payout-grid { grid-template-columns: 1fr 1fr; }
  .pricing-row { grid-template-columns: 1fr auto; }
  .pricing-cost { grid-column: 1 / -1; }
  .filters, .sidebar { position: static; }
  .next-action { flex-direction: column; align-items: stretch; }
  .tutor-row { grid-template-columns: 96px minmax(0, 1fr); }
  .tutor-row > .tutor-actions { grid-column: 1 / -1; display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding-top: 12px; border-top: 1px solid var(--line); text-align: left; }
  .tutor-actions .tutor-meta { margin-right: auto; }
  .tutor-open { margin-top: 0; }
  .profile-photo { width: 100%; max-width: 360px; }
  .plan.featured, .tariff-card.featured { transform: none; }
}

@media (max-width: 640px) {
  .container { width: min(100% - 24px, 1180px); }
  .nav-inner { min-height: 64px; gap: 10px; padding: 8px 0; }
  .logo small { display: none; }
  .logo-mark { width: 34px; height: 34px; border-radius: 11px; flex: 0 0 34px; }
  .logo-mark:before { font-size: 22px; left: 11px; top: 3px; }
  .logo > div:not(.logo-mark) { min-width: 0; }
  .logo b { display: block; max-width: 126px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .mobile-menu-panel { width: 100%; }
  .nav-actions { grid-template-columns: 1fr; }
  .nav-actions .btn { padding: 10px 12px; font-size: 13px; white-space: normal; }
  .section { padding: 54px 0; }
  .section-tight { padding: 34px 0; }
  .section-title { font-size: 30px; line-height: 1.12; }
  .section-lead { font-size: 16px; line-height: 1.55; }
  .hero { padding: 34px 0 46px; }
  .hero h1 { font-size: 40px; line-height: 1.08; margin: 16px 0; }
  .hero p { font-size: 16px; line-height: 1.55; }
  .hero-card, .card { border-radius: var(--radius); padding: 18px; }
  .hero-card h2 { font-size: 26px; }
  .hero-features, .stats-bar, .grid-4, .compact-2, .pricing, .tariff-grid, .dashboard-grid, .metric-row, .options, .report-source-grid, .feature-cards, .topic-map-grid, .payout-grid, .source-grid, .form-compact-grid { grid-template-columns: 1fr; }
  .pricing-row { grid-template-columns: 1fr; gap: 16px; padding: 26px 18px 18px; border-radius: var(--radius); }
  .pricing-row .btn { width: 100%; }
  .pricing-title h3, .pricing-cost b { font-size: 24px; }
  .pricing-cost s { display: inline-block; margin-top: 4px; }
  .pricing-ribbon { left: 18px; }
  .tariff-card { padding: 20px; border-radius: var(--radius); }
  .tariff-top h3 { font-size: 22px; }
  .tariff-price { font-size: 28px; }
  .profile-header h1 { font-size: 36px; line-height: 1.1; }
  .profile-grid { gap: 20px; }
  .profile-photo { width: 100%; max-width: 100%; border-radius: 20px; padding: 8px; }
  .profile-photo img { border-radius: 14px; }
  .profile-header > .pill { display: flex; width: 100%; border-radius: 14px; padding: 8px 10px; font-size: 12px; }
  .profile-actions, .payment-actions, .rating-row { display: grid; grid-template-columns: 1fr; }
  .profile-actions .btn, .payment-actions .btn, .rating-row .btn { width: 100%; min-height: 48px; padding: 11px 12px; }
  .application-detail-grid, .application-edit-grid { grid-template-columns: 1fr; }
  .tabs { overflow-x: auto; gap: 0; padding-bottom: 1px; scrollbar-width: none; }
  .tabs::-webkit-scrollbar, .sidebar .card::-webkit-scrollbar { display: none; }
  .tab { flex: 0 0 auto; white-space: nowrap; padding: 12px 13px; }
  .referral-box { align-items: stretch; flex-direction: column; }
  .stat { border-right: 0; border-bottom: 1px solid var(--line); }
  .stat:last-child { border-bottom: 0; }
  .tutor-row { grid-template-columns: 88px minmax(0, 1fr); gap: 12px; padding: 12px; border-radius: var(--radius); align-items: start; }
  .tutor-row img { width: 88px; height: 108px; border-radius: 12px; }
  .tutor-row h3 { font-size: 18px; line-height: 1.15; }
  .tutor-heading { align-items: flex-start; gap: 5px; }
  .tutor-heading .tag { padding: 4px 7px; }
  .tutor-row .tags { gap: 5px; margin-top: 8px; }
  .tutor-row .tags .tag { padding: 4px 7px; }
  .tutor-rating { gap: 5px; margin-top: 8px; }
  .tutor-rating .rating-stars { font-size: 13px; }
  .tutor-row .price { font-size: 21px; }
  .tutor-row .tutor-open { font-size: 14px; }
  .review-summary { grid-template-columns: 1fr; gap: 18px; padding: 18px; }
  .review-author { grid-template-columns: 38px 1fr; }
  .review-author time { grid-column: 2; }
  .review-card, .review-form { padding: 16px; }
  .payment-safety { grid-template-columns: 1fr; padding: 16px; }
  .verification-checks { grid-template-columns: 1fr; }
  .compliance-form { padding: 14px; }
  .inline-actions { display: grid; grid-template-columns: 1fr; width: 100%; }
  .inline-actions .btn { width: 100%; }
  .price, .plan-price { font-size: 32px; white-space: normal; }
  .auth-wrap { min-height: auto; padding: 34px 0; }
  .dashboard { gap: 14px; width: 100%; max-width: 100%; }
  .dashboard section, .dashboard .card, .dashboard .next-action, .dashboard .teacher-focus, .dashboard .homework-item, .dashboard .metric { max-width: 100%; min-width: 0; }
  .dashboard h2 { font-size: 24px; line-height: 1.15; }
  .dashboard p, .dashboard span, .dashboard b { min-width: 0; }
  .dashboard .btn { width: 100%; max-width: 100%; white-space: normal; }
  .sidebar { margin: 0; width: 100%; }
  .sidebar .card { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch; gap: 8px; overflow: visible; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
  .sidebar b, .sidebar p, .sidebar #logoutBtn { display: none; }
  .side-link { justify-content: center; min-width: 0; white-space: normal; text-align: center; padding: 11px 10px; border: 1px solid var(--line); background: white; line-height: 1.2; }
  .next-action { padding: 18px; border-radius: var(--radius); }
  .next-action h2 { font-size: 24px; line-height: 1.15; }
  .next-action .pill { max-width: 100%; white-space: normal; }
  .section-head { align-items: stretch; flex-direction: column; }
  .teacher-card { grid-template-columns: 1fr; }
  .teacher-card img { width: 100%; height: 220px; border-radius: 14px; }
  .student-card-head, .homework-top, .lesson-balance-head, .topic-progress > div:first-child { align-items: flex-start; flex-direction: column; }
  .homework-item { grid-template-columns: 1fr; padding: 14px; }
  .homework-item > div { min-width: 0; }
  .status { width: fit-content; max-width: 100%; white-space: normal; }
  .deadline { white-space: normal; }
  .mini-checks, .quick-templates, .topic-grid { display: grid; grid-template-columns: 1fr; }
  .chat-thread { max-height: 420px; padding: 10px; border-radius: 14px; }
  .chat-message { width: 100%; }
  .chat-compose { grid-template-columns: 1fr; }
  #profileLead { width: 100%; padding-top: 28px; }
  #profileLead .hero-card { width: 100%; margin: 0 !important; }
  .assignment-list .homework-item { align-items: stretch; }
  audio { width: 100%; }
  .footer-inner { flex-direction: column; }
  .footer-legal { grid-template-columns: 1fr; gap: 24px; }
}

@media (max-width: 380px) {
  .container { width: min(100% - 18px, 1180px); }
  .logo b { max-width: 102px; }
  .nav-actions .btn { font-size: 12px; padding: 9px; }
  .hero h1 { font-size: 34px; }
  .hero-card, .card { padding: 15px; }
  .tutor-row { grid-template-columns: 76px minmax(0, 1fr); }
  .tutor-row img { width: 76px; height: 96px; }
  .tutor-row .tutor-meta { font-size: 12px; }
  .tutor-row .tags { display: none; }
}

