:root {
  font-family: "Inter","PingFang SC","Microsoft YaHei",sans-serif;
  color: #141c36;
  background: #f7faff;
  font-size: 16px;
  line-height: 1.6;
  --blue: #2859e7;
  --muted: #53637d;
  --edge: #dce6f4;
  --paper: #fff;
  --pale: #eef5ff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

button,input,select,textarea {
  font: inherit;
}

button,select {
  cursor: pointer;
}

button:disabled {
  cursor: wait;
  opacity: .7;
}

h1,h2,h3,p {
  margin: 0;
}

button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,summary:focus-visible {
  outline: 3px solid #537cff;
  outline-offset: 3px;
}

.wrap {
  width: min(1152px,calc(100% - 64px));
  margin-inline: auto;
}

.app {
  min-height: 71vh;
}

.header {
  background: white;
  border-bottom: 1px solid var(--edge);
}

.topbar {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(12px, 1.8vw, 22px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-size: 18px;
  font-weight: 780;
  min-width: 0;
  overflow-wrap: anywhere;
}

.brand-mark {
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: #2455ed;
  display: grid;
  place-items: center;
  color: white;
  font-size: 27px;
  line-height: 1;
}

.topbar nav {
  display: flex;
  flex-wrap: wrap;
  gap: 7px clamp(12px, 1.6vw, 21px);
  align-items: center;
  color: #475678;
  font-size: 14px;
  font-weight: 650;
}

.topbar nav a {
  white-space: nowrap;
}

.header-actions {
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.language-picker select {
  width: auto;
  min-width: 92px;
}

.topbar nav a:hover,.topbar nav a[aria-current] {
  color: var(--blue);
}

.button {
  border: 1px solid transparent;
  border-radius: 10px;
  background: var(--blue);
  color: white;
  padding: 10px 18px;
  font-weight: 700;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 43px;
  white-space: nowrap;
}

.button:hover {
  background: #1740b5;
}

.outline {
  background: white;
  color: #233255;
  border-color: #d4e0f4;
}

.outline:hover {
  background: #edf4ff;
}

.ghost {
  background: #edf3ff;
  color: #234ec8;
}

.ghost:hover {
  background: #dce8ff;
}

.button.danger {
  background: #fff6f6;
  color: #a33440;
  border-color: #f2d8da;
}

.hero {
  background: radial-gradient(ellipse at 75% 22%,#e2eaff 0,transparent 48%),linear-gradient(115deg,#f2f7ff 0%,#e8f3ff 100%);
  overflow: hidden;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 52px;
  min-height: 485px;
  padding-block: 56px;
}

.eyebrow {
  color: #2356d0;
  font-weight: 750;
  letter-spacing: .05em;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 13px;
}

.eyebrow::before {
  content: "";
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: #4673ef;
}

.hero h1 {
  font-size: clamp(38px,4.2vw,62px);
  line-height: 1.15;
  letter-spacing: -.045em;
  font-weight: 850;
}

.hero h1 span {
  display: block;
  color: #2955df;
}

.hero p {
  color: var(--muted);
  font-size: 17px;
  max-width: 480px;
  margin-top: 19px;
}

.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 27px;
}

.hero .button {
  min-height: 48px;
  padding-inline: 22px;
}

.hero-figure {
  margin: 0;
  position: relative;
  aspect-ratio: 1.38;
  border: 1px solid rgba(255,255,255,.9);
  border-radius: 26px;
  background: radial-gradient(ellipse at 50% 35%,#f3f9ff,#b7cdf9);
  box-shadow: 0 24px 65px #466cb52b;
  overflow: hidden;
  isolation: isolate;
}

.hero-figure img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.section {
  padding-block: 52px 58px;
}

.section+ .section {
  padding-top: 6px;
}

.section-head {
  margin-bottom: 23px;
}

.section-head h2,.page-head h1 {
  font-size: clamp(28px,4vw,40px);
  letter-spacing: -.04em;
  line-height: 1.2;
  font-weight: 820;
}

.section-head p,.page-head p {
  color: var(--muted);
  margin-top: 9px;
}

.course-grid,.video-grid {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 17px;
}

.course-card {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 17px;
  background: #fff;
  border: 1px solid var(--edge);
  border-radius: 18px;
  padding: 23px;
  box-shadow: 0 5px 20px #20458108;
}

.course-card-wide {
  grid-column: 1 / -1;
}

.course-icon {
  width: 56px;
  height: 56px;
  border-radius: 15px;
  display: grid;
  place-items: center;
  background: #e9f0ff;
  color: #2857dc;
  font-weight: 800;
  font-size: 20px;
}

.course-icon.purple {
  background: #eeebff;
  color: #6044c6;
}

.course-card h3 {
  font-size: 22px;
  line-height: 1.25;
}

.course-card p {
  color: var(--muted);
  margin-top: 7px;
}

.course-card .button {
  margin-top: 16px;
}

.video-tile {
  background: #fff;
  border: 1px solid var(--edge);
  border-radius: 16px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.video-tile:hover {
  border-color: #9eb7f5;
}

.video-tile .icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #eaf0ff;
  color: #2856db;
  font-size: 16px;
}

.video-tile strong,.video-tile small {
  display: block;
}

.video-tile small {
  color: var(--muted);
  font-size: 14px;
}

.foot {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  border-top: 1px solid var(--edge);
  padding-block: 22px;
  color: var(--muted);
  font-size: 14px;
}

.page {
  padding-block: 40px 60px;
}

.page-head {
  margin-bottom: 23px;
}

.back {
  display: inline-block;
  color: #2958ce;
  font-weight: 650;
  font-size: 14px;
  margin-bottom: 12px;
}

.toolbar,.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.toolbar {
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.tab {
  font-size: 14px;
  display: inline-block;
  padding: 8px 13px;
  border: 1px solid var(--edge);
  border-radius: 8px;
  color: #3c4c70;
  background: white;
  font-weight: 650;
}

.tab:hover,.tab.active {
  color: #2349c6;
  border-color: #a8bdf5;
  background: #eaf1ff;
}

.catalog-layout {
  display: grid;
  grid-template-columns: 295px minmax(0,1fr);
  gap: 18px;
}

.shelf,.panel,.entry,.editor {
  background: #fff;
  border: 1px solid var(--edge);
  border-radius: 14px;
}

.shelf {
  padding: 10px;
  align-self: start;
}

.chapter-link,.topic-link {
  display: flex;
  gap: 8px;
  padding: 9px 10px;
  border-radius: 8px;
  font-size: 14px;
  align-items: flex-start;
}

.chapter-link {
  font-weight: 740;
}

.topic-link {
  margin-left: 10px;
  color: #475878;
}

.chapter-link:hover,.topic-link:hover,.chapter-link.active,.topic-link.active {
  background: #eaf1ff;
  color: #204bc5;
}

.code {
  flex: none;
  color: #2b58cd;
  font-weight: 760;
}

.topic-gate {
  margin-left: auto;
  font-size: 12px;
  color: #5b6492;
  white-space: nowrap;
}

.panel {
  padding: 23px;
  min-height: 260px;
}

.panel h2 {
  font-size: 25px;
  line-height: 1.3;
}

.subline {
  color: var(--muted);
  margin-top: 5px;
}

.filters {
  margin-block: 18px;
}

.filter-field {
  max-width: 280px;
  width: 100%;
}

.entries {
  display: grid;
  gap: 9px;
}

.entry {
  padding: 13px 15px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  min-width: 0;
}

.entry>div:first-child {
  min-width: 0;
  overflow-wrap: anywhere;
}

.entry small {
  font-size: 13px;
  color: var(--muted);
}

.entry p {
  font-size: 14px;
  color: var(--muted);
  white-space: pre-wrap;
}

.entry-buttons {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.empty {
  padding: 26px 16px;
  border-radius: 11px;
  border: 1px dashed #cbd9ef;
  color: var(--muted);
  background: #f8fbff;
  text-align: center;
}

.source {
  font-size: 14px;
  display: inline-block;
  text-decoration: underline;
  text-underline-offset: 3px;
  color: #365cc8;
}

.editor {
  padding: 20px;
  margin-bottom: 15px;
}

.editor h2 {
  font-size: 22px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 12px;
  margin-top: 12px;
}

.wide {
  grid-column: 1/-1;
}

label {
  display: grid;
  gap: 5px;
  font-size: 14px;
  font-weight: 690;
}

input,textarea,select {
  width: 100%;
  border: 1px solid #cbd9ed;
  border-radius: 8px;
  padding: 9px 10px;
  color: #17223b;
  background: white;
  min-height: 42px;
}

select {
  appearance: none;
  padding-right: 32px;
  background: white linear-gradient(45deg,transparent 50%,#4e6189 50%) right 15px center/6px 6px no-repeat;
  background-image: linear-gradient(45deg,transparent 50%,#4e6189 50%),linear-gradient(135deg,#4e6189 50%,transparent 50%);
  background-position: right 16px center,right 10px center;
  background-size: 6px 6px;
  background-repeat: no-repeat;
}

textarea {
  resize: vertical;
  min-height: 78px;
}

.editor summary {
  cursor: pointer;
  font-weight: 750;
}

.editor .actions {
  margin-top: 13px;
}

.feedback {
  margin-top: 9px;
  color: #2851be;
  font-size: 14px;
  min-height: 1.3em;
}

.feedback.error {
  color: #aa2334;
}

.help {
  font-weight: 400;
  color: var(--muted);
  font-size: 14px;
}

.tag {
  color: #294fc5;
  font-size: 13px;
  font-weight: 700;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

dialog {
  width: min(820px,calc(100% - 26px));
  padding: 15px;
  border: 1px solid var(--edge);
  border-radius: 16px;
  box-shadow: 0 20px 100px #0006;
  color: #141c36;
}

dialog::backdrop {
  background: #0a153a99;
}

.dialog-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.dialog-top h2 {
  font-size: 18px;
}

dialog video {
  display: block;
  background: #090f20;
  width: 100%;
  max-height: 70vh;
  border-radius: 9px;
}

[hidden] {
  display: none!important;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 17px;
}

.info-card {
  padding: clamp(19px, 3vw, 30px);
  border: 1px solid var(--edge);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 5px 20px #20458108;
  overflow-wrap: anywhere;
}

.info-card h2 {
  font-size: clamp(22px, 2.5vw, 28px);
  line-height: 1.25;
}

.info-card p {
  color: var(--muted);
  margin-top: 10px;
}

.info-card .button {
  margin-top: 18px;
}

.info-card .campus-address {
  color: #293f70;
  font-weight: 700;
}

.info-copy {
  white-space: pre-wrap;
}

.pricing-accent {
  background: #edf4ff;
  border-color: #cfdef8;
}

.pricing-card .fee {
  font-size: clamp(19px, 2.3vw, 25px);
  font-weight: 800;
  color: var(--blue);
  margin-block: 23px 12px;
}

.contact-panel {
  margin-top: 19px;
}

.contact-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  padding: 0;
  margin: 14px 0 0;
  list-style: none;
  font-size: 15px;
}

.contact-list a {
  color: #244ebd;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.translated-form {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.field-language {
  font-size: 13px;
  font-weight: 650;
  color: var(--muted);
}

.page-editors h2 {
  margin: 20px 0 9px;
  font-size: 19px;
}

@media(max-width:850px) {
  .wrap {
    width: calc(100% - 38px);
  }
  .hero-inner {
    gap: 25px;
    min-height: 0;
  }
  .hero h1 {
    font-size: clamp(34px,5.4vw,48px);
  }
  .topbar {
    flex-wrap: wrap;
    row-gap: 7px;
    padding-block: 10px;
  }
  .topbar nav {
    order: 3;
    width: 100%;
    gap: 7px 16px;
  }
  .catalog-layout {
    grid-template-columns: 240px minmax(0,1fr);
  }
}

@media(max-width:660px) {
  .wrap {
    width: calc(100% - 30px);
  }
  .topbar {
    flex-wrap: wrap;
    column-gap: 8px;
    row-gap: 0;
    padding-block: 10px;
  }
  .topbar nav {
    order: 3;
    width: 100%;
    padding-top: 12px;
    gap: 7px 14px;
  }
  .brand {
    font-size: 16px;
  }
  .manage-link {
    padding: 6px 10px;
    min-height: 35px;
  }
  .hero-inner {
    grid-template-columns: 1fr;
    padding-block: 33px;
    gap: 23px;
  }
  .hero p {
    font-size: 16px;
  }
  .hero-figure {
    max-height: 280px;
    aspect-ratio: 1.55;
  }
  .course-grid,.video-grid,.catalog-layout,.form-grid,.info-grid,.translated-form {
    grid-template-columns: 1fr;
  }
  .section {
    padding-block: 35px;
  }
  .course-card {
    padding: 16px;
    gap: 12px;
  }
  .page {
    padding-block: 26px 38px;
  }
  .shelf {
    max-height: 265px;
    overflow: auto;
  }
  .panel {
    padding: 15px;
  }
  .foot {
    flex-direction: column;
    gap: 4px;
  }
  .entry {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .entry-buttons .button {
    min-height: 34px;
    padding: 5px 11px;
  }
  .filter-field {
    max-width: none;
  }
}
