@font-face {
  font-family: "Golos Text";
  src: url("/assets/golos.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
}

:root {
  color-scheme: light;
  --page: #fcfbf8;
  --paper: #ffffff;
  --ink: #15223a;
  --muted: #46536b;
  --line: #d2d9e6;
  --surface: #e5edff;
  --surface-strong: #cfddff;
  --figure: #a9bffa;
  --figure-line: #7d9be5;
  --panel: #213b91;
  --panel-ink: #ffffff;
  --panel-hover: #172c73;
  --panel-line: #9caff2;
  --accent: #ffad6d;
  --accent-hover: #ffbe90;
  --accent-ink: #24180f;
  --accent-deep: #983a18;
  --link: #233f98;
  --document-link: #233f98;
  --brand-caption: #47505a;
  --focus: #1e3fc6;
  --workbook: #f5f7ff;
  --rule: #dce4f8;
  --note: #fff7e9;
  --note-tint: #e7e9fa;
  --action-warm: #ffd6b6;
  --action-warm-strong: #ffc391;
  --menu: #eaf0ff;
  --map-paper: #d8e5f6;
  --map-block: #9fb7db;
  --map-water: #a2bedf;
  --radius: 31px;
  --wrap: 1296px;
}

:root[data-theme="green-gold"] {
  --page: #fcfbf5;
  --paper: #fffef9;
  --ink: #172a20;
  --muted: #425448;
  --line: #ced9cd;
  --surface: #e5efcc;
  --surface-strong: #d6e6b0;
  --figure: #9fbd78;
  --figure-line: #769551;
  --panel: #1e5945;
  --panel-ink: #fffef7;
  --panel-hover: #154332;
  --panel-line: #a3c6a1;
  --accent: #f5ce72;
  --accent-hover: #f9da8e;
  --accent-ink: #281d11;
  --accent-deep: #785315;
  --link: #225235;
  --brand-caption: #48514b;
  --focus: #276040;
  --workbook: #f4f7e8;
  --rule: #dce5cc;
  --note: #fff9e6;
  --note-tint: #dfebd0;
  --action-warm: #f8dfb2;
  --action-warm-strong: #f4ce90;
  --menu: #edf1dd;
  --map-paper: #e0ebcd;
  --map-block: #afc590;
  --map-water: #9cbfb7;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { scroll-padding-top: 100px; }
body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: "Golos Text", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.55;
  -webkit-tap-highlight-color: transparent;
}

img { display: block; max-width: 100%; }
button { font: inherit; }
a { color: var(--link); text-underline-offset: .22em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }
h1, h2, h3, p, figure, ul { margin: 0; }
h1, h2, h3 { line-height: 1.04; letter-spacing: -.046em; text-wrap: balance; font-weight: 710; }

.wrap { width: min(var(--wrap), calc(100% - clamp(32px, 9vw, 144px))); margin-inline: auto; }
.skip {
  position: fixed;
  z-index: 10;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  background: var(--paper);
  border-radius: 8px;
  transform: translateY(-180%);
}
.skip:focus { transform: none; }

.header {
  position: relative;
  z-index: 4;
  background: var(--page);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 77px;
}

.js .header--home:not(.header--in-flow) {
  position: sticky;
  top: 0;
  min-block-size: var(--home-header-full);
  background: none;
  pointer-events: none;
}

.js .header--home:not(.header--in-flow)::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  block-size: var(--home-header-visible);
  background: color-mix(in srgb, var(--page) 96%, transparent);
  opacity: 0;
  transition: opacity 140ms ease-out;
}

.js .header--home.is-scrolled:not(.header--in-flow)::before { opacity: 1; }
.header--home .header-inner { position: relative; }
.js .header--home:not(.header--in-flow) .header-inner { min-height: var(--home-header-visible); }
.header--home .header-inner > * { pointer-events: auto; }

.js .header--home {
  --home-header-full: 77px;
  --home-header-compact: 59px;
  --home-header-visible: var(--home-header-full);
}

.js .header--home.is-compact:not(.header--in-flow) { --home-header-visible: var(--home-header-compact); }

@media (max-width: 780px) {
  .js .header--home {
    --home-header-full: 62px;
    --home-header-compact: 54px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .header--home::before { transition: none !important; }
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  width: fit-content;
  color: var(--ink);
  font-size: 23px;
  font-weight: 810;
  letter-spacing: .005em;
  text-decoration: none;
  white-space: nowrap;
}

.brand-mark { flex: none; width: 27px; height: 26px; }

.main-nav { display: flex; align-items: center; flex-wrap: wrap; gap: 4px clamp(15px, 2.8vw, 44px); }
.main-nav a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  font-size: 15px;
  font-weight: 560;
  color: var(--ink);
  text-decoration: none;
  padding-inline: 8px;
  border-radius: 6px;
}
.main-nav a:is(:hover, [aria-current], [data-current-section]) { color: var(--link); background: var(--surface); }
@media (min-width: 781px) {
  .main-nav a { border-radius: 999px; padding-inline: 24px; }
}
.menu-toggle { display: none; }

.main { padding-block: 21px 76px; }
.center-hero, .program-panel, .inner-cover, .home-about, .course-intro { border-radius: var(--radius); }
.center-hero {
  position: relative;
  display: grid;
  grid-template-columns: .91fr 1fr;
  min-height: clamp(440px, 40vw, 580px);
  background: var(--surface);
  overflow: hidden;
}

.hero-copy, .program-copy {
  position: relative;
  z-index: 2;
  align-self: center;
  padding-block: 52px;
  padding-inline-start: clamp(38px, 6.25vw, 94px);
}

.badge {
  width: fit-content;
  border-radius: 100px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 13px;
  line-height: 1.3;
  font-weight: 670;
  padding: 7px 11px;
}

.hero-copy h1 {
  margin-top: 16px;
  font-size: clamp(73px, 9.3vw, 145px);
  letter-spacing: -.020em;
  white-space: nowrap;
  line-height: .98;
  font-weight: 820;
}
.hero-intro { margin-block: 18px 28px; font-size: clamp(24px, 3vw, 39px); line-height: 1.14; font-weight: 580; letter-spacing: -.048em; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  min-height: 50px;
  padding: 9px 17px;
  border: 1px solid transparent;
  border-radius: 11px;
  width: fit-content;
  max-width: 100%;
  font-size: 16px;
  font-weight: 650;
  text-decoration: none;
}
.button-icon { flex: none; font-size: 21px; font-weight: 550; line-height: 1; }
.button-icon svg { display: block; flex: none; }
.primary { background: var(--panel); color: var(--panel-ink); }
.primary:hover { background: var(--link); }
.accent { background: var(--accent); color: var(--accent-ink); }
.accent:hover { background: var(--accent-hover); }
.secondary { color: var(--ink); background: var(--surface-strong); }
.secondary:hover { background: var(--accent); }
.program-panel .button:focus-visible { outline-color: var(--panel-ink); }

.portraits { position: relative; isolation: isolate; min-width: 0; align-self: stretch; }
.portrait-shapes { position: absolute; z-index: -1; inset: 0; }
.portrait-shapes i { display: block; position: absolute; }
.portrait-shapes i:first-child {
  width: 81%;
  height: 83%;
  right: 8%;
  bottom: -7%;
  background: var(--figure);
  border-radius: 49% 50% 7% 7%;
  rotate: -8deg;
}
.portrait-shapes i:nth-child(2) {
  width: 94%;
  height: 57%;
  right: 1%;
  bottom: 0;
  border: 1px solid var(--figure-line);
  border-radius: 51%;
  rotate: -32deg;
}
.portrait-shapes i:nth-child(3) {
  width: clamp(13px, 2vw, 28px);
  aspect-ratio: 1;
  background: var(--accent);
  position: absolute;
  top: 21%;
  right: 16%;
  transform: rotate(18deg);
  border-radius: 6px;
}
.portrait {
  position: absolute;
  bottom: -1px;
  right: 5%;
  width: min(99%, 675px);
  max-width: none;
  height: auto;
}


.section { margin-block-start: clamp(43px, 6vw, 86px); }
.section-title { font-size: clamp(33px, 4.4vw, 66px); font-weight: 730; line-height: 1.03; }
.home-programs > .section-title { margin-block-end: 20px; }
.home-programs:focus { outline: none; }
.home-programs:focus-visible > .section-title { text-decoration: underline var(--focus); }

.program-panel {
  display: grid;
  grid-template-columns: 1.12fr .88fr;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: clamp(350px, 38vw, 500px);
  background: var(--panel);
  color: var(--panel-ink);
}
.program-copy { padding-block: 46px; }
.course-audience {
  display: flex;
  align-items: baseline;
  gap: .45em;
  width: fit-content;
  max-width: 100%;
  margin-block: 0 .85em;
  color: var(--muted);
  font-size: .9375rem;
  font-weight: 590;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.course-audience::before {
  content: "";
  flex: none;
  width: .43em;
  height: .43em;
  margin-bottom: .11em;
  border-radius: 50%;
  background: var(--audience-marker, var(--accent-deep));
}
.program-panel .course-audience {
  --audience-marker: var(--accent);
  color: color-mix(in srgb, var(--panel-ink) 86%, var(--panel));
}
.program-copy :is(h2, h3) { font-size: clamp(34px, 5.25vw, 76px); line-height: 1.01; text-wrap: wrap; margin-bottom: 29px; }

.math-art {
  --art-field: var(--panel-line);
  --art-line: var(--panel-line);
  position: relative;
  min-height: 300px;
  isolation: isolate;
  display: grid;
  place-items: center;
  margin: 0 2.1vw 0 0;
}
.math-orbit {
  position: absolute;
  left: 1%;
  right: 2%;
  top: 23%;
  bottom: 19%;
  border: 1px solid var(--art-line);
  border-radius: 50%;
  transform: rotate(-29deg);
  opacity: .8;
}
.math-orbit::before {
  position: absolute;
  content: "";
  inset: 8px -13px -8px 13px;
  border: 1px solid var(--art-line);
  border-radius: inherit;
  opacity: .55;
}
.math-note {
  z-index: 1;
  width: 57%;
  max-width: 292px;
  padding: clamp(12px, 2vw, 23px) clamp(12px, 2.4vw, 27px) 13px;
  min-width: 154px;
  border-radius: 19px;
  color: var(--ink);
  background:
    repeating-linear-gradient(0deg, transparent 0 15px, var(--rule) 15px 16px),
    var(--note);
  box-shadow: 5px 7px 0 var(--art-field);
  transform: rotate(-12deg);
}
.math-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.math-grid b {
  aspect-ratio: 1.06;
  display: grid;
  place-items: center;
  color: var(--ink);
  background: var(--note-tint);
  border: 1px solid var(--line);
  border-radius: 5px;
  font-size: clamp(18px, 2.8vw, 37px);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.math-grid b:nth-child(5) { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); }
.math-note > span { display: block; margin-top: 8px; font-size: clamp(12px, 1.5vw, 18px); font-weight: 600; text-align: center; }
.math-tab {
  position: absolute;
  top: 15%;
  right: 9%;
  width: clamp(44px, 6vw, 83px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: min(17px, 2vw);
  background: var(--accent);
  color: var(--accent-ink);
  font-size: clamp(26px, 4.3vw, 56px);
  font-weight: 550;
  line-height: 1;
  transform: rotate(17deg);
}
.math-fold { position: absolute; bottom: 15%; right: 12%; width: 13%; height: 13%; border-inline-end: 2px solid var(--art-line); border-block-end: 2px solid var(--art-line); transform: rotate(-22deg); }
.math-point { position: absolute; left: 8%; top: 31%; width: 10px; aspect-ratio: 1; border-radius: 50%; background: var(--accent); }

.home-about,
.inner-cover.about-cover {
  grid-template-columns: minmax(0, 44fr) minmax(0, 56fr);
}
.home-about {
  position: relative;
  display: grid;
  min-height: 340px;
  isolation: isolate;
  background: var(--surface);
  overflow: hidden;
}
.home-about-copy,
.about-cover .inner-cover-copy {
  z-index: 1;
  align-self: center;
  padding: clamp(24px, 4vw, 62px);
  padding-inline-end: clamp(14px, 2.3vw, 34px);
}
.home-about-copy p { max-width: 33ch; margin-block: 16px 24px; }
.building {
  display: block;
  margin: clamp(10px, 1.6vw, 24px) clamp(10px, 1.6vw, 24px) clamp(10px, 1.6vw, 24px) 0;
  align-self: center;
  min-width: 0;
  border-radius: 0 calc(var(--radius) - 8px) calc(var(--radius) - 8px) 0;
  overflow: hidden;
  mask-image: linear-gradient(to right, transparent,
    rgb(0 0 0 / .12) 2%, rgb(0 0 0 / .40) 5%, rgb(0 0 0 / .77) 8%, #000 12%);
}
.building img { display: block; width: 100%; height: auto; }
.about-more {
  color: var(--panel-ink);
  background: var(--panel);
}
.about-more:hover { background: var(--panel-hover); }

@media (max-width: 690px) {
  .about-more { box-shadow: 0 0 0 1px var(--panel-hover), 0 2px 8px rgb(13 26 36 / .15); }
}

.back { display: inline-flex; min-height: 44px; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; margin-block-end: 8px; padding-inline: 6px; text-decoration: none; border-radius: 6px; }
.back:is(:hover, :active) { color: var(--accent-deep); }
.back:focus-visible { outline-width: 2px; outline-offset: 1px; }
.back:focus:not(:focus-visible) { outline: none; }
.course-intro {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.13fr) minmax(0, 1fr);
  align-items: stretch;
  min-height: clamp(290px, 33vw, 475px);
  overflow: hidden;
  background:
    radial-gradient(circle, var(--rule) 1.15px, transparent 1.4px) 5px 5px / 18px 18px,
    var(--workbook);
}
.course-copy { position: relative; z-index: 1; align-self: center; padding: clamp(22px, 4vw, 62px); padding-right: 0; }
.course-intro h1 { font-size: clamp(36px, 4.95vw, 76px); margin-block: 0 15px; line-height: 1; }
.course-lead { max-width: 32ch; font-size: clamp(17px, 1.55vw, 23px); line-height: 1.4; }
.course-scene { display: grid; position: relative; isolation: isolate; align-self: end; margin-inline: 0 3%; }
.course-scene svg { position: absolute; inset: 0; height: 100%; width: 100%; z-index: -1; }
.course-scene .portrait { position: static; width: 100%; height: auto; }
.course-topics {
  max-width: 576px;
  margin: clamp(40px, 6vw, 84px) auto 0;
}
.chapter-heading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
  background: var(--page);
  padding: 6px 8px 17px;
}
.chapter-heading h2 { font-size: clamp(31px, 4.1vw, 44px); }
.chapter-scope {
  width: fit-content;
  border-radius: 99px;
  padding: 6px 12px;
  color: var(--link);
  background: var(--surface);
  font-size: clamp(13px, 1.4vw, 18px);
  font-weight: 620;
  line-height: 1.3;
}
.course-contact {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: clamp(23px, 3vw, 42px);
  padding: clamp(23px, 4.2vw, 62px);
  overflow: hidden;
  background: linear-gradient(105deg, var(--note), var(--action-warm));
  border-radius: var(--radius);
}
/* Keep enough natural scroll after the deck for the final sheet to clear the screen. */
.pinned-topics + .course-contact {
  min-block-size: calc(100svh - 8rem);
  align-items: center;
}
.course-contact > div { position: relative; z-index: 1; }
.course-contact h2 { max-width: 18ch; font-size: clamp(30px, 3.7vw, 54px); }
.course-contact .button { margin-top: clamp(14px, 2vw, 25px); }
.question-art { flex: none; width: clamp(108px, 20vw, 270px); height: auto; }

.inner-cover {
  position: relative;
  isolation: isolate;
  min-height: clamp(350px, 33vw, 475px);
  display: grid;
  grid-template-columns: 1fr .75fr;
  overflow: hidden;
  align-items: center;
  background: var(--surface);
}
.inner-cover-copy { padding: clamp(27px, 6.2vw, 90px); }
.inner-cover h1 { font-size: clamp(49px, 7.05vw, 103px); text-wrap: wrap; }
.inner-cover .badge { margin-block-end: 12px; }
.inner-cover p:not(.badge) { margin-top: 16px; max-width: 29ch; font-size: clamp(18px, 2.15vw, 28px); line-height: 1.3; }
.about-cover { background: var(--surface); }
.about-cover p:not(.badge) { max-width: 38ch; font-size: clamp(17px, 1.64vw, 22px); line-height: 1.48; }
.about-cover .about-more { margin-top: 20px; }
.text-link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  width: fit-content;
  font-size: 16px;
  font-weight: 650;
  text-decoration: none;
  border-radius: 5px;
}
.text-link:active { color: var(--accent-deep); }
@media (hover: hover) and (pointer: fine) {
  .text-link:hover { text-decoration: underline; text-underline-offset: .25em; }
}
.text-link .button-icon { font-size: 18px; }

.documents { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.document-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
  justify-items: start;
  gap: 12px;
  padding: clamp(22px, 4.5vw, 60px);
  border-radius: 22px;
  background: var(--surface);
}
.document-card h2 { max-inline-size: 100%; font-size: clamp(26px, 3.15vw, 48px); text-wrap: balance; line-height: 1.07; overflow-wrap: anywhere; }
.document-card p { max-width: 58ch; }
.document-details > p + p { margin-block-start: 8px; }
@media (min-width: 691px) {
  .documents > :is(.document-executor, .document-license) {
    align-content: stretch;
    grid-template-rows: auto 1fr auto;
  }
}
.document-license { background: var(--note); }
.document-program { grid-column: 1 / -1; background: var(--workbook); }

.file-art { position: relative; margin: auto; width: clamp(115px, 24vw, 335px); height: clamp(118px, 25vw, 301px); }
.file-art i { position: absolute; border-radius: 11px; }
.file-art i:nth-child(1) { background: var(--figure); inset: 7% 17% 10% 5%; transform: rotate(-12deg); }
.file-art i:nth-child(2) {
  inset: 1% 11% 8% 13%;
  border: 1px solid var(--line);
  background: repeating-linear-gradient(var(--paper) 0 17px, var(--rule) 17px 18px);
  transform: rotate(6deg);
}
.file-art i:nth-child(3) { inset: 53% 3% 25% 72%; background: var(--accent); transform: rotate(-5deg); }
.contact-art {
  display: block;
  width: min(90%, 440px);
  height: auto;
  margin: auto;
  pointer-events: none;
}
.phone {
  display: inline-flex;
  justify-content: space-between;
  align-items: center;
  gap: clamp(8px, 2.6vw, 16px);
  min-height: 51px;
  margin-top: 25px;
  padding: 10px clamp(18px, 5.15vw, 26px);
  border-radius: 10px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 670;
  font-size: clamp(20px, 3vw, 33px);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  text-decoration: none;
}
.phone:hover { background: var(--accent-hover); }
.footer { border-top: 1px solid var(--line); background: var(--paper); }
.footer-inner {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 72px;
  padding-block: 14px;
  font-size: 15px;
  font-weight: 620;
  color: var(--muted);
}
@media (max-width: 1050px) {
  .hero-copy { padding-inline-start: clamp(29px, 5vw, 63px); }
  .program-copy { padding-inline-start: clamp(25px, 5vw, 63px); }
  .portrait-shapes i:first-child { height: 72%; }
}

.main-nav small,
.main-nav .nav-icon,
.main-nav .button-icon { display: none; }
.main-nav strong { font-weight: inherit; }

@media (min-width: 781px) {
  .main-nav { column-gap: clamp(8px, 2vw, 32px); }
  .main-nav a { white-space: nowrap; }
}

.program-index > h1 { margin-block: 8px 22px; }
.program-description { max-width: 41ch; margin: -12px 0 23px; }

.home-directory { display: grid; grid-template-columns: 1.12fr .88fr; gap: 16px; margin-top: 16px; }
.about-directory { margin-top: clamp(33px, 5.5vw, 75px); }

.home-directory a {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-content: center;
  gap: 6px 14px;
  min-height: 160px;
  padding: clamp(19px, 3vw, 37px);
  overflow: hidden;
  isolation: isolate;
  background: var(--workbook);
  border: 0;
  border-radius: 20px;
  color: var(--ink);
  text-decoration: none;
}
.home-directory a:hover { background: var(--surface); }
.home-directory .directory-contact { background: var(--action-warm); }
.home-directory .directory-contact:hover { background: var(--action-warm-strong); }
.home-directory a .button-icon {
  grid-area: 1 / 2 / 3 / 3;
  align-self: center;
  display: grid;
  width: 35px;
  height: 35px;
  place-items: center;
  border-radius: 50%;
  background: var(--paper);
}
.home-directory a strong { grid-area: 1 / 1; font-size: clamp(25px, 3.4vw, 45px); font-weight: 720; line-height: 1.05; letter-spacing: -.039em; }
.home-directory a:not(.directory-contact) strong { font-size: clamp(23px, 2.8vw, 34px); }
.home-directory a span:not(.button-icon) { grid-area: 2 / 1; font-size: 15px; color: var(--muted); }
.home-directory a .button-icon,
.home-directory a strong,
.home-directory a span { z-index: 1; }
.home-directory i {
  position: absolute;
  right: 12%;
  bottom: -21px;
  width: 91px;
  height: 104px;
  background: var(--figure);
  opacity: .38;
  rotate: -14deg;
  border-radius: 13px;
}
.home-directory .directory-file::after {
  content: "";
  position: absolute;
  inset: 24px 18px;
  background: repeating-linear-gradient(0deg, transparent 0 12px, var(--panel) 12px 13px);
}
.home-directory .directory-marker {
  width: 85px;
  height: 85px;
  border-radius: 50% 50% 50% 18%;
  bottom: -7px;
  rotate: -45deg;
  background: var(--action-warm-strong);
  opacity: .9;
}
.home-directory .directory-marker::after {
  content: "";
  position: absolute;
  inset: 27px;
  border-radius: 50%;
  background: var(--action-warm);
}

.location {
  display: grid;
  grid-template-columns: .94fr 1.06fr;
  min-height: 380px;
  overflow: hidden;
  background: var(--surface);
  border-radius: var(--radius);
}
.location-copy { align-self: center; padding: clamp(24px, 5.5vw, 82px); }
.location-copy h2 { text-wrap: wrap; font-size: clamp(33px, 4.05vw, 61px); }
.location-copy p { margin-block: 15px 22px; max-width: 31ch; }
.map-link { justify-content: flex-start; gap: 9px; }
.map-link .button-icon { margin-left: 2px; }
.route-pin { flex: 0 0 auto; color: #a83532; }

.location-map {
  position: relative;
  min-height: 310px;
  overflow: hidden;
  isolation: isolate;
  background: var(--map-paper);
}
.map-stage { position: absolute; inset: 0; overflow: hidden; }
.map-stage > svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; pointer-events: none; }
.map-world { transform-origin: 50% 50%; transform-box: view-box; fill: none; stroke-linejoin: round; stroke-linecap: round; }
.map-green { fill: var(--surface-strong); }
.map-blocks { fill: var(--map-block); }
.map-river { stroke: var(--map-water); stroke-width: 11; }
.map-rail { stroke: var(--figure-line); stroke-width: 2; stroke-dasharray: 8 5; }
.map-local { stroke: var(--paper); stroke-width: 4.4; }
.map-major { stroke: var(--paper); stroke-width: 8; }
.map-house { fill: var(--panel); stroke: var(--paper); stroke-width: 1.8; }
.map-radius { fill: none; stroke: var(--panel); opacity: .35; stroke-width: 1.3; }

.map-city-boundary { fill: var(--surface); stroke: var(--figure-line); stroke-opacity: .76; stroke-width: 1.15; }
.map-city-green { fill: color-mix(in srgb, #92ac73 44%, var(--map-paper)); }
.map-city-built { fill: color-mix(in srgb, var(--map-block) 75%, var(--paper)); }
.map-city-water { fill: var(--map-water); }
.map-city-river { fill: none; stroke: var(--map-water); stroke-width: 3.2; }
.map-city-rail { fill: none; stroke: var(--muted); stroke-width: 1.45; stroke-dasharray: 5 3; opacity: .62; }
.map-city-local { fill: none; stroke: var(--paper); stroke-width: 1.05; }
.map-city-major { fill: none; stroke: var(--paper); stroke-width: 2.2; }
.map-city-world { stroke-linecap: round; stroke-linejoin: round; }

.map-caption, .map-credit, .map-pin { position: absolute; z-index: 2; border-radius: 8px; }
.map-interactive .map-static { display: none; }
.map-caption, .map-pin {
  display: inline-flex;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  border: 0;
  background: transparent;
  font-size: 13px;
  line-height: 1.2;
}
.map-caption {
  gap: 5px;
  padding: 0 8px;
  color: var(--ink);
  font-weight: 620;
}
button.map-caption, button.map-pin { cursor: pointer; }
.map-caption::before, .map-pin::before {
  position: absolute;
  z-index: -1;
  inset: 7px 0;
  border-radius: inherit;
  background: var(--paper);
  box-shadow: 0 2px 7px color-mix(in srgb, var(--ink) 13%, transparent);
  content: "";
}
button.map-caption:hover::before {
  background: var(--surface-strong);
}
.map-zoom-in, [data-map-current="city"] .map-zoom-out { display: none; }
[data-map-current="city"] .map-zoom-in { display: block; }
.map-credit {
  right: 10px;
  bottom: 10px;
  padding: 5px 8px;
  background: var(--paper);
  color: var(--ink);
  font-size: 12px;
  line-height: 1.38;
}
.map-credit a { color: var(--ink); text-decoration: none; }
.map-credit a:hover { color: var(--link); text-decoration: underline; }
.map-pin {
  --map-pin-offset: 10px;
  --map-pin-fill: #274794;
  top: var(--map-pin-y, 50%);
  left: var(--map-pin-x, 50%);
  transform: translate(-50%, calc(-100% - var(--map-pin-offset)));
  justify-content: center;
  padding: 0 9px;
  color: #fff;
  font-weight: 650;
  white-space: nowrap;
}
.map-pin::before { background: var(--map-pin-fill); }
button.map-pin:hover::before { background: #1b367a; }
button.map-pin:focus-visible { outline-offset: -3px; }
.map-static { pointer-events: none; }
.map-pin::after {
  position: absolute;
  top: calc(100% - 7px);
  left: 50%;
  width: 1px;
  height: calc(var(--map-pin-offset) + 2px);
  background: var(--map-pin-fill);
  opacity: .8;
  content: "";
  pointer-events: none;
}

.course-chapters { --chapter-height: clamp(394px, 123vw, 510px); }
.chapter-stage { display: flex; flex-direction: column; gap: clamp(14px, 2.4vw, 33px); }
.chapter-slot { --chapter-paper: var(--surface-strong); }
.chapter-slot:nth-child(2) { --chapter-paper: var(--action-warm); }
.chapter-slot:nth-child(3) { --chapter-paper: var(--panel); color: var(--panel-ink); }
.chapter-slot:nth-child(3) .art-route { stroke: var(--panel-ink); }
.chapter-slot:nth-child(3) .art-rule { stroke: var(--panel-line); }
.chapter-slot:nth-child(4) { --chapter-paper: var(--figure); }
.chapter-sheet {
  display: grid;
  align-items: center;
  height: 100%;
  border-radius: var(--radius);
  background: var(--chapter-paper);
}
.course-chapter {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto 1fr;
  align-items: start;
  gap: 18px;
  min-height: var(--chapter-height);
  padding: clamp(24px, 5.5vw, 47px);
}
.course-chapter h3 {
  font-size: clamp(29px, 4.1vw, 46px);
  line-height: 1.04;
  text-wrap: balance;
  hyphens: auto;
  overflow-wrap: anywhere;
}
.course-chapter p {
  max-width: 40ch;
  margin-top: 14px;
  font-size: clamp(17px, 1.35vw, 19px);
  overflow-wrap: anywhere;
}
.chapter-illustration {
  width: min(100%, 400px);
  align-self: end;
  justify-self: center;
}
.chapter-illustration svg { display: block; width: 100%; height: auto; overflow: visible; }

@media (min-width: 601px) {
  .course-chapters { --chapter-height: clamp(380px, calc(100svh - 184px), 594px); }
  .course-chapter { padding: clamp(24px, 4.7svh, 47px); }
  .chapter-illustration { width: min(100%, 400px, 52svh); }
}

@media (min-width: 601px) and (max-height: 590px) {
  .course-chapter { padding-block: clamp(16px, 3.5svh, 22px); }
  .course-chapter h3 { font-size: clamp(1.75rem, 6.6svh, 2.5rem); }
}

.art-offset { fill: var(--figure); }
.art-page { fill: var(--paper); stroke: var(--ink); stroke-width: 1.4; }
.art-rule { fill: none; stroke: var(--figure-line); stroke-width: 2.6; stroke-linejoin: round; }
.art-accent-line { fill: none; stroke: var(--accent); stroke-width: 14; stroke-linecap: round; }
.art-number { fill: var(--ink); font: 680 23px "Golos Text", Arial, sans-serif; }
.art-accent { fill: var(--accent); stroke: var(--ink); stroke-width: 1.3; }
.art-route { fill: none; stroke: var(--panel); stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; }
.art-node { fill: var(--paper); stroke: var(--panel); stroke-width: 3; }

@media (prefers-reduced-motion: no-preference) {
  /* Measure a viewport that stays stable as mobile bars open or close. */
  .js .course-topics::before {
    content: '';
    position: fixed;
    inset: 0 auto auto 0;
    inline-size: 0;
    block-size: 100vh;
    block-size: 100svh;
    visibility: hidden;
    pointer-events: none;
  }
  .pinned-topics .chapter-heading { position: sticky; top: 0; z-index: 1; }
  .is-pinned-stack {
    --stack-card: clamp(var(--stack-card-min), var(--chapter-height), var(--stack-card-max));
    position: relative;
    z-index: 2;
  }
  .is-pinned-stack .chapter-stage::after {
    content: "";
    flex: none;
    height: clamp(22px, 3.2vw, 44px);
  }
  .is-pinned-stack .chapter-slot {
    position: sticky;
    top: calc(var(--stack-top) + var(--layer-offset));
    /* The invisible space below each sheet gives every slot the same bottom
       edge once pinned. They then leave together with the layers still showing. */
    height: calc(var(--stack-card) + var(--stack-depth) - var(--layer-offset));
    flex: none;
    pointer-events: none;
  }
  .is-pinned-stack .chapter-sheet {
    height: var(--stack-card);
    transform-origin: center top;
    pointer-events: auto;
  }
  .is-pinned-stack .course-chapter {
    height: 100%;
    min-height: 0;
    grid-template-rows: auto minmax(0, 1fr);
  }
  .is-pinned-stack .chapter-illustration {
    aspect-ratio: 400 / 230;
    max-height: 100%;
  }
  .is-pinned-stack .chapter-illustration svg { height: 100%; }
}

@media (max-width: 780px) {
  .header-inner { min-height: 62px; }
  .main-nav { min-width: 0; }
  .js .menu-toggle {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    padding: 0;
    color: var(--ink);
    background: transparent;
    border: 0;
    border-radius: 12px;
    cursor: pointer;
  }
  .js .menu-toggle:hover, .js .menu-toggle[aria-expanded="true"] { background: var(--surface); }
  .menu-toggle i { display: block; width: 22px; height: 19px; position: relative; }
  .menu-toggle i::before, .menu-toggle i::after {
    position: absolute;
    content: "";
    left: 0;
    top: 5px;
    height: 2px;
    width: 22px;
    background: currentColor;
    transform-origin: center;
    border-radius: 9px;
  }
  .menu-toggle i::after { top: 12px; left: 4px; width: 18px; }
  .menu-toggle[aria-expanded="true"] i::before,
  .menu-toggle[aria-expanded="true"] i::after { top: 9px; left: 0; width: 22px; }
  .menu-toggle[aria-expanded="true"] i::before { transform: rotate(45deg); }
  .menu-toggle[aria-expanded="true"] i::after { transform: rotate(-45deg); }
  .js .main-nav {
    position: absolute;
    z-index: 3;
    display: none;
    inset-inline: max(12px, 4.5vw);
    top: calc(100% + 5px);
    margin-left: auto;
    max-width: 452px;
    padding: 11px;
    background: var(--menu);
    border-radius: 17px;
    box-shadow: 0 10px 28px #18264330;
  }
  .js .header--home .main-nav { inset-inline: 0; }
  .js .header--home:not(.header--in-flow) .main-nav {
    max-block-size: calc(100svh - var(--home-header-visible) - 12px);
    overflow-y: auto;
  }
  .js .menu-toggle[aria-expanded="true"] + .main-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 7px;
    animation: menu-in 175ms ease-out both;
  }
  .js .main-nav a {
    --tile: var(--surface);
    display: grid;
    position: relative;
    align-content: start;
    gap: 4px;
    min-height: 77px;
    padding: 11px;
    border-radius: 10px;
    background: linear-gradient(145deg, var(--tile), var(--paper) 128%);
    color: var(--ink);
    font-size: 17px;
    line-height: 1.17;
    transition: transform 140ms ease-out, box-shadow 140ms ease-out;
  }
  .js .main-nav .nav-programs { --tile: var(--surface-strong); }
  .js .main-nav .nav-about { --tile: var(--menu); }
  .js .main-nav .nav-documents { --tile: var(--workbook); }
  .js .main-nav .nav-contacts { --tile: var(--action-warm); }
  .js .main-nav a:is([aria-current], [data-current-section]) { box-shadow: inset 0 0 0 1px var(--figure-line); }
  .js .main-nav a:hover { transform: translateY(-1px); box-shadow: inset 0 0 0 1px var(--figure-line), 0 3px 8px #17264512; }
  .js .main-nav .nav-icon {
    display: grid;
    place-items: center;
    width: 31px;
    height: 30px;
    border-radius: 8px;
    margin-bottom: 2px;
    color: var(--link);
    background: var(--paper);
  }
  .js .main-nav .nav-contacts .nav-icon { color: var(--accent-deep); }
  .js .main-nav .button-icon {
    display: grid;
    place-items: center;
    position: absolute;
    right: 9px;
    top: 10px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--paper);
  }
  .js .main-nav .button-icon svg { width: 14px; height: 14px; }
  @keyframes menu-in { from { transform: translateY(-6px); opacity: .88; } to { transform: none; opacity: 1; } }
}

@media (min-width: 630px) and (max-width: 780px) {
  .js .main-nav { max-width: 530px; padding: 13px; }
  .js .menu-toggle[aria-expanded="true"] + .main-nav { gap: 10px; }
  .js .main-nav a { min-height: 88px; padding: 14px; }
  .js .main-nav .button-icon { right: 13px; top: 13px; }
}

@media (max-width: 690px) {
  :root { --radius: 21px; }
  .main { padding-block: 14px 46px; }
  .header-inner { gap: 11px; }
  html:not(.js) .header-inner { align-items: start; flex-direction: column; gap: 0; padding-block: 4px 8px; }
  html:not(.js) .main-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 0 15px; }
  .brand { font-size: 21px; }
  .center-hero, .program-panel, .home-about, .inner-cover { grid-template-columns: 1fr; min-height: auto; }
  .hero-copy, .program-copy { padding: 25px clamp(18px, 6.1vw, 35px) 0; }
  .hero-copy h1 { font-size: clamp(60px, 16.4vw, 105px); margin-top: 13px; }
  .hero-intro { margin-block: 12px 18px; font-size: clamp(25px, 6.9vw, 40px); }
  .badge { padding: 6px 9px; font-size: 12px; }
  .portraits { height: clamp(199px, 62vw, 320px); margin-top: 2px; }
  .portrait { width: 93%; right: 3.5%; }
  .portrait-shapes i:first-child { width: 81%; height: 84%; right: 10%; }
  .portrait-shapes i:nth-child(2) { width: 88%; height: 58%; right: 5%; bottom: -1%; }
  .portrait-shapes i:nth-child(3) { top: 12%; right: 14%; }
  .home-programs > .section-title { margin-bottom: 14px; }
  .course-audience { margin-block-end: .45em; }
  .program-copy :is(h2, h3) { font-size: clamp(29px, 8.25vw, 56px); margin-bottom: 17px; }
  .math-art { min-height: clamp(174px, 51vw, 286px); margin: 0 6%; }
  .math-orbit { left: 8%; right: 6%; top: 23%; bottom: 19%; }
  .math-note { width: 43%; max-width: 200px; }
  .math-tab { right: 13%; }
  .math-fold { right: 16%; }
  .math-point { left: 15%; }
  .home-about, .inner-cover.about-cover { grid-template-columns: minmax(0, 1fr); }
  .home-about-copy { padding: 24px; }
  .about-cover .inner-cover-copy { padding: 26px 22px 20px; }
  .home-about .building, .about-cover .building {
    z-index: -1;
    margin: -88px 0 0;
    border-radius: 0;
    mask-image: linear-gradient(to bottom,
      transparent 0%, rgb(0 0 0 / .07) 5%, rgb(0 0 0 / .21) 12%,
      rgb(0 0 0 / .47) 20%, rgb(0 0 0 / .76) 28%, #000 36%);
  }
  .building img {
    transform: scale(1.08);
    transform-origin: top left;
  }
  .home-about .building img { transform-origin: 75px top; }
  .home-directory { grid-template-columns: 1fr; gap: 9px; }
  .home-directory a { min-height: 109px; }
  .home-directory a span:not(.button-icon) { padding-right: 23px; }
  .home-directory i { right: 8%; }
  .location { grid-template-columns: 1fr; }
  .location-map { min-height: 283px; }
  .course-intro { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .course-copy { padding: 25px 22px 2px; }
  .course-intro h1 { font-size: clamp(31px, 9.8vw, 57px); }
  .course-lead { max-width: 32ch; }
  .course-scene { width: min(100%, 465px); margin: 5px auto 0; }
  .chapter-heading { gap: 11px; padding-block: 10px 20px; }
  .course-contact { align-items: start; }
  .question-art { width: clamp(83px, 24vw, 140px); margin: 0 -8px 0 -5px; }
  .inner-cover { grid-template-columns: 1fr; }
  .inner-cover-copy { padding: 26px 22px 13px; }
  .inner-cover h1 { font-size: clamp(42px, 11vw, 71px); }
  .file-art { margin: 15px clamp(24px, 11vw, 55px) 24px auto; }
  .contact-cover .inner-cover-copy { padding-inline: clamp(24px, 7vw, 37px); }
  .contact-art { width: min(90%, 350px); margin: 7px auto 16px; }
  .documents { grid-template-columns: 1fr; gap: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; scroll-behavior: auto !important; }
  .js .main-nav a { transition: none; }
  .js .main-nav a:hover { transform: none; }
}

/* Shared navigation, location and privacy surfaces. */
.about-more .button-icon {
  width: auto;
  height: auto;
  background: none;
}

.footer-inner { justify-content: space-between; flex-wrap: wrap; gap: 16px 30px; }
.footer-identity { display: grid; justify-items: start; row-gap: .25rem; }
.footer-brand { min-height: auto; gap: 7px; font-size: 1.1875rem; line-height: 1.05; }
.footer-brand .brand-mark { width: 1.375rem; height: auto; }
.footer-tagline { color: var(--brand-caption); font-size: .8125rem; font-weight: 560; line-height: 1.2; }
.footer-links { display: flex; align-items: center; flex-wrap: wrap; gap: 4px clamp(22px, 3vw, 42px); }
.footer-links :is(a, button) {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 5px 0;
  border: 0;
  border-radius: 4px;
  background: none;
  color: var(--document-link);
  font-size: .875rem;
  font-weight: 610;
  text-align: start;
  text-decoration: none;
  cursor: pointer;
}
.footer-links a:hover { color: var(--ink); }

.location {
  --location-paper: color-mix(in srgb, var(--map-paper), var(--surface) 72%);
  background: var(--location-paper);
}
.location-map { background: color-mix(in srgb, var(--map-paper), var(--figure) 12%); }
.location-map::before {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 0;
  background: linear-gradient(90deg, var(--location-paper), transparent clamp(44px, 8vw, 116px));
  pointer-events: none;
}
.map-caption {
  top: 18px;
  left: clamp(42px, 5vw, 74px);
}
@media (min-width: 781px) {
  .map-caption { left: auto; right: 18px; }
}

.privacy-copy {
  max-inline-size: 46rem;
  margin: clamp(1.25rem, 3.1vw, 2.75rem) auto 0;
  overflow-wrap: anywhere;
}
.privacy-copy h1 { font-size: clamp(1.75rem, 1.2rem + 3vw, 3.6rem); line-height: 1.07; }
.privacy-copy h2 { font-size: clamp(1.4rem, 1.1rem + 1.6vw, 2rem); line-height: 1.15; text-wrap: wrap; }
.privacy-copy section { margin-block-start: clamp(1.5rem, 4vw, 2.75rem); }
.privacy-copy p { max-inline-size: 64ch; margin-block-start: .65em; font-size: 1.0625rem; line-height: 1.65; }
.privacy-lead p { margin-block-start: 1.15em; }
.documents .text-link {
  max-inline-size: 100%;
  color: var(--document-link);
  font-size: 1rem;
  text-decoration: none;
  overflow-wrap: anywhere;
}
.documents .text-link:is(:hover, :active) {
  color: var(--ink);
  text-decoration: none;
}
.documents p { font-size: 1.0625rem; overflow-wrap: anywhere; }

@media (max-width: 780px) {
  .js .main-nav a {
    --emblem: var(--figure);
    --emblem-detail: var(--panel);
    isolation: isolate;
    align-content: start;
    padding: 15px 31px 10px 12px;
  }
  .js .main-nav a > strong { position: relative; z-index: 1; }
  .js .main-nav .nav-icon {
    position: absolute;
    z-index: -1;
    inset: 0;
    overflow: hidden;
    display: block;
    width: auto;
    height: auto;
    margin: 0;
    border-radius: inherit;
    background: none;
    pointer-events: none;
  }
  .js .main-nav .nav-icon svg {
    position: absolute;
    right: 4%;
    bottom: -26px;
    width: clamp(64px, 18vw, 102px);
    height: auto;
    transform: rotate(-17deg);
    opacity: .52;
  }
  .nav-emblem-fill { fill: var(--emblem); }
  .nav-emblem-line { fill: none; stroke: var(--emblem-detail); stroke-width: 1; stroke-linecap: round; opacity: .42; }
  .js .main-nav .nav-contacts { --emblem: var(--action-warm-strong); --emblem-detail: var(--accent-deep); }
  .js .main-nav .button-icon { z-index: 1; background: none; }
  .js .main-nav .button-icon svg { width: 16px; height: 16px; }
}

@media (max-width: 690px) {
  .location-map::before { background: linear-gradient(var(--location-paper), transparent 58px); }
  .map-caption { top: 15px; left: 15px; }
  .footer-inner { align-items: start; flex-direction: column; gap: 8px; }
  .footer-links { width: 100%; justify-content: center; column-gap: clamp(12px, 4.1vw, 32px); }
}
@media (max-width: 400px) {
  .footer-links a { font-size: .8125rem; }
}
@media (max-width: 340px) {
  .footer-inner { width: calc(100% - 16px); }
  .footer-links a { letter-spacing: -.057em; }
}

.documents-cover .inner-cover-copy { min-inline-size: 0; overflow-wrap: anywhere; }
.documents-cover h1 { max-width: 15ch; font-size: clamp(33px, 5.12vw, 76px); overflow-wrap: anywhere; }
.registry-number { font-variant-numeric: tabular-nums; }

@media (max-width: 690px) {
  .documents-cover h1 { font-size: clamp(27px, 7.6vw, 48px); }
}

/* Plain navigation links use color for pointer feedback and an outline for Tab. */
.back:is(:hover, :active),
.footer-links a:is(:hover, :active),
.documents .text-link:is(:hover, :active) {
  color: var(--accent-deep);
  text-decoration: none;
}

@media (hover: none) {
  .back:hover:not(:active) { color: var(--muted); }
  .footer-links a:hover:not(:active),
  .documents .text-link:hover:not(:active) { color: var(--document-link); }
}

.course-contact h2 { font-size: clamp(1.875rem, 3.7vw, 3.375rem); }
.course-contact .button { font-size: 1rem; }

@media (max-width: 780px) {
  .course-contact {
    display: grid;
    grid-template-columns: minmax(0, 1fr) clamp(0px, calc(100% - 8rem), min(18vw, 106px));
    align-items: center;
    justify-content: start;
    column-gap: 10px;
    row-gap: 12px;
    padding: clamp(16px, 4.6vw, 28px);
  }
  .pinned-topics + .course-contact { min-block-size: 0; }
  .course-contact > div { display: contents; }
  .course-contact h2 {
    grid-area: 1 / 1;
    font-size: clamp(1.5rem, 5.9vw, 1.875rem);
    overflow-wrap: anywhere;
  }
  .course-contact .button {
    grid-area: 2 / 1 / 3 / -1;
    margin-top: 0;
  }
  .question-art {
    grid-area: 1 / 2;
    width: 100%;
    margin: 0;
  }
}

@media (min-width: 691px) {
  .home-about,
  .inner-cover.about-cover {
    grid-template-columns: minmax(0, 1fr);
  }

  .home-about {
    min-height: clamp(340px, 33vw, 442px);
  }

  .home-about-copy,
  .about-cover .inner-cover-copy {
    width: 44%;
    padding-inline-end: clamp(14px, 2.3vw, 34px);
  }

  .home-about .building,
  .about-cover .building {
    position: absolute;
    inset: 0 -6% 0 auto;
    width: 78%;
    height: 100%;
    margin: 0;
    border-radius: 0;
    mask-image: linear-gradient(to right,
      transparent, rgb(0 0 0 / .02) 16%, rgb(0 0 0 / .13) 29%,
      rgb(0 0 0 / .43) 43%, rgb(0 0 0 / .81) 56%, #000 68%);
    pointer-events: none;
  }

  .building img {
    height: 100%;
    object-fit: cover;
    object-position: right 40%;
  }
}
