:root {
  color-scheme: light;
  font: 16px/1.5 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #161c35;
  background: #f6f7fc;
  --accent: #3f49d9;
  --muted: #59627a;
}
* { box-sizing: border-box; }
body { margin: 0; }
button, input { font: inherit; }
button { cursor: pointer; }
a { color: #323ab7; text-underline-offset: 3px; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #7079ff; outline-offset: 3px; }
.shell { max-width: 1280px; margin: 0 auto; padding: clamp(16px, 3vw, 40px); }
.intro {
  padding: clamp(24px, 5vw, 56px);
  border-radius: 22px;
  background: radial-gradient(ellipse at right top, #4147a4 0%, transparent 68%), #171d49;
  color: white;
}
.eyebrow { display: flex; align-items: center; gap: 10px; font-size: .9rem; font-weight: 700; }
.mark { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 10px; background: #696eff; font-size: .75rem; }
h1 { margin: 18px 0 4px; font-size: clamp(2.3rem, 6vw, 4rem); letter-spacing: -.06em; line-height: 1.05; }
.intro p { color: #e3e5ff; margin: 12px 0 0; }
.navigation { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 6px 18px; border-bottom: 1px solid #dce1f0; margin-top: 18px; }
.tabs { display: flex; gap: 10px; }
.tabs button { padding: 12px 14px; border: 0; border-bottom: 3px solid transparent; background: transparent; color: var(--muted); font-weight: 650; }
.tabs button[aria-selected="true"] { border-bottom-color: var(--accent); color: var(--accent); }
.navigation .channel { margin: 8px 0; }
.search-label { display: block; margin-bottom: 7px; font-size: .92rem; font-weight: 650; }
.search { width: min(100%, 360px); }
.search input { width: 100%; min-height: 44px; border: 1px solid #dce1f0; border-radius: 10px; padding: 9px 12px; background: white; color: #161c35; }
.catalog { margin-top: 22px; }
.catalog-header { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
h2 { margin: 0; font-size: clamp(1.15rem, 2vw, 1.45rem); line-height: 1.25; }
#status, #playlist-status { color: var(--muted); margin: 5px 0 0; font-size: .92rem; }
.back { padding: 0; margin: 0 0 16px; border: 0; background: transparent; color: var(--accent); font-weight: 650; }
.channel { font-size: .92rem; font-weight: 650; }
.videos { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 245px), 1fr)); gap: 16px; }
.card { text-align: left; border-radius: 15px; border: 1px solid #dce1f0; background: white; padding: 0; color: inherit; overflow: hidden; align-self: stretch; }
.card:hover { border-color: var(--accent); box-shadow: 0 5px 18px #23346a16; }
.card img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; background: #e5e7f8; }
.card-body { padding: 12px 15px 16px; }
.card-meta { color: var(--muted); font-size: .78rem; }
.card h3 { font-size: .96rem; line-height: 1.35; margin: 5px 0 0; overflow-wrap: anywhere; }
.more { display: block; margin: 20px auto 0; border: 1px solid #ccd0ed; border-radius: 10px; color: #323ab7; background: white; padding: 9px 15px; font-weight: 650; }
dialog { width: min(94vw, 900px); max-height: 92dvh; border: 0; border-radius: 16px; padding: 0; color: inherit; background: white; }
dialog::backdrop { background: #101431c9; }
.lesson-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 16px; overflow-wrap: anywhere; }
#close { border: 0; background: #eff0fa; color: #161c35; border-radius: 8px; width: 38px; height: 38px; flex: 0 0 38px; font-size: 1.45rem; }
#player iframe { display: block; width: 100%; aspect-ratio: 16 / 9; min-height: 200px; border: 0; background: #0d1021; }
#player p, .lesson-details { padding: 0 16px; }
.lesson-details { padding-top: 14px; padding-bottom: 14px; overflow-wrap: anywhere; }
#description { white-space: pre-wrap; font-size: .92rem; color: var(--muted); }
