:root {
  color-scheme: light;
  --bg: #f4f6fb;
  --surface: rgba(255, 255, 255, 0.92);
  --surface-solid: #ffffff;
  --surface-soft: #f8fafc;
  --ink: #111827;
  --muted: #64748b;
  --line: rgba(226, 232, 240, 0.92);
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --accent: #f97316;
  --nav: rgba(255, 255, 255, 0.82);
  --ticker: #0f172a;
  --glass: rgba(255, 255, 255, 0.72);
  --shadow-sm: 0 12px 34px rgba(15, 23, 42, 0.08);
  --shadow-md: 0 22px 60px rgba(15, 23, 42, 0.14);
  --shadow-lg: 0 34px 110px rgba(15, 23, 42, 0.22);
  --radius: 22px;
}

body.dark {
  color-scheme: dark;
  --bg: #020617;
  --surface: rgba(15, 23, 42, 0.82);
  --surface-solid: #0f172a;
  --surface-soft: #111827;
  --ink: #f8fafc;
  --muted: #94a3b8;
  --line: rgba(99, 102, 241, 0.18);
  --primary: #6366f1;
  --primary-dark: #818cf8;
  --accent: #f97316;
  --nav: rgba(2, 6, 23, 0.76);
  --ticker: #090f22;
  --glass: rgba(15, 23, 42, 0.66);
  --shadow-sm: 0 12px 34px rgba(0, 0, 0, 0.22);
  --shadow-md: 0 24px 70px rgba(0, 0, 0, 0.34);
  --shadow-lg: 0 36px 120px rgba(0, 0, 0, 0.52);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.13), transparent 30rem),
    radial-gradient(circle at 92% 2%, rgba(249, 115, 22, 0.10), transparent 24rem),
    radial-gradient(circle at 50% 105%, rgba(99, 102, 241, 0.11), transparent 28rem),
    var(--bg);
  transition: background 260ms ease, color 260ms ease;
}
body.dark {
  background:
    radial-gradient(circle at 12% -4%, rgba(99, 102, 241, 0.24), transparent 28rem),
    radial-gradient(circle at 92% 4%, rgba(124, 58, 237, 0.18), transparent 25rem),
    radial-gradient(circle at 50% 110%, rgba(37, 99, 235, 0.18), transparent 30rem),
    var(--bg);
}
button, input, textarea { font: inherit; }
button { cursor: pointer; }
img { display: block; max-width: 100%; }

.grain {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 0;
  opacity: 0.18;
  background-image: linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(to bottom, black, transparent 70%);
}
#app { position: relative; z-index: 1; min-height: 100vh; display: flex; flex-direction: column; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-areas: "brand crumbs actions";
  gap: 1rem;
  align-items: center;
  padding: 0.9rem clamp(1rem, 4vw, 3.5rem);
  border-bottom: 1px solid var(--line);
  background: var(--nav);
  backdrop-filter: blur(22px) saturate(150%);
}
.brand, .crumbs button, .section-title button, .nav-icon, .theme-toggle, .nav-pill {
  border: 0;
  background: transparent;
  color: inherit;
}
.brand { grid-area: brand; display: inline-flex; align-items: center; gap: 0.75rem; text-align: left; }
.brand-mark {
  display: grid; place-items: center; flex: 0 0 auto;
  width: 2.55rem; height: 2.55rem; border-radius: 15px;
  background: linear-gradient(135deg, #111827, #334155);
  color: white; font-size: 0.96rem; font-weight: 900; letter-spacing: -0.04em;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.18);
}
body.dark .brand-mark { background: linear-gradient(135deg, #4f46e5, #0f172a); box-shadow: 0 12px 34px rgba(99, 102, 241, 0.22); }
.brand strong { display: block; font-size: 0.94rem; font-weight: 850; letter-spacing: -0.025em; }
.brand small { display: block; margin-top: 0.08rem; color: var(--muted); font-size: 0.62rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.13em; }

.crumbs { grid-area: crumbs; display: flex; gap: 0.35rem; align-items: center; min-width: 0; justify-content: flex-end; color: var(--muted); font-size: 0.8rem; font-weight: 700; }
.crumbs button { overflow: hidden; max-width: 22ch; padding: 0.42rem 0.58rem; border-radius: 999px; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; transition: background 160ms ease, color 160ms ease; }
.crumbs button:not(:disabled):hover { background: rgba(99, 102, 241, 0.10); color: var(--primary-dark); }
.crumbs button:disabled { color: var(--ink); cursor: default; }
.nav-actions { grid-area: actions; display: inline-flex; justify-content: flex-end; align-items: center; gap: 0.45rem; }
.nav-icon, .theme-toggle, .nav-pill {
  display: inline-grid; place-items: center;
  width: 2.35rem; height: 2.35rem; border: 1px solid var(--line); border-radius: 999px;
  background: var(--glass); color: var(--ink); text-decoration: none;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}
.nav-icon:hover, .theme-toggle:hover, .nav-pill:hover { transform: translateY(-2px); border-color: rgba(99, 102, 241, 0.42); }

.nav-pill {
  display: inline-flex; align-items: center; justify-content: center;
  width: auto; min-width: 0; height: 2.35rem; padding: 0 .9rem;
  font-size: .72rem; font-weight: 850; white-space: nowrap;
}
.hero-tools { display: grid; gap: .75rem; }
.saved-shortcut {
  width: 100%; border: 1px solid var(--line); border-radius: 18px; padding: .78rem .95rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  background: linear-gradient(135deg, rgba(37,99,235,.12), rgba(99,102,241,.08)); color: var(--ink);
  font-size: .86rem; font-weight: 850; box-shadow: 0 10px 24px rgba(15,23,42,.06);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}
.saved-shortcut:hover { transform: translateY(-2px); border-color: rgba(99,102,241,.38); box-shadow: var(--shadow-sm); }
.saved-shortcut span { display: grid; place-items: center; min-width: 1.6rem; height: 1.6rem; border-radius: 999px; background: var(--primary); color: #fff; font-size: .74rem; }

.nav-icon svg { width: 1.05rem; height: 1.05rem; }
.theme-toggle span { font-size: 1.02rem; line-height: 1; }

.ticker { overflow: hidden; border-bottom: 1px solid var(--line); background: var(--ticker); color: white; }
.ticker-track { display: flex; width: max-content; animation: ticker 28s linear infinite; }
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker span { display: inline-flex; align-items: center; gap: 0.7rem; padding: 0.62rem 1.15rem; font-size: 0.72rem; font-weight: 900; letter-spacing: 0.10em; white-space: nowrap; }
.ticker span::after { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }

.layout { flex: 1; padding: clamp(1rem, 4vw, 3.5rem); }
.workspace { width: min(1180px, 100%); margin: 0 auto; }
.eyebrow { display: inline-flex; align-items: center; color: var(--primary-dark); font-size: 0.72rem; font-weight: 900; letter-spacing: 0.16em; text-transform: uppercase; }

.hero {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(17rem, 25rem); gap: 1.2rem; align-items: end;
  margin-bottom: 1.35rem; padding: clamp(1.15rem, 3vw, 1.7rem); border: 1px solid var(--line); border-radius: 30px;
  background: linear-gradient(135deg, var(--surface), rgba(248,250,252,0.68));
  box-shadow: var(--shadow-sm); backdrop-filter: blur(18px);
}
body.dark .hero { background: linear-gradient(135deg, rgba(15,23,42,0.92), rgba(15,23,42,0.56)); }
.hero h1, .section-title h1 { margin: 0.35rem 0 0; max-width: 18ch; font-size: clamp(1.55rem, 3.4vw, 2.45rem); font-weight: 900; line-height: 1.03; letter-spacing: -0.058em; }
.hero p { max-width: 42rem; margin: 0.75rem 0 0; color: var(--muted); font-size: 0.92rem; line-height: 1.65; }
.search-box { display: flex; align-items: center; gap: 0.65rem; padding: 0.82rem 0.95rem; border: 1px solid var(--line); border-radius: 17px; background: var(--surface-solid); box-shadow: 0 12px 28px rgba(15, 23, 42, 0.07); transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease; }
.search-box:focus-within { border-color: rgba(99, 102, 241, 0.55); box-shadow: 0 18px 42px rgba(99, 102, 241, 0.14); }
.search-box span { color: var(--primary); font-size: 1.1rem; font-weight: 900; }
.search-box input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 0.92rem; font-weight: 650; }

.course-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.course-card, .subject-card, .topic-row, .video-card, .empty, .loader-wrap { border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow-sm); backdrop-filter: blur(16px); }
.course-card { overflow: hidden; display: grid; border-radius: var(--radius); transition: transform 200ms ease, box-shadow 200ms ease, border-color 200ms ease, background 200ms ease; }
.course-card:hover, .video-card:hover, .subject-card:hover { transform: translateY(-5px); border-color: rgba(99, 102, 241, 0.38); box-shadow: var(--shadow-md); }
.course-card:active, .video-card:active, .subject-card:active, .topic-row:active { transform: translateY(-1px) scale(.995); }
.course-image { position: relative; display: grid; place-items: center; height: clamp(12rem, 19vw, 15rem); overflow: hidden; background: var(--surface-soft); border-bottom: 1px solid var(--line); }
.course-image::after, .video-thumb::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(to bottom, transparent 70%, rgba(15,23,42,.05)); }
.course-image img { width: 100%; height: 100%; object-fit: contain; padding: 0; transition: transform 260ms ease, filter 260ms ease; }
.bookmark-btn { position: absolute; top: .8rem; right: .8rem; z-index: 2; width: 2.2rem; height: 2.2rem; border: 1px solid rgba(255,255,255,.42); border-radius: 999px; background: rgba(2,6,23,.58); color: white; display: grid; place-items: center; font-size: 1.15rem; line-height: 1; backdrop-filter: blur(14px); box-shadow: 0 12px 24px rgba(0,0,0,.18); transition: transform 170ms ease, background 170ms ease, border-color 170ms ease; }
.bookmark-btn:hover { transform: translateY(-1px) scale(1.06); background: rgba(37,99,235,.85); }
.bookmark-btn.saved { background: rgba(249,115,22,.94); border-color: rgba(255,255,255,.66); }
.course-card:hover .course-image img { transform: scale(1.018); filter: saturate(1.04); }
.course-body { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.9rem; align-items: end; padding: 1rem; margin-top: 0; }
.course-body h3 { margin: 0.42rem 0 0; min-height: 2.7em; font-size: 0.96rem; line-height: 1.35; font-weight: 850; letter-spacing: -0.024em; }
.chip { width: fit-content; padding: 0.26rem 0.5rem; border-radius: 999px; background: rgba(37, 99, 235, 0.10); color: var(--primary-dark); font-size: 0.64rem; font-weight: 900; text-transform: uppercase; letter-spacing: 0.08em; }
.course-body button, .topic-row button, .video-actions button, .modal-button { border: 0; border-radius: 999px; background: var(--primary); color: white; padding: 0.64rem 0.9rem; font-size: 0.82rem; font-weight: 850; white-space: nowrap; transition: background 160ms ease, transform 160ms ease, box-shadow 160ms ease; box-shadow: 0 10px 26px rgba(37, 99, 235, 0.20); }
.course-body button:hover, .topic-row button:hover, .video-actions button:hover, .modal-button:hover { background: var(--primary-dark); }

.section-title { display: flex; gap: 1rem; align-items: flex-start; margin-bottom: 1.2rem; }
.section-title > button { margin-top: 0.15rem; padding: 0.66rem 0.85rem; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); font-size: 0.86rem; font-weight: 850; box-shadow: var(--shadow-sm); transition: transform 180ms ease, border-color 180ms ease; }
.section-title > button:hover { transform: translateX(-2px); border-color: rgba(99, 102, 241, 0.36); }
.section-title h1 { max-width: 26ch; font-size: clamp(1.5rem, 3.5vw, 2.45rem); }
.subject-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.subject-card { display: grid; grid-template-columns: auto 1fr auto; gap: 0.9rem; align-items: center; padding: 0.85rem; border-radius: var(--radius); transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease; }
.subject-icon { width: 4rem; height: 4rem; display: grid; place-items: center; overflow: hidden; border-radius: 16px; background: var(--surface-soft); border: 1px solid var(--line); }
.subject-icon img { width: 100%; height: 100%; object-fit: contain; padding: 0.2rem; }
.book-icon { display: grid; place-items: center; width: 100%; height: 100%; color: #64748b; background: linear-gradient(135deg, rgba(99,102,241,.09), rgba(15,23,42,.04)); }
.book-icon svg { width: 2.15rem; height: 2.15rem; opacity: .88; }
body.dark .book-icon { color: #94a3b8; background: linear-gradient(135deg, rgba(99,102,241,.16), rgba(15,23,42,.72)); }
.subject-card h3, .topic-row h3, .video-info h3 { margin: 0; font-size: 1rem; line-height: 1.35; font-weight: 850; letter-spacing: -0.025em; }
.subject-card p, .topic-row p, .video-info p { margin: 0.22rem 0 0; color: var(--muted); font-size: 0.84rem; font-weight: 650; }
.arrow { color: var(--primary); font-size: 1.35rem; font-weight: 900; }
.topic-list { display: grid; gap: 0.75rem; max-width: 58rem; }
.topic-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 0.9rem; align-items: center; padding: 0.9rem; border-radius: var(--radius); transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease; }
.topic-row:hover { transform: translateX(4px); border-color: rgba(99, 102, 241, 0.36); box-shadow: var(--shadow-md); }
.topic-index { display: grid; place-items: center; width: 2.6rem; height: 2.6rem; border-radius: 14px; background: rgba(37, 99, 235, 0.10); color: var(--primary-dark); font-size: 0.84rem; font-weight: 900; }

.video-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.video-card { overflow: hidden; border-radius: var(--radius); transition: transform 200ms ease, box-shadow 200ms ease, border-color 200ms ease; cursor: pointer; }
.video-thumb { position: relative; display: grid; place-items: center; aspect-ratio: 16 / 9; background: var(--surface-soft); overflow: hidden; border-bottom: 1px solid var(--line); }
.video-thumb img { width: 100%; height: 100%; object-fit: contain; padding: 0; transition: transform 260ms ease, filter 260ms ease; }
.video-card:hover .video-thumb img { transform: scale(1.015); filter: saturate(1.05); }
.play-button { position: absolute; display: grid; place-items: center; width: 3.3rem; height: 3.3rem; border: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.92); color: var(--primary); box-shadow: 0 18px 42px rgba(15, 23, 42, 0.24); font-size: 1.06rem; backdrop-filter: blur(12px); transition: transform 180ms ease, background 180ms ease; }
.video-card:hover .play-button { transform: scale(1.06); background: white; }
.duration { position: absolute; right: 0.75rem; bottom: 0.75rem; border-radius: 999px; background: rgba(15, 23, 42, 0.84); color: white; padding: 0.3rem 0.55rem; font-weight: 850; font-size: 0.72rem; }
.video-info { padding: 1rem; margin-top: 0; }
.video-actions { display: flex; gap: 0.55rem; margin-top: 0.9rem; }
.video-actions .ghost { background: var(--surface-solid); color: var(--ink); border: 1px solid var(--line); box-shadow: none; }
.video-actions .ghost:hover { background: var(--surface-soft); color: var(--primary-dark); }

.loader-wrap, .empty { display: grid; place-items: center; min-height: 20rem; border-radius: var(--radius); text-align: center; color: var(--muted); }
.premium-loader { position: relative; overflow: hidden; gap: .85rem; padding: 2.2rem; background: radial-gradient(circle at 50% 0%, rgba(99,102,241,.12), transparent 16rem), linear-gradient(135deg, var(--surface), rgba(255,255,255,.62)); }
body.dark .premium-loader { background: radial-gradient(circle at 50% 0%, rgba(99,102,241,.28), transparent 18rem), linear-gradient(135deg, rgba(15,23,42,.96), rgba(30,41,59,.7)); }
.premium-loader::before { content: ""; position: absolute; inset: -40%; background: conic-gradient(from 0deg, transparent, rgba(99,102,241,.22), transparent 32%); animation: spin 2.8s linear infinite; opacity: .55; }
.premium-loader::after { content: ""; position: absolute; inset: 1px; border-radius: calc(var(--radius) - 1px); background: linear-gradient(135deg, var(--surface), transparent); pointer-events: none; }
.loader-brand { position: relative; display: grid; place-items: center; width: 3.8rem; height: 3.8rem; border-radius: 20px; background: linear-gradient(135deg, #111827, #334155); color: white; font-weight: 950; box-shadow: 0 18px 44px rgba(15,23,42,.18); }
body.dark .loader-brand { background: linear-gradient(135deg, #6366f1, #020617); }
.loader-lines { position: relative; display: grid; gap: .5rem; width: min(17rem, 80%); margin: .25rem auto; }
.loader-lines span { height: .55rem; border-radius: 999px; background: linear-gradient(90deg, rgba(99,102,241,.18), rgba(249,115,22,.12)); animation: pulseLine 1.2s ease-in-out infinite alternate; }
.loader-lines span:nth-child(2) { width: 78%; margin: auto; animation-delay: .12s; }
.loader-lines span:nth-child(3) { width: 55%; margin: auto; animation-delay: .22s; }
.premium-loader strong { position: relative; z-index: 1; color: var(--ink); font-size: 1rem; }
.premium-loader p { position: relative; z-index: 1; margin: 0; font-size: .86rem; }
.loader { width: 2.45rem; height: 2.45rem; border: 3px solid rgba(99, 102, 241, 0.18); border-top-color: var(--primary); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes shimmer { 0%,100% { transform: translateX(-40%); opacity: .45; } 50% { transform: translateX(40%); opacity: 1; } }
@keyframes pulseLine { from { opacity: .45; transform: scaleX(.96); } to { opacity: 1; transform: scaleX(1); } }
@keyframes spin { to { transform: rotate(360deg); } }
.empty strong { color: var(--ink); font-size: 1.25rem; }
.empty p { margin: 0.45rem 0 0; }
.notice { margin-bottom: 1rem; padding: 0.9rem 1rem; border: 1px solid rgba(249, 115, 22, 0.35); border-radius: 16px; color: #c2410c; background: rgba(255, 247, 237, 0.92); font-size: 0.92rem; font-weight: 750; }
body.dark .notice { color: #fed7aa; background: rgba(124, 45, 18, 0.22); }

.footer { padding: 1.2rem clamp(1rem, 4vw, 3.5rem) 1.6rem; color: var(--muted); text-align: center; font-size: 0.78rem; font-weight: 700; }
.footer span { display: inline-flex; padding: 0.75rem 1rem; border: 1px solid var(--line); border-radius: 999px; background: var(--glass); backdrop-filter: blur(16px); }

.modal { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; padding: clamp(1rem, 4vw, 3rem); background: rgba(15, 23, 42, 0.72); backdrop-filter: blur(18px) saturate(130%); animation: fadeIn 180ms ease both; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.player-card { width: min(72rem, 100%); overflow: hidden; border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 24px; background: #020617; box-shadow: var(--shadow-lg); animation: modalIn 220ms ease both; }
@keyframes modalIn { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
.player-top { display: flex; justify-content: space-between; align-items: center; padding: 0.8rem 0.95rem; color: white; font-size: 0.9rem; font-weight: 850; }
.player-top button, .modal-close { border: 0; background: rgba(255, 255, 255, 0.10); color: white; border-radius: 50%; width: 2.2rem; height: 2.2rem; font-size: 1.35rem; transition: background 160ms ease, transform 160ms ease; }
.player-top button:hover, .modal-close:hover { background: rgba(255,255,255,.18); transform: rotate(6deg) scale(1.03); }
.player-frame { position: relative; background: black; }
.player-loading { display: grid; place-items: center; gap: .65rem; min-height: min(56vw, 34rem); color: white; text-align: center; background: radial-gradient(circle at 50% 35%, rgba(99,102,241,.22), transparent 18rem), #020617; }
.player-loading p { margin: 0; color: #94a3b8; font-size: .9rem; }
.player-card iframe { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; background: black; }
.player-watermark { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); pointer-events: none; padding: 0.34rem 0.66rem; border-radius: 999px; background: rgba(2, 6, 23, 0.34); color: rgba(255, 255, 255, 0.66); font-size: clamp(0.76rem, 2vw, 1rem); font-weight: 850; letter-spacing: 0.02em; backdrop-filter: blur(4px); text-shadow: 0 1px 2px rgba(0,0,0,.28); }

.telegram-card { width: min(28rem, 100%); position: relative; overflow: hidden; padding: 1.25rem; border: 1px solid rgba(255,255,255,.16); border-radius: 26px; background: linear-gradient(135deg, rgba(15,23,42,.98), rgba(30,41,59,.94)); color: white; box-shadow: var(--shadow-lg); animation: modalIn 220ms ease both; }
.telegram-card::before { content: ""; position: absolute; inset: -40% -10% auto auto; width: 13rem; height: 13rem; border-radius: 50%; background: rgba(99, 102, 241, .28); filter: blur(8px); }
.telegram-card .modal-close { position: absolute; right: .9rem; top: .9rem; z-index: 1; }
.telegram-badge { width: 3.1rem; height: 3.1rem; display: grid; place-items: center; border-radius: 18px; background: rgba(99, 102, 241, .18); margin-bottom: .9rem; }
.telegram-card h2 { margin: 0; font-size: 1.45rem; line-height: 1.15; letter-spacing: -.035em; }
.telegram-card p { margin: .65rem 0 1rem; color: #cbd5e1; line-height: 1.6; font-size: .94rem; }
.telegram-list { display: grid; gap: .5rem; margin: 0 0 1.1rem; padding: 0; list-style: none; color: #e2e8f0; font-size: .88rem; font-weight: 700; }
.telegram-list li::before { content: "•"; margin-right: .5rem; color: var(--accent); }
.modal-button { display: inline-flex; align-items: center; justify-content: center; width: 100%; text-decoration: none; }

@media (max-width: 980px) { .hero, .course-grid, .video-grid { grid-template-columns: 1fr 1fr; } .hero { align-items: start; } }
@media (max-width: 720px) {
  .topbar { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "brand actions" "crumbs crumbs"; gap: .65rem; padding: 0.8rem 1rem; }
  .brand strong { font-size: 0.88rem; }
  .brand small { font-size: 0.56rem; letter-spacing: .11em; }
  .brand-mark { width: 2.35rem; height: 2.35rem; border-radius: 14px; }
  .nav-actions { align-self: center; }
  .crumbs { grid-column: 1 / -1; justify-content: flex-start; overflow-x: auto; padding-bottom: 0.05rem; scrollbar-width: none; }
  .crumbs::-webkit-scrollbar { display: none; }
  .crumbs button { max-width: 12ch; padding-inline: .42rem; }
  .hero, .course-grid, .subject-grid, .video-grid { grid-template-columns: 1fr; }
  .hero { border-radius: 24px; }
  .hero h1 { font-size: clamp(1.45rem, 7vw, 2.05rem); line-height: 1.07; }
  .hero p { font-size: .9rem; }
  .course-image { height: clamp(14rem, 62vw, 20rem); }
  .course-body { grid-template-columns: 1fr; }
  .course-body button { width: 100%; }
  .topic-row { grid-template-columns: auto minmax(0, 1fr); }
  .topic-row button { grid-column: 1 / -1; width: 100%; }
  .video-info { padding: 0.95rem 1rem 1.05rem; }
  .section-title { display: grid; gap: 0.8rem; }
  .player-card { border-radius: 20px; }
  .modal { padding: 1rem; }
}

.saved-title p { margin: .35rem 0 0; color: var(--muted); font-size: .88rem; line-height: 1.5; }

@media (max-width: 520px) {
  .nav-pill { width: 2.35rem; padding: 0; overflow: hidden; font-size: 0; }
  .nav-pill::before { content: "★"; font-size: .95rem; }
}
