@font-face {
  font-family: 'Nunito';
  src: url('/fonts/Nunito-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Nunito';
  src: url('/fonts/Nunito-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --mb-ink: #141217;
  --mb-text: #343039;
  --mb-muted: #6f7682;
  --mb-blue: #2563eb;
  --mb-blue-deep: #1746b7;
  --mb-blue-soft: #eaf1ff;
  --mb-violet: #4f46e5;
  --mb-violet-deep: #1e1b4b;
  --mb-night: #0a0e23;
  --mb-gold: #d4a537;
  --mb-gold-soft: #fbf3e0;
  --mb-bg: #f7f9fc;
  --mb-deep: #0b1220;
  --mb-line: rgba(37, 99, 235, .14);
  --mb-font: 'Nunito', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
}

body {
  font-family: var(--mb-font);
  background: linear-gradient(180deg, #f7f9fc 0%, #ffffff 42%, #f3f6fb 100%);
  color: var(--mb-ink);
}

h1, h2, h3, h4, h5, h6,
.navbar-brand,
.btn {
  font-family: var(--mb-font);
}

.navbar {
  background: rgba(255, 255, 255, .82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: background .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.navbar.is-scrolled {
  background: rgba(255, 255, 255, .96);
  border-bottom-color: var(--mb-line);
  box-shadow: 0 10px 30px rgba(15, 23, 42, .07);
}

.navbar-brand {
  letter-spacing: 0;
  color: var(--mb-ink);
}

.navbar .nav-link {
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  font-weight: 600;
  font-size: .95rem;
  color: #1f2937;
  padding-inline: .9rem;
  border-radius: 8px;
  transition: color .15s ease, background .15s ease;
}

.navbar .nav-link:hover,
.navbar .nav-link:focus {
  color: var(--mb-blue);
  background: var(--mb-blue-soft);
}

.navbar .navbar-nav .btn {
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  font-weight: 600;
}

.brand-short {
  display: none;
}

@media (max-width: 360px) {
  .brand-full {
    display: none;
  }
  .brand-short {
    display: inline;
  }
}


.navbar-logo,
.footer-logo {
  flex: 0 0 auto;
  border-radius: 10px;
}

/* ===== Админ-меню (верхняя панель) ===== */
.admin-nav {
  position: sticky;
  top: 62px;
  z-index: 1010;
  background: #0f172a;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.admin-nav-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: .5rem 0;
}

.admin-nav-title {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  flex: 0 0 auto;
  padding-right: 1rem;
  border-right: 1px solid rgba(255, 255, 255, .12);
  color: #fff;
  font-weight: 800;
  font-size: .9rem;
}

.admin-nav-links {
  display: flex;
  align-items: center;
  gap: .25rem;
  flex: 1 1 auto;
  overflow-x: auto;
  scrollbar-width: thin;
}

.admin-nav-link {
  display: inline-flex;
  align-items: center;
  gap: .38rem;
  flex: 0 0 auto;
  padding: .45rem .6rem;
  border-radius: 8px;
  color: rgba(255, 255, 255, .72);
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  font-size: .84rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: background .15s ease, color .15s ease;
}

@media (min-width: 1200px) {
  .admin-nav-links {
    justify-content: flex-start;
  }
}

.admin-nav-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, .1);
}

.admin-nav-link.active {
  color: #fff;
  background: var(--mb-blue);
}

.admin-nav-site {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  flex: 0 0 auto;
  color: rgba(255, 255, 255, .72);
  font-size: .85rem;
  font-weight: 600;
  text-decoration: none;
}

.admin-nav-site:hover {
  color: #fff;
}

@media (max-width: 767.98px) {
  .admin-nav-title span,
  .admin-nav-site span {
    display: none;
  }
}

.help-card {
  border-color: rgba(37, 99, 235, .3);
  background: linear-gradient(135deg, var(--mb-blue-soft), #fff);
}

.help-list {
  margin: .4rem 0 0;
  padding-left: 1.1rem;
  color: #344054;
  line-height: 1.65;
  font-size: .92rem;
}

.help-list li + li {
  margin-top: .35rem;
}

.account-head {
  padding: 1.6rem 1.75rem;
  border: 1px solid var(--mb-line);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(239, 246, 255, .9), #fff);
  box-shadow: 0 14px 38px rgba(15, 23, 42, .06);
}

.account-avatar {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 56px;
  height: 56px;
  border-radius: 16px;
  font-size: 1.5rem;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, #2563eb, #0f172a);
}

.account-support {
  display: flex;
  flex-direction: column;
  padding: 1.75rem;
  border-radius: 18px;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(37, 99, 235, .96), rgba(15, 23, 42, .96)),
    url('/images/wiki-community.jpg') center/cover;
  box-shadow: 0 20px 52px rgba(37, 99, 235, .2);
}

.account-support p {
  color: rgba(255, 255, 255, .86);
  line-height: 1.65;
}

.account-support .btn-light {
  margin-top: auto;
  align-self: flex-start;
}

.account-support-ico {
  display: inline-grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-bottom: 1rem;
  border-radius: 12px;
  font-size: 1.15rem;
  background: rgba(255, 255, 255, .16);
}

.auth-card {
  max-width: 440px;
  padding: 2rem;
  background: #fff;
  border: 1px solid rgba(37, 99, 235, .14);
  border-radius: 12px;
  box-shadow: 0 18px 45px rgba(15, 23, 42, .08);
}

.card {
  border-radius: 12px;
  border-color: rgba(37, 99, 235, .14);
}

.article-card img {
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.article-card {
  overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.article-card:hover {
  transform: translateY(-3px);
  border-color: rgba(37, 99, 235, .28);
  box-shadow: 0 18px 42px rgba(15, 23, 42, .10);
}

.article-card-placeholder {
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 9;
  color: #fff;
  font-weight: 700;
  background:
    linear-gradient(135deg, rgba(37, 99, 235, .88), rgba(15, 23, 42, .92)),
    url('/images/wiki-community.jpg') center/cover;
}

.article-category {
  color: var(--mb-blue);
  font-size: .78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.article-page {
  max-width: 760px;
}

.article-content {
  font-size: 1.08rem;
  line-height: 1.78;
}

.article-content img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  margin: 1rem 0;
}

.locked-box {
  background: linear-gradient(135deg, #eef4ff, #ffffff);
}

.admin-article-form .tox-tinymce {
  border-radius: 12px;
  border-color: rgba(37, 99, 235, .16);
}

.article-cover-preview {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid rgba(37, 99, 235, .14);
}

.empty-state {
  border-color: rgba(37, 99, 235, .14) !important;
}

.wiki-home {
  margin-top: -1.5rem;
}

.wiki-hero {
  position: relative;
  isolation: isolate;
  min-height: 680px;
  display: flex;
  align-items: center;
  padding: 5.5rem 0 4rem;
  color: #fff;
  overflow: hidden;
  background: #0b1220;
}

.wiki-hero-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(115deg, rgba(8, 12, 28, .96) 0%, rgba(17, 24, 58, .9) 45%, rgba(30, 27, 75, .78) 100%),
    radial-gradient(120% 90% at 82% 18%, rgba(79, 70, 229, .38), transparent 62%),
    radial-gradient(90% 70% at 10% 90%, rgba(37, 99, 235, .28), transparent 60%),
    url('/images/wiki-hero.jpg') center/cover;
}

.wiki-hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 180px;
  z-index: -1;
  background: linear-gradient(180deg, rgba(247, 249, 252, 0), #f7f9fc 88%);
}

.hero-kicker,
.section-label {
  color: var(--mb-blue);
  font-size: .78rem;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.wiki-hero .hero-kicker {
  color: #93c5fd;
  margin-bottom: 1rem;
}

.wiki-hero h1 {
  max-width: 840px;
  margin: 0;
  font-size: clamp(2.5rem, 5vw, 5.25rem);
  line-height: .98;
  font-weight: 900;
}

.hero-lead {
  max-width: 760px;
  margin: 1.5rem 0 0;
  color: rgba(255, 255, 255, .84);
  font-size: 1.2rem;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .85rem;
  margin-top: 2rem;
}

.hero-proof {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin-top: 2rem;
}

.hero-proof span {
  padding: .65rem .9rem;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 999px;
  color: rgba(255, 255, 255, .88);
  background: rgba(255, 255, 255, .08);
  backdrop-filter: blur(10px);
}

.hero-visual,
.hero-library-panel {
  position: relative;
  max-width: 420px;
  margin-left: auto;
}

.hero-visual img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, .2);
  box-shadow: 0 28px 80px rgba(0, 0, 0, .38);
}

.hero-visual-note {
  position: absolute;
  left: -1.25rem;
  right: 1.25rem;
  bottom: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: .15rem;
  padding: 1rem 1.1rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, .92);
  color: var(--mb-ink);
  box-shadow: 0 18px 42px rgba(0, 0, 0, .22);
}

.hero-visual-note span {
  color: var(--mb-muted);
  font-size: .9rem;
}

.hero-library-panel {
  padding: 1.25rem;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 22px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, .14), rgba(255, 255, 255, .04)),
    rgba(10, 14, 35, .62);
  backdrop-filter: blur(18px);
  box-shadow: 0 30px 90px rgba(0, 0, 0, .45);
}

.library-panel-top {
  display: flex;
  flex-direction: column;
  gap: .35rem;
  padding: 1rem 1.1rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, .92);
  color: var(--mb-ink);
}

.library-panel-top span {
  color: var(--mb-blue);
  font-size: .76rem;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.library-panel-top strong {
  font-size: 1.05rem;
  line-height: 1.25;
}

.library-panel-list {
  display: grid;
  gap: .75rem;
  margin-top: .9rem;
}

.library-panel-item {
  position: relative;
  padding: .9rem 1rem .9rem 1.1rem;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 14px;
  background: rgba(255, 255, 255, .07);
  transition: background .2s ease, border-color .2s ease;
}

.library-panel-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 14px;
  bottom: 14px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: linear-gradient(180deg, var(--mb-gold), rgba(212, 165, 55, .2));
}

.library-panel-item:hover {
  background: rgba(255, 255, 255, .12);
  border-color: rgba(255, 255, 255, .2);
}

.library-panel-item b {
  display: block;
  margin-bottom: .2rem;
  color: #fff;
  font-size: 1.02rem;
}

.library-panel-item span {
  display: block;
  color: rgba(255, 255, 255, .78);
  font-size: .93rem;
  line-height: 1.5;
}

.home-section {
  padding: 5rem 0;
}

.section-title {
  margin: .55rem 0 0;
  font-size: clamp(2rem, 3vw, 3.25rem);
  line-height: 1.08;
  font-weight: 900;
  color: var(--mb-ink);
}

.section-text {
  color: #344054;
  font-size: 1.08rem;
  line-height: 1.85;
}

.direction-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.direction-card {
  min-height: 300px;
  padding: 1.5rem;
  border: 1px solid var(--mb-line);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 16px 38px rgba(15, 23, 42, .06);
}

.direction-num {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  margin-bottom: 1.4rem;
  border-radius: 12px;
  color: #fff;
  font-weight: 900;
  background: linear-gradient(135deg, #2563eb, #0f172a);
}

.direction-card h3 {
  margin-bottom: .8rem;
  font-size: 1.2rem;
  font-weight: 850;
}

.direction-card p {
  margin: 0;
  color: var(--mb-muted);
  line-height: 1.7;
}

.who-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.who-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.6rem;
  border: 1px solid var(--mb-line);
  border-radius: 16px;
  background: linear-gradient(180deg, #f8fbff, #fff);
  box-shadow: 0 14px 34px rgba(15, 23, 42, .05);
}

.who-card h3 {
  margin-bottom: .6rem;
  font-size: 1.15rem;
  font-weight: 850;
}

.who-card p {
  margin: 0;
  color: var(--mb-muted);
  line-height: 1.7;
}

.who-card-ico {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  font-size: 1.25rem;
  color: var(--mb-blue);
  background: var(--mb-blue-soft);
  border: 1px solid rgba(37, 99, 235, .14);
}

/* Место под фото (заглушка — замените картинку) */
.photo-slot {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--mb-line);
  box-shadow: 0 22px 56px rgba(15, 23, 42, .12);
}

.photo-slot img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

/* Блок вопросов — единая панель, как остальные секции */
.faq-panel {
  padding: 2.5rem;
  border: 1px solid var(--mb-line);
  border-radius: 20px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .96), rgba(239, 246, 255, .92)),
    #fff;
  box-shadow: 0 18px 52px rgba(15, 23, 42, .08);
}

.faq-wrap .accordion {
  --bs-accordion-border-color: var(--mb-line);
  --bs-accordion-border-radius: 14px;
  --bs-accordion-active-bg: var(--mb-blue-soft);
  --bs-accordion-active-color: var(--mb-ink);
  --bs-accordion-btn-focus-box-shadow: 0 0 0 .2rem rgba(37, 99, 235, .14);
}

.faq-wrap .accordion-item {
  border-radius: 14px !important;
  overflow: hidden;
  margin-bottom: .6rem;
}

.faq-wrap .accordion-button {
  font-weight: 750;
}

.faq-wrap .accordion-body {
  color: #344054;
  line-height: 1.75;
}

.home-support {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  margin-top: 1.25rem;
  padding: 1.4rem 1.6rem;
  border: 1px solid var(--mb-line);
  border-radius: 16px;
  background: linear-gradient(135deg, var(--mb-blue-soft), #fff);
}

.home-support-text {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.home-support-ico {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  font-size: 1.1rem;
  color: #fff;
  background: linear-gradient(135deg, #2563eb, #0f172a);
}

@media (max-width: 991.98px) {
  .who-grid {
    grid-template-columns: 1fr;
  }
  .faq-panel {
    padding: 1.5rem;
  }
}

@media (max-width: 575.98px) {
  .home-support {
    flex-direction: column;
    align-items: flex-start;
  }
}

.home-band {
  padding: 5rem 0;
  background: #fff;
  border-top: 1px solid var(--mb-line);
  border-bottom: 1px solid var(--mb-line);
}

.home-band-img {
  width: 100%;
  aspect-ratio: 5 / 4;
  object-fit: cover;
  border-radius: 18px;
  box-shadow: 0 24px 70px rgba(15, 23, 42, .14);
}

.access-strip {
  padding: 2.5rem;
  border: 1px solid var(--mb-line);
  border-radius: 20px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .96), rgba(239, 246, 255, .92)),
    #fff;
  box-shadow: 0 18px 52px rgba(15, 23, 42, .08);
}

.access-strip h2 {
  margin: .45rem 0 1rem;
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  font-weight: 900;
  line-height: 1.08;
}

.access-strip p {
  margin: 0;
  color: #344054;
  font-size: 1.05rem;
  line-height: 1.8;
}

.access-points {
  display: grid;
  gap: .75rem;
}

.access-points span {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .9rem 1rem;
  border: 1px solid rgba(37, 99, 235, .16);
  border-radius: 12px;
  color: var(--mb-ink);
  font-weight: 750;
  background: #fff;
}

.access-ico {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  font-size: .95rem;
  color: var(--mb-blue);
  background: var(--mb-blue-soft);
}

.empty-library {
  padding: 3rem;
  border: 1px solid var(--mb-line);
  border-radius: 16px;
  background: #fff;
}

.empty-library h3 {
  font-weight: 850;
}

.courses-empty-ico {
  display: inline-grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border-radius: 20px;
  font-size: 1.8rem;
  color: #fff;
  background: linear-gradient(135deg, #2563eb, #0f172a);
}

/* Быстрая статистика в кабинете */
.account-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.account-stat {
  display: flex;
  align-items: center;
  gap: .85rem;
  padding: 1.1rem 1.2rem;
  border: 1px solid var(--mb-line);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, .05);
}

.account-stat-ico {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  font-size: 1rem;
  color: var(--mb-blue);
  background: var(--mb-blue-soft);
}

.account-stat b {
  display: block;
  font-size: 1.15rem;
  line-height: 1.2;
}

.account-stat span {
  display: block;
  color: var(--mb-muted);
  font-size: .82rem;
}

@media (max-width: 991.98px) {
  .account-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.library-cta {
  padding: 3rem;
  border-radius: 20px;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(37, 99, 235, .94), rgba(15, 23, 42, .96)),
    url('/images/wiki-community.jpg') center/cover;
  box-shadow: 0 24px 70px rgba(37, 99, 235, .22);
}

.library-cta .section-label {
  color: #bfdbfe;
}

.library-cta h2 {
  margin: .5rem 0 1rem;
  font-size: clamp(2rem, 3vw, 3.4rem);
  font-weight: 900;
  line-height: 1.08;
}

.library-cta p {
  max-width: 780px;
  margin: 0;
  color: rgba(255, 255, 255, .84);
  font-size: 1.08rem;
  line-height: 1.75;
}

.reader-path {
  padding: 2.5rem;
  border: 1px solid var(--mb-line);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 18px 52px rgba(15, 23, 42, .07);
}

.reader-path-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.reader-path-item {
  min-height: 220px;
  padding: 1.25rem;
  border: 1px solid rgba(37, 99, 235, .14);
  border-radius: 14px;
  background: linear-gradient(180deg, #f8fbff, #fff);
}

.reader-path-item span {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  margin-bottom: 1rem;
  border-radius: 11px;
  color: #fff;
  font-weight: 900;
  background: #0f172a;
}

.reader-path-item h3 {
  font-size: 1.05rem;
  font-weight: 850;
}

.reader-path-item p {
  margin: 0;
  color: var(--mb-muted);
  line-height: 1.65;
}

.page-hero {
  padding: 2.25rem;
  border: 1px solid var(--mb-line);
  border-radius: 20px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .96), rgba(239, 246, 255, .92)),
    #fff;
}

.page-hero h1,
.plans-hero h1 {
  margin: .5rem 0 1rem;
  font-size: clamp(2.1rem, 4vw, 4rem);
  line-height: 1.02;
  font-weight: 900;
}

.page-hero p,
.plans-hero p {
  max-width: 780px;
  margin: 0;
  color: #344054;
  font-size: 1.08rem;
  line-height: 1.75;
}

.materials-search {
  padding: 1rem;
  border: 1px solid var(--mb-line);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 12px 34px rgba(15, 23, 42, .05);
}

.category-access-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .9rem;
}

.category-access-card {
  min-height: 112px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  padding: 1rem;
  border: 1px solid var(--mb-line);
  border-radius: 14px;
  color: var(--mb-ink);
  text-align: left;
  text-decoration: none;
  background: #fff;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.category-access-card:hover,
.category-access-card.active {
  transform: translateY(-2px);
  border-color: rgba(37, 99, 235, .34);
  box-shadow: 0 14px 34px rgba(15, 23, 42, .08);
}

.category-access-card span {
  font-weight: 850;
}

.category-access-card small {
  color: var(--mb-muted);
}

.category-access-card.locked {
  cursor: pointer;
  opacity: .82;
}

.lock-icon {
  display: inline-block;
  margin-right: .35rem;
  padding: .12rem .4rem;
  border-radius: 999px;
  color: #fff;
  font-size: .72rem;
  font-weight: 800;
  background: #0f172a;
}

.plans-hero {
  padding: 2.75rem;
  border-radius: 22px;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(15, 23, 42, .96), rgba(37, 99, 235, .88)),
    url('/images/wiki-sacred.jpg') center/cover;
  box-shadow: 0 24px 72px rgba(15, 23, 42, .16);
}

.plans-hero .section-label,
.plans-hero p {
  color: rgba(255, 255, 255, .84);
}

.plans-note {
  padding: 1.35rem;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 16px;
  background: rgba(255, 255, 255, .12);
  backdrop-filter: blur(12px);
}

.plans-note strong {
  display: block;
  margin-bottom: .5rem;
}

.plan-card {
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  border: 1px solid var(--mb-line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 16px 42px rgba(15, 23, 42, .06);
}

.plan-card.featured {
  border-color: rgba(37, 99, 235, .34);
  box-shadow: 0 22px 58px rgba(37, 99, 235, .14);
}

.plan-card.free {
  border-color: rgba(22, 163, 74, .28);
  background: linear-gradient(180deg, #f3fbf6, #fff);
}

/* Максимальный тариф — премиальное оформление с золотым акцентом */
.plan-card.premium {
  position: relative;
  color: #fff;
  border-color: rgba(212, 165, 55, .45);
  background:
    linear-gradient(160deg, rgba(30, 27, 75, .98), rgba(10, 14, 35, .98));
  box-shadow: 0 24px 62px rgba(15, 23, 42, .28);
}

.plan-card.premium .plan-price,
.plan-card.premium h2 {
  color: #fff;
}

.plan-card.premium .plan-period,
.plan-card.premium .plan-description,
.plan-card.premium .plan-features {
  color: rgba(255, 255, 255, .78);
}

.plan-card.premium .plan-access {
  border-color: rgba(212, 165, 55, .28);
  background: rgba(255, 255, 255, .06);
}

.plan-card.premium .plan-access span {
  color: var(--mb-gold);
}

.plan-card.premium .plan-access p {
  color: rgba(255, 255, 255, .82);
}

.plan-card.premium .badge {
  color: #2a1f05 !important;
  background: var(--mb-gold) !important;
}

.plan-card.premium .btn-outline-primary {
  color: #0a0e23;
  background: var(--mb-gold);
  border-color: var(--mb-gold);
}

.plan-card.premium .btn-outline-primary:hover {
  background: #e5b84b;
  border-color: #e5b84b;
}

/* Общая полировка карточек */
.direction-card,
.who-card,
.plans-detail-card {
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.direction-card:hover,
.who-card:hover,
.plans-detail-card:hover {
  transform: translateY(-3px);
  border-color: rgba(37, 99, 235, .3);
  box-shadow: 0 20px 44px rgba(15, 23, 42, .1);
}

.plan-card:not(.premium) {
  transition: transform .18s ease, box-shadow .18s ease;
}

.plan-card:not(.premium):hover {
  transform: translateY(-3px);
  box-shadow: 0 22px 52px rgba(15, 23, 42, .12);
}

.btn-primary {
  background: linear-gradient(135deg, #2f6bf0, #1d4ed8);
  border-color: #1d4ed8;
  box-shadow: 0 8px 20px rgba(37, 99, 235, .22);
}

.btn-primary:hover,
.btn-primary:focus {
  background: linear-gradient(135deg, #2560e0, #1a45c0);
  border-color: #1a45c0;
}

.plan-price {
  margin-top: .75rem;
  font-size: 2.35rem;
  font-weight: 900;
  line-height: 1;
}

.plan-period,
.plan-description,
.plan-access p {
  color: var(--mb-muted);
}

.plan-access {
  margin: 1rem 0;
  padding: .9rem;
  border: 1px solid rgba(37, 99, 235, .12);
  border-radius: 12px;
  background: #f8fbff;
}

.plan-access span {
  display: block;
  margin-bottom: .25rem;
  color: var(--mb-blue);
  font-size: .78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.plan-access p,
.plan-features {
  margin-bottom: 0;
}

.plan-features {
  padding-left: 1.1rem;
  color: #344054;
  line-height: 1.7;
}

.plans-legal-note {
  padding: 1.5rem;
  border: 1px solid var(--mb-line);
  border-radius: 16px;
  background: #fff;
}

.plans-detail-card {
  padding: 1.6rem;
  border: 1px solid var(--mb-line);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(15, 23, 42, .05);
}

.plans-detail-ico {
  display: inline-grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-bottom: 1rem;
  border-radius: 12px;
  font-size: 1.1rem;
  color: #fff;
  background: linear-gradient(135deg, #2563eb, #0f172a);
}

.plans-detail-list {
  margin: .5rem 0 0;
  padding-left: 1.1rem;
  color: #344054;
  line-height: 1.7;
}

.plans-detail-list li + li {
  margin-top: .4rem;
}

.plans-faq {
  padding: 1.6rem 1.75rem;
  border: 1px solid var(--mb-line);
  border-radius: 16px;
  background: var(--mb-blue-soft);
}

.legal-page {
  max-width: 860px;
  margin: 0 auto;
  padding: 2.25rem;
  border: 1px solid var(--mb-line);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 18px 52px rgba(15, 23, 42, .07);
}

.legal-page h1 {
  margin: .5rem 0 1rem;
  font-size: clamp(2rem, 4vw, 3.4rem);
  font-weight: 900;
  line-height: 1.08;
}

.legal-lead,
.legal-section p,
.legal-requisites p {
  color: #344054;
  line-height: 1.75;
}

.legal-section {
  padding-top: 1.5rem;
  margin-top: 1.5rem;
  border-top: 1px solid var(--mb-line);
}

.legal-section h2,
.legal-requisites h2 {
  font-size: 1.2rem;
  font-weight: 850;
}

.legal-requisites {
  margin-top: 2rem;
  padding: 1.25rem;
  border-radius: 14px;
  background: #f8fbff;
}

.lesson-player {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 14px;
  overflow: hidden;
  background: #000;
}

.lesson-player iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.lesson-watermark {
  position: absolute;
  right: 12px;
  bottom: 10px;
  z-index: 2;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: .72rem;
  color: rgba(255, 255, 255, .72);
  background: rgba(0, 0, 0, .35);
  pointer-events: none;
}

.course-access-card {
  position: sticky;
  top: 90px;
}

.course-page {
  max-width: 760px;
}

.article-tags,
.materials-tags {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}

.article-tag,
.materials-tag {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .35rem .8rem;
  border: 1px solid var(--mb-line);
  border-radius: 999px;
  color: var(--mb-ink);
  font-size: .85rem;
  font-weight: 700;
  text-decoration: none;
  background: var(--mb-blue-soft);
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}

.article-tag:hover,
.materials-tag:hover,
.materials-tag.active {
  color: #fff;
  background: var(--mb-blue);
  border-color: var(--mb-blue);
}

.materials-tag-count {
  font-size: .72rem;
  opacity: .7;
}

.site-footer {
  position: relative;
  margin-top: 5rem;
  padding: 3.75rem 0 1.5rem;
  color: rgba(255, 255, 255, .72);
  background:
    linear-gradient(160deg, rgba(17, 24, 58, .98), rgba(8, 12, 28, .99)),
    radial-gradient(90% 70% at 85% 0%, rgba(79, 70, 229, .35), transparent 60%);
}

/* Тонкая акцентная линия сверху */
.site-footer::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, var(--mb-blue), var(--mb-violet), var(--mb-gold));
}

.footer-logo {
  border-radius: 10px;
}

.footer-brand {
  font-size: 1.15rem;
  font-weight: 800;
  color: #fff;
}

.footer-desc {
  max-width: 340px;
  margin-bottom: 1.25rem;
  color: rgba(255, 255, 255, .68);
  line-height: 1.65;
}

.footer-support-btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .55rem 1.05rem;
  border-radius: 10px;
  color: #1a1305;
  font-size: .9rem;
  font-weight: 700;
  text-decoration: none;
  background: var(--mb-gold);
  transition: background .15s ease, transform .15s ease;
}

.footer-support-btn:hover {
  color: #1a1305;
  background: #e5b84b;
  transform: translateY(-1px);
}

.footer-col-title {
  margin-bottom: 1.1rem;
  font-size: .74rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--mb-gold);
}

.footer-links li + li,
.footer-req li + li {
  margin-top: .55rem;
}

.footer-req {
  margin: 0 0 1rem;
  color: rgba(255, 255, 255, .62);
  font-size: .9rem;
  line-height: 1.5;
}

.footer-mail {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  color: rgba(255, 255, 255, .82);
  font-size: .9rem;
  text-decoration: none;
}

.footer-mail:hover {
  color: var(--mb-gold);
}

.footer-copy {
  color: rgba(255, 255, 255, .5);
  font-size: .85rem;
}

.footer-links a {
  color: rgba(255, 255, 255, .72);
  font-size: .93rem;
  text-decoration: none;
  transition: color .15s ease;
}

.footer-links a:hover {
  color: var(--mb-gold);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1.5rem;
  margin-top: 2.5rem;
  border-top: 1px solid rgba(255, 255, 255, .1);
}

.footer-socials {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .6rem;
}

.footer-socials a {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  color: rgba(255, 255, 255, .8);
  font-size: 1.1rem;
  text-decoration: none;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .12);
  transition: transform .15s ease, background .15s ease, color .15s ease, border-color .15s ease;
}

.footer-socials a:hover {
  transform: translateY(-2px);
  color: #1a1305;
  background: var(--mb-gold);
  border-color: var(--mb-gold);
}

.footer-social-img {
  width: 20px;
  height: 20px;
  object-fit: contain;
  opacity: .9;
  transition: opacity .15s ease;
}

.footer-socials a:hover .footer-social-img {
  opacity: 1;
}

.footer-social-img {
  width: 22px;
  height: 22px;
  object-fit: contain;
}

@media (max-width: 991.98px) {
  .wiki-hero {
    min-height: auto;
    padding: 4rem 0 3.25rem;
  }

  .hero-visual {
    max-width: 360px;
    margin: 0;
  }

  .hero-library-panel {
    max-width: 100%;
    margin: 0;
  }

  .direction-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .reader-path-grid,
  .category-access-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 575.98px) {
  .wiki-hero h1 {
    font-size: 2.45rem;
  }

  .hero-lead,
  .section-text {
    font-size: 1rem;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .hero-visual-note {
    position: static;
    margin-top: .75rem;
  }

  .home-section,
  .home-band {
    padding: 3.25rem 0;
  }

  .direction-grid {
    grid-template-columns: 1fr;
  }

  .direction-card {
    min-height: auto;
  }

  .library-cta {
    padding: 2rem;
  }

  .access-strip {
    padding: 1.5rem;
  }

  .reader-path,
  .page-hero,
  .plans-hero,
  .legal-page {
    padding: 1.5rem;
  }

  .reader-path-grid,
  .category-access-grid {
    grid-template-columns: 1fr;
  }

  .footer-bottom {
    display: block;
  }

  .footer-socials {
    margin-bottom: 1rem;
  }
}
