:root {
  --text: #07142f;
  --text-2: #50607f;
  --text-3: #7a89a8;
  --blue: #245fe8;
  --blue-2: #2686ea;
  --cyan: #1fb3c2;
  --border: rgba(71, 105, 160, .16);
  --shadow-xs: 0 5px 18px rgba(21, 58, 122, .05);
  --shadow-sm: 0 12px 34px rgba(20, 56, 120, .08);
  --max: 1424px;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

* { box-sizing: border-box; }
html { min-height: 100%; scroll-behavior: smooth; background: #f8fbff; }
body { margin: 0; min-height: 100%; color: var(--text); background: #f8fbff; }
a { color: inherit; text-decoration: none; }
summary { font: inherit; }
:focus-visible { outline: 3px solid rgba(47, 164, 255, .44); outline-offset: 4px; border-radius: 12px; }

.page {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  color: var(--text);
  background:
    radial-gradient(850px 520px at 72% 19%, rgba(68, 135, 255, .13), transparent 65%),
    radial-gradient(620px 460px at 35% 34%, rgba(46, 201, 210, .055), transparent 72%),
    linear-gradient(180deg, #fff 0%, #f7fbff 49%, #fff 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  text-rendering: geometricPrecision;
  -webkit-font-smoothing: antialiased;
}

.skip-link { position: fixed; top: -80px; left: 16px; z-index: 100; padding: 12px 16px; border-radius: 12px; color: #fff; background: var(--text); transition: top .2s var(--ease); }
.skip-link:focus { top: 14px; }

.site-header { position: sticky; top: 0; z-index: 50; border-bottom: 1px solid rgba(59, 93, 151, .12); background: rgba(255, 255, 255, .72); backdrop-filter: blur(22px) saturate(140%); -webkit-backdrop-filter: blur(22px) saturate(140%); }
.header-inner { width: min(var(--max), calc(100% - 96px)); height: 84px; margin: 0 auto; display: grid; grid-template-columns: 220px minmax(0, 1fr) 398px; align-items: center; gap: 24px; }
.brand { width: 196px; display: inline-flex; align-items: center; transition: transform .22s var(--ease), opacity .22s var(--ease); }
.brand:hover { transform: translateY(-1px); opacity: .96; }
.brand img { width: 196px; height: auto; display: block; }
.nav { min-width: 0; display: flex; justify-content: center; gap: clamp(20px, 2.4vw, 38px); font-size: 16px; font-weight: 650; letter-spacing: -.012em; }
.nav a, .header-login { position: relative; color: #0c1731; white-space: nowrap; transition: color .18s var(--ease); }
.nav a::after, .header-login::after { content: ""; position: absolute; right: 0; bottom: -8px; left: 0; height: 2px; border-radius: 99px; background: linear-gradient(90deg, var(--blue), var(--cyan)); transform: scaleX(0); transform-origin: center; transition: transform .22s var(--ease); }
.header-login::after { bottom: 2px; }
.nav a:hover, .header-login:hover { color: var(--blue); }
.nav a:hover::after, .header-login:hover::after { transform: scaleX(1); }
.header-actions { display: flex; align-items: center; justify-content: flex-end; gap: 16px; font-size: 16px; font-weight: 650; }
.header-login { min-height: 44px; display: inline-flex; align-items: center; }

.btn { min-height: 58px; padding: 0 30px; display: inline-flex; align-items: center; justify-content: center; gap: 14px; border: 1px solid transparent; border-radius: 14px; white-space: nowrap; cursor: pointer; user-select: none; font-size: 17px; font-weight: 760; letter-spacing: -.015em; transition: transform .24s var(--ease), box-shadow .24s var(--ease), border-color .24s var(--ease), background .24s var(--ease); }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn .arrow { font-size: 20px; line-height: 1; transform: translateY(-1px); transition: transform .24s var(--ease); }
.btn:hover .arrow { transform: translate(4px, -1px); }
.btn-primary { color: #fff; background: linear-gradient(135deg, #2457e6 0%, #2870ea 52%, #1d8fd4 100%); box-shadow: 0 14px 32px rgba(36, 95, 232, .23), inset 0 1px 0 rgba(255, 255, 255, .30); }
.btn-primary:hover { box-shadow: 0 19px 40px rgba(36, 95, 232, .29), inset 0 1px 0 rgba(255, 255, 255, .32); }
.btn-secondary { color: var(--text); background: rgba(255, 255, 255, .72); border-color: rgba(64, 97, 156, .18); box-shadow: var(--shadow-xs), inset 0 1px 0 rgba(255, 255, 255, .96); }
.btn-secondary:hover { border-color: rgba(36, 104, 242, .28); box-shadow: var(--shadow-sm); }
.header-start { width: 138px; min-width: 138px; min-height: 52px; padding: 0 18px; gap: 12px; font-size: 16px; }

.mobile-menu { display: none; position: relative; z-index: 80; }
.menu-button { width: 44px; min-width: 44px; height: 44px; min-height: 44px; padding: 0; display: inline-flex; align-items: center; justify-content: center; list-style: none; border: 1px solid rgba(64, 97, 156, .16); border-radius: 13px; color: var(--text); background: rgba(255, 255, 255, .78); box-shadow: var(--shadow-xs), inset 0 1px 0 rgba(255, 255, 255, .95); cursor: pointer; transition: transform .22s var(--ease), border-color .22s var(--ease), box-shadow .22s var(--ease), color .22s var(--ease); }
.menu-button::-webkit-details-marker { display: none; }
.menu-button:hover { transform: translateY(-1px); border-color: rgba(36, 104, 242, .26); color: var(--blue); box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255, 255, 255, .96); }
.burger-lines { width: 18px; height: 14px; display: flex; flex-direction: column; justify-content: space-between; }
.burger-lines span { height: 2px; display: block; border-radius: 99px; background: currentColor; transition: transform .22s var(--ease), opacity .22s var(--ease); }
.mobile-menu[open] .burger-lines span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.mobile-menu[open] .burger-lines span:nth-child(2) { opacity: 0; }
.mobile-menu[open] .burger-lines span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
.mobile-nav { position: absolute; top: calc(100% + 12px); right: 0; width: min(286px, calc(100vw - 28px)); padding: 9px; border: 1px solid rgba(63, 98, 156, .16); border-radius: 20px; background: rgba(255, 255, 255, .94); box-shadow: 0 24px 70px rgba(20, 56, 120, .16), inset 0 1px 0 rgba(255, 255, 255, .96); backdrop-filter: blur(18px) saturate(140%); -webkit-backdrop-filter: blur(18px) saturate(140%); }
.mobile-nav a { min-height: 46px; padding: 0 13px; display: flex; align-items: center; border-radius: 13px; font-size: 15px; font-weight: 720; letter-spacing: -.015em; transition: background .18s var(--ease), color .18s var(--ease), transform .18s var(--ease); }
.mobile-nav a:hover { color: var(--blue); background: rgba(36, 104, 242, .07); transform: translateX(2px); }

.courses-page { flex: 1 0 auto; }
.courses-hero, .levels-section, .level-test-section { width: min(var(--max), calc(100% - 96px)); margin: 0 auto; }
.courses-hero { padding: 48px 0; display: grid; grid-template-columns: minmax(0, 1fr); justify-items: center; text-align: center; gap: clamp(42px, 5vw, 78px); }
.courses-copy { min-width: 0; max-width: 920px; margin: 0 auto; text-align: center; }
.courses-hero-chips { margin-bottom: 34px; display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 10px; }
.courses-hero-chip { min-height: 36px; padding: 0 14px; display: inline-flex; align-items: center; gap: 9px; border: 1px solid rgba(36, 104, 242, .20); border-radius: 13px; color: var(--blue); background: rgba(255, 255, 255, .72); box-shadow: 0 8px 24px rgba(38, 100, 219, .055), inset 0 1px 0 rgba(255, 255, 255, .9); white-space: nowrap; font-size: 15px; font-weight: 750; letter-spacing: -.01em; }
.courses-hero-chip--highlight { color: #168a45; border-color: rgba(15, 159, 69, .16); background: rgba(240, 252, 245, .82); }
.courses-hero-chip__prefix { line-height: 1; transform: translateY(-.5px); }
.courses-title { max-width: 850px; margin: 0 auto; color: var(--text); font-size: clamp(50px, 4.7vw, 76px); line-height: .98; letter-spacing: -.062em; font-weight: 830; }
.courses-lead { max-width: 690px; margin: 28px auto 0; color: var(--text-2); font-size: 20px; line-height: 1.54; letter-spacing: -.018em; font-weight: 500; }
.courses-cta-row { margin-top: 30px; display: flex; align-items: center; justify-content: center; gap: 22px; }
.courses-cta-row .btn { min-width: 212px; }

.levels-section { padding: 8px 0 54px; }
.courses-section-head { margin-bottom: 22px; display: flex; align-items: end; justify-content: space-between; gap: 30px; }
.courses-section-head h2 { margin: 0; color: var(--text); font-size: clamp(30px, 2.55vw, 42px); line-height: 1.05; letter-spacing: -.045em; font-weight: 830; }
.courses-section-head p { max-width: 500px; margin: 0; color: var(--text-2); text-align: right; font-size: 16px; line-height: 1.48; font-weight: 580; }
.levels-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; }
.level-card { min-height: 300px; padding: 24px; position: relative; overflow: hidden; display: flex; flex-direction: column; border: 1px solid rgba(63, 98, 156, .15); border-radius: 28px; background: rgba(255, 255, 255, .78); box-shadow: var(--shadow-xs), inset 0 1px 0 rgba(255, 255, 255, .92); transition: transform .24s var(--ease), box-shadow .24s var(--ease), border-color .24s var(--ease), background .24s var(--ease); }
.level-card::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .9; background: radial-gradient(220px 150px at 82% 0%, rgba(36, 104, 242, .075), transparent 72%); }
.level-card > * { position: relative; z-index: 1; }
.level-card:hover { transform: translateY(-4px); border-color: rgba(36, 104, 242, .25); background: rgba(255, 255, 255, .92); box-shadow: 0 20px 48px rgba(20, 56, 120, .11), inset 0 1px 0 rgba(255, 255, 255, .95); }
.level-topline { margin-bottom: 28px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.level-badge { min-width: 64px; height: 58px; padding: 0 14px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid rgba(36, 104, 242, .16); border-radius: 20px; color: #1f5ff2; background: linear-gradient(180deg, #edf5ff, #e4efff); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .92), 0 10px 28px rgba(30, 88, 184, .07); font-size: 22px; font-weight: 850; letter-spacing: -.035em; }
.level-b1 .level-badge, .level-a2 .level-badge { color: #15934c; background: linear-gradient(180deg, #e7fbef, #def6e7); border-color: rgba(15, 159, 69, .16); }
.level-a1 .level-badge { color: #7754f3; background: linear-gradient(180deg, #f2eaff, #ece2ff); border-color: rgba(119, 84, 243, .18); }
.level-status { height: 26px; padding: 0 11px; display: inline-flex; align-items: center; border: 1px solid rgba(44, 88, 162, .13); border-radius: 99px; color: var(--text-2); background: rgba(255, 255, 255, .72); white-space: nowrap; font-size: 12px; font-weight: 780; }
.level-status.mid { color: #1a8c4b; border-color: rgba(15, 159, 69, .15); background: #edf9f0; }
.level-card h3 { margin: 0 0 18px; color: var(--text); font-size: 25px; line-height: 1.08; letter-spacing: -.045em; font-weight: 830; }
.level-meta { margin-bottom: 24px; display: flex; flex-wrap: wrap; gap: 8px; }
.level-meta span { min-height: 30px; padding: 0 10px; display: inline-flex; align-items: center; border: 1px solid rgba(63, 98, 156, .10); border-radius: 99px; color: var(--text-2); background: rgba(245, 248, 255, .82); white-space: nowrap; font-size: 12px; font-weight: 720; }
.level-link { min-height: 46px; margin-top: auto; padding: 0 14px 0 16px; display: inline-flex; align-items: center; justify-content: space-between; gap: 12px; border: 1px solid rgba(36, 104, 242, .16); border-radius: 14px; color: var(--blue); background: rgba(255, 255, 255, .75); box-shadow: var(--shadow-xs), inset 0 1px 0 rgba(255, 255, 255, .95); font-weight: 790; transition: transform .22s var(--ease), border-color .22s var(--ease), background .22s var(--ease); }
.level-link:hover { transform: translateY(-1px); border-color: rgba(36, 104, 242, .28); background: rgba(255, 255, 255, .94); }

.level-test-section { padding: 0 0 48px; }
.test-panel { padding: clamp(30px, 3.3vw, 44px); position: relative; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 32px; border: 1px solid var(--border); border-radius: 32px; background: linear-gradient(135deg, rgba(255, 255, 255, .86), rgba(246, 250, 255, .84)); box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255, 255, 255, .96); }
.test-panel::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(420px 220px at 88% 20%, rgba(36, 104, 242, .09), transparent 70%); }
.test-panel > * { position: relative; z-index: 1; }
.test-panel h2 { margin: 0 0 14px; color: var(--text); font-size: clamp(30px, 2.65vw, 44px); line-height: 1.05; letter-spacing: -.045em; font-weight: 830; }
.test-panel p { max-width: 760px; margin: 0; color: var(--text-2); font-size: 18px; line-height: 1.55; font-weight: 560; }
.test-panel .btn { min-width: 184px; }

.site-footer { margin-top: auto; background: rgba(255, 255, 255, .52); }
.footer-inner { width: min(var(--max), calc(100% - 96px)); margin: 0 auto; padding: 18px 0 22px; display: flex; align-items: center; justify-content: space-between; gap: 26px; }
.footer-note { min-width: 250px; display: flex; align-items: baseline; gap: 13px; color: var(--text-2); order: 1; }
.copyright, .footer-note p { margin: 0; color: #6f7f9b; white-space: nowrap; font-size: 13px; line-height: 1; font-weight: 700; letter-spacing: 0; }
.footer-links { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 10px 22px; order: 2; }
.footer-links a { color: var(--text-2); font-size: 13px; font-weight: 650; transition: color .2s var(--ease), transform .2s var(--ease); }
.footer-links a:hover { color: var(--blue); transform: translateY(-1px); }
.socials { margin: 0; display: flex; align-items: center; gap: 10px; flex: 0 0 auto; order: 3; }
.social-icon { width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid rgba(63, 98, 156, .12); border-radius: 12px; color: #31415f; background: rgba(255, 255, 255, .62); transition: transform .22s var(--ease), color .22s var(--ease), border-color .22s var(--ease), background .22s var(--ease); }

@media (max-width: 1360px) {
  .header-inner, .courses-hero, .levels-section, .level-test-section, .footer-inner { width: min(100% - 48px, var(--max)); }
  .courses-title { font-size: clamp(48px, 4.8vw, 64px); }
  .levels-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .level-card { min-height: 250px; }
}

@media (max-width: 1260px) {
  .header-inner { width: min(100% - 40px, var(--max)); height: 72px; grid-template-columns: auto minmax(0, 1fr) auto; gap: 16px; }
  .brand, .brand img { width: 164px; }
  .nav { display: none; }
  .header-actions { justify-self: end; gap: 12px; font-size: 15px; }
  .header-start { display: none; }
  .header-login { min-height: 44px; font-size: 15px; }
  .mobile-menu { display: block; }
}

@media (max-width: 1080px) {
  .courses-hero { max-width: 920px; }
  .courses-copy { max-width: 780px; }
  .courses-section-head { display: block; text-align: center; }
  .courses-section-head p { margin: 12px auto 0; text-align: center; }
  .test-panel { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .test-panel p { margin-inline: auto; }
}

@media (max-width: 900px) {
  .btn { min-height: 54px; padding: 0 22px; font-size: 16px; }
  .courses-hero, .levels-section, .level-test-section { width: min(100% - 28px, 760px); }
  .courses-hero { padding: 28px 0 34px; gap: 28px; }
  .courses-title { font-size: clamp(42px, 8.4vw, 60px); }
  .courses-lead { font-size: 18px; }
  .courses-hero-chips { margin-bottom: 24px; }
  .courses-hero-chip { min-height: 34px; padding: 0 12px; font-size: 13.5px; }
  .levels-grid { gap: 16px; }
  .level-card { padding: 22px; border-radius: 24px; }
  .level-card h3 { font-size: 23px; }
  .level-test-section { padding-bottom: 34px; }
  .footer-inner { width: min(100% - 28px, 720px); padding: 22px 0 26px; align-items: flex-start; flex-direction: column; gap: 16px; }
  .socials { order: 1; }
  .footer-links { justify-content: flex-start; order: 2; }
  .footer-note { min-width: 0; flex-direction: column; align-items: flex-start; gap: 5px; order: 3; }
  .footer-note p { order: 1; white-space: normal; line-height: 1; }
  .footer-note .copyright { order: 2; }
}

@media (max-width: 700px) {
  .site-header { transition: padding-bottom .24s var(--ease); }
  .site-header:has(.mobile-menu[open]) { padding-bottom: 322px; }
  .mobile-menu { position: static; }
  .mobile-nav { position: absolute; top: 82px; right: 14px; left: 14px; z-index: 70; width: auto; padding: 0; display: none; border: 0; border-radius: 0; background: transparent; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
  .mobile-menu[open] .mobile-nav { display: grid; gap: 10px; }
  .mobile-nav a { min-height: 50px; padding: 0 18px; border: 1px solid rgba(63, 98, 156, .16); border-radius: 18px; color: var(--text-2); background: rgba(255, 255, 255, .96); box-shadow: var(--shadow-xs), inset 0 1px 0 rgba(255, 255, 255, .96); font-size: 17px; font-weight: 760; }
}

@media (max-width: 640px) {
  .courses-title { font-size: clamp(38px, 11.4vw, 50px); line-height: 1.02; }
  .courses-lead { font-size: 17px; line-height: 1.54; }
  .courses-cta-row { display: grid; grid-template-columns: 1fr; gap: 12px; }
  .courses-cta-row .btn { width: 100%; min-width: 0; }
  .levels-section { padding-bottom: 36px; }
  .levels-grid { grid-template-columns: 1fr; }
  .courses-section-head h2 { font-size: 28px; }
  .courses-section-head p { font-size: 15px; }
  .level-card { min-height: 0; }
  .level-topline { margin-bottom: 22px; }
  .level-meta span { font-size: 11px; }
  .test-panel { padding: 24px 18px; border-radius: 26px; }
  .test-panel h2 { font-size: 28px; }
  .test-panel p { font-size: 16px; }
  .test-panel .btn { width: 100%; min-width: 0; }
}

@media (max-width: 560px) {
  .page { background: linear-gradient(180deg, #fff 0%, #f7fbff 56%, #fff 100%); }
  .header-inner { width: calc(100% - 20px); height: 64px; gap: 8px; }
  .brand, .brand img { width: 132px; }
  .header-actions { gap: 6px; }
  .header-login { min-height: 36px; font-size: 13.5px; line-height: 1; }
  .mobile-menu { margin-right: -4px; }
  .menu-button { width: 38px; min-width: 38px; height: 38px; min-height: 38px; border-radius: 12px; }
  .burger-lines { width: 17px; height: 13px; }
  .mobile-nav { top: 72px; }
  .site-header:has(.mobile-menu[open]) { padding-bottom: 304px; }
  .footer-links { gap: 9px 16px; }
}

@media (max-width: 380px) {
  .header-inner { width: calc(100% - 18px); height: 62px; gap: 6px; }
  .brand, .brand img { width: 118px; }
  .header-actions { gap: 5px; }
  .header-login { min-height: 34px; font-size: 13px; }
  .menu-button { width: 36px; min-width: 36px; height: 36px; min-height: 36px; border-radius: 11px; }
  .mobile-menu { margin-right: -5px; }
  .mobile-nav { top: 68px; right: 10px; left: 10px; }
  .site-header:has(.mobile-menu[open]) { padding-bottom: 294px; }
}

@media (max-width: 360px) {
  .courses-title { font-size: 35px; }
  .courses-hero-chips { gap: 8px; }
  .courses-hero-chip { font-size: 13px; }
  .level-topline { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 340px) {
  .brand, .brand img { width: 106px; }
  .header-login { min-height: 32px; font-size: 12.5px; }
  .menu-button { width: 34px; min-width: 34px; height: 34px; min-height: 34px; }
  .burger-lines { width: 16px; height: 12px; }
  .mobile-nav { top: 64px; }
}
