/* Hellopifagor — main stylesheet */
:root {
  --bg: #f6f7fb;
  --surface: #ffffff;
  --surface-2: #f1f3f8;
  --surface-3: #e8ebf2;
  --text: #0f172a;
  --text-2: #475569;
  --muted: #8590a6;
  --border: #e4e8f0;
  --border-2: #d3d9e5;
  --primary: #3a57f2;
  --primary-hover: #2b45d6;
  --primary-soft: #eef1fe;
  --accent: #ffb020;
  --accent-soft: #fff4dc;
  --success: #15803d;
  --success-soft: #e7f6ec;
  --danger: #dc3545;
  --danger-soft: #fdecee;
  --radius: 14px;
  --radius-sm: 10px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06);
  --shadow: 0 6px 20px rgba(15, 23, 42, .07);
  --shadow-lg: 0 24px 60px rgba(15, 23, 42, .18);
  --font: Inter, "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Arial, sans-serif;
  --container: 1240px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-hover); }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; letter-spacing: -.015em; }
p { margin: 0 0 1em; }
button { font: inherit; color: inherit; }
input, select, textarea { font: inherit; color: inherit; }
hr { border: 0; border-top: 1px solid var(--border); margin: 8px 0; }
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.muted { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.nowrap { white-space: nowrap; }
html.is-auth .guest-only { display: none !important; }
html:not(.is-auth) .user-only { display: none !important; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 42px; padding: 0 18px; border-radius: 11px; border: 1px solid transparent;
  font-weight: 600; font-size: 14.5px; line-height: 1; cursor: pointer; white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s, box-shadow .15s, transform .05s;
  text-decoration: none; user-select: none;
}
.btn:active { transform: translateY(1px); }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 6px 16px rgba(58, 87, 242, .28); }
.btn-primary:hover { background: var(--primary-hover); color: #fff; }
.btn-ghost { background: transparent; color: var(--text); }
.btn-ghost:hover { background: var(--surface-2); color: var(--text); }
.btn-outline { background: var(--surface); border-color: var(--border-2); color: var(--text); }
.btn-outline:hover { border-color: var(--text-2); color: var(--text); }
.btn-soft { background: var(--primary-soft); color: var(--primary); }
.btn-soft:hover { background: #e2e7fd; color: var(--primary-hover); }
.btn-light { background: #fff; color: var(--text); }
.btn-light:hover { background: #f1f3f8; color: var(--text); }
.btn-danger { background: var(--danger-soft); color: var(--danger); }
.btn-danger:hover { background: #fbdde1; color: var(--danger); }
.btn-sm { height: 34px; padding: 0 12px; font-size: 13.5px; border-radius: 9px; }
.btn-lg { height: 52px; padding: 0 26px; font-size: 16px; border-radius: 13px; }
.btn-block { width: 100%; }
.btn[disabled], .btn.is-busy { opacity: .7; pointer-events: none; }
.btn.is-busy::before {
  content: ""; width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite;
}
.icon-btn {
  width: 40px; height: 40px; display: inline-grid; place-items: center; border-radius: 10px;
  border: 0; background: transparent; cursor: pointer; color: var(--text-2);
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn svg { width: 20px; height: 20px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- badges & chips ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: 6px;
  font-size: 12px; font-weight: 600; background: var(--surface-2); color: var(--text-2); white-space: nowrap;
}
.badge-pro { background: linear-gradient(135deg, #ffcf5c, #ffa516); color: #4a2c00; letter-spacing: .03em; }
.badge-primary { background: var(--primary-soft); color: var(--primary); }
.badge-success { background: var(--success-soft); color: var(--success); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border); color: var(--text-2); font-size: 14px; font-weight: 500;
  cursor: pointer; white-space: nowrap;
}
.chip:hover { border-color: var(--border-2); color: var(--text); }
.chip.is-active { background: var(--text); border-color: var(--text); color: #fff; }
.chip .count { color: var(--muted); font-size: 12.5px; }
.chip.is-active .count { color: rgba(255, 255, 255, .6); }

/* ---------- header ---------- */
.hdr { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .92); backdrop-filter: saturate(1.6) blur(12px); border-bottom: 1px solid var(--border); }
.hdr-in { display: flex; align-items: center; gap: 28px; height: 68px; }
.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-size: 20px; letter-spacing: -.02em; flex: none; }
.logo:hover { color: var(--text); }
.logo svg { width: 34px; height: 34px; }
.logo b { font-weight: 800; }
.logo span { font-weight: 500; }
.hdr-nav { display: flex; gap: 4px; }
.hdr-nav a { padding: 8px 12px; border-radius: 9px; color: var(--text-2); font-weight: 500; font-size: 14.5px; }
.hdr-nav a:hover, .hdr-nav a.is-active { color: var(--text); background: var(--surface-2); }
.hdr-search { flex: 1; max-width: 420px; position: relative; margin-left: auto; }
.hdr-search svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--muted); pointer-events: none; }
.hdr-search input {
  width: 100%; height: 42px; padding: 0 14px 0 40px; border-radius: 11px; border: 1px solid transparent;
  background: var(--surface-2); outline: none; font-size: 14.5px; transition: border-color .15s, background .15s;
}
.hdr-search input:focus { background: #fff; border-color: var(--primary); box-shadow: 0 0 0 4px rgba(58, 87, 242, .12); }
.hdr-actions { display: flex; align-items: center; gap: 8px; flex: none; }
.burger { display: none; }

.user-menu { position: relative; }
.user-btn { display: flex; align-items: center; gap: 10px; height: 42px; padding: 0 10px 0 4px; border-radius: 12px; border: 0; background: transparent; cursor: pointer; font-weight: 600; font-size: 14.5px; }
.user-btn:hover { background: var(--surface-2); }
.user-btn svg { width: 16px; height: 16px; color: var(--muted); }
.user-btn .uname { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar {
  width: 34px; height: 34px; border-radius: 50%; display: inline-grid; place-items: center; flex: none;
  background: var(--primary); color: #fff; font-weight: 700; font-size: 13px; letter-spacing: .02em;
}
.avatar-lg { width: 72px; height: 72px; font-size: 24px; }
.avatar-xl { width: 112px; height: 112px; font-size: 36px; }
.um-drop {
  position: absolute; right: 0; top: calc(100% + 8px); width: 260px; padding: 8px; border-radius: 14px;
  background: #fff; border: 1px solid var(--border); box-shadow: var(--shadow-lg);
  opacity: 0; visibility: hidden; transform: translateY(-6px); transition: .15s;
}
.user-menu.is-open .um-drop { opacity: 1; visibility: visible; transform: none; }
.um-head { padding: 10px 12px 12px; border-bottom: 1px solid var(--border); margin-bottom: 6px; }
.um-head b { display: block; font-size: 14.5px; }
.um-head small { color: var(--muted); font-size: 13px; }
.um-drop a, .um-drop button {
  display: flex; width: 100%; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 9px;
  color: var(--text); font-size: 14.5px; border: 0; background: none; cursor: pointer; text-align: left;
}
.um-drop a:hover, .um-drop button:hover { background: var(--surface-2); color: var(--text); }
.um-drop .plan-row { justify-content: space-between; }

/* ---------- sections ---------- */
main { min-height: 60vh; }
.section { padding: 64px 0; }
.section-sm { padding: 40px 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.section-head h2 { font-size: 30px; font-weight: 800; }
.section-head p { margin: 8px 0 0; color: var(--text-2); }
.section-head .more { font-weight: 600; white-space: nowrap; display: inline-flex; align-items: center; gap: 4px; }
.section-head .more svg { width: 16px; height: 16px; }
.bg-white { background: var(--surface); }

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; padding: 72px 0 80px; background:
  radial-gradient(900px 420px at 85% -10%, rgba(106, 61, 240, .14), transparent 60%),
  radial-gradient(700px 400px at -10% 110%, rgba(58, 87, 242, .12), transparent 60%), var(--surface); border-bottom: 1px solid var(--border); }
.hero-in { display: grid; grid-template-columns: 1.08fr .92fr; gap: 56px; align-items: center; }
.hero-kicker { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 999px; background: var(--primary-soft); color: var(--primary); font-weight: 600; font-size: 13.5px; margin-bottom: 22px; }
.hero-kicker span { background: var(--primary); color: #fff; border-radius: 999px; padding: 2px 9px; font-size: 12px; }
.hero h1 { font-size: 54px; font-weight: 850; line-height: 1.06; letter-spacing: -.035em; margin-bottom: 20px; }
.hero h1 em { font-style: normal; background: linear-gradient(90deg, var(--primary), #7a3ff0); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .sub { font-size: 18px; color: var(--text-2); max-width: 560px; margin-bottom: 30px; }
.hero-search { display: flex; gap: 8px; padding: 8px; background: #fff; border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow); max-width: 580px; }
.hero-search .inp { flex: 1; position: relative; }
.hero-search .inp svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; color: var(--muted); }
.hero-search input { width: 100%; height: 52px; border: 0; outline: none; padding: 0 12px 0 42px; font-size: 16px; background: transparent; }
.hero-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; align-items: center; font-size: 14px; color: var(--muted); }
.hero-tags a { padding: 4px 10px; border-radius: 8px; background: var(--surface-2); color: var(--text-2); font-size: 13.5px; }
.hero-tags a:hover { background: var(--surface-3); color: var(--text); }
.hero-stats { display: flex; gap: 36px; margin-top: 40px; }
.hero-stats b { display: block; font-size: 28px; font-weight: 800; letter-spacing: -.02em; }
.hero-stats span { color: var(--muted); font-size: 14px; }

.hero-visual { position: relative; }
.mock { background: #fff; border-radius: 20px; box-shadow: var(--shadow-lg); border: 1px solid var(--border); overflow: hidden; }
.mock-thumb { position: relative; aspect-ratio: 16/9; }
.mock-thumb img { width: 100%; height: 100%; object-fit: cover; }
.mock-thumb .play { position: absolute; right: 18px; bottom: 20px; width: 56px; height: 56px; border-radius: 50%; background: rgba(255, 255, 255, .95); display: grid; place-items: center; box-shadow: 0 10px 30px rgba(0, 0, 0, .25); }
.mock-thumb .play svg { width: 26px; height: 26px; color: var(--primary); margin-left: 4px; }
.mock-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: rgba(255, 255, 255, .3); }
.mock-bar i { display: block; width: 38%; height: 100%; background: var(--accent); }
.mock-body { padding: 18px 20px 20px; }
.mock-body h4 { font-size: 16px; margin-bottom: 4px; }
.mock-body small { color: var(--muted); }
.mock-toc { margin-top: 14px; display: grid; gap: 6px; }
.mock-toc div { display: flex; gap: 12px; font-size: 13.5px; padding: 7px 10px; border-radius: 8px; color: var(--text-2); }
.mock-toc div.is-now { background: var(--primary-soft); color: var(--text); font-weight: 600; }
.mock-toc code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--primary); font-size: 12.5px; }
.float-card { position: absolute; background: #fff; border-radius: 14px; box-shadow: var(--shadow-lg); border: 1px solid var(--border); padding: 12px 14px; display: flex; align-items: center; gap: 10px; font-size: 13.5px; }
.float-card .ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; }
.float-card .ic svg { width: 18px; height: 18px; }
.float-card b { display: block; font-size: 14px; }
.float-card small { color: var(--muted); }
.float-1 { left: -38px; top: 64%; }
.float-1 .ic { background: var(--success-soft); color: var(--success); }
.float-2 { right: -26px; bottom: -22px; }
.float-2 .ic { background: var(--accent-soft); color: #b76e00; }

/* ---------- category tiles ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; }
.cat-tile { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; min-height: 132px; padding: 16px; border-radius: var(--radius); color: #fff; transition: transform .15s, box-shadow .15s; }
.cat-tile:hover { color: #fff; transform: translateY(-2px); box-shadow: var(--shadow); }
.cat-tile .glyph { position: absolute; right: -6px; bottom: -18px; font-size: 76px; font-weight: 700; opacity: .2; font-family: Georgia, "Times New Roman", serif; line-height: 1; white-space: nowrap; }
.cat-tile b { font-size: 15.5px; position: relative; line-height: 1.25; }
.cat-tile small { position: relative; opacity: .82; font-size: 13px; }

/* ---------- lecture cards ---------- */
.grid-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 26px 20px; }
.grid-cards.cols-3 { grid-template-columns: repeat(3, 1fr); }
.lcard { display: flex; flex-direction: column; color: var(--text); min-width: 0; }
.lcard:hover { color: var(--text); }
.thumb { position: relative; aspect-ratio: 16/9; border-radius: 12px; overflow: hidden; background: var(--surface-3); }
.thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.lcard:hover .thumb img { transform: scale(1.035); }
.thumb .dur { position: absolute; right: 8px; bottom: 8px; background: rgba(10, 14, 30, .82); color: #fff; font-size: 12px; font-weight: 600; padding: 2px 6px; border-radius: 5px; font-variant-numeric: tabular-nums; }
.thumb .badge-pro { position: absolute; left: 8px; top: 8px; height: 20px; font-size: 11px; }
.thumb .prog { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: rgba(255, 255, 255, .35); }
.thumb .prog i { display: block; height: 100%; background: var(--danger); }
.lcard-body { padding: 12px 2px 0; min-width: 0; }
.lcard-cat { font-size: 12.5px; color: var(--muted); margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lcard-title { font-size: 15.5px; font-weight: 650; line-height: 1.32; margin-bottom: 8px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lcard:hover .lcard-title { color: var(--primary); }
.lcard-author { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--text-2); }
.lcard-author .avatar { width: 22px; height: 22px; font-size: 9.5px; }
.lcard-stats { font-size: 13px; color: var(--muted); margin-top: 3px; }

.ccard { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; color: var(--text); transition: box-shadow .15s, transform .15s; }
.ccard:hover { color: var(--text); box-shadow: var(--shadow); transform: translateY(-2px); }
.ccard .thumb { border-radius: 0; }
.ccard-body { padding: 16px 18px 18px; display: flex; flex-direction: column; flex: 1; }
.ccard-body h3 { font-size: 17px; font-weight: 700; margin: 6px 0 8px; }
.ccard-body p { color: var(--text-2); font-size: 14px; margin-bottom: 14px; flex: 1; }
.ccard-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; color: var(--muted); align-items: center; }
.ccard-meta span { display: inline-flex; align-items: center; gap: 5px; }
.ccard-meta svg { width: 15px; height: 15px; }

.pcard { display: flex; gap: 14px; align-items: center; padding: 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); color: var(--text); transition: box-shadow .15s; }
.pcard:hover { box-shadow: var(--shadow); color: var(--text); }
.pcard .avatar { width: 56px; height: 56px; font-size: 19px; }
.pcard b { display: block; font-size: 15px; line-height: 1.3; }
.pcard small { display: block; color: var(--muted); font-size: 13px; line-height: 1.4; margin-top: 2px; }
.grid-people { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }

/* ---------- steps / features ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.step { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 28px; }
.step .num { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); margin-bottom: 18px; }
.step .num svg { width: 22px; height: 22px; }
.step h3 { font-size: 19px; margin-bottom: 8px; }
.step p { color: var(--text-2); margin: 0; }

/* ---------- pricing ---------- */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; align-items: stretch; }
.plan { position: relative; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 28px; }
.plan.is-featured { border: 2px solid var(--primary); box-shadow: 0 20px 50px rgba(58, 87, 242, .16); }
.plan .ribbon { position: absolute; top: -13px; left: 28px; background: var(--primary); color: #fff; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; }
.plan h3 { font-size: 20px; margin-bottom: 6px; }
.plan .desc { color: var(--text-2); font-size: 14px; min-height: 44px; }
.plan .price { font-size: 40px; font-weight: 850; letter-spacing: -.03em; margin: 12px 0 2px; }
.plan .price small { font-size: 15px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.plan .per { color: var(--muted); font-size: 13.5px; margin-bottom: 20px; min-height: 20px; }
.plan ul { list-style: none; padding: 0; margin: 0 0 24px; display: grid; gap: 10px; flex: 1; }
.plan li { display: flex; gap: 10px; font-size: 14.5px; }
.plan li svg { width: 18px; height: 18px; flex: none; color: var(--success); margin-top: 2px; }
.plan li.off { color: var(--muted); }
.plan li.off svg { color: var(--border-2); }
.compare { width: 100%; border-collapse: collapse; background: var(--surface); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); }
.compare th, .compare td { padding: 14px 18px; border-bottom: 1px solid var(--border); text-align: left; font-size: 14.5px; }
.compare th { background: var(--surface-2); font-weight: 650; }
.compare td:not(:first-child), .compare th:not(:first-child) { text-align: center; width: 18%; }
.compare tr:last-child td { border-bottom: 0; }
.compare .yes { color: var(--success); font-weight: 700; }
.compare .no { color: var(--border-2); }

/* ---------- testimonials ---------- */
.reviews { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.review { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; display: flex; flex-direction: column; }
.review .stars { color: var(--accent); letter-spacing: 2px; margin-bottom: 10px; font-size: 15px; }
.review p { font-size: 14.5px; color: var(--text-2); flex: 1; }
.review .who { display: flex; align-items: center; gap: 10px; }
.review .who b { display: block; font-size: 14px; }
.review .who small { color: var(--muted); font-size: 12.5px; }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: 10px; max-width: 860px; }
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.faq summary { list-style: none; cursor: pointer; padding: 18px 22px; font-weight: 650; font-size: 16px; display: flex; justify-content: space-between; gap: 16px; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; width: 10px; height: 10px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform .2s; flex: none; margin-top: -4px; }
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: 4px; }
.faq details p { padding: 0 22px 20px; margin: 0; color: var(--text-2); }

/* ---------- CTA ---------- */
.cta { border-radius: 24px; padding: 48px; color: #fff; background: radial-gradient(600px 300px at 90% 0%, rgba(255, 255, 255, .18), transparent 60%), linear-gradient(120deg, #3a57f2, #6a3df0); display: flex; align-items: center; justify-content: space-between; gap: 32px; }
.cta h2 { font-size: 32px; font-weight: 800; margin-bottom: 8px; }
.cta p { margin: 0; opacity: .88; font-size: 17px; }

/* ---------- footer ---------- */
.ftr { background: #0d1326; color: #a9b1c7; padding: 56px 0 28px; margin-top: 64px; font-size: 14px; }
.ftr a { color: #a9b1c7; }
.ftr a:hover { color: #fff; }
.ftr-top { display: grid; grid-template-columns: 1.6fr repeat(4, 1fr); gap: 32px; }
.ftr .logo { color: #fff; margin-bottom: 14px; }
.ftr .about { max-width: 320px; line-height: 1.6; }
.ftr h4 { color: #fff; font-size: 14px; margin-bottom: 14px; }
.ftr ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.ftr-bottom { border-top: 1px solid rgba(255, 255, 255, .08); margin-top: 40px; padding-top: 22px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 13px; color: #737c95; }
.ftr .age { display: inline-grid; place-items: center; border: 1px solid #3a4360; border-radius: 6px; padding: 1px 6px; font-size: 12px; margin-right: 10px; }

/* ---------- page header, breadcrumbs, pagination ---------- */
.page-hero { background: var(--surface); border-bottom: 1px solid var(--border); padding: 36px 0 30px; }
.page-hero h1 { font-size: 38px; font-weight: 850; letter-spacing: -.03em; margin-bottom: 8px; }
.page-hero p { color: var(--text-2); font-size: 16.5px; max-width: 760px; margin: 0; }
.page-hero .meta-row { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 16px; color: var(--muted); font-size: 14px; }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 13.5px; color: var(--muted); margin-bottom: 14px; }
.crumbs a { color: var(--text-2); }
.crumbs a:hover { color: var(--primary); }
.crumbs span.sep { color: var(--border-2); }
.cat-hero { color: #fff; border: 0; position: relative; overflow: hidden; }
.cat-hero .crumbs, .cat-hero .crumbs a { color: rgba(255, 255, 255, .78); }
.cat-hero .crumbs span.sep { color: rgba(255, 255, 255, .4); }
.cat-hero p, .cat-hero .meta-row { color: rgba(255, 255, 255, .86); }
.cat-hero .glyph { position: absolute; right: 4%; bottom: -40px; font-size: 220px; font-weight: 700; opacity: .14; font-family: Georgia, serif; line-height: 1; pointer-events: none; white-space: nowrap; }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.toolbar .found { color: var(--text-2); font-size: 14.5px; }
.select { height: 38px; padding: 0 34px 0 12px; border: 1px solid var(--border-2); border-radius: 10px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%238590a6' stroke-width='1.8' fill='none'/%3E%3C/svg%3E") no-repeat right 12px center; appearance: none; font-size: 14px; cursor: pointer; }
.pager { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; margin-top: 44px; }
.pager a, .pager span { min-width: 40px; height: 40px; padding: 0 12px; border-radius: 10px; display: inline-grid; place-items: center; font-weight: 600; font-size: 14px; color: var(--text-2); background: var(--surface); border: 1px solid var(--border); }
.pager a:hover { border-color: var(--border-2); color: var(--text); }
.pager .is-current { background: var(--text); color: #fff; border-color: var(--text); }
.pager .gap { border: 0; background: none; }

/* ---------- lecture page ---------- */
.lec-wrap { padding: 24px 0 0; }
.lec-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 32px; align-items: start; }
.player { position: relative; aspect-ratio: 16/9; background: #05070f; border-radius: 16px; overflow: hidden; color: #fff; user-select: none; }
.player .poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity .3s, filter .3s; }
.player::after { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 60%, rgba(0, 0, 0, .55)); pointer-events: none; }
.player .big-play { position: absolute; z-index: 3; inset: 0; margin: auto; width: 84px; height: 84px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .95); color: var(--primary); display: grid; place-items: center; cursor: pointer; box-shadow: 0 14px 40px rgba(0, 0, 0, .35); transition: transform .15s; }
.player .big-play:hover { transform: scale(1.06); }
.player .big-play svg { width: 32px; height: 32px; margin-left: 5px; }
.player .controls { position: absolute; z-index: 3; left: 0; right: 0; bottom: 0; padding: 0 14px 10px; }
.player .scrub { height: 4px; background: rgba(255, 255, 255, .28); border-radius: 2px; margin-bottom: 8px; position: relative; }
.player .scrub i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: var(--accent); border-radius: 2px; }
.player .scrub b { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: rgba(255, 255, 255, .4); border-radius: 2px; }
.player .crow { display: flex; align-items: center; gap: 6px; font-size: 13.5px; }
.player .crow button { width: 36px; height: 36px; border: 0; background: none; color: #fff; display: grid; place-items: center; border-radius: 8px; cursor: pointer; opacity: .92; }
.player .crow button:hover { background: rgba(255, 255, 255, .12); opacity: 1; }
.player .crow svg { width: 20px; height: 20px; }
.player .crow .time { font-variant-numeric: tabular-nums; margin-left: 4px; opacity: .92; }
.player .crow .spacer { flex: 1; }
.player .crow .q { width: auto; padding: 0 8px; font-size: 12.5px; font-weight: 700; }
.player .wm { position: absolute; z-index: 2; top: 14px; right: 16px; font-size: 13px; font-weight: 600; opacity: .7; display: flex; align-items: center; gap: 6px; }
.player .wm svg { width: 18px; height: 18px; }
.player .state { position: absolute; z-index: 4; inset: 0; display: none; place-items: center; text-align: center; padding: 24px; background: rgba(5, 7, 15, .72); }
.player .spinner { width: 54px; height: 54px; border-radius: 50%; border: 4px solid rgba(255, 255, 255, .2); border-top-color: #fff; animation: spin .9s linear infinite; }
.player.is-loading .big-play, .player.is-error .big-play { display: none; }
.player.is-loading .state-loading { display: grid; }
.player.is-loading .poster { filter: blur(2px) brightness(.6); }
.player.is-error .state-error { display: grid; }
.player.is-error .poster { filter: blur(6px) brightness(.35); }
.player .state-error h3 { font-size: 19px; margin: 12px 0 6px; }
.player .state-error p { opacity: .78; font-size: 14px; max-width: 420px; margin: 0 auto 16px; }
.player .state-error .code { font-family: ui-monospace, Menlo, Consolas, monospace; opacity: .5; font-size: 12px; margin-top: 12px; }
.player .state-error svg.ic { width: 44px; height: 44px; margin: 0 auto; opacity: .85; }

.lec-title { font-size: 26px; font-weight: 800; letter-spacing: -.02em; margin: 20px 0 10px; line-height: 1.25; }
.lec-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; color: var(--muted); font-size: 14px; }
.lec-meta .dot { width: 3px; height: 3px; background: var(--border-2); border-radius: 50%; }
.lec-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 22px; }
.lec-actions .btn.is-on { background: #fff0f1; border-color: #f6c6cb; color: var(--danger); }
.lec-actions .btn.is-on svg { fill: currentColor; }
.box { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; }
.box + .box { margin-top: 16px; }
.box h2, .box h3.h { font-size: 18px; font-weight: 750; margin-bottom: 14px; }
.lecturer-row { display: flex; align-items: center; gap: 14px; }
.lecturer-row .avatar { width: 52px; height: 52px; font-size: 18px; }
.lecturer-row b { display: block; font-size: 15.5px; }
.lecturer-row small { color: var(--muted); font-size: 13.5px; }
.lecturer-row .btn { margin-left: auto; }
.desc p { color: var(--text-2); }
.desc-meta { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 8px; padding-top: 16px; border-top: 1px solid var(--border); }
.desc-meta div small { display: block; color: var(--muted); font-size: 12.5px; }
.desc-meta div b { font-size: 14.5px; font-weight: 600; }
.toc { display: grid; gap: 2px; }
.toc a { display: flex; gap: 14px; align-items: baseline; padding: 9px 10px; border-radius: 9px; color: var(--text); font-size: 14.5px; }
.toc a:hover { background: var(--surface-2); color: var(--text); }
.toc code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--primary); font-size: 13px; min-width: 62px; }
.notes-locked { position: relative; border-radius: 12px; overflow: hidden; }
.notes-locked .blur { filter: blur(5px); color: var(--text-2); user-select: none; pointer-events: none; font-size: 14.5px; }
.notes-locked .over { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center; background: rgba(255, 255, 255, .55); }
.notes-locked .over b { font-size: 15.5px; }

.side-box { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.side-box + .side-box { margin-top: 18px; }
.side-head { padding: 16px 18px; border-bottom: 1px solid var(--border); }
.side-head b { display: block; font-size: 15.5px; }
.side-head small { color: var(--muted); font-size: 13px; }
.playlist { max-height: 520px; overflow: auto; padding: 6px; }
.pl-item { display: flex; gap: 12px; padding: 8px; border-radius: 10px; color: var(--text); align-items: center; }
.pl-item:hover { background: var(--surface-2); color: var(--text); }
.pl-item.is-current { background: var(--primary-soft); }
.pl-item .n { width: 22px; text-align: center; color: var(--muted); font-size: 13px; flex: none; }
.pl-item .thumb { width: 112px; flex: none; border-radius: 8px; }
.pl-item .thumb .dur { font-size: 11px; right: 4px; bottom: 4px; padding: 1px 4px; }
.pl-item .t { font-size: 13.5px; font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pl-item small { color: var(--muted); font-size: 12.5px; }
.rel-list { padding: 6px; }
.rel-list .pl-item .thumb { width: 150px; }

.comments-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.c-form { display: flex; gap: 12px; margin-bottom: 22px; }
.c-form textarea { flex: 1; min-height: 46px; height: 46px; resize: vertical; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--border-2); outline: none; }
.c-form textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(58, 87, 242, .12); }
.comment { display: flex; gap: 12px; padding: 14px 0; border-top: 1px solid var(--border); }
.comment .avatar { width: 38px; height: 38px; font-size: 13px; }
.comment .head { font-size: 13.5px; margin-bottom: 2px; }
.comment .head b { margin-right: 8px; }
.comment .head small { color: var(--muted); }
.comment p { margin: 0 0 6px; font-size: 14.5px; }
.comment .acts { display: flex; gap: 14px; font-size: 13px; color: var(--muted); }
.comment .acts button { border: 0; background: none; padding: 0; color: inherit; cursor: pointer; display: inline-flex; gap: 5px; align-items: center; }
.comment .acts button:hover { color: var(--text); }
.comment .acts svg { width: 15px; height: 15px; }

/* ---------- lecturer / course hero ---------- */
.prof-hero { display: flex; gap: 28px; align-items: center; }
.course-hero { display: grid; grid-template-columns: 1fr 420px; gap: 40px; align-items: center; }
.course-hero .thumb { border-radius: 16px; box-shadow: var(--shadow); }
.course-list { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.course-list a { display: grid; grid-template-columns: 40px 140px 1fr auto; gap: 16px; align-items: center; padding: 12px 18px; color: var(--text); border-bottom: 1px solid var(--border); }
.course-list a:last-child { border-bottom: 0; }
.course-list a:hover { background: var(--surface-2); color: var(--text); }
.course-list .n { color: var(--muted); font-weight: 600; text-align: center; }
.course-list .thumb { border-radius: 8px; }
.course-list .t b { display: block; font-size: 15px; }
.course-list .t small { color: var(--muted); font-size: 13px; }
.course-list .r { color: var(--muted); font-size: 13.5px; display: flex; align-items: center; gap: 10px; white-space: nowrap; }

/* ---------- prose ---------- */
.prose { max-width: 820px; font-size: 16px; }
.prose h2 { font-size: 22px; margin: 34px 0 12px; }
.prose p, .prose li { color: #2c3648; }
.prose ul, .prose ol { padding-left: 22px; margin: 0 0 1em; }
.prose li { margin-bottom: 6px; }
.prose .lead { font-size: 19px; color: var(--text); }

/* ---------- forms ---------- */
.field { margin-bottom: 16px; }
.label { display: block; font-size: 13.5px; font-weight: 600; margin-bottom: 6px; color: var(--text); }
.input { width: 100%; height: 46px; padding: 0 14px; border-radius: 11px; border: 1px solid var(--border-2); background: #fff; outline: none; font-size: 15px; transition: border-color .15s, box-shadow .15s; }
textarea.input { height: auto; min-height: 96px; padding: 12px 14px; resize: vertical; }
select.input { appearance: none; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%238590a6' stroke-width='1.8' fill='none'/%3E%3C/svg%3E") no-repeat right 14px center; padding-right: 36px; cursor: pointer; }
.input:focus { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(58, 87, 242, .12); }
.input[disabled] { background: var(--surface-2); color: var(--muted); }
.field.has-error .input { border-color: var(--danger); box-shadow: 0 0 0 4px rgba(220, 53, 69, .1); }
.field .err { display: none; color: var(--danger); font-size: 13px; margin-top: 6px; }
.field.has-error .err { display: block; }
.hint { color: var(--muted); font-size: 13px; margin-top: 6px; }
.pass-wrap { position: relative; }
.pass-wrap .input { padding-right: 48px; }
.pass-wrap .eye { position: absolute; right: 4px; top: 3px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--text-2); cursor: pointer; }
.check input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--primary); flex: none; }
.form-alert { display: none; padding: 12px 14px; border-radius: 10px; font-size: 14px; margin-bottom: 16px; }
.form-alert.is-error { display: block; background: var(--danger-soft); color: #a51d2b; }
.form-alert.is-ok { display: block; background: var(--success-soft); color: var(--success); }
.switch { position: relative; width: 44px; height: 26px; flex: none; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: var(--border-2); transition: .2s; }
.switch span::after { content: ""; position: absolute; left: 3px; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); transition: .2s; }
.switch input:checked + span { background: var(--primary); }
.switch input:checked + span::after { transform: translateX(18px); }
.switch input:focus-visible + span { box-shadow: 0 0 0 4px rgba(58, 87, 242, .2); }

/* ---------- auth ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; background: var(--surface); }
.auth-side { position: relative; overflow: hidden; color: #fff; padding: 40px 56px; display: flex; flex-direction: column; justify-content: space-between; background: radial-gradient(700px 400px at 100% 0%, rgba(255, 255, 255, .16), transparent 60%), linear-gradient(150deg, #3a57f2 0%, #5a3df0 60%, #3b1fa8 100%); }
.auth-side .logo { color: #fff; }
.auth-side .logo svg rect:first-child { fill: #fff; }
.auth-side .logo svg path { fill: #3a57f2; }
.auth-side h2 { font-size: 38px; font-weight: 850; line-height: 1.1; letter-spacing: -.03em; margin-bottom: 16px; max-width: 480px; }
.auth-side p { opacity: .85; font-size: 17px; max-width: 460px; }
.auth-side .bg-tri { position: absolute; right: -120px; bottom: -80px; width: 520px; opacity: .1; }
.auth-thumbs { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; max-width: 480px; margin-top: 28px; }
.auth-thumbs img { border-radius: 10px; box-shadow: 0 10px 30px rgba(0, 0, 0, .25); }
.auth-side .quote { font-size: 14.5px; opacity: .8; }
.auth-main { display: flex; align-items: center; justify-content: center; padding: 40px 24px; }
.auth-card { width: 100%; max-width: 420px; }
.auth-card h1 { font-size: 30px; font-weight: 850; letter-spacing: -.025em; margin-bottom: 8px; }
.auth-card .sub { color: var(--text-2); margin-bottom: 26px; }
.tabs { display: flex; gap: 4px; padding: 4px; background: var(--surface-2); border-radius: 12px; margin-bottom: 26px; }
.tabs a, .tabs button { flex: 1; text-align: center; padding: 9px; border-radius: 9px; font-weight: 600; font-size: 14.5px; color: var(--text-2); border: 0; background: none; cursor: pointer; }
.tabs .is-active { background: #fff; color: var(--text); box-shadow: var(--shadow-sm); }
.auth-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; font-size: 14px; }
.auth-foot { margin-top: 22px; font-size: 13px; color: var(--muted); text-align: center; }
.mobile-logo { display: none; margin-bottom: 28px; }

/* ---------- account ---------- */
.acc { padding: 32px 0 0; }
.acc-layout { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 28px; align-items: start; }
.acc-side { position: sticky; top: 92px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px; }
.acc-user { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 8px 0 18px; border-bottom: 1px solid var(--border); margin-bottom: 12px; }
.acc-user .avatar { margin-bottom: 12px; }
.acc-user b { display: block; font-size: 16.5px; }
.acc-user small { display: block; color: var(--muted); font-size: 13px; margin: 2px 0 10px; word-break: break-all; }
.acc-nav { display: grid; gap: 2px; }
.acc-nav a, .acc-nav button { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: var(--text-2); font-weight: 550; font-size: 14.5px; border: 0; background: none; cursor: pointer; width: 100%; text-align: left; }
.acc-nav a:hover, .acc-nav button:hover { background: var(--surface-2); color: var(--text); }
.acc-nav a.is-active { background: var(--primary-soft); color: var(--primary); }
.acc-nav svg { width: 19px; height: 19px; flex: none; }
.acc-nav .cnt { margin-left: auto; font-size: 12px; color: var(--muted); font-weight: 600; }
.acc-main { min-width: 0; }
.acc-main > section { display: none; }
.acc-main > section.is-active { display: block; animation: fade .2s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.acc-title { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.acc-title h1 { font-size: 28px; font-weight: 850; letter-spacing: -.025em; }
.acc-title p { margin: 4px 0 0; color: var(--text-2); }
.acc-block { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px; margin-bottom: 20px; }
.acc-block > h2 { font-size: 18px; font-weight: 750; margin-bottom: 4px; }
.acc-block > .bsub { color: var(--muted); font-size: 14px; margin-bottom: 18px; }
.acc-block-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 18px; }
.acc-block-head h2 { font-size: 18px; font-weight: 750; }
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 20px; }
.tile { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; }
.tile small { display: block; color: var(--text-2); font-size: 13.5px; margin-bottom: 6px; }
.tile b { font-size: 30px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.tile .unit { font-size: 15px; font-weight: 600; color: var(--muted); margin-left: 4px; }
.tile .delta { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.trial-banner { display: flex; align-items: center; gap: 18px; padding: 18px 22px; border-radius: var(--radius-lg); margin-bottom: 20px; background: linear-gradient(110deg, #fff7e3, #fff0f5); border: 1px solid #fde3b0; }
.trial-banner .ic { width: 44px; height: 44px; border-radius: 12px; background: #fff; display: grid; place-items: center; color: #c47a00; flex: none; }
.trial-banner .ic svg { width: 22px; height: 22px; }
.trial-banner b { display: block; font-size: 15.5px; }
.trial-banner span { color: var(--text-2); font-size: 14px; }
.trial-banner .btn { margin-left: auto; }
.cont-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.cont-grid .lcard-title { font-size: 14.5px; }
.chart-wrap { position: relative; }
.chart { display: flex; align-items: flex-end; gap: 2px; height: 180px; padding-top: 8px; border-bottom: 1px solid var(--border-2); position: relative; }
.chart .gl { position: absolute; left: 0; right: 0; border-top: 1px dashed var(--border); pointer-events: none; }
.chart .gl span { position: absolute; right: 0; top: -18px; font-size: 11.5px; color: var(--muted); background: var(--surface); padding-left: 4px; }
.chart .col { flex: 1; height: 100%; display: flex; align-items: flex-end; justify-content: center; cursor: default; position: relative; }
.chart .bar { width: 58%; max-width: 46px; background: var(--primary); border-radius: 4px 4px 0 0; min-height: 0; transition: background .15s; }
.chart .col.is-today .bar { background: #6a3df0; }
.chart .col:hover .bar { background: var(--primary-hover); }
.chart .col.zero .bar { height: 2px !important; background: var(--border-2); border-radius: 2px; }
.chart-x { display: flex; gap: 2px; margin-top: 8px; }
.chart-x span { flex: 1; text-align: center; font-size: 12.5px; color: var(--muted); }
.chart-x span.is-today { color: var(--text); font-weight: 600; }
.chart-tip { position: absolute; z-index: 5; pointer-events: none; background: var(--text); color: #fff; font-size: 12.5px; padding: 6px 10px; border-radius: 8px; white-space: nowrap; transform: translate(-50%, -100%); margin-top: -10px; opacity: 0; transition: opacity .1s; }
.chart-tip b { font-weight: 700; }
.chart-tip.is-on { opacity: 1; }
.chart-sum { display: flex; gap: 28px; margin-bottom: 14px; flex-wrap: wrap; }
.chart-sum div small { display: block; color: var(--muted); font-size: 13px; }
.chart-sum div b { font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.hist { display: grid; }
.hist-row { display: grid; grid-template-columns: 168px minmax(0, 1fr) auto; gap: 18px; align-items: center; padding: 14px 0; border-top: 1px solid var(--border); }
.hist-row:first-child { border-top: 0; padding-top: 0; }
.hist-row .thumb { border-radius: 10px; }
.hist-row .t { font-weight: 650; color: var(--text); display: block; margin-bottom: 4px; line-height: 1.35; }
.hist-row .t:hover { color: var(--primary); }
.hist-row small { color: var(--muted); font-size: 13px; display: block; }
.progress { height: 6px; border-radius: 999px; background: var(--surface-3); overflow: hidden; margin-top: 10px; max-width: 320px; }
.progress i { display: block; height: 100%; background: var(--primary); border-radius: 999px; }
.progress.done i { background: var(--success); }
.hist-day { font-size: 13px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin: 22px 0 6px; }
.hist-day:first-child { margin-top: 0; }
.empty { text-align: center; padding: 48px 20px; }
.empty .ic { width: 64px; height: 64px; border-radius: 18px; background: var(--surface-2); display: grid; place-items: center; margin: 0 auto 16px; color: var(--muted); }
.empty .ic svg { width: 30px; height: 30px; }
.empty h3 { font-size: 18px; margin-bottom: 6px; }
.empty p { color: var(--text-2); max-width: 380px; margin: 0 auto 18px; }
.plan-card { display: grid; grid-template-columns: 1fr auto; gap: 20px; align-items: center; padding: 24px; border-radius: var(--radius-lg); color: #fff; background: radial-gradient(500px 200px at 100% 0%, rgba(255, 255, 255, .18), transparent 60%), linear-gradient(120deg, #3a57f2, #6a3df0); margin-bottom: 20px; }
.plan-card small { opacity: .8; font-size: 13.5px; }
.plan-card h2 { font-size: 26px; font-weight: 850; margin: 4px 0 6px; display: flex; align-items: center; gap: 10px; }
.plan-card p { margin: 0; opacity: .9; }
.plan-card .price { text-align: right; }
.plan-card .price b { font-size: 30px; font-weight: 850; }
.kv { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.kv div { background: var(--surface-2); border-radius: 12px; padding: 14px 16px; }
.kv small { display: block; color: var(--muted); font-size: 13px; margin-bottom: 3px; }
.kv b { font-size: 15px; font-weight: 650; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.set-row { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 14px 0; border-top: 1px solid var(--border); }
.set-row:first-of-type { border-top: 0; }
.set-row b { display: block; font-size: 15px; font-weight: 600; }
.set-row small { color: var(--muted); font-size: 13.5px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.table th { text-align: left; font-size: 12.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 650; padding: 0 12px 10px; border-bottom: 1px solid var(--border); }
.table td { padding: 14px 12px; border-bottom: 1px solid var(--border); }
.table tr:last-child td { border-bottom: 0; }
.table td:first-child, .table th:first-child { padding-left: 0; }
.table td:last-child, .table th:last-child { padding-right: 0; text-align: right; }
.table .num { font-variant-numeric: tabular-nums; }
.sess { display: flex; align-items: center; gap: 16px; padding: 14px 0; border-top: 1px solid var(--border); }
.sess:first-child { border-top: 0; padding-top: 0; }
.sess .ic { width: 44px; height: 44px; border-radius: 12px; background: var(--surface-2); display: grid; place-items: center; color: var(--text-2); flex: none; }
.sess .ic svg { width: 22px; height: 22px; }
.sess b { display: block; font-size: 15px; }
.sess small { color: var(--muted); font-size: 13px; }
.sess .btn, .sess .badge { margin-left: auto; }
.danger-zone { border-color: #f6cdd2; }
.acc-skel { height: 420px; border-radius: var(--radius-lg); background: linear-gradient(90deg, var(--surface) 0, var(--surface-2) 40%, var(--surface) 80%); background-size: 200% 100%; animation: sk 1.2s infinite; }
@keyframes sk { to { background-position: -200% 0; } }

/* ---------- modal, toast, cookie ---------- */
.modal-bg { position: fixed; inset: 0; z-index: 200; background: rgba(10, 14, 30, .5); backdrop-filter: blur(3px); display: grid; place-items: center; padding: 20px; opacity: 0; transition: opacity .15s; }
.modal-bg.is-open { opacity: 1; }
.modal { width: 100%; max-width: 440px; background: #fff; border-radius: 20px; padding: 28px; box-shadow: var(--shadow-lg); position: relative; transform: translateY(8px) scale(.98); transition: transform .15s; }
.modal-bg.is-open .modal { transform: none; }
.modal .x { position: absolute; right: 12px; top: 12px; }
.modal .m-ic { width: 52px; height: 52px; border-radius: 14px; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; margin-bottom: 16px; }
.modal .m-ic svg { width: 26px; height: 26px; }
.modal .m-ic.warn { background: var(--danger-soft); color: var(--danger); }
.modal .m-ic.pro { background: var(--accent-soft); color: #c47a00; }
.modal h3 { font-size: 21px; font-weight: 800; margin-bottom: 8px; }
.modal p { color: var(--text-2); margin-bottom: 22px; }
.modal .m-acts { display: flex; gap: 10px; }
.modal .m-acts .btn { flex: 1; }
.toasts { position: fixed; z-index: 300; left: 50%; bottom: 24px; transform: translateX(-50%); display: grid; gap: 8px; justify-items: center; pointer-events: none; }
.toast { background: var(--text); color: #fff; padding: 12px 18px; border-radius: 12px; font-size: 14.5px; box-shadow: var(--shadow-lg); display: flex; align-items: center; gap: 10px; animation: toast .2s ease; }
.toast svg { width: 18px; height: 18px; color: #4ade80; }
.toast.is-error svg { color: #f87171; }
@keyframes toast { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.cookie { position: fixed; z-index: 150; left: 24px; bottom: 24px; max-width: 420px; background: #fff; border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow-lg); padding: 18px 20px; display: flex; gap: 16px; align-items: center; font-size: 13.5px; color: var(--text-2); }
.cookie p { margin: 0; }

/* ---------- search ---------- */
.search-big { display: flex; gap: 10px; max-width: 760px; margin-top: 18px; }
.search-big .input { height: 52px; font-size: 16px; border-radius: 13px; }
.res-list { display: grid; gap: 4px; }
.res { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 20px; padding: 12px; border-radius: 14px; color: var(--text); }
.res:hover { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.res h3 { font-size: 17px; font-weight: 700; margin: 2px 0 6px; line-height: 1.3; }
.res mark { background: #ffe9a8; color: inherit; border-radius: 3px; padding: 0 1px; }
.res .snip { color: var(--text-2); font-size: 14px; margin-top: 8px; }

/* ---------- 404 ---------- */
.nf { text-align: center; padding: 100px 0 60px; }
.nf .big { font-size: 140px; font-weight: 900; letter-spacing: -.06em; line-height: 1; background: linear-gradient(120deg, #3a57f2, #6a3df0); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nf h1 { font-size: 28px; margin: 10px 0; }
.nf p { color: var(--text-2); margin-bottom: 26px; }

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .cat-grid { grid-template-columns: repeat(4, 1fr); }
  .hdr-nav a { padding: 8px 9px; }
  .lec-layout { grid-template-columns: minmax(0, 1fr) 330px; }
  .reviews { grid-template-columns: repeat(2, 1fr); }
  .ftr-top { grid-template-columns: 1fr 1fr 1fr; }
  .ftr-top > :first-child { grid-column: 1 / -1; }
}
@media (max-width: 1020px) {
  .hdr-nav { display: none; position: absolute; left: 0; right: 0; top: 68px; background: #fff; border-bottom: 1px solid var(--border); flex-direction: column; padding: 10px 16px 16px; box-shadow: var(--shadow); }
  .hdr.nav-open .hdr-nav { display: flex; }
  .hdr-nav a { padding: 12px; font-size: 16px; }
  .burger { display: inline-grid; }
  .hero-in { grid-template-columns: 1fr; }
  .hero-visual { max-width: 560px; }
  .grid-cards { grid-template-columns: repeat(3, 1fr); }
  .lec-layout { grid-template-columns: 1fr; }
  .steps, .plans { grid-template-columns: 1fr; max-width: 560px; }
  .grid-people { grid-template-columns: repeat(2, 1fr); }
  .acc-layout { grid-template-columns: 1fr; }
  .acc-side { position: static; }
  .acc-user { flex-direction: row; text-align: left; gap: 14px; }
  .acc-user .avatar { margin: 0; width: 56px; height: 56px; font-size: 19px; }
  .acc-user small { margin-bottom: 6px; }
  .acc-nav { grid-auto-flow: column; overflow-x: auto; }
  .acc-nav a, .acc-nav button { white-space: nowrap; }
  .acc-nav .cnt { margin-left: 4px; }
  .tiles, .cont-grid { grid-template-columns: repeat(2, 1fr); }
  .auth { grid-template-columns: 1fr; }
  .auth-side { display: none; }
  .mobile-logo { display: inline-flex; }
  .course-hero { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  body { font-size: 14.5px; }
  .container { padding: 0 16px; }
  .hdr-in { gap: 10px; height: 60px; }
  .hdr-nav { top: 60px; }
  .logo { font-size: 18px; }
  .logo svg { width: 30px; height: 30px; }
  .hdr-search { display: none; }
  .hdr-actions { margin-left: auto; }
  .hdr-actions .btn-primary { display: none; }
  .user-btn .uname { display: none; }
  .hero { padding: 40px 0 48px; }
  .hero h1 { font-size: 36px; }
  .hero .sub { font-size: 16px; }
  .hero-stats { gap: 20px; flex-wrap: wrap; }
  .hero-stats b { font-size: 22px; }
  .float-1, .float-2 { display: none; }
  .section { padding: 44px 0; }
  .section-head h2 { font-size: 24px; }
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .grid-cards, .grid-cards.cols-3 { grid-template-columns: 1fr; }
  .grid-people { grid-template-columns: 1fr; }
  .reviews { grid-template-columns: 1fr; }
  .cta { flex-direction: column; align-items: flex-start; padding: 32px 24px; }
  .cta h2 { font-size: 24px; }
  .ftr-top { grid-template-columns: 1fr 1fr; }
  .page-hero h1 { font-size: 28px; }
  .lec-title { font-size: 21px; }
  .player { border-radius: 0; margin: 0 -16px; }
  .lec-wrap { padding-top: 0; }
  .desc-meta { grid-template-columns: 1fr 1fr; }
  .course-list a { grid-template-columns: 28px 96px 1fr; }
  .course-list .r { display: none; }
  .prof-hero { flex-direction: column; align-items: flex-start; }
  .tiles { gap: 10px; }
  .tile b { font-size: 24px; }
  .cont-grid { grid-template-columns: 1fr; }
  .hist-row { grid-template-columns: 112px minmax(0, 1fr); }
  .hist-row > :last-child { grid-column: 2; justify-self: start; }
  .kv, .form-grid { grid-template-columns: 1fr; }
  .plan-card { grid-template-columns: 1fr; }
  .plan-card .price { text-align: left; }
  .trial-banner { flex-wrap: wrap; }
  .trial-banner .btn { margin-left: 0; }
  .res { grid-template-columns: 1fr; }
  .compare th, .compare td { padding: 10px; font-size: 13px; }
  .cookie { left: 12px; right: 12px; bottom: 12px; max-width: none; flex-direction: column; align-items: stretch; }
  .table .hide-m { display: none; }
}
