:root {
  color-scheme: light;
  --ink: #111827;
  --muted: #667487;
  --paper: #fff;
  --background: #f6f7f8;
  --line: #eef0f2;
  --field-line: #e0e4e9;
  --pink: #c91460;
  --rose: #fbe5f0;
  --accent: #ec4195;
  --primary: #d42b7d;
  --surface-radius: 12px;
  --control-radius: 8px;
  --page-heading: 1.5rem;
  --section-heading: 1.23rem;
  --site-font: "Segoe UI", system-ui, -apple-system, sans-serif;
  --green: #246044;
  --mint: #e7f4e9;
  font-family: var(--site-font);
  font-weight: 400;
  color: var(--ink);
  background: var(--background);
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; }
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select, option, optgroup { font: inherit; }
button { cursor: pointer; }
button, a, input { touch-action: manipulation; }
:focus-visible { outline: 3px solid var(--pink); outline-offset: 4px; }
img { display: block; max-width: 100%; }
svg { flex: 0 0 auto; }
h1, h2, h3, p { margin: 0; }
.wrap { width: min(83%, 1280px); margin: 0 auto; }
.visually-hidden, .skip-link:not(:focus) {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}
.skip-link:focus { z-index: 5; position: absolute; inset: 12px auto auto 12px; padding: 10px; background: white; }

.site-header { position: relative; z-index: 2; background: var(--paper); border-bottom: 1px solid var(--line); }
.header-inner, .footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.header-inner { min-height: 64px; }
.brand { color: #111827; font-size: 20px; line-height: 28px; letter-spacing: -.5px; font-weight: 700; white-space: nowrap; }
.brand span { color: var(--accent); }
#site-nav { display: flex; align-items: center; gap: 24px; font-size: 14px; line-height: 20px; font-weight: 500; color: #465161; }
#site-nav a[aria-current], #site-nav a:hover, .footer-actions a:hover { color: var(--pink); }
.login-link { display: inline-flex; gap: 8px; align-items: center; padding: 9px 15px; border: 1px solid var(--line); border-radius: var(--control-radius); }
.profile-link { border: 0; padding: 0; overflow-wrap: anywhere; }
.profile-avatar { display: grid; place-items: center; flex: 0 0 32px; width: 32px; height: 32px; border-radius: 50%; background: var(--rose); color: var(--pink); }
.login-link svg { width: 16px; }
.menu-toggle { display: none; }

.hero-inner { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; padding: 24px 0 16px; border-bottom: 1px solid var(--line); }
.catalog-heading p { margin-top: 5px; color: var(--muted); font-size: 14px; line-height: 1.35; }
h1 { font-size: var(--page-heading); font-weight: 700; line-height: 1.3333; overflow-wrap: anywhere; }
h2 { font-size: var(--section-heading); font-weight: 600; line-height: 1.25; }
h3, h4, h5, h6 { font-weight: 600; }
b, strong { font-weight: 700; }
.search {
  display: flex; align-items: center; gap: 9px; width: clamp(160px, 32vw, 360px); flex-shrink: 0;
  padding: 0 12px; border: 1px solid var(--field-line); border-radius: var(--control-radius); background: white; color: var(--muted);
}
.search:focus-within { outline: 2px solid var(--pink); outline-offset: 2px; }
.search input { width: 100%; min-width: 0; height: 40px; outline: none; border: 0; background: transparent; color: var(--ink); }
.search input::placeholder { color: #788394; }
.catalog-results { padding: 20px 0 32px; }
.product-grid { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 400px)); }
.product { width: 90%; overflow: clip; background: var(--paper); border: 1px solid var(--line); border-radius: var(--surface-radius); }
@media (hover: hover) and (pointer: fine) {
  .product { transition: transform 180ms ease, box-shadow 180ms ease; }
  .product:hover { transform: translateY(-4px); box-shadow: 0 8px 20px rgb(17 24 39 / 10%); }
}
@media (prefers-reduced-motion: reduce) {
  .product { transition: none; }
  .product:hover { transform: none; }
}
.product-cover { display: block; position: relative; }
.product-cover:focus-visible { outline-offset: -5px; }
.product-cover img, .course-cover img, .cover-placeholder { width: 100%; aspect-ratio: 16 / 9; height: auto; object-fit: cover; }
.cover-placeholder { display: grid; place-items: center; background: var(--rose); color: var(--pink); }
.cover-placeholder svg { width: 64px; height: 64px; }
.chip { display: inline-flex; align-items: center; gap: 7px; padding: 7px 11px; color: #215e3e; background: #e1f3e6; border-radius: 200px; font-size: 12px; font-weight: 700; }
.chip > span { width: 6px; height: 6px; border-radius: 50%; background: #348b59; }
.product-cover .chip { position: absolute; inset: 14px auto auto 14px; }
.product-body { padding: 16px 18px; }
.product-body h2 { font-size: 20px; letter-spacing: -.025em; line-height: 1.27; }
.product-body h2 a:hover { color: var(--pink); }
.product-body p { margin: 8px 0 12px; color: var(--muted); font-size: 14px; }
.product-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; border-top: 1px solid var(--line); padding: 11px 0; font-size: 14px; }
.product-meta strong, .price { color: var(--green); }
.product-meta a { display: inline-flex; align-items: center; gap: 7px; color: var(--pink); font-weight: 600; }
.product-meta a:hover { text-decoration: underline; }
.product-meta svg { width: 16px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 16px; min-height: 40px; border-radius: var(--control-radius); font-size: 14px; font-weight: 600; }
.button svg { width: 17px; }
.button-wide { width: 100%; }
.button-pink { background: var(--primary); color: white; }
.button-pink:hover { background: var(--pink); }
.button-quiet { color: var(--pink); background: white; border: 1px solid var(--line); }
.button-quiet:hover { border-color: var(--pink); }
.button-editor, .prose .button-editor { color: var(--pink); background: var(--rose); text-decoration: none; }
.button-editor:hover { background: #f8d5e6; }
.product-body .button-editor, .course-edit { margin-top: 8px; }
.course-edit { display: flex; flex-wrap: wrap; gap: 8px; }
.lesson-edit { margin-bottom: 15px; }
.empty { padding: 48px 16px; text-align: center; color: var(--muted); }
.empty svg { width: 28px; height: 28px; margin-bottom: 8px; color: var(--pink); }

.not-found { padding: 34px 0 46px; }
.not-found-hero { display: grid; justify-items: start; gap: 12px; max-width: 680px; }
.not-found-code { font-size: clamp(58px, 12vw, 104px); font-weight: 700; line-height: .9; letter-spacing: -.05em; }
.not-found-hero h1 { font-size: clamp(26px, 4.4vw, 40px); line-height: 1.12; letter-spacing: -.02em; }
.not-found-hero p { color: var(--muted); line-height: 1.6; }
.not-found-hero .not-found-code { color: #f3c9dd; line-height: .9; }
.not-found-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.not-found-courses { margin-top: 36px; }
.not-found-courses h2 { margin-bottom: 12px; font-size: 20px; }
.quick-course-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.quick-course {
  display: grid; grid-template-columns: 84px minmax(0, 1fr) auto; align-items: center; gap: 14px;
  padding: 12px; border: 1px solid var(--line); border-radius: var(--surface-radius); background: white;
}
.quick-course:hover { border-color: var(--pink); }
.quick-course:hover .quick-course-title { color: var(--pink); }
.quick-course-cover { display: block; width: 84px; aspect-ratio: 8 / 5; overflow: clip; border-radius: 8px; background: var(--rose); }
.quick-course-cover img { width: 100%; height: 100%; aspect-ratio: auto; object-fit: cover; }
.quick-course-cover .cover-placeholder svg { width: 26px; height: 26px; }
.quick-course-title { display: block; font-weight: 600; line-height: 1.35; overflow-wrap: anywhere; }
.quick-course-meta { display: block; margin-top: 3px; color: var(--muted); font-size: 13px; }
.quick-course > svg { width: 18px; color: var(--pink); }

.site-footer { border-top: 1px solid var(--line); background: #fff; }
.footer-inner { min-height: 84px; font-size: 13px; color: var(--muted); }
.footer-actions { display: flex; align-items: center; gap: 13px; }
.social { display: grid; place-items: center; min-width: 36px; min-height: 36px; border: 1px solid var(--line); border-radius: 50%; }
.social svg { width: 16px; height: 16px; }
.back-to-top {
  position: fixed;
  z-index: 3;
  inset-inline-end: max(16px, env(safe-area-inset-right));
  inset-block-end: max(16px, env(safe-area-inset-bottom));
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid transparent;
  border-radius: 50%;
  background: var(--pink);
  color: white;
  box-shadow: 0 5px 18px #49273338;
}
.back-to-top:hover { background: #982055; }

.course-page, .document-page { padding: 34px 0 60px; }
.back { display: inline-flex; align-items: center; gap: 8px; color: var(--pink); font-size: 14px; font-weight: 600; }
.back:hover { text-decoration: underline; }
.back svg { width: 17px; height: 17px; }
.course-hero { display: grid; grid-template-columns: 1.05fr 1fr; align-items: center; gap: 36px; padding: 31px 0 43px; }
.course-intro h1 { margin: 15px 0; }
.course-intro p { line-height: 1.55; color: var(--muted); }
.course-meta { display: flex; align-items: center; gap: 12px; }
.course-meta time { font-size: 13px; color: var(--muted); }
.course-cover { border-radius: var(--surface-radius); overflow: hidden; }
.price { display: block; margin: 19px 0 16px; font-size: 23px; }
.price del { margin-inline-start: 8px; color: var(--muted); font-size: .72em; font-weight: 500; }
.program h2 { margin-bottom: 15px; }
.program-box { border: 1px solid var(--line); border-radius: var(--surface-radius); overflow: hidden; background: white; }
.program-box + .program-box { margin-top: 14px; }
.program-box h3 { background: var(--background); padding: 15px 20px; font-size: 14px; }
.section-description { padding: 10px 20px 0; color: var(--muted); font-size: 14px; }
.lesson-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 14px; padding: 16px 20px; }
.lesson-row:hover { background: #fff8fc; }
.play-icon { display: grid; place-items: center; width: 33px; height: 33px; border-radius: 50%; color: var(--pink); background: var(--rose); }
.play-icon svg { width: 16px; }
.lesson-name { font-weight: 600; overflow-wrap: anywhere; }
.preview-label { background: var(--rose); color: #922051; border-radius: 6px; padding: 5px 7px; font-size: 12px; font-weight: 600; }
.duration { display: inline-flex; gap: 4px; align-items: center; white-space: nowrap; font-size: 13px; color: var(--muted); }
.duration svg { width: 16px; }

.lesson-layout { display: grid; grid-template-columns: 290px minmax(0, 1fr); align-items: start; gap: 24px; padding: 37px 0 55px; }
.lesson-sidebar, .prose, .message-card { border: 1px solid var(--line); border-radius: var(--surface-radius); background: white; }
.lesson-sidebar { overflow: hidden; }
.sidebar-course, .sidebar-section a { display: flex; gap: 8px; align-items: flex-start; padding: 16px; font-size: 14px; font-weight: 600; line-height: 1.45; }
.sidebar-course:hover { color: var(--pink); }
.sidebar-course svg, .sidebar-section a svg { width: 16px; height: 20px; }
.sidebar-section-heading { padding: 9px 16px; background: var(--background); }
.sidebar-section-number { color: #6b7280; font-size: 10px; font-weight: 500; line-height: 1.4; }
.sidebar-section-title { margin-top: 3px; color: var(--muted); font-size: 12px; font-weight: 600; text-transform: uppercase; }
.sidebar-section a[aria-current] { border-inline-start: 3px solid var(--pink); color: var(--pink); background: var(--rose); }
.prose { padding: clamp(22px, 4vw, 48px); line-height: 1.7; overflow-wrap: anywhere; }
/* Imported lesson markup can specify a different family inline. Keep its emphasis. */
.prose, .prose :where(*) { font-family: var(--site-font) !important; }
.prose h2 { margin: 1.35em 0 .45em; }
.prose h3 { margin: 1em 0 .35em; font-size: 1.15rem; }
.prose p, .prose ul, .prose ol { margin: .75em 0; }
.prose ul, .prose ol { padding-inline-start: 1.45em; }
.prose a { color: var(--pink); text-decoration: underline; }
.prose blockquote { margin: 1.2em 0; padding: 8px 18px; border-inline-start: 3px solid var(--pink); background: #fbf2f7; }
.prose video { max-width: 100%; }
.lesson-columns, .lesson-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 16px 0; }
.lesson-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 175px), 1fr)); }
.lesson-text-columns > div { min-width: 0; padding-inline: 12px; border: 1px solid var(--line); border-radius: var(--control-radius); }
.lesson-carousel { display: flex; gap: 12px; margin: 16px 0; overflow-x: auto; scroll-snap-type: x mandatory; }
.lesson-carousel > figure { flex: 0 0 100%; min-width: 0; scroll-snap-align: start; }
:is(.lesson-columns, .lesson-grid, .lesson-carousel) figure { margin: 0; overflow: hidden; border-radius: 12px; background: var(--background); }
:is(.lesson-columns, .lesson-grid, .lesson-carousel) img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
:is(.lesson-columns, .lesson-grid, .lesson-carousel) figcaption { padding: 8px 12px; text-align: center; }
.lesson-carousel-controls { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 16px; }
.lesson-carousel-controls button { border: 1px solid var(--field-line); background: var(--paper); color: var(--pink); }
.lesson-carousel-controls button:disabled { color: var(--muted); cursor: default; }
.document { max-width: 820px; margin: 22px 0 0; }
.message-page { padding: 36px 0 50px; }
.message-card { width: min(100%, 400px); padding: 22px 20px; }
.message-card p { margin: 13px 0 20px; color: var(--muted); line-height: 1.55; }
.message-card .back { margin: 10px; }
.account-form { display: grid; gap: 14px; margin: 20px 0 8px; }
.account-form label { display: grid; gap: 6px; font-size: 14px; font-weight: 600; }
.account-form input { min-width: 0; padding: 9px 12px; border: 1px solid var(--field-line); border-radius: var(--control-radius); }
.password-field { display: grid; gap: 6px; }
.password-control { position: relative; }
.password-control input { width: 100%; padding-inline-end: 46px; }
.password-control input::-ms-reveal { display: none; }
.password-toggle {
  position: absolute;
  inset: 1px 1px 1px auto;
  display: grid;
  place-items: center;
  width: 42px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
}
.password-toggle:hover { background: #f5f0f5; }
.password-toggle svg { display: block; }
.account-form .button, .message-card form .button, .course-intro form .button { border: 0; }
.message-card .form-error { color: #971e45; }
.profile-details { display: grid; grid-template-columns: auto 1fr; gap: 10px 16px; margin: 16px 0; }
.profile-details dd { margin: 0; overflow-wrap: anywhere; }

@media (max-width: 800px) {
  .wrap { width: calc(100% - 48px); }
  .course-hero, .lesson-layout { grid-template-columns: 1fr; }
  .footer-inner { flex-wrap: wrap; padding: 17px 0; gap: 10px 20px; }
}

@media (max-width: 560px) {
  .wrap { width: calc(100% - 32px); }
  .header-inner { min-height: 56px; }
  .menu-toggle { display: grid; place-items: center; width: 42px; height: 42px; border: 0; background: transparent; color: var(--ink); }
  #site-nav { display: none; position: absolute; inset: 100% 0 auto; padding: 12px 16px; background: white; border-bottom: 1px solid var(--line); }
  #site-nav.is-open { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }
  .hero-inner { gap: 10px; padding: 16px 0 12px; }
  .hero-inner h1 { font-size: clamp(1.15rem, 5vw, 1.5rem); }
  .catalog-heading p { font-size: 12px; }
  .product-cover img, .product-cover .cover-placeholder { max-height: 140px; }
  .search { width: min(44%, 200px); padding-inline: 8px; gap: 5px; }
  .search svg { width: 16px; }
  .search input { font-size: 13px; }
  .catalog-results { padding-top: 14px; padding-bottom: 24px; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
  .course-page, .document-page, .lesson-layout { padding-top: 23px; padding-bottom: 32px; }
  .course-hero { padding-top: 19px; padding-bottom: 29px; gap: 22px; }
  .lesson-row { grid-template-columns: auto 1fr auto; gap: 8px; padding: 11px 13px; }
  .lesson-name { grid-column: 2 / -1; }
  .preview-label { grid-column: 2; justify-self: start; }
  .duration { justify-self: end; }
  .lesson-layout { gap: 15px; }
}

@media (max-width: 360px) {
  .catalog-results { padding-top: 10px; }
  .product-body { padding: 12px 14px; }
  .product-body h2 { font-size: 17px; }
  .product-meta { padding-block: 8px; }
}
