@font-face {
  font-family: "Onest Local";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("fonts/onest-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: "Onest Local";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("fonts/onest-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: light;
  --bg: #dcd8cc;
  --surface: #fffefa;
  --surface-muted: #f1f0eb;
  --surface-blue: #e8dcff;
  --ink: #171918;
  --muted: #686b66;
  --quiet: #8c908a;
  --line: #deded7;
  --line-strong: #c8c9c3;
  --action: #171918;
  --action-hover: #313531;
  --lime: #c9ff38;
  --lime-soft: #ecffc0;
  --turquoise: #bcefe4;
  --lilac: #e8dcff;
  --success: #176647;
  --success-bg: #d8f3e4;
  --warning: #805000;
  --warning-bg: #ffe9a9;
  --danger: #8c3841;
  --danger-bg: #ffdfe2;
  --radius: 24px;
  --focus: #6347e9;
  --font-display: "Onest Local", ui-sans-serif, sans-serif;
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }

* { scrollbar-color: #a5a398 var(--surface-muted); scrollbar-width: thin; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--surface-muted); }
::-webkit-scrollbar-thumb { border: 2px solid var(--surface-muted); border-radius: 999px; background: #a5a398; }
::-webkit-scrollbar-thumb:hover { background: #7c817b; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
}

::selection { background: #cfdcff; color: #101728; }

button, a { -webkit-tap-highlight-color: transparent; }

a { color: inherit; }

a:focus-visible, button:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 10px;
  left: 10px;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  transform: translateY(-160%);
  transition: transform 160ms ease-out;
}

.skip-link:focus { transform: translateY(0); }

.app-shell {
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr);
  width: min(1380px, calc(100% - 48px));
  min-height: calc(100vh - 56px);
  margin: 28px auto;
  overflow: clip;
  border-radius: 28px;
  background: var(--surface);
  box-shadow: 0 24px 70px rgba(34, 31, 24, 0.12);
  animation: portal-settle 380ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.sidebar {
  position: sticky;
  top: 28px;
  z-index: 20;
  display: flex;
  width: 236px;
  height: calc(100vh - 56px);
  flex-direction: column;
  border-right: 0;
  background: #f2f1ec;
}

.sidebar__top { padding: 28px 22px 18px; }

.product-mark {
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
}

.product-mark__symbol {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50% 50% 44% 56%;
  background: var(--lime);
  color: var(--ink);
  font-size: 0.74rem;
  letter-spacing: 0.04em;
}

.menu-button { display: none; }

.sidebar__nav {
  display: grid;
  gap: 4px;
  padding: 20px 14px;
}

.nav-link {
  display: flex;
  min-height: 44px;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  color: #4c5668;
  font-size: 0.93rem;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 160ms ease-out, color 160ms ease-out;
}

.nav-link:hover { background: var(--surface-muted); color: var(--ink); }
.nav-link--active { background: var(--lime-soft); color: var(--ink); }

.nav-link svg,
.demo-notice svg,
.lesson-duration svg,
.primary-action svg,
.status-block--access > svg,
.module__lock,
.module__offer-icon,
.module__complete {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.sidebar__footer {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-top: auto;
  padding: 18px 22px;
  border-top: 0;
}

.profile-avatar {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: #e6e9ee;
  color: #4e5869;
  font-size: 0.8rem;
  font-weight: 700;
}

.profile-copy { display: grid; min-width: 0; }
.profile-copy strong { font-size: 0.84rem; font-weight: 650; }
.profile-copy small { color: var(--muted); font-size: 0.74rem; }

.main {
  grid-column: 2;
  width: min(1180px, 100%);
  padding: 48px clamp(32px, 4.2vw, 64px) 72px;
}

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.page-header h1,
.page-header p,
.program__header h2,
.program__header p,
.demo-notice h2,
.demo-notice p,
.lesson-panel h2,
.lesson-panel p,
.status-block h2,
.status-block p,
.module h3,
.module p,
.materials h2,
.materials p { margin: 0; }

.page-header h1 {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 4.2vw, 4.8rem);
  line-height: 0.96;
  letter-spacing: -0.04em;
}

.page-header p { margin-top: 7px; color: var(--muted); }

.demo-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 7px 11px;
  border: 0;
  border-radius: 999px;
  background: var(--lilac);
  color: #3f315a;
  font-size: 0.76rem;
  font-weight: 700;
}

.demo-badge__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #7455c7;
}

.demo-notice {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 12px;
  margin-top: 30px;
  padding: 15px 17px;
  border: 0;
  border-radius: 14px;
  background: #f2f1ec;
}

.demo-notice svg { margin-top: 1px; color: #526078; }
.demo-notice h2 { font-size: 0.9rem; }
.demo-notice p { margin-top: 2px; max-width: 75ch; color: var(--muted); font-size: 0.84rem; }

.overview-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, 0.78fr);
  gap: 20px;
  margin-top: 28px;
}

.lesson-panel {
  display: grid;
  min-height: 322px;
  align-content: space-between;
  padding: clamp(24px, 3vw, 38px);
  border-radius: var(--radius);
  background: var(--lime);
  box-shadow: none;
}

.lesson-state {
  display: inline-flex;
  width: fit-content;
  padding: 7px 10px;
  border-radius: 999px 999px 999px 6px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--ink);
  font-size: 0.72rem;
  font-weight: 700;
}

.lesson-context { margin-top: 38px !important; color: #3f4730; font-size: 0.86rem; font-weight: 650; }

.lesson-panel h2 {
  font-family: var(--font-display);
  max-width: 19ch;
  margin-top: 8px;
  font-size: clamp(1.62rem, 3vw, 2.45rem);
  line-height: 1.1;
  letter-spacing: -0.035em;
}

.lesson-duration {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 16px !important;
  color: var(--muted);
  font-size: 0.84rem;
}

.lesson-duration svg { width: 17px; height: 17px; }

.primary-action {
  display: inline-flex;
  width: fit-content;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 34px;
  padding: 12px 16px 12px 18px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 0.93rem;
  font-weight: 700;
  text-decoration: none;
  transition: background-color 160ms ease-out, transform 160ms ease-out;
}

.primary-action:hover { background: var(--action-hover); transform: translateY(-2px); }
.primary-action svg { width: 18px; height: 18px; }

.course-status {
  display: grid;
  align-content: start;
  gap: 16px;
  background: transparent;
}

.status-block { min-height: 153px; padding: 24px; border-radius: var(--radius); background: var(--turquoise); }
.status-block + .status-block { border-top: 0; }

.status-block__heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.status-block h2 { font-size: 0.86rem; font-weight: 650; }
.status-block__heading strong { font-size: 1.42rem; font-variant-numeric: tabular-nums; letter-spacing: -0.03em; }

.progress-track {
  overflow: hidden;
  height: 8px;
  margin-top: 20px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.72);
}

.progress-track span {
  display: block;
  width: var(--progress);
  height: 100%;
  border-radius: inherit;
  background: #117465;
}

.status-block > p { margin-top: 10px; color: var(--muted); font-size: 0.8rem; }

.status-block--access {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  background: var(--lilac);
}

.status-block--access > svg { margin-top: 1px; color: #55627a; }
.status-block--access p { margin-top: 4px; color: var(--ink); font-size: 0.92rem; font-weight: 650; font-variant-numeric: tabular-nums; }

.program { margin-top: 46px; scroll-margin-top: 24px; }

.program__header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 16px;
}

.program__header h2,
.materials h2 { font-family: var(--font-display); font-size: 1.32rem; letter-spacing: -0.02em; }
.program__header p { margin-top: 3px; color: var(--muted); font-size: 0.84rem; }

.status-legend { display: flex; flex-wrap: wrap; gap: 12px; color: var(--muted); font-size: 0.73rem; }
.status-legend span { display: inline-flex; align-items: center; gap: 6px; }

.legend-dot { width: 7px; height: 7px; border-radius: 50%; }
.legend-dot--done { background: var(--success); }
.legend-dot--current { background: var(--action); }
.legend-dot--locked { background: var(--quiet); }

.module-list {
  display: grid;
  gap: 10px;
  overflow: visible;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  list-style: none;
}

.module {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  min-height: 106px;
  padding: 19px 22px;
  border-radius: 18px;
  background: var(--surface-muted);
  transition: transform 180ms ease-out, background-color 180ms ease-out;
}

.module + .module { border-top: 0; }
.module:hover { transform: translateX(4px); }
.module--completed { background: #e7f4ec; }
.module--available { background: #eefed0; }
.module--prerequisite_locked { background: #fff5da; }
.module--standalone_offer { background: #e8dcff; }
.module--content_not_ready { background: #efefec; }

.module__number { color: var(--quiet); font-size: 0.77rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.module__title-row { display: flex; flex-wrap: wrap; align-items: center; gap: 9px 12px; }
.module h3 { min-width: 180px; font-size: 0.97rem; font-weight: 650; }
.module__meta { margin-top: 5px !important; color: var(--muted); font-size: 0.78rem; }
.module__reason { margin-top: 7px !important; max-width: 68ch; color: #5c6677; font-size: 0.8rem; }

.standalone-offer {
  display: grid;
  justify-items: start;
  gap: 8px;
  margin-top: 14px;
  padding: 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.62);
}

.standalone-offer__benefit {
  max-width: 58ch;
  color: #342b40;
  font-size: 0.84rem;
  font-weight: 600;
}

.standalone-offer__price {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px 999px 999px 6px;
  background: #ded0f4;
  color: #4c386a;
  font-size: 0.82rem;
  font-weight: 750;
}

.standalone-offer__details { color: #342b40; }

.standalone-offer__details summary {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  gap: 9px;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 700;
  list-style: none;
  transition: background-color 160ms ease-out, transform 160ms ease-out;
}

.standalone-offer__details summary::-webkit-details-marker { display: none; }
.standalone-offer__details summary::after { content: "+"; font-size: 1rem; line-height: 1; }
.standalone-offer__details[open] summary::after { content: "−"; }
.standalone-offer__details summary:hover { background: var(--action-hover); transform: translateY(-1px); }
.standalone-offer__details summary:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.standalone-offer__details p { margin-top: 9px !important; color: #655773; font-size: 0.76rem; }

.chat-card {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 15px;
  align-items: center;
  margin-top: 20px;
  padding: 18px 20px;
  border-radius: 18px;
  background: var(--turquoise);
}

.chat-card--not_included { background: var(--lilac); }

.chat-card__icon {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 14px 14px 14px 5px;
  background: rgba(255, 255, 255, 0.72);
  color: #176657;
}

.chat-card__icon svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.chat-card h2,
.chat-card p { margin: 0; }
.chat-card h2 { font-size: 0.92rem; }
.chat-card__copy p { margin-top: 2px; color: #3f6159; font-size: 0.8rem; }

.chat-card__action { display: grid; justify-items: end; gap: 6px; }
.chat-card__action button,
.chat-card__details summary {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  padding: 8px 12px;
  border: 0;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
}

.chat-card__action button:disabled { cursor: not-allowed; opacity: 0.62; }
.chat-card__action small { color: #4e685f; font-size: 0.68rem; }
.chat-card__details { justify-self: end; color: #385c53; }
.chat-card__details summary { cursor: pointer; list-style: none; transition: background-color 160ms ease-out, transform 160ms ease-out; }
.chat-card__details summary::-webkit-details-marker { display: none; }
.chat-card__details summary:hover { background: var(--action-hover); transform: translateY(-1px); }
.chat-card__details summary:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.chat-card__details p { max-width: 44ch; margin-top: 7px; color: #4e685f; font-size: 0.7rem; text-align: right; }
.chat-card__state { color: #58436f; font-size: 0.72rem; font-weight: 750; }

.status-chip {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 8px;
  border-radius: 999px 999px 999px 6px;
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1.2;
}

.status-chip--completed { background: #c9ead7; color: var(--success); }
.status-chip--available { background: var(--lime); color: #33410d; }
.status-chip--prerequisite_locked { background: var(--warning-bg); color: var(--warning); }
.status-chip--standalone_offer { background: #d2c0f1; color: #493466; }
.status-chip--content_not_ready { background: var(--surface-muted); color: #5d6674; }

.module__action {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.8);
  color: var(--ink);
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: none;
}

.module__action:hover { background: var(--surface); transform: translateX(2px); }
.module__lock { justify-self: end; color: #9aa1ac; }
.module__offer-icon { justify-self: end; color: #674a97; }
.module__complete { justify-self: end; color: var(--success); }

.detail-shell {
  width: min(1180px, calc(100% - 48px));
  min-height: calc(100vh - 56px);
  margin: 28px auto;
  overflow: clip;
  border-radius: 28px;
  background: var(--surface);
  box-shadow: 0 24px 70px rgba(34, 31, 24, 0.12);
  animation: portal-settle 380ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.detail-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 28px;
  background: #f2f1ec;
}

.back-link {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: none;
  transition: background-color 160ms ease-out, transform 160ms ease-out;
}

.back-link:hover { background: #fff; transform: translateX(-2px); }

.detail-main { padding: clamp(28px, 5vw, 64px); }

.module-hero {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr) minmax(210px, 0.52fr);
  gap: 22px;
  align-items: center;
  padding: clamp(24px, 4vw, 44px);
  border-radius: var(--radius);
  background: var(--lilac);
}

.module-hero__number {
  display: grid;
  width: 68px;
  height: 68px;
  place-items: center;
  border-radius: 22px 22px 22px 7px;
  background: var(--lime);
  color: #28320b;
  font-size: 1.1rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.module-hero h1,
.module-hero p,
.lesson-header h1,
.lesson-header p,
.video-placeholder h2,
.video-placeholder p,
.lesson-materials h2,
.lesson-materials p { margin: 0; }

.module-hero h1,
.lesson-header h1 {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 4.3rem);
  line-height: 0.98;
  letter-spacing: -0.045em;
}

.module-hero p { margin-top: 10px; color: #5c4b72; font-size: 0.9rem; }

.detail-progress {
  padding: 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.67);
}

.detail-progress strong { font-size: 1.8rem; letter-spacing: -0.04em; }
.detail-progress .progress-track { margin-top: 12px; background: #e8e5ef; }
.detail-progress small { display: block; margin-top: 8px; color: var(--muted); font-size: 0.72rem; }

.lesson-list {
  display: grid;
  gap: 10px;
  margin: 30px 0 0;
  padding: 0;
  list-style: none;
}

.lesson-row {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 24px;
  gap: 14px;
  align-items: center;
  padding: 18px 20px;
  border-radius: 18px;
  background: var(--surface-muted);
}

.lesson-row--completed { background: #e7f4ec; }
.lesson-row--current { background: var(--lime-soft); }
.lesson-row--locked { color: #737772; }
.lesson-row__number { color: var(--quiet); font-size: 0.74rem; font-weight: 750; font-variant-numeric: tabular-nums; }
.lesson-row__copy { display: flex; flex-wrap: wrap; align-items: center; gap: 9px 12px; }
.lesson-row h2 { margin: 0; font-size: 0.96rem; }
.lesson-row h2 a { text-decoration-thickness: 1px; text-underline-offset: 4px; }
.lesson-row__state { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.status-chip--lesson-completed { background: #c9ead7; color: var(--success); }
.status-chip--lesson-current { background: var(--lime); color: #33410d; }
.status-chip--lesson-locked { background: #e3e3de; color: #666a65; }

.lesson-header { max-width: 900px; }
.lesson-header__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-top: 18px; color: var(--muted); font-size: 0.8rem; font-weight: 650; }
.lesson-header .lesson-duration { margin-top: 0 !important; }

.video-placeholder {
  display: grid;
  min-height: 380px;
  place-items: center;
  margin-top: 30px;
  padding: 28px;
  border-radius: var(--radius);
  background: #202421;
  color: #fff;
  text-align: center;
}

.video-placeholder__mark {
  display: grid;
  width: 72px;
  height: 72px;
  margin: 0 auto 18px;
  place-items: center;
  border-radius: 28px 28px 28px 9px;
  background: var(--lime);
  color: var(--ink);
}

.video-placeholder__mark svg { width: 32px; height: 32px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.video-placeholder h2 { font-size: 1.35rem; }
.video-placeholder p { margin-top: 6px; color: #c5cbc6; font-size: 0.84rem; }

.lesson-materials {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 12px;
  margin-top: 18px;
  padding: 20px;
  border-radius: 18px;
  background: var(--lilac);
}

.lesson-materials > svg { width: 22px; height: 22px; fill: none; stroke: #5c4b72; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.lesson-materials h2 { font-size: 0.9rem; }
.lesson-materials p { margin-top: 3px; color: #5c4b72; font-size: 0.8rem; }
.completion-note { margin: 18px 0 0; color: var(--muted); font-size: 0.78rem; }

.lesson-navigation {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 16px;
  margin-top: 30px;
}

.lesson-navigation > .back-link { align-self: center; background: var(--surface-muted); }
.next-lesson { display: grid; min-width: min(360px, 100%); gap: 3px; padding: 16px 18px; border-radius: 18px; background: var(--surface-muted); color: #72766f; }
.next-lesson small { font-size: 0.7rem; }
.next-lesson strong { font-size: 0.9rem; }
.next-lesson .status-chip { width: fit-content; margin-top: 5px; }

@keyframes portal-settle {
  from { transform: translateY(10px) scale(0.997); }
  to { transform: translateY(0) scale(1); }
}

.materials {
  margin-top: 22px;
  padding: 24px;
  border: 0;
  border-radius: var(--radius);
  background: #f1f0eb;
  scroll-margin-top: 24px;
}

.materials p { margin-top: 7px; max-width: 70ch; color: var(--muted); font-size: 0.88rem; }

@media (max-width: 900px) {
  .app-shell { display: block; width: 100%; min-height: 100vh; margin: 0; border-radius: 0; }
  .detail-shell { width: 100%; min-height: 100vh; margin: 0; border-radius: 0; }

  .sidebar {
    position: sticky;
    inset: 0;
    width: 100%;
    border-right: 0;
    height: auto;
    border-bottom: 0;
    background: var(--surface);
  }

  .sidebar__top { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 12px 18px; }
  .product-mark__name { font-size: 0.84rem; }
  .product-mark__symbol { width: 34px; height: 34px; border-radius: 9px; }

  .menu-button {
    display: inline-flex;
    min-height: 40px;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border: 0;
    border-radius: 9px;
    background: var(--surface-muted);
    color: var(--ink);
    font: inherit;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
  }

  .menu-button__icon,
  .menu-button__icon::before,
  .menu-button__icon::after {
    display: block;
    width: 16px;
    height: 1.5px;
    border-radius: 1px;
    background: currentColor;
  }

  .menu-button__icon { position: relative; }
  .menu-button__icon::before,
  .menu-button__icon::after { position: absolute; left: 0; content: ""; }
  .menu-button__icon::before { top: -5px; }
  .menu-button__icon::after { top: 5px; }

  .sidebar__nav { display: none; max-height: calc(100vh - 60px); overflow-y: auto; padding: 8px 14px 14px; }
  .sidebar__nav[data-open="true"] { display: grid; }
  .sidebar__footer { display: none; }

  .main { width: 100%; padding: 34px 24px 60px; }
  .detail-main { padding: 38px 24px 60px; }
  .overview-layout { grid-template-columns: 1fr; }
  .course-status { grid-template-columns: 1fr 1fr; }
  .status-block + .status-block { border-top: 0; border-left: 0; }
}

@media (max-width: 620px) {
  .main { padding: 24px 16px 48px; }
  .page-header { display: grid; }
  .demo-badge { justify-self: start; }
  .demo-notice { margin-top: 22px; }
  .lesson-panel { min-height: 290px; padding: 24px; }
  .lesson-panel h2 { font-size: 1.72rem; }
  .primary-action { width: 100%; }
  .course-status { grid-template-columns: 1fr; }
  .status-block + .status-block { border-top: 0; border-left: 0; }
  .chat-card { grid-template-columns: 42px minmax(0, 1fr); align-items: start; }
  .chat-card__action,
  .chat-card__details { grid-column: 2; justify-self: start; }
  .chat-card__action { justify-items: start; }
  .chat-card__details p { text-align: left; }
  .program { margin-top: 36px; }
  .program__header { align-items: flex-start; }
  .status-legend { display: none; }

  .module {
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 12px;
    align-items: start;
    min-height: 0;
    padding: 18px 16px;
  }

  .module__number { padding-top: 3px; }
  .module__action,
  .module__lock,
  .module__offer-icon,
  .module__complete { grid-column: 2; justify-self: start; }
  .module__action { margin-left: -10px; }
  .materials { padding: 20px; }

  .detail-topbar { padding: 12px 16px; }
  .detail-topbar .back-link { padding-inline: 10px; }
  .detail-main { padding: 28px 16px 48px; }
  .module-hero { grid-template-columns: 52px minmax(0, 1fr); gap: 16px; padding: 22px; }
  .module-hero__number { width: 52px; height: 52px; border-radius: 17px 17px 17px 6px; }
  .module-hero h1 { font-size: 2rem; }
  .detail-progress { grid-column: 1 / -1; }
  .lesson-row { grid-template-columns: 28px minmax(0, 1fr) 20px; padding: 16px; }
  .lesson-row__copy { align-items: flex-start; }
  .video-placeholder { min-height: 280px; padding: 22px; }
  .lesson-header h1 { font-size: 2.2rem; }
  .lesson-navigation { display: grid; }
  .next-lesson { min-width: 0; }
}

@media (max-width: 360px) {
  .product-mark__name { display: none; }
  .page-header h1 { font-size: 1.55rem; }
  .module h3 { min-width: 0; }
  .module__title-row { align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
