:root {
  --primary: #0699D8;
  --primary-deep: #0578AB;
  --primary-soft: #E6F6FC;
  --sky: #38BDF8;
  --teal: #14B8A6;
  --navy: #0F172A;
  --text: #0F172A;
  --muted: #64748B;
  --border: #E2E8F0;
  --bg: #FFFFFF;
  --bg-soft: #F8FAFC;
  --bg-tint: #F1F5F9;
  --radius: 0;
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  --shadow-sm: 0 4px 16px rgba(15, 23, 42, 0.06);
  --font: "Inter", system-ui, -apple-system, sans-serif;
  --brand: #0699D8;
  --brand-light: #38BDF8;
  --accent: #14B8A6;
  --danger: #E42B27;
  --white: #fff;
  /* Shared public page / header content width */
  --page-max: 1200px;
  --page-gutter: 2.5rem;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { overflow-x: clip; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-deep, #0578AB); }
img { max-width: 100%; display: block; }
button { font-family: inherit; }
.container { width: min(var(--page-max), calc(100% - var(--page-gutter))); margin: 0 auto; }
.muted { color: var(--muted); }
.mt-1 { margin-top: .5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-2 { margin-bottom: 1rem; }
.flex { display: flex; gap: .75rem; flex-wrap: wrap; align-items: center; }
.center { text-align: center; }
.flash-wrap { margin-top: 1rem; }
.text-accent { color: var(--primary); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  border: none; cursor: pointer;
  padding: .9rem 1.45rem;
  border-radius: var(--radius);
  font-family: inherit; font-weight: 600; font-size: .95rem;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease, color .15s ease, border-color .15s ease;
}
.btn:hover { transform: translateY(-1px); }
/* Beat `a { color: var(--primary) }` so primary CTAs stay white on blue */
.btn-primary,
a.btn-primary,
button.btn-primary {
  background: var(--primary); color: #fff;
  box-shadow: 0 8px 20px rgba(6, 153, 216, 0.25);
}
.btn-primary:hover,
.btn-primary:focus,
.btn-primary:focus-visible,
a.btn-primary:hover,
a.btn-primary:focus,
a.btn-primary:focus-visible,
button.btn-primary:hover,
button.btn-primary:focus,
button.btn-primary:focus-visible {
  background: var(--primary-deep, #0578AB); color: #fff;
}
a.btn-primary:visited { color: #fff; }
.btn-accent,
a.btn-accent,
button.btn-accent { background: var(--teal); color: #fff; }
a.btn-accent:visited { color: #fff; }
.btn-outline {
  background: #fff; color: var(--primary);
  border: 1.5px solid #A8D9F0;
}
.btn-outline:hover { background: var(--primary-soft, #E6F6FC); color: var(--primary); border-color: var(--primary); }
.btn-ghost { background: transparent; color: var(--text); }
.btn-ghost:hover { color: var(--primary); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-sm { padding: .55rem 1.15rem; font-size: .875rem; border-radius: 0; }

/* Header — match ref-hero-exact.png */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(226,232,240,.55);
  overflow: visible;
}
.header-inner {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1rem;
  min-height: 64px;
  height: 68px;
  padding: .5rem 0;
  overflow: visible;
}
.brand {
  display: inline-flex; align-items: center;
  align-self: center;
  height: auto;
  color: inherit; justify-self: start;
  line-height: 0;
  grid-column: 1;
}
.brand:hover { color: inherit; }
.brand-mark {
  flex-shrink: 0; display: grid; place-items: center;
  height: auto;
}
.brand-mark svg {
  height: 44px;
  width: auto;
  display: block;
}
.brand-logo {
  flex-shrink: 0;
  height: 44px;
  width: auto;
  object-fit: contain;
  display: block;
}
.brand-logo--footer {
  width: 36px;
  height: 36px;
}
.nav {
  display: contents;
  white-space: nowrap;
}
.nav a,
.nav__links a {
  color: #334155; font-weight: 500; font-size: .9rem;
}
.nav a:hover,
.nav a.is-active,
.nav__links a:hover,
.nav__links a.is-active { color: var(--primary); }
.nav a.is-active,
.nav__links a.is-active { font-weight: 600; }
.nav__backdrop,
.nav__sheet-head,
.nav__contacts {
  display: none;
}
.nav__sheet {
  display: contents;
}
.nav__links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.35rem;
  flex-wrap: nowrap;
  grid-column: 2;
  justify-self: center;
  min-width: 0;
}
/* Guard: never let a nested <nav class="nav"> inherit the mobile overlay box */
.nav__links > .nav {
  display: contents;
  position: static !important;
  inset: auto !important;
  width: auto !important;
  height: auto !important;
  margin: 0 !important;
  visibility: visible !important;
  pointer-events: auto !important;
  z-index: auto !important;
  transform: none !important;
  opacity: 1 !important;
  background: transparent !important;
  overflow: visible !important;
}
.header-actions {
  display: flex; align-items: center; gap: .5rem; justify-content: flex-end;
  justify-self: end;
  align-self: center;
  grid-column: 3;
  /* Must share row 1 with .header-search--desktop — otherwise auto-placement
     pushes fav/cabinet onto row 2 (icons sit on the header/content seam). */
  grid-row: 1;
  z-index: 5;
}
.header-actions .fav-menu { order: 1; }
.header-actions .user-menu,
.header-actions .header-auth-btn { order: 2; }
/* Desktop search sits left of fav/cabinet in the same end-column cell */
.header-search--desktop {
  grid-column: 3;
  grid-row: 1;
  justify-self: end;
  align-self: center;
  margin-right: 5.6rem;
  z-index: 6;
}
.header-action-label {
  display: none;
}
.icon-btn {
  width: 38px; height: 38px; border-radius: 999px;
  border: 0; background: transparent; color: #475569;
  display: inline-grid; place-items: center; cursor: pointer;
}
.icon-btn:hover { color: var(--primary); }

.fav-menu {
  position: relative;
  flex-shrink: 0;
}
.fav-menu__btn {
  position: relative;
}
.fav-menu.is-open .fav-menu__btn,
.fav-menu__btn:focus-visible {
  color: var(--primary);
  background: #EFF6FF;
  outline: none;
}
.fav-menu__badge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: #0699D8;
  color: #fff;
  font-size: .65rem;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
  pointer-events: none;
}
.fav-menu__badge.is-empty {
  display: none;
}
.fav-menu__dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 70;
  width: min(320px, calc(100vw - 1.5rem));
  padding: .55rem;
  border: 1px solid #E2E8F0;
  border-radius: 0;
  background: #fff;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.12);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity .15s ease, transform .15s ease, visibility .15s ease;
}
.fav-menu.is-open .fav-menu__dropdown {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}
.fav-menu__head {
  padding: .45rem .65rem .55rem;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .02em;
  text-transform: uppercase;
  color: #64748B;
}
.fav-menu__list {
  display: flex;
  flex-direction: column;
  gap: .15rem;
  max-height: min(360px, 50vh);
  overflow-y: auto;
}
.fav-menu__item {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .45rem .55rem;
  border-radius: 10px;
  text-decoration: none;
  color: #0F172A;
  transition: background .12s ease;
}
.fav-menu__item:hover,
.fav-menu__item:focus-visible {
  background: #EFF6FF;
  outline: none;
}
.fav-menu__cover {
  width: 48px;
  height: 32px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
  background: #E2E8F0;
}
.fav-menu__meta {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: .1rem;
}
.fav-menu__title {
  font-size: .85rem;
  font-weight: 600;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.fav-menu__format {
  font-size: .72rem;
  color: #64748B;
}
.fav-menu__empty {
  margin: 0;
  padding: 1rem .7rem;
  text-align: center;
  font-size: .85rem;
  color: #64748B;
  line-height: 1.4;
}
.fav-menu__footer {
  display: block;
  margin-top: .35rem;
  padding: .55rem .7rem;
  border-top: 1px solid #F1F5F9;
  border-radius: 0 0 10px 10px;
  text-align: center;
  font-size: .8rem;
  font-weight: 600;
  color: #0699D8;
  text-decoration: none;
}
.fav-menu__footer:hover {
  background: #EFF6FF;
}

.header-search {
  position: relative;
  flex-shrink: 0;
}
.header-search.is-open .header-search__btn,
.header-search__btn:focus-visible {
  color: var(--primary);
  background: #EFF6FF;
  outline: none;
  border: 1px solid #93C5FD;
  border-radius: 10px;
}
.header-search__panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 70;
  width: min(380px, calc(100vw - 1.5rem));
  padding: .65rem;
  border: 1px solid #E2E8F0;
  border-radius: 0;
  background: #fff;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.12);
}
.header-search__panel[hidden] {
  display: none;
}
.header-search__field {
  display: flex;
  align-items: center;
  gap: .55rem;
  padding: .55rem .7rem;
  border: 1px solid #BFDBFE;
  border-radius: 10px;
  background: #F8FAFC;
  transition: border-color .12s ease, background .12s ease, box-shadow .12s ease;
}
.header-search__field:focus-within {
  border-color: #93C5FD;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(6, 153, 216, 0.12);
}
.header-search__field-icon {
  flex-shrink: 0;
  color: #64748B;
}
.header-search__input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: none;
  background: transparent;
  font: inherit;
  font-size: .9rem;
  color: #0F172A;
}
.header-search__input::placeholder {
  color: #94A3B8;
}
.header-search__input::-webkit-search-cancel-button {
  appearance: none;
}
.header-search__hint {
  margin: .55rem .35rem .25rem;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .03em;
  text-transform: uppercase;
  color: #64748B;
}
.header-search__list {
  display: flex;
  flex-direction: column;
  gap: .15rem;
  max-height: min(360px, 50vh);
  overflow-y: auto;
  min-height: 2.5rem;
}
.header-search__item {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .45rem .55rem;
  border-radius: 10px;
  text-decoration: none;
  color: #0F172A;
  transition: background .12s ease;
}
.header-search__item:hover,
.header-search__item:focus-visible,
.header-search__item.is-active {
  background: #EFF6FF;
  outline: none;
}
.header-search__cover {
  width: 48px;
  height: 32px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
  background: #E2E8F0;
}
.header-search__meta {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: .1rem;
}
.header-search__title {
  font-size: .85rem;
  font-weight: 600;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.header-search__format {
  font-size: .72rem;
  color: #64748B;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.header-search__empty,
.header-search__loading,
.header-search__error {
  margin: 0;
  padding: 1rem .7rem;
  text-align: center;
  font-size: .85rem;
  color: #64748B;
  line-height: 1.4;
}
.header-search__error {
  color: #B91C1C;
}
.header-search__footer {
  display: block;
  margin-top: .35rem;
  padding: .55rem .7rem;
  border-top: 1px solid #F1F5F9;
  border-radius: 0 0 10px 10px;
  text-align: center;
  font-size: .8rem;
  font-weight: 600;
  color: #0699D8;
  text-decoration: none;
}
.header-search__footer:hover {
  background: #EFF6FF;
}

.header-auth-btn {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  padding: 0;
  border-radius: 999px;
  border: 1.5px solid #93C5FD;
  background: #EFF6FF;
  color: var(--primary);
  display: inline-grid;
  place-items: center;
  text-decoration: none;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease;
}
.header-auth-btn:hover,
.header-auth-btn:focus-visible {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 6px 16px rgba(6, 153, 216, 0.22);
  outline: none;
}

/* Logged-in profile menu */
.user-menu {
  position: relative;
  flex-shrink: 0;
}
.user-menu__trigger {
  width: 40px;
  height: 40px;
  padding: 0;
  border: 2px solid #BFDBFE;
  border-radius: 999px;
  background: #EFF6FF;
  color: #0699D8;
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}
.user-menu__trigger:hover,
.user-menu__trigger:focus-visible,
.user-menu.is-open .user-menu__trigger {
  border-color: #0699D8;
  background: #DBEAFE;
  box-shadow: 0 0 0 3px rgba(6, 153, 216, 0.18);
  outline: none;
}
.user-menu__avatar {
  font-size: .85rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -.02em;
  user-select: none;
}
.user-menu__dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 60;
  width: min(240px, calc(100vw - 1.5rem));
  padding: .5rem;
  border: 1px solid #E2E8F0;
  border-radius: 0;
  background: #fff;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.12);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity .15s ease, transform .15s ease, visibility .15s ease;
}
.user-menu:hover .user-menu__dropdown,
.user-menu:focus-within .user-menu__dropdown,
.user-menu.is-open .user-menu__dropdown {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}
.user-menu__meta {
  display: flex;
  flex-direction: column;
  gap: .15rem;
  padding: .55rem .7rem .7rem;
  border-bottom: 1px solid #F1F5F9;
  margin-bottom: .35rem;
}
.user-menu__name {
  font-size: .88rem;
  font-weight: 600;
  color: #0F172A;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.user-menu__email {
  font-size: .75rem;
  color: #64748B;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.user-menu__list {
  display: flex;
  flex-direction: column;
  gap: .1rem;
}
.user-menu__item {
  display: block;
  padding: .55rem .7rem;
  border-radius: 10px;
  color: #334155;
  font-size: .875rem;
  font-weight: 500;
  line-height: 1.3;
  text-decoration: none;
  transition: background .12s ease, color .12s ease;
}
.user-menu__item:hover,
.user-menu__item:focus-visible {
  background: #EFF6FF;
  color: #0699D8;
  outline: none;
}
.user-menu__item--danger {
  color: #DC2626;
}
.user-menu__item--danger:hover,
.user-menu__item--danger:focus-visible {
  background: #FEF2F2;
  color: #B91C1C;
}

.menu-toggle {
  display: none; width: 42px; height: 42px; border-radius: 12px;
  border: 1px solid var(--border); background: #fff; cursor: pointer;
  align-items: center; justify-content: center; flex-direction: column; gap: 5px;
  z-index: 130;
  position: relative;
}
.menu-toggle span {
  display: block; width: 18px; height: 2px; background: #334155; border-radius: 2px;
  transition: transform .2s ease, opacity .2s ease;
}
.menu-toggle.is-open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.menu-toggle.is-open span:nth-child(2) {
  opacity: 0;
}
.menu-toggle.is-open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}
body.nav-open {
  overflow: hidden;
  touch-action: none;
  position: fixed;
  inset: 0 auto auto 0;
  width: 100%;
}

/* Sections */
.section { padding: 5.5rem 0; }
.section-title {
  margin: 0;
  font-size: clamp(1.55rem, 2.6vw, 2.05rem);
  font-weight: 800; letter-spacing: -.02em; line-height: 1.25;
  color: var(--text);
}
.section-lead { margin: .75rem 0 1rem; color: var(--muted); max-width: 420px; line-height: 1.55; }
.section-head-row {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 1rem; margin-bottom: 1.75rem; flex-wrap: wrap;
}
.section-head-inline { align-items: center; }
.section-head-left {
  display: flex; align-items: baseline; gap: 1rem; flex-wrap: wrap; min-width: 0;
}
.section-inline-lead {
  margin: 0; color: var(--muted); font-size: .95rem; max-width: 420px;
}
.section-link {
  color: var(--primary); font-weight: 600; font-size: .95rem; white-space: nowrap;
}
.section-head-actions {
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
}

/* Hero styles live in assets/css/hero.css */

/* Platform intro — after hero, before edu-model */
.platform-intro {
  background: #F4F8FD;
  padding-top: 2.75rem;
  padding-bottom: 2.5rem;
}
.platform-intro .section-title {
  margin: 0 0 0.75rem;
  color: #123A6B;
}
.platform-intro__lead {
  margin: 0 0 1.25rem;
  max-width: none;
  width: 100%;
  color: var(--muted, #64748B);
  font-size: 1.05rem;
  line-height: 1.55;
}
.platform-intro__body {
  max-width: none;
  width: 100%;
  color: var(--text, #0F172A);
  font-size: 1rem;
  line-height: 1.65;
}
.platform-intro__body.rich-content p {
  margin: 0 0 1rem;
}
.platform-intro__body.rich-content p:last-child {
  margin-bottom: 0;
}
.platform-intro__more {
  margin: 1.35rem 0 0;
}

/* Educational model — after platform intro */
.edu-model {
  background: #fff;
  padding-top: 2.75rem;
  padding-bottom: 2.75rem;
}
.edu-model .section-title {
  margin: 0 0 1.5rem;
}
.edu-model__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
  align-items: stretch;
}
.edu-model__card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 280px;
  padding: 1.6rem 1.45rem 1.45rem;
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.edu-model__card--lecture { background: #E42B27; }
.edu-model__card--practicum { background: #123A6B; }
.edu-model__card--course { background: #0699D8; }
.edu-model__name {
  margin: 0 0 0.85rem;
  font-size: clamp(1.35rem, 2vw, 1.65rem);
  font-weight: 800;
  line-height: 1.2;
  color: #fff;
}
.edu-model__text {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.95);
}
.edu-model__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: stretch;
  width: 100%;
  min-height: 2.55rem;
  padding: 0.55rem 1.4rem;
  background: #F1F5F9;
  color: #0F172A;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background .15s ease, color .15s ease;
}
.edu-model__btn:hover {
  background: #fff;
  color: var(--primary-deep, #0578AB);
}

@media (max-width: 900px) {
  .edu-model__grid {
    grid-template-columns: 1fr;
  }
  .edu-model__card {
    min-height: 0;
  }
}

/* Pillars */
.pillars { background: #fff; }
.pillars-layout {
  display: grid; grid-template-columns: minmax(220px, .78fr) 1.8fr;
  gap: 1.75rem; align-items: start;
}
.pillars-title { max-width: 280px; padding-top: .35rem; }
.pillars-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem;
}
.pillar-card {
  background: #fff; border-radius: var(--radius); padding: 1.35rem 1.2rem 1.4rem;
  box-shadow: var(--shadow-sm); border: 1px solid rgba(226,232,240,.85);
}
.pillar-icon {
  width: 48px; height: 48px; border-radius: 0;
  display: grid; place-items: center; margin-bottom: .95rem;
}
.pillar-icon-blue,
.pillar-icon-sky,
.pillar-icon-navy,
.pillar-icon-teal { background: var(--primary-soft, #E6F6FC); color: var(--primary, #0699D8); }
.pillar-card h3 { margin: 0 0 .4rem; font-size: 1rem; font-weight: 700; line-height: 1.3; }
.pillar-card p { margin: 0; color: var(--muted); font-size: .9rem; line-height: 1.45; }

/* Homepage configurable banner (below #pillars) */
.home-banner {
  background: #F8FBFF;
  padding-top: 0.25rem;
}
.home-banner-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.75rem;
  padding: clamp(1.6rem, 3vw, 2.35rem) clamp(1.4rem, 3vw, 2.5rem);
  border-radius: var(--radius);
  color: #fff;
  background: linear-gradient(118deg, #0B1F4A 0%, #1E3A8A 42%, #0699D8 78%, #38BDF8 100%);
  box-shadow: 0 14px 36px rgba(6, 153, 216, 0.18);
  position: relative;
  overflow: hidden;
}
.home-banner-box::after {
  content: "";
  position: absolute;
  right: -8%;
  top: -40%;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(20, 184, 166, 0.35) 0%, rgba(20, 184, 166, 0) 70%);
  pointer-events: none;
}
.home-banner-copy {
  position: relative;
  z-index: 1;
  max-width: 720px;
}
.home-banner-title {
  margin: 0;
  font-size: clamp(1.35rem, 2.4vw, 1.85rem);
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: 1.25;
  color: #fff;
}
.home-banner-text {
  margin: .7rem 0 0;
  color: rgba(226, 232, 240, 0.92);
  font-size: 1rem;
  line-height: 1.5;
  max-width: 560px;
}
.home-banner-actions {
  position: relative;
  z-index: 1;
  flex-shrink: 0;
}
.home-banner-btn,
a.home-banner-btn {
  background: #fff;
  color: #1E3A8A;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.18);
}
.home-banner-btn:hover,
.home-banner-btn:focus,
a.home-banner-btn:hover,
a.home-banner-btn:focus {
  background: #F0FDFA;
  color: #0F766E;
}

/* Programs */
.filter-pills {
  display: flex; flex-wrap: wrap; gap: .55rem; margin-bottom: 1.5rem;
}
.pill {
  border: 1px solid transparent; background: var(--bg-tint); color: #475569;
  border-radius: 0; padding: .55rem 1rem; font-weight: 600; font-size: .875rem;
  cursor: pointer; transition: .15s ease;
}
.pill:hover { color: var(--primary); }
.pill.is-active {
  background: var(--primary); color: #fff;
  box-shadow: 0 8px 18px rgba(6,153,216,.22);
}
.programs-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.15rem;
}
.program-card {
  background: #fff; border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-sm); border: 1px solid rgba(226,232,240,.85);
  transition: transform .15s ease, box-shadow .15s ease;
}
.program-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.program-card.is-hidden { display: none; }
.programs-empty { margin: 1rem 0 0; padding: .5rem 0; }
.program-card-link { color: inherit; display: block; }
.program-card-link:hover { color: inherit; }
.program-card-media { position: relative; aspect-ratio: 16/10; background: #E2E8F0; }
.program-card-media img { width: 100%; height: 100%; object-fit: cover; }
.program-badge {
  position: absolute; top: .8rem; left: .8rem; z-index: 1;
  background: var(--primary); color: #fff; font-size: .7rem; font-weight: 700;
  padding: .35rem .75rem; border-radius: 999px; text-transform: uppercase; letter-spacing: .02em;
}
.program-card-body { padding: 1rem 1.05rem 1.15rem; }
.program-format {
  display: inline-block;
  margin: 0 0 .45rem;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--primary, #0699D8);
}
.program-card-body h3 {
  margin: 0 0 .4rem; font-size: 1rem; font-weight: 700; line-height: 1.35;
  min-height: 2.7em;
}
.program-card-desc {
  margin: 0 0 .85rem;
  color: var(--muted);
  font-size: .82rem;
  font-weight: 500;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
}
.program-card-meta {
  display: flex; align-items: center; gap: .55rem;
  color: var(--muted); font-size: .82rem; font-weight: 500;
}
.program-meta-text { margin-right: auto; }
.program-arrow {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--primary); color: #fff;
  display: inline-grid; place-items: center; flex-shrink: 0;
}

/* How */
.how-steps {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem;
}
.how-step { position: relative; }
.how-num {
  width: 44px; height: 44px; border-radius: 50%;
  background: #DBEAFE; color: var(--primary);
  display: inline-grid; place-items: center;
  font-weight: 800; font-size: 1.1rem; margin-bottom: 1rem;
}
.how-step h3 { margin: 0 0 .45rem; font-size: 1.05rem; }
.how-step p { margin: 0; color: var(--muted); font-size: .92rem; }

/* Mentors / Stories carousels */
.mentors { background: #F0F7FF; }
.mentors-layout {
  display: grid; grid-template-columns: minmax(240px, .72fr) 1.9fr;
  gap: 1.75rem; align-items: start;
}
.mentors-intro .section-link { display: inline-block; margin-top: .25rem; }
.mentors-carousel-wrap { position: relative; min-width: 0; padding-top: 3.25rem; }
.mentors-controls {
  position: absolute; top: 0; right: 0; z-index: 2;
}
.mentors-empty { margin: 0; padding: 1.5rem 0; }
.carousel { overflow: hidden; }
.carousel-track {
  display: flex; gap: 1rem; overflow-x: auto; scroll-snap-type: x mandatory;
  padding: .15rem .1rem .65rem; scrollbar-width: none;
}
.mentors-carousel-wrap .carousel-track { gap: 1.25rem; }
.carousel-track::-webkit-scrollbar { display: none; }
.carousel-controls { display: flex; gap: .5rem; }
.carousel-btn {
  width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--border); background: #fff; color: #334155;
  font-size: 1.25rem; cursor: pointer; line-height: 1;
  box-shadow: var(--shadow-sm);
}
.carousel-btn:hover { color: var(--primary); border-color: #BFDBFE; }
.mentor-card {
  flex: 0 0 260px; scroll-snap-align: start;
  background: #fff; border-radius: 0; overflow: hidden;
  border: 0; box-shadow: var(--shadow-sm);
  padding: 0 0 1.15rem;
  color: inherit; display: block; transition: transform .15s ease, box-shadow .15s ease;
}
/* Exactly 4 mentor cards visible on desktop (gap 20px × 3) */
.mentors-carousel-wrap .mentor-card {
  flex: 0 0 calc((100% - 1.25rem * 3) / 4);
  width: calc((100% - 1.25rem * 3) / 4);
  max-width: calc((100% - 1.25rem * 3) / 4);
}
a.mentor-card:hover { color: inherit; transform: translateY(-2px); box-shadow: var(--shadow); }
.mentor-photo {
  position: relative;
  aspect-ratio: 4 / 5; background: #E2E8F0;
  display: grid; place-items: center; overflow: hidden;
}
.mentor-photo img { width: 100%; height: 100%; object-fit: cover; }
.mentor-photo-fallback {
  width: 100%; height: 100%; display: grid; place-items: center;
  background: linear-gradient(145deg, #DBEAFE, #BFDBFE);
  color: #1E40AF; font-size: 2.75rem; font-weight: 700;
}
.mentor-card__badge {
  position: absolute;
  top: 0.7rem;
  right: 0.7rem;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}
.mentor-card__badge--mentor { color: #C2410C; background: #FFF7ED; }
.mentor-card__badge--mentor svg { color: #F59E0B; }
.mentor-card__badge--expert { color: #0578AB; background: #EFF6FF; }
.mentor-card__badge--expert svg { color: #0699D8; }
.mentor-card__badge--practitioner { color: #1E3A8A; background: #EFF6FF; }
.mentor-card__badge--practitioner svg { color: #0699D8; }
.mentor-card h3 {
  margin: 1rem 1rem .35rem; font-size: 1.02rem; font-weight: 700;
  color: #1A202C; line-height: 1.3;
}
.mentor-role {
  margin: 0 1rem; color: #4A5568; font-weight: 500; font-size: .86rem;
  line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
  overflow: hidden;
}
.mentor-bio { margin: .45rem 1rem 0; color: var(--muted); font-size: .86rem; }
.experts-page { background: #F0F7FF; }
.experts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.25rem;
}
.experts-grid .mentor-card { flex: none; width: 100%; }

/* Support */
.support { background: #F5FFFA; }
.support-layout {
  display: grid; grid-template-columns: minmax(240px, .78fr) 1.8fr;
  gap: 1.75rem; align-items: start;
}
.support-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem;
}
.support-icon-card {
  background: #EEF6FB; border-radius: 0;
  padding: 1.6rem 1rem 1.45rem; text-align: center;
  min-height: 160px; display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.support-icon { margin-bottom: .9rem; }
.support-icon-card h3 { margin: 0; font-size: .98rem; line-height: 1.3; }

.support-banners {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 1.5rem;
}
.support-banner {
  background: #EEF6FB; border-radius: 0;
  padding: 1.35rem 1.15rem 1.25rem;
  text-align: left;
  min-height: 180px;
  display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-start;
  gap: .65rem;
  border: 1px solid rgba(6, 153, 216, 0.12);
}
.support-banner h3 {
  margin: 0; font-size: 1.05rem; line-height: 1.3; font-weight: 700; color: var(--text, #0F172A);
}
.support-banner p {
  margin: 0; color: var(--muted, #64748B); font-size: .9rem; line-height: 1.45; flex: 1;
}
.support-banner__btn,
a.support-banner__btn {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .55rem 1rem;
  border-radius: 0;
  font-size: .875rem;
  font-weight: 600;
  background: #fff;
  border: 1px solid var(--primary, #0699D8);
  color: var(--primary, #0699D8);
  text-decoration: none;
}
.support-banner__btn:hover,
a.support-banner__btn:hover {
  background: var(--primary, #0699D8);
  color: #fff;
}
.support-banner--photo {
  background-color: transparent;
}
.support-banner--photo h3,
.support-banner--photo p {
  color: #fff;
  text-shadow: 0 1px 3px rgba(0,0,0,.35);
}
.support-banner--fg h3,
.support-banner--fg p {
  color: var(--support-fg, inherit);
  text-shadow: none;
}
.support-banner--photo.support-banner--fg h3,
.support-banner--photo.support-banner--fg p {
  text-shadow: 0 1px 3px rgba(0,0,0,.35);
}

/* Home surveys carousel */
.home-surveys {
  background: #F0F7FF;
}
.home-surveys .section-lead {
  margin: .45rem 0 0;
  max-width: 36rem;
}
.home-surveys .carousel-track {
  gap: 1.15rem;
}
.home-survey-card {
  flex: 0 0 calc((100% - 1.15rem * 2) / 3);
  width: calc((100% - 1.15rem * 2) / 3);
  max-width: calc((100% - 1.15rem * 2) / 3);
  scroll-snap-align: start;
  background: #fff;
  border: 1px solid #e2e8f0;
  box-shadow: var(--shadow-sm);
  padding: 1.25rem 1.3rem 1.35rem;
  display: flex;
  flex-direction: column;
  min-height: 220px;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.home-survey-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: #bfdbfe;
}
.home-survey-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  margin-bottom: .75rem;
}
.home-survey-card__badge {
  display: inline-flex;
  align-items: center;
  padding: .2rem .55rem;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #0578AB;
  background: #EFF6FF;
}
.home-survey-card__meta {
  color: var(--muted, #64748b);
  font-size: .85rem;
}
.home-survey-card__title {
  margin: 0 0 .45rem;
  font-size: 1.15rem;
  line-height: 1.3;
  color: #0f172a;
}
.home-survey-card__title a {
  color: inherit;
  text-decoration: none;
}
.home-survey-card__title a:hover {
  color: var(--primary, #0699D8);
}
.home-survey-card__subtitle,
.home-survey-card__excerpt {
  margin: 0;
  color: #475569;
  font-size: .92rem;
  line-height: 1.45;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.home-survey-card__btn {
  margin-top: 1rem;
  align-self: flex-start;
}
@media (max-width: 960px) {
  .home-survey-card {
    flex: 0 0 calc((100% - 1.15rem) / 2);
    width: calc((100% - 1.15rem) / 2);
    max-width: calc((100% - 1.15rem) / 2);
  }
}
@media (max-width: 640px) {
  .home-survey-card {
    flex: 0 0 85%;
    width: 85%;
    max-width: 85%;
  }
}

/* Stats banner */
.stats-wrap { padding: 1rem 0 2rem; }
.stats-banner {
  display: grid; grid-template-columns: 1fr minmax(240px, 280px);
  background: #0B1B33; color: #fff; border-radius: var(--radius); overflow: hidden;
}
.stats-list {
  display: grid; grid-template-columns: repeat(4, 1fr);
  padding: 2.1rem 1.5rem;
}
.stat-item {
  padding: 0 1rem;
  border-right: 1px solid rgba(148,163,184,.22);
}
.stat-item:last-child { border-right: 0; }
.stat-item strong {
  display: block; font-size: clamp(1.55rem, 2.4vw, 2.05rem);
  font-weight: 800; letter-spacing: -.02em; line-height: 1.1; margin-bottom: .35rem;
}
.stat-item span { color: #94A3B8; font-size: .84rem; line-height: 1.35; display: block; }
.stats-cta {
  display: flex; align-items: center; gap: .85rem;
  padding: 1.5rem 1.25rem; background: var(--primary, #0699D8); color: #fff;
  font-weight: 700; font-size: 1.05rem; line-height: 1.3;
}
.stats-cta:hover { color: #fff; background: #0587bf; }
.stats-cta-icon { flex-shrink: 0; display: grid; place-items: center; }
.stats-cta-arrow {
  width: 42px; height: 42px; border-radius: 50%; flex-shrink: 0; margin-left: auto;
  background: rgba(255,255,255,.22); display: inline-grid; place-items: center;
  font-size: 1.2rem;
}

/* Stories */
.story-card {
  flex: 0 0 calc(33.333% - .7rem); scroll-snap-align: start;
  background: #F8FAFC; border-radius: var(--radius); padding: 1.5rem;
  border: 0; box-shadow: none;
  display: flex; flex-direction: column; min-height: 250px;
}
.story-quote {
  font-size: 3.5rem; line-height: .75; color: #BFDBFE; font-weight: 700;
  margin-bottom: .35rem;
}
.story-text { margin: 0 0 1.25rem; color: #334155; flex: 1; font-size: .98rem; line-height: 1.5; }
.story-author { display: flex; align-items: center; gap: .75rem; }
.story-author img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }
.story-author strong { display: block; font-size: .95rem; }
.story-author span { color: var(--muted); font-size: .82rem; }

/* News */
.news-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.15rem;
}
.news-card {
  background: #fff; border-radius: var(--radius);
  border: 1px solid rgba(226,232,240,.9); box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.news-card-link {
  display: grid; grid-template-columns: 120px 1fr; column-gap: .95rem; row-gap: 0;
  color: inherit; align-items: stretch; min-height: 112px;
}
.news-card-link:hover { color: inherit; }
.news-thumb {
  position: relative;
  align-self: stretch;
  min-height: 100%;
  overflow: hidden;
  background: #E2E8F0;
}
.news-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.news-body { padding: .95rem 1rem .95rem 0; display: flex; flex-direction: column; justify-content: center; }
.news-body time { display: block; color: var(--muted); font-size: .8rem; margin-bottom: .35rem; }
.news-body h3 { margin: 0; font-size: .98rem; line-height: 1.35; font-weight: 700; }
.news-body p { display: none; }

/* FAQ */
.faq { background: var(--bg-soft); }
.faq-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: .85rem 1.15rem;
}
.faq-item {
  background: #fff; border-radius: var(--radius); border: 1px solid rgba(226,232,240,.95);
  overflow: hidden;
}
.faq-question {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; text-align: left; background: transparent; border: 0;
  padding: 1.1rem 1.2rem; cursor: pointer; font-weight: 600; color: var(--text);
  font-size: .98rem;
}
.faq-plus {
  width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0;
  background: #EFF6FF; color: var(--primary);
  display: inline-grid; place-items: center; font-size: 1.15rem; font-weight: 700;
  transition: transform .2s ease;
}
.faq-item.is-open .faq-plus { transform: rotate(45deg); background: var(--primary); color: #fff; }
.faq-answer { padding: 0 1.2rem 1.15rem; color: var(--muted); }
.faq-answer p { margin: 0; }
.faq-answer[hidden] { display: none; }

/* Final CTA */
.final-cta { padding: 2.5rem 0 4.5rem; background: #fff; }
.final-cta-box {
  display: flex; align-items: center; justify-content: space-between; gap: 2rem;
  background: #EEF6FF; border-radius: var(--radius); padding: 2.4rem 2.5rem;
}
.final-cta-copy { max-width: 620px; }
.final-cta h2 {
  margin: 0 0 .65rem; font-size: clamp(1.55rem, 2.6vw, 2rem);
  font-weight: 800; letter-spacing: -.02em;
}
.final-cta p { margin: 0; color: var(--muted); max-width: 560px; }
.final-cta-actions { display: flex; gap: .75rem; flex-wrap: wrap; flex-shrink: 0; }

/* Footer styles live in assets/css/footer.css */

/* Alerts / Auth / Forms (LMS) */
.alert {
  padding: .9rem 1.1rem; border-radius: 0; margin: 1rem 0; font-weight: 600;
}
.alert-success { background: #e8f8ec; color: #1f7a38; }
.alert-error { background: #fdecea; color: #b42318; }
.auth-wrap {
  min-height: 70vh; display: grid; place-items: center; padding: 2rem 0;
}
.auth-card {
  width: min(440px, 100%); background: #fff; border-radius: 0;
  box-shadow: var(--shadow); padding: 2rem; border: 1px solid var(--border);
}
.auth-card-wide { width: min(560px, 100%); }
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; font-weight: 600; margin-bottom: .35rem; font-size: .9rem; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: .8rem 1rem; border: 1px solid var(--border); border-radius: 0;
  font: inherit; background: #fafcfd;
}
.form-group textarea { min-height: 110px; resize: vertical; }

.page-hero {
  background: linear-gradient(120deg, #1E3A8A, var(--sky));
  color: #fff; padding: 3rem 0 2.5rem;
}
.page-hero h1 { margin: 0; color: #fff; }

.filters { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.5rem; }
.chip {
  padding: .45rem .9rem; border-radius: 0; background: #fff; border: 1px solid var(--border);
  color: var(--text); font-weight: 600; font-size: .85rem;
}
.chip.active, .chip:hover { background: var(--primary); color: #fff; border-color: var(--primary); }

.layout-split {
  display: grid; grid-template-columns: 280px 1fr; gap: 1.25rem;
}
@media (max-width: 900px) { .layout-split { grid-template-columns: 1fr; } }

.side-nav a {
  display: block; padding: .7rem .9rem; border-radius: 0; color: var(--text); font-weight: 600;
}
.side-nav a.active, .side-nav a:hover { background: rgba(6,153,216,.1); color: var(--primary); }

.panel, .feature-card, .course-card, .webinar-card {
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-sm);
  overflow: hidden; border: 1px solid rgba(226,232,240,.85);
}
.panel { padding: 1.25rem; }
.feature-card { padding: 1.5rem; }
.feature-card .num {
  font-size: 2rem; font-weight: 800; color: var(--sky); margin-bottom: .5rem;
}
.feature-card h3 { margin: 0 0 .5rem; }
.section-head { margin-bottom: 2rem; }
.section-head h2 { margin: 0 0 .5rem; font-size: clamp(1.6rem, 3vw, 2.2rem); }
.section-head p { margin: 0; color: var(--muted); max-width: 640px; }
.grid-3 { display: grid; gap: 1.25rem; grid-template-columns: repeat(3, 1fr); }
.grid-2 { display: grid; gap: 1.25rem; grid-template-columns: repeat(2, 1fr); }
@media (max-width: 900px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }

.course-card .cover {
  aspect-ratio: 16/10; background: #d9ecf6 center/cover; position: relative;
}
.course-card .badge {
  position: absolute; top: .8rem; left: .8rem;
  background: var(--teal); color: #fff; font-size: .75rem; font-weight: 700;
  padding: .3rem .65rem; border-radius: 0;
}
.course-card .body { padding: 1.1rem 1.2rem 1.35rem; }
.course-card .cat { color: var(--primary); font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.course-card h3 { margin: .35rem 0 .6rem; font-size: 1.05rem; }
.course-meta { display: flex; gap: 1rem; color: var(--muted); font-size: .85rem; margin-bottom: 1rem; }

.progress {
  height: 10px; background: #e6eef3; border-radius: 0; overflow: hidden;
}
.progress > span { display: block; height: 100%; background: linear-gradient(90deg, var(--primary), var(--teal)); }

.lesson-list a {
  display: flex; justify-content: space-between; gap: .5rem;
  padding: .75rem .85rem; border-radius: 0; color: var(--text); font-weight: 600;
  border: 1px solid transparent;
}
.lesson-list a.active { background: rgba(6,153,216,.1); border-color: rgba(6,153,216,.2); color: var(--primary); }
.lesson-list .done { color: var(--teal); font-size: .8rem; }
.lesson-list a.locked { opacity: .72; color: var(--muted); }
.lesson-list .lock-hint { display: block; font-weight: 600; color: #b42318; margin-top: .15rem; }
.locked-lesson {
  text-align: center; padding: 2.5rem 1rem; background: #f7fafc; border-radius: 0; border: 1px dashed #c5d8e4;
}
.locked-icon { font-size: 2.5rem; margin-bottom: .5rem; }
.lesson-unlock-row {
  display: flex; flex-wrap: wrap; gap: .75rem; align-items: end;
  padding: 1rem 0; border-bottom: 1px solid #e8eef2;
}
.lesson-unlock-title { flex: 1 1 180px; min-width: 160px; }
.check-inline { display: inline-flex; align-items: center; gap: .4rem; font-weight: 600; cursor: pointer; }

.video-frame {
  position: relative; aspect-ratio: 16/9; background: #111; border-radius: 0; overflow: hidden;
}
.video-frame iframe, .video-frame video { width: 100%; height: 100%; border: 0; }
.video-fallback {
  color: #fff; display: grid; place-items: center; height: 100%; padding: 1rem; text-align: center;
}
.video-watch-hint, .video-embed-error { margin: .35rem 0 0; }
.video-embed-error { color: #b42318; }

.quiz-option {
  display: block; padding: .9rem 1rem; border: 1px solid var(--border); border-radius: 0;
  margin-bottom: .6rem; cursor: pointer; background: #fff;
}
.quiz-option:has(input:checked) { border-color: var(--primary); background: rgba(6,153,216,.08); }
.quiz-option input { margin-right: .55rem; }

.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: .75rem; border-bottom: 1px solid #e8eef2; text-align: left; font-size: .92rem; }
.table th { color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; }

.admin-shell, .cabinet-shell { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.admin-shell .sidebar, .cabinet-shell .sidebar {
  background: #0F172A; color: #fff; padding: 1.5rem 1rem;
}
.admin-shell .sidebar a, .cabinet-shell .sidebar a {
  display: block; color: #d5e6ef; padding: .65rem .8rem; border-radius: 0; font-weight: 600; margin-bottom: .2rem;
}
.admin-shell .sidebar a:hover, .cabinet-shell .sidebar a:hover,
.admin-shell .sidebar a.active, .cabinet-shell .sidebar a.active { background: rgba(255,255,255,.1); color: #fff; }
.admin-shell .main, .cabinet-shell .main { padding: 1.5rem; }
@media (max-width: 900px) {
  .admin-shell, .cabinet-shell { grid-template-columns: 1fr; }
}

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
@media (max-width: 900px) { .stats { grid-template-columns: 1fr 1fr; } }
.stat {
  background: #fff; border-radius: 0; padding: 1.2rem; box-shadow: var(--shadow-sm);
}
.stat strong { display: block; font-size: 1.8rem; color: var(--primary); }
.sidebar-role {
  font-size: .75rem; text-transform: uppercase; letter-spacing: .06em;
  color: var(--teal); margin: 0 .8rem .2rem; font-weight: 700;
}
.teacher-shell .sd-page {
  max-width: none;
  padding: 0;
  margin: 0;
  background: transparent;
}
.sidebar-badge {
  display: inline-block;
  min-width: 1.25rem;
  padding: 0.1rem 0.4rem;
  margin-left: 0.35rem;
  border-radius: 999px;
  background: #f59e0b;
  color: #0f172a;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  vertical-align: middle;
}
.teacher-banner {
  min-height: 280px; background: center/cover; color: #fff;
  display: flex; align-items: flex-end; padding: 2.5rem 0;
}
.teacher-banner-inner { display: flex; gap: 1.25rem; align-items: flex-end; }
.teacher-avatar {
  width: 120px; height: 120px; border-radius: 50%; border: 4px solid #fff;
  background: #ccc center/cover; flex-shrink: 0; box-shadow: var(--shadow);
}
.teacher-banner h1 { margin: 0 0 .35rem; color: #fff; }
.teacher-headline { margin: 0; opacity: .95; font-size: 1.05rem; }
.teacher-layout { display: grid; grid-template-columns: 1fr 300px; gap: 1.25rem; }
@media (max-width: 900px) { .teacher-layout { grid-template-columns: 1fr; } }
.teacher-news-item { padding: 1rem 0; border-bottom: 1px solid #e8eef2; }
.teacher-news-item h3 { margin: 0 0 .25rem; }
.teacher-news-item time { display: block; font-size: .8rem; margin-bottom: .5rem; }
.teacher-course-link {
  display: flex; justify-content: space-between; gap: .5rem;
  padding: .75rem 0; border-bottom: 1px solid #eef3f6; color: inherit; font-weight: 600;
}
.teacher-course-link:hover { color: var(--primary); }

/* Courses listing cards (LMS) */
.courses-grid {
  display: grid; gap: 1.35rem; grid-template-columns: repeat(3, 1fr);
}
.ms-course-card {
  border-radius: 0; overflow: hidden; height: 100%;
  transition: transform .2s ease, box-shadow .2s ease;
  box-shadow: var(--shadow-sm);
}
.ms-course-card:hover { transform: translateY(-2px); }
.ms-course-cover {
  display: block; position: relative; min-height: 320px; height: 100%;
  background: #d9ecf6; overflow: hidden; border-radius: 0; color: #fff;
}
.ms-course-cover img {
  width: 100%; height: 100%; min-height: 320px; object-fit: cover;
}
.ms-course-overlay {
  position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end;
  padding: 15px 20px 18px;
  background: linear-gradient(180deg, rgba(15,23,42,0) 0%, rgba(15,23,42,.9) 100%);
}
.ms-status {
  position: absolute; top: 12px; right: 12px; z-index: 3;
  min-width: 110px; padding: 7px 14px; border-radius: 0;
  font-size: 12px; font-weight: 700; color: #fff; text-align: center;
}
.ms-status-featured { background: #14B8A6; }
.ms-status-new, .badge-free { background: #38BDF8; }
.badge-hit { background: #f09b23; }
.badge-combined { background: #7c3aed; }
.ms-cat { color: #B3BAC2; font-size: 14px; font-weight: 500; margin-bottom: 10px; }
.ms-course-overlay h3 {
  margin: 0; font-size: 17px; line-height: 1.2; font-weight: 700; color: #fff; min-height: 40px;
}
.ms-excerpt { margin: 12px 0 0; color: #fff; font-size: 14px; line-height: 20px; }
.ms-meta-row {
  display: flex; align-items: center; justify-content: space-between; gap: .5rem;
  margin-top: 10px; flex-wrap: wrap;
}
.ms-rating { display: inline-flex; align-items: center; gap: .35rem; color: #B3BAC2; font-size: 14px; }
.ms-stars { color: #B3BAC2; letter-spacing: -.05em; font-size: 14px; }
.ms-meta { display: inline-flex; align-items: center; gap: .45rem; color: #fff; font-size: 14px; }
.ms-meta-divider { width: 1px; height: 12px; background: #B3BAC2; }
.ms-price-row { margin-top: 7px; }
.ms-price {
  display: inline-flex; align-items: center; gap: .4rem;
  color: #fff; font-weight: 700; font-size: 14px;
}
.ms-price-icon {
  width: 18px; height: 18px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center; font-size: 11px;
}
.ms-teacher {
  display: block; font-size: 13px; font-weight: 600; color: #B3BAC2; margin-top: .45rem;
}
@media (max-width: 980px) {
  .courses-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .courses-grid { grid-template-columns: 1fr; }
  .ms-course-cover, .ms-course-cover img { min-height: 280px; }
}

/* Responsive */
@media (max-width: 1100px) {
  .pillars-layout, .mentors-layout, .support-layout { grid-template-columns: 1fr; }
  .pillars-title { max-width: none; margin-bottom: .25rem; }
  .pillars-grid, .programs-grid, .how-steps { grid-template-columns: 1fr 1fr; }
  .support-grid { grid-template-columns: 1fr 1fr; }
  .support-banners { grid-template-columns: 1fr; }
  .news-grid { grid-template-columns: 1fr; }
  .mentors-carousel-wrap .mentor-card {
    flex-basis: calc((100% - 1.25rem) / 2);
    width: calc((100% - 1.25rem) / 2);
    max-width: calc((100% - 1.25rem) / 2);
  }
  .story-card { flex-basis: calc(50% - .55rem); }
  .stats-list { grid-template-columns: 1fr 1fr; }
  .stat-item { border-right: 0; padding: .5rem .75rem; }
  .mentors-controls { position: static; margin-bottom: .75rem; justify-content: flex-end; }
  .mentors-carousel-wrap { padding-top: 0; }
  .final-cta-box { flex-direction: column; align-items: flex-start; }
  .home-banner-box { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 992px) {
  :root {
    --page-gutter: 1.5rem;
  }
}

@media (max-width: 900px) {
  /* backdrop-filter creates a containing block for position:fixed —
     without this, .nav fixed inset:0 only covers the sticky header. */
  .site-header {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: #fff;
    overflow: visible;
  }
  .site-header > .container,
  .header-inner {
    overflow: visible;
  }
  .header-inner {
    grid-template-columns: 1fr auto;
    gap: .5rem;
  }
  .menu-toggle {
    display: inline-flex;
    grid-column: 2;
    justify-self: end;
    z-index: 1;
  }
  /* Only the root header nav — never nested .nav inside .nav__links */
  #site-main-nav.nav,
  nav.nav[data-nav] {
    display: block;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100vw;
    width: 100dvw;
    height: 100vh;
    height: 100dvh;
    margin: 0;
    z-index: 2000;
    pointer-events: none;
    visibility: hidden;
    white-space: normal;
  }
  #site-main-nav.nav.open,
  nav.nav[data-nav].open {
    pointer-events: auto;
    visibility: visible;
  }
  body.nav-open .site-header {
    z-index: 50;
    background: #fff;
  }
  #site-main-nav .nav__backdrop,
  nav[data-nav] .nav__backdrop {
    display: block;
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.45);
    opacity: 0;
    transition: opacity .2s ease;
    cursor: pointer;
  }
  #site-main-nav.open .nav__backdrop,
  nav[data-nav].open .nav__backdrop { opacity: 1; }
  #site-main-nav .nav__sheet,
  nav[data-nav] .nav__sheet {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    background:
      radial-gradient(120% 80% at 100% 0%, rgba(56, 189, 248, 0.10), transparent 55%),
      radial-gradient(90% 70% at 0% 100%, rgba(6, 153, 216, 0.08), transparent 50%),
      #fff;
    transform: translateY(10px);
    opacity: 0;
    transition: transform .28s ease, opacity .22s ease;
    overflow: hidden;
    padding:
      max(0.65rem, env(safe-area-inset-top, 0px))
      max(1.1rem, env(safe-area-inset-right, 0px))
      max(1rem, env(safe-area-inset-bottom, 0px))
      max(1.1rem, env(safe-area-inset-left, 0px));
  }
  #site-main-nav.open .nav__sheet,
  nav[data-nav].open .nav__sheet {
    transform: translateY(0);
    opacity: 1;
  }
  .nav__sheet-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-shrink: 0;
    padding: 0.2rem 0.1rem 0.95rem;
    border-bottom: 1px solid rgba(226, 232, 240, 0.95);
  }
  .nav__sheet-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    min-width: 0;
    color: inherit;
    line-height: 0;
  }
  .nav__sheet-brand:hover { color: inherit; }
  .nav__sheet-logo {
    height: 40px;
    width: auto;
    max-width: min(200px, 58vw);
    object-fit: contain;
    display: block;
  }
  .nav__sheet-mark svg {
    height: 40px;
    width: auto;
  }
  .nav__sheet-brand-name {
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--navy);
    line-height: 1.15;
  }
  .nav__sheet-title {
    display: none;
  }
  .nav__close {
    width: 44px;
    height: 44px;
    border: 1px solid #BFDBFE;
    border-radius: 0;
    background: #EFF6FF;
    color: #1E40AF;
    display: inline-grid;
    place-items: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: background .15s ease, color .15s ease, border-color .15s ease;
  }
  .nav__close:hover,
  .nav__close:focus-visible {
    background: #DBEAFE;
    color: #0578AB;
    border-color: #93C5FD;
    outline: none;
  }
  .nav__links {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0.15rem;
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 1rem 0.1rem 0.5rem;
    grid-column: auto;
    justify-self: stretch;
  }
  .nav__links a {
    display: flex;
    align-items: center;
    min-height: 52px;
    padding: 0.85rem 1rem;
    border-radius: 0;
    font-size: 1.12rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: #0F172A;
  }
  .nav__links a:hover,
  .nav__links a.is-active {
    background: #EFF6FF;
    color: var(--primary);
  }
  .header-actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.55rem;
    flex-shrink: 0;
    max-height: min(38vh, 340px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
    grid-column: auto;
    grid-row: auto;
    align-self: stretch;
    justify-self: stretch;
    z-index: auto;
  }
  .nav__contacts {
    display: block;
    flex-shrink: 0;
    margin-top: 0.75rem;
    padding: 1rem 1rem 0.85rem;
    border-radius: 0;
    background: linear-gradient(165deg, #0B1F4A 0%, #1E3A8A 55%, #0699D8 120%);
    color: #E2E8F0;
    box-shadow: 0 12px 28px rgba(6, 153, 216, 0.18);
  }
  /* Override .nav a (#334155) — all contact links must stay white on dark gradient */
  .nav .nav__contacts a,
  .nav__contacts a {
    color: #fff;
  }
  .nav .nav__contacts a:hover,
  .nav__contacts a:hover {
    color: #DBEAFE;
  }
  .nav__contacts-label {
    margin: 0 0 0.55rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(191, 219, 254, 0.9);
  }
  .nav__contacts-phone {
    display: inline-flex;
    align-items: center;
    margin: 0 0 0.45rem;
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #fff;
    line-height: 1.2;
  }
  .nav__contacts-phone:hover { color: #DBEAFE; }
  .nav__contacts-address {
    margin: 0 0 0.55rem;
    font-size: 0.9rem;
    line-height: 1.45;
    color: rgba(226, 232, 240, 0.92);
  }
  .nav__contacts-email {
    display: inline-block;
    margin: 0 0 0.65rem;
    font-size: 0.88rem;
    font-weight: 600;
    color: #fff;
  }
  .nav__contacts-email:hover { color: #DBEAFE; }
  .nav__contacts-social {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem 0.85rem;
    margin-top: 0.15rem;
  }
  .nav__contacts-link {
    display: inline-flex;
    align-items: center;
    font-size: 0.88rem;
    font-weight: 700;
    color: #fff;
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-color: rgba(191, 219, 254, 0.65);
  }
  .nav__contacts-link:hover {
    color: #DBEAFE;
  }
  /* Search stays outside mobile sheet — hide desktop search on small screens */
  .header-search--desktop,
  .header-search--desktop .header-search__panel,
  #header-search-panel {
    display: none !important;
  }
  .nav__sheet .header-search,
  .nav__sheet #header-search-panel {
    display: none !important;
  }
  .header-actions .user-menu,
  .header-actions .header-auth-btn { order: 1; }
  .header-actions .fav-menu { order: 2; }
  .header-search--desktop {
    margin-right: 0;
  }
  .header-action-label {
    display: inline;
    font-size: 0.95rem;
    font-weight: 600;
  }
  #site-main-nav .icon-btn,
  #site-main-nav .header-auth-btn,
  #site-main-nav .user-menu__trigger,
  nav[data-nav] .icon-btn,
  nav[data-nav] .header-auth-btn,
  nav[data-nav] .user-menu__trigger {
    width: 100%;
    height: auto;
    min-height: 48px;
    padding: 0.7rem 1rem;
    border-radius: 0;
    border: 1.5px solid #BFDBFE;
    background: #F8FAFC;
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.65rem;
    place-items: unset;
  }
  #site-main-nav .header-auth-btn,
  #site-main-nav .user-menu__trigger,
  nav[data-nav] .header-auth-btn,
  nav[data-nav] .user-menu__trigger {
    color: var(--primary);
  }
  #site-main-nav .fav-menu,
  #site-main-nav .user-menu,
  nav[data-nav] .fav-menu,
  nav[data-nav] .user-menu {
    width: 100%;
  }
  #site-main-nav .fav-menu__badge,
  nav[data-nav] .fav-menu__badge {
    position: static;
    margin-left: auto;
  }
  #site-main-nav .fav-menu__dropdown,
  #site-main-nav .user-menu__dropdown,
  nav[data-nav] .fav-menu__dropdown,
  nav[data-nav] .user-menu__dropdown {
    position: static;
    top: auto;
    right: auto;
    width: 100%;
    margin-top: 0.45rem;
    transform: none;
    box-shadow: none;
  }
  #site-main-nav .fav-menu__dropdown,
  #site-main-nav .user-menu__dropdown,
  nav[data-nav] .fav-menu__dropdown,
  nav[data-nav] .user-menu__dropdown {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    display: none;
  }
  #site-main-nav .fav-menu.is-open .fav-menu__dropdown,
  #site-main-nav .user-menu.is-open .user-menu__dropdown,
  nav[data-nav] .fav-menu.is-open .fav-menu__dropdown,
  nav[data-nav] .user-menu.is-open .user-menu__dropdown {
    display: block;
  }
  #site-main-nav .user-menu:hover .user-menu__dropdown,
  nav[data-nav] .user-menu:hover .user-menu__dropdown {
    display: none;
  }
  #site-main-nav .user-menu.is-open:hover .user-menu__dropdown,
  nav[data-nav] .user-menu.is-open:hover .user-menu__dropdown {
    display: block;
  }
  /* Nested legacy <nav class="nav"> must stay a transparent wrapper on mobile */
  #site-main-nav .nav__links > .nav,
  nav[data-nav] .nav__links > .nav {
    display: contents !important;
    position: static !important;
    visibility: visible !important;
    pointer-events: auto !important;
    width: auto !important;
    height: auto !important;
    inset: auto !important;
    opacity: 1 !important;
    transform: none !important;
  }
  .faq-grid { grid-template-columns: 1fr; }
  .stats-banner { grid-template-columns: 1fr; }
  .stats-list { padding: 1.5rem 1rem; }
  .section { padding: 3.25rem 0; }
  .final-cta-actions { width: 100%; }
  .final-cta-actions .btn { flex: 1 1 auto; justify-content: center; }
  .table-scroll,
  .panel:has(> .table),
  .panel:has(> table.table) {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .table { min-width: 560px; }
}

@media (max-width: 768px) {
  :root {
    --page-gutter: 1.25rem;
  }
  .page-hero { padding: 2rem 0 1.75rem; }
  .page-hero h1 { font-size: clamp(1.45rem, 6vw, 1.85rem); }
  .auth-card { padding: 1.35rem 1.15rem; }
}

@media (max-width: 640px) {
  :root {
    --page-gutter: 1rem;
  }
  .header-inner {
    min-height: 58px;
    height: 60px;
  }
  .brand-mark svg,
  .brand-logo {
    height: 36px;
  }
  .pillars-grid, .programs-grid, .support-grid, .how-steps { grid-template-columns: 1fr; }
  /* Keep two mentor cards visible side-by-side on mobile */
  .mentors-carousel-wrap .carousel-track { gap: .75rem; }
  .mentors-carousel-wrap .mentor-card {
    flex: 0 0 calc((100% - .75rem) / 2);
    width: calc((100% - .75rem) / 2);
    max-width: calc((100% - .75rem) / 2);
    padding-bottom: .85rem;
  }
  .mentors-carousel-wrap .mentor-card h3 {
    margin: .7rem .55rem .25rem;
    font-size: .82rem;
    line-height: 1.25;
  }
  .mentors-carousel-wrap .mentor-role {
    margin: 0 .55rem;
    font-size: .72rem;
    line-height: 1.35;
    -webkit-line-clamp: 3;
  }
  .story-card { flex-basis: 85%; }
  .news-card-link { grid-template-columns: 100px 1fr; }
  .stats-list { grid-template-columns: 1fr 1fr; gap: .5rem; }
  .final-cta-box { padding: 1.6rem 1.25rem; }
  .section-head-left { flex-direction: column; align-items: flex-start; gap: .35rem; }
  .section { padding: 2.75rem 0; }
  .stats { grid-template-columns: 1fr; }
  .rich-content iframe { min-height: 220px; }
  .teacher-banner-inner { flex-direction: column; align-items: flex-start; }
  .teacher-avatar { width: 88px; height: 88px; }
}

/* Public news list / article */
.news-list-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
  gap: 1.25rem;
}
.news-list-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.news-list-card__media {
  display: block; aspect-ratio: 16 / 9; overflow: hidden; background: #e8eef3;
}
.news-list-card__media img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.news-list-card__body { padding: 1.1rem 1.25rem 1.35rem; display: flex; flex-direction: column; gap: .55rem; flex: 1; }
.news-list-card__body h2 { margin: 0; font-size: 1.15rem; line-height: 1.35; }
.news-list-card__body h2 a { color: inherit; text-decoration: none; }
.news-list-card__body h2 a:hover { color: var(--accent, #1690C8); }
.news-list-card__body .btn { align-self: flex-start; margin-top: auto; }

.news-article { max-width: 860px; }
.news-article__cover {
  margin: 0 0 1.5rem; border-radius: 0; overflow: hidden; background: #e8eef3;
}
.news-article__cover img { width: 100%; display: block; max-height: 420px; object-fit: cover; }
.news-article__lead {
  font-size: 1.15rem; line-height: 1.55; color: #54595F; margin: 0 0 1.25rem; font-weight: 500;
}
.news-article__body.rich-content,
.news-article__embeds.rich-content {
  line-height: 1.7; color: #333;
}
.rich-content h2, .rich-content h3 { margin: 1.4rem 0 .6rem; }
.rich-content p { margin: 0 0 1rem; }
.rich-content ul, .rich-content ol { margin: 0 0 1rem; padding-left: 1.35rem; }
.rich-content img { max-width: 100%; height: auto; border-radius: 0; }
.rich-content iframe {
  width: 100%; max-width: 100%; min-height: 360px; border: 0; border-radius: 0;
  margin: .75rem 0 1.25rem;
}
.news-article__gallery {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: .75rem; margin-top: 1.75rem;
}
.news-article__gallery img {
  width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 0; display: block;
}

/* Course webinar room + live chat */
.webinar-desc { line-height: 1.55; }
.webinar-room { margin-top: .5rem; }
.webinar-room__status {
  display: flex; flex-wrap: wrap; align-items: center; gap: .65rem 1rem;
  padding: .9rem 1rem; border-radius: 0; background: #f4f8fb; border: 1px solid #d9e6ef;
  margin-bottom: 1rem;
}
.webinar-room__status[hidden] { display: none !important; }
.webinar-room__status--live {
  background: rgba(34, 197, 94, .08); border-color: rgba(34, 197, 94, .35);
}
.webinar-room__status--after {
  background: #f8fafc; border-color: #d9e6ef;
  flex-direction: column; align-items: flex-start; gap: .35rem;
}
.webinar-live-dot {
  width: .65rem; height: .65rem; border-radius: 50%; background: #16a34a;
  box-shadow: 0 0 0 4px rgba(22, 163, 74, .18); animation: webinar-pulse 1.6s ease-in-out infinite;
}
@keyframes webinar-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.15); opacity: .7; }
}
.webinar-countdown { text-align: center; width: 100%; padding: .5rem 0; }
.webinar-countdown__label { margin: 0; color: var(--muted); font-weight: 600; }
.webinar-countdown__when { margin: .35rem 0; font-size: 1.15rem; }
.webinar-countdown__timer {
  margin-top: .75rem; font-size: 1.35rem; font-weight: 700; color: var(--primary, #0699D8);
  font-variant-numeric: tabular-nums;
}
.webinar-layout { display: block; }
.webinar-layout--av {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
  gap: 1rem;
  align-items: stretch;
  margin-bottom: 1rem;
}
.webinar-stage__video {
  min-height: 420px;
  border-radius: 0;
  overflow: hidden;
  background: #0f172a;
  border: 1px solid #1e293b;
}
.webinar-stage__video[hidden] { display: none !important; }
.webinar-jitsi {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 420px;
}
.webinar-jitsi > iframe {
  width: 100% !important;
  height: 100% !important;
  min-height: 420px;
  border: 0;
}
.webinar-jitsi__placeholder {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: .75rem; text-align: center;
  min-height: 420px; padding: 1.5rem; color: #e2e8f0;
}
.webinar-jitsi__placeholder .muted { color: #94a3b8; max-width: 28rem; margin: 0; }
.webinar-jitsi__placeholder p { margin: 0; }
.webinar-layout--av .webinar-chat {
  display: flex; flex-direction: column; min-height: 420px; max-height: min(70vh, 640px);
  margin: 0;
}
.webinar-layout--av .webinar-chat__log { flex: 1; height: auto; min-height: 0; }
.webinar-chat {
  border: 1px solid #d9e6ef; border-radius: 0; overflow: hidden; background: #fff;
}
.webinar-chat__head {
  display: flex; justify-content: space-between; align-items: center; gap: .75rem;
  padding: .75rem 1rem; border-bottom: 1px solid #e8eef2; background: #f8fafc;
}
.webinar-chat__log {
  height: min(420px, 55vh); overflow-y: auto; padding: .85rem 1rem;
  display: flex; flex-direction: column; gap: .75rem; background: #fcfdff;
}
.webinar-chat__msg {
  padding: .65rem .8rem; border-radius: 0; background: #fff; border: 1px solid #eef2f6;
}
.webinar-chat__meta {
  display: flex; flex-wrap: wrap; gap: .35rem .65rem; align-items: baseline;
  margin-bottom: .3rem; font-size: .82rem;
}
.webinar-chat__role {
  color: var(--primary, #0699D8); font-weight: 600; font-size: .75rem;
  text-transform: uppercase; letter-spacing: .03em;
}
.webinar-chat__meta time { color: var(--muted); margin-left: auto; font-size: .75rem; }
.webinar-chat__text { line-height: 1.45; word-break: break-word; }
.webinar-chat__composer {
  display: grid; grid-template-columns: 1fr auto; gap: .65rem; align-items: end;
  padding: .85rem 1rem; border-top: 1px solid #e8eef2; background: #fff;
}
.webinar-chat__composer[hidden] { display: none !important; }
.webinar-chat__composer textarea {
  grid-column: 1 / -1; width: 100%; resize: vertical; min-height: 64px;
}
.webinar-chat__composer .btn { justify-self: end; }
.webinar-chat__error { grid-column: 1 / -1; color: #b42318; margin: 0; }
.webinar-chat__error[hidden] { display: none !important; }
.webinar-chat__closed { padding: 0 1rem 1rem; margin: 0; }
.webinar-chat__closed[hidden] { display: none !important; }
.webinar-chat__empty { margin: .5rem 0; }
@media (max-width: 960px) {
  .webinar-layout--av {
    grid-template-columns: 1fr;
  }
  .webinar-layout--av .webinar-chat {
    max-height: none; min-height: 320px;
  }
}
@media (max-width: 640px) {
  .webinar-chat__composer { grid-template-columns: 1fr; }
  .webinar-chat__composer .btn { width: 100%; }
  .webinar-stage__video,
  .webinar-jitsi,
  .webinar-jitsi__placeholder,
  .webinar-jitsi > iframe { min-height: 280px; }
}

/* Floating «Сохранить курс» on course edit (teacher + shared) */
.course-save-fab {
  position: fixed;
  right: max(1.25rem, env(safe-area-inset-right, 0px));
  bottom: max(1.25rem, env(safe-area-inset-bottom, 0px));
  z-index: 90;
  box-shadow: 0 8px 28px rgba(6, 153, 216, 0.38);
}
.course-save-fab:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
}
.layout__content:has(.course-save-fab),
.td-layout__content:has(.course-save-fab) {
  padding-bottom: 5rem;
}
@media (max-width: 640px) {
  .course-save-fab {
    right: max(0.75rem, env(safe-area-inset-right, 0px));
    bottom: max(0.75rem, env(safe-area-inset-bottom, 0px));
    padding: 0.7rem 1.15rem;
    font-size: 0.875rem;
  }
}
