* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: #4c4744;
  background: #f6f0eb;
  font-family: Inter, Arial, sans-serif;
}
a { color: inherit; }

.ek-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #fff;
  border-bottom: 1px solid #eee6df;
}
.ek-header__inner {
  width: min(1180px, calc(100% - 36px));
  min-height: 86px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
}
.ek-logo { display: inline-flex; align-items: center; text-decoration: none; }
.ek-logo img { width: 170px; height: auto; display: block; }
.ek-menu {
  width: 44px;
  height: 44px;
  border: 0;
  padding: 9px;
  background: transparent;
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
}
.ek-menu span { height: 3px; border-radius: 3px; background: #4a4643; }
.ek-nav { margin-left: auto; display: flex; align-items: center; gap: 24px; }
.ek-nav a { text-decoration: none; font-weight: 800; }
.ek-nav a:hover { color: #9821df; }
.ek-cta {
  padding: 13px 22px;
  border-radius: 999px;
  color: #fff !important;
  background: linear-gradient(135deg, #ad24e8, #8016cd);
  box-shadow: 0 5px 0 #6413a0;
}

.subject-page { min-height: 70vh; }
.subject-shell {
  width: min(1040px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 72px;
}
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  color: #9220d5;
  font-weight: 800;
}
.breadcrumb a { text-decoration: none; }
.course-label { margin: 16px 0 0; color: #7c7470; font-size: 1.08rem; }
.subject-heading {
  padding: 46px 18px 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  text-align: left;
}
.subject-heading__icon {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 24px;
  font-size: 43px;
  background: #fff;
  box-shadow: 0 13px 30px rgba(79, 54, 38, .10);
}
.subject-heading h1 { margin: 0; font-size: clamp(2rem, 5vw, 3.2rem); line-height: 1.06; }
.subject-heading p { max-width: 670px; margin: 10px 0 0; color: #7d716a; line-height: 1.55; }

.program-card {
  position: relative;
  padding: 70px 28px 34px;
  border-radius: 30px;
  background: #fff;
  box-shadow: 0 18px 50px rgba(90, 65, 48, .08);
}
.program-pill {
  position: absolute;
  top: 32px;
  left: 50%;
  transform: translateX(-50%);
  padding: 13px 26px;
  border-radius: 999px;
  background: #f2ece7;
  font-weight: 900;
}
.state-card { padding: 50px 20px; text-align: center; }
.state-card--error { color: #9b2d2d; }
.loader {
  width: 44px;
  height: 44px;
  margin: 0 auto 16px;
  border: 5px solid #eee4f4;
  border-top-color: #9220d5;
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.chapters { display: grid; gap: 52px; }
.chapter-block__eyebrow { margin: 0 0 7px; color: #746d68; font-size: 1.08rem; }
.chapter-block__title { margin: 0 0 20px; color: #403c39; font-size: clamp(1.5rem, 3vw, 2rem); }
.lesson-list {
  overflow: hidden;
  border: 3px solid #f0e9e4;
  border-radius: 22px;
  background: #fff;
}
.lesson-row {
  min-height: 104px;
  padding: 25px 30px;
  display: flex;
  align-items: center;
  gap: 18px;
  text-decoration: none;
  border-bottom: 3px solid #f0e9e4;
  transition: background .18s ease, padding-left .18s ease;
}
.lesson-row:last-child { border-bottom: 0; }
.lesson-row:hover, .lesson-row:focus-visible { background: #fcf8ff; padding-left: 36px; outline: none; }
.lesson-row__content { min-width: 0; flex: 1; }
.lesson-row__title { margin: 0; color: #44403d; font-size: 1.15rem; font-weight: 800; }
.lesson-row__meta { margin: 8px 0 0; color: #867b74; font-size: .9rem; }
.lesson-row__arrow { color: #504b48; font-size: 2rem; font-weight: 400; }
.subject-summary {
  margin-top: 52px;
  padding: 30px 34px;
  border-radius: 18px;
  color: #5f5752;
  background: #f4efeb;
  line-height: 1.7;
}

.member-gate { padding: 78px 0 12px; text-align: center; }
.member-gate h2 { margin: 0 0 30px; font-size: clamp(2rem, 4vw, 2.7rem); }
.member-gate__choices { width: min(460px, 100%); margin: 0 auto; display: grid; gap: 18px; }
.member-choice {
  min-height: 100px;
  padding: 18px 24px;
  display: grid;
  grid-template-columns: 74px 1fr auto;
  align-items: center;
  gap: 16px;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 9px 0 #ead8c8;
  text-align: left;
  text-decoration: none;
  font-size: 1.25rem;
  font-weight: 900;
  transition: transform .18s ease;
}
.member-choice:hover { transform: translateY(-4px); }
.member-choice__icon {
  width: 66px;
  height: 66px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: #fbf3ff;
  font-size: 37px;
}
.member-choice strong { font-size: 2rem; }
.member-login { margin-top: 32px; }
.member-login a { color: #9821df; text-decoration: none; font-weight: 900; }

.ek-footer { margin-top: 38px; color: #fff; background: #272727; }
.ek-footer__inner {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
  padding: 58px 0 44px;
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 60px;
}
.ek-footer__brand img { width: 180px; filter: brightness(0) invert(1); }
.ek-footer__brand h2 { margin: 28px 0 12px; }
.ek-footer__brand p { max-width: 590px; color: #d1d1d1; line-height: 1.65; }
.ek-footer__links { display: grid; grid-template-columns: repeat(2, 1fr); gap: 36px; }
.ek-footer__links h3 { margin-top: 0; }
.ek-footer__links a { display: block; margin: 12px 0; color: #cecece; text-decoration: none; }
.ek-footer__bottom {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
  padding: 22px 0 28px;
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  border-top: 1px solid #4e4e4e;
  color: #cfcfcf;
}
.ek-footer__bottom a { color: inherit; text-decoration: none; }

@media (max-width: 820px) {
  .ek-menu { display: flex; }
  .ek-logo img { width: 145px; }
  .ek-nav { display: none; position: absolute; top: 86px; left: 0; right: 0; padding: 22px; flex-direction: column; background: #fff; border-top: 1px solid #eee; box-shadow: 0 15px 25px rgba(0,0,0,.08); }
  .ek-nav.is-open { display: flex; }
  .subject-heading { align-items: flex-start; }
  .program-card { padding-left: 18px; padding-right: 18px; }
  .ek-footer__inner { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .subject-heading { padding-left: 0; padding-right: 0; }
  .subject-heading__icon { width: 66px; height: 66px; font-size: 34px; }
  .lesson-row { min-height: 88px; padding: 20px 18px; }
  .lesson-row:hover { padding-left: 22px; }
  .member-choice { grid-template-columns: 58px 1fr auto; padding: 15px; font-size: 1.05rem; }
  .member-choice__icon { width: 54px; height: 54px; font-size: 30px; }
  .ek-footer__links { grid-template-columns: 1fr; }
}
