.academy-progress {
  position: fixed;
  z-index: 1001;
  inset: 0 0 auto;
  height: 3px;
  background: transparent;
}

.academy-progress span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, #5d7cff, #41c7ad);
  transition: width .08s linear;
}

.academy-course-header {
  position: sticky;
  z-index: 1000;
  top: 0;
  border-bottom: 1px solid #e6e9f1;
  background: rgba(255, 255, 255, .94);
  color: #17243b;
  font: 14px/1.4 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  backdrop-filter: blur(14px);
  transition: box-shadow .2s ease;
}

.academy-course-header.is-scrolled {
  box-shadow: 0 8px 26px rgba(34, 52, 103, .1);
}

.academy-course-nav {
  display: flex;
  width: min(1120px, calc(100% - 40px));
  min-height: 66px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 0 auto;
}

.nav-menu-toggle {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid #dfe3ed;
  border-radius: 9px;
  background: #fff;
  color: #53617b;
  cursor: pointer;
  font: 650 12px/1.2 Inter, ui-sans-serif, system-ui, sans-serif;
}

.nav-menu-toggle[hidden],
.nav-links[hidden],
.academy-course-links[hidden] {
  display: none !important;
}

.nav-menu-icon {
  font-size: 17px;
  line-height: 1;
}

.academy-course-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #17243b;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: -.03em;
  text-decoration: none;
}

.academy-course-brand span {
  font-family: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: -.04em;
}

.academy-course-mark {
  display: block;
  width: 38px;
  height: 38px;
  flex: none;
  object-fit: contain;
}

.academy-course-links {
  display: flex;
  align-items: center;
  gap: 22px;
}

.academy-course-links a {
  color: #53617b;
  font-size: 12px;
  font-weight: 650;
  text-decoration: none;
}

.academy-course-links a:hover,
.academy-course-links a:focus-visible {
  color: #3455db;
}

.academy-course-links .academy-course-home {
  padding: 9px 13px;
  border-radius: 8px;
  background: #3455db;
  color: #fff;
}

.academy-course-links .academy-course-home:hover,
.academy-course-links .academy-course-home:focus-visible {
  background: #233da8;
  color: #fff;
}

.academy-reading-status {
  position: fixed;
  z-index: 999;
  right: 18px;
  bottom: 18px;
  padding: 7px 10px;
  border: 1px solid #e6e9f1;
  border-radius: 99px;
  background: rgba(255, 255, 255, .94);
  color: #53617b;
  font: 11px/1.3 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  box-shadow: 0 5px 18px rgba(34, 52, 103, .08);
}

@media (max-width: 520px) {
  .academy-course-nav {
    width: calc(100% - 28px);
    min-height: 58px;
    gap: 8px;
  }

  .academy-course-brand {
    font-size: 12px;
  }

  .academy-course-mark {
    width: 33px;
    height: 33px;
  }

  .academy-course-links {
    gap: 6px;
  }

  .academy-course-links a {
    font-size: 10px;
  }

  .academy-course-links .academy-course-home {
    padding: 6px 8px;
  }

  .theme-toggle {
    width: 32px;
    height: 32px;
  }

  .academy-reading-status {
    right: 10px;
    bottom: 10px;
    font-size: 10px;
  }
}

.skip-link {
  position: fixed;
  z-index: 1002;
  top: 10px;
  left: 10px;
  padding: 10px 14px;
  border-radius: 8px;
  background: #3455db;
  color: #fff;
  font: 700 13px/1.2 Inter, ui-sans-serif, system-ui, sans-serif;
  transform: translateY(-160%);
  transition: transform .18s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid #8297ee;
  outline-offset: 3px;
}

.nav,
.academy-course-nav {
  position: relative;
  justify-content: space-between;
  gap: 14px;
}

.header-actions {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-left: auto;
}

.header-actions .nav-join {
  white-space: nowrap;
}

.nav-join-mobile {
  display: none !important;
}

.nav-links:not([hidden]),
.academy-course-links:not([hidden]) {
  position: absolute;
  z-index: 30;
  top: calc(100% + 10px);
  right: 0;
  display: flex;
  width: min(340px, calc(100vw - 32px));
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  padding: 10px;
  border: 1px solid #e6e9f1;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 16px 38px rgba(20, 32, 58, .16);
}

.nav-links:not([hidden]) a,
.academy-course-links:not([hidden]) a {
  display: flex;
  min-height: 40px;
  align-items: center;
  padding: 8px 10px;
  border-radius: 8px;
}

.nav-links:not([hidden]) .theme-toggle,
.academy-course-links:not([hidden]) .theme-toggle {
  align-self: flex-end;
}

@media (max-width: 620px) {
  .header-actions {
    gap: 6px;
  }

  .header-actions > .nav-join {
    display: none;
  }

  .nav-links:not([hidden]) .nav-join-mobile {
    display: inline-flex !important;
    justify-content: center;
  }

  .nav-menu-toggle {
    min-height: 36px;
    gap: 5px;
    padding: 0 8px;
  }

  .theme-toggle {
    width: 34px;
    height: 34px;
  }

  .academy-course-brand span {
    font-size: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .skip-link {
    transition-duration: .01ms;
  }
}

@media (prefers-reduced-motion: reduce) {
  .academy-progress span,
  .academy-course-header {
    transition-duration: .01ms;
  }
}

.hero {
  isolation: isolate;
}

.hero::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  background: radial-gradient(
    420px circle at var(--glow-x, 78%) var(--glow-y, 25%),
    rgba(113, 139, 255, .16),
    transparent 72%
  );
  content: "";
  pointer-events: none;
}

.visual-stage {
  position: relative;
  min-width: 0;
  padding: 17px 5px;
  perspective: 1100px;
}

.visual-stage .code-window {
  position: relative;
  z-index: 1;
  transform: perspective(1100px) rotateX(var(--tilt-y, 0deg)) rotateY(var(--tilt-x, 0deg)) rotate(1deg);
  transition: transform .24s ease, box-shadow .24s ease;
  will-change: transform;
}

.visual-stage:hover .code-window {
  box-shadow: 0 32px 76px rgba(27, 43, 83, .27);
}

.floating-chip {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 11px 8px 8px;
  border: 1px solid rgba(227, 231, 248, .9);
  border-radius: 10px;
  background: rgba(255, 255, 255, .94);
  color: #53617b;
  font-size: 10px;
  font-weight: 750;
  box-shadow: 0 10px 28px rgba(38, 55, 111, .12);
  animation: academy-float 5s ease-in-out infinite;
  pointer-events: none;
}

.chip-symbol {
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  border-radius: 7px;
  background: #eef0ff;
  color: #3455db;
  font: 800 10px ui-monospace, SFMono-Regular, Menlo, monospace;
}

.floating-chip-c { top: 0; left: -18px; }
.floating-chip-py { top: 25%; right: -17px; animation-delay: -1.6s; }
.floating-chip-js { bottom: 1px; left: 8%; animation-delay: -3.2s; }

.language-card,
.concept-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

.language-card::before,
.concept-card::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  background: radial-gradient(
    190px circle at var(--pointer-x, 50%) var(--pointer-y, 50%),
    rgba(99, 126, 255, .105),
    transparent 75%
  );
  content: "";
  opacity: 0;
  transition: opacity .2s ease;
  pointer-events: none;
}

.language-card:hover::before,
.language-card:focus-visible::before,
.concept-card:hover::before {
  opacity: 1;
}

.button,
.nav-join {
  position: relative;
  overflow: hidden;
}

.button::after,
.nav-join::after {
  position: absolute;
  inset: -50% auto -50% -45%;
  width: 32%;
  background: rgba(255, 255, 255, .2);
  content: "";
  transform: skewX(-20deg);
  transition: left .45s ease;
}

.button:hover::after,
.nav-join:hover::after {
  left: 120%;
}

@keyframes academy-float {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -8px; }
}

@media (max-width: 850px) {
  .floating-chip-c { left: -7px; }
  .floating-chip-py { right: -7px; }
}

@media (max-width: 620px) {
  .visual-stage { width: calc(100% - 8px); max-width: 430px; margin: 0 auto; padding: 16px 3px; }
  .visual-stage .code-window { width: 100%; }
  .floating-chip { padding: 6px 8px 6px 6px; font-size: 9px; }
  .chip-symbol { width: 22px; height: 22px; }
  .floating-chip-c { left: -5px; }
  .floating-chip-py { right: -5px; }
}

@media (prefers-reduced-motion: reduce) {
  .floating-chip { animation: none; }
  .visual-stage .code-window { transform: none; transition: none; }
  .button::after,
  .nav-join::after { display: none; }
}

.course-chapter-list {
  display: grid;
  gap: 9px;
  padding-left: 26px;
}

.course-chapter-list li {
  padding: 12px 15px;
  border: 1px solid #e6e9f1;
  border-radius: 9px;
  background: #fff;
}

.course-chapter-list li::marker {
  color: #3455db;
  font-weight: 800;
}

.course-chapter-list a {
  display: block;
  color: #233da8;
  font-weight: 700;
  text-decoration: none;
}

.course-chapter-list a:hover,
.course-chapter-list a:focus-visible {
  text-decoration: underline;
}

.academy-chapter-navigation {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 28px 0;
  padding: 15px;
  border: 1px solid #e6e9f1;
  border-radius: 10px;
  background: #f7f8fc;
  font: 13px/1.5 Inter, ui-sans-serif, system-ui, sans-serif;
}

.academy-chapter-navigation a {
  color: #3455db;
  font-weight: 700;
  text-decoration: none;
}

.academy-chapter-navigation a:first-child::before {
  margin-right: 7px;
  content: "\2190";
}

.academy-chapter-navigation a:last-child::after {
  margin-left: 7px;
  content: "\2192";
}

.academy-chapter-navigation a:hover,
.academy-chapter-navigation a:focus-visible {
  text-decoration: underline;
}

.course-topic-suggestions {
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid #e6e9f1;
}

.course-topic-suggestions h2 {
  margin: 0 0 14px;
  color: #17243b;
  font-size: clamp(22px, 4vw, 29px);
  line-height: 1.2;
  letter-spacing: -.04em;
}

.course-topic-suggestions ul {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.course-topic-suggestions li {
  padding: 12px 15px;
  border: 1px solid #e6e9f1;
  border-radius: 9px;
  background: #fff;
}

.course-topic-suggestions a {
  color: #3455db;
  font-weight: 700;
  text-decoration: none;
}

.course-topic-suggestions a:hover,
.course-topic-suggestions a:focus-visible {
  text-decoration: underline;
}

.course-placeholder-page {
  min-height: 100vh;
  margin: 0;
  background: #f7f8fc;
  color: #17243b;
  font: 16px/1.6 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.course-placeholder {
  box-sizing: border-box;
  width: min(720px, calc(100% - 36px));
  margin: 9vh auto;
  padding: clamp(24px, 6vw, 52px);
  border: 1px solid #e6e9f1;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 16px 42px rgba(34, 52, 103, .08);
}

.course-placeholder .placeholder-kicker {
  margin: 0 0 10px;
  color: #3455db;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.course-placeholder h1 {
  margin: 0;
  font-size: clamp(32px, 6vw, 48px);
  line-height: 1.1;
  letter-spacing: -.05em;
}

.course-placeholder p {
  color: #64718a;
}

.course-placeholder .placeholder-note {
  margin: 26px 0;
  padding: 16px 18px;
  border-left: 3px solid #3455db;
  border-radius: 5px;
  background: #f2f4ff;
  color: #53617b;
  font-size: 14px;
}

.course-placeholder .placeholder-home {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  padding: 0 17px;
  border-radius: 9px;
  background: #3455db;
  color: #fff;
  font-size: 13px;
  font-weight: 750;
  text-decoration: none;
}

.topic-suggestion {
  margin-top: 34px;
  padding-top: 26px;
  border-top: 1px solid #e6e9f1;
}

.topic-suggestion h2 {
  margin: 0;
  color: #17243b;
  font-size: clamp(22px, 4vw, 29px);
  line-height: 1.2;
  letter-spacing: -.04em;
}

.topic-suggestion p:not(.placeholder-kicker) {
  margin: 8px 0 18px;
  color: #64718a;
}

@media (max-width: 520px) {
  .academy-chapter-navigation {
    align-items: stretch;
    flex-direction: column;
  }
}

.course-reader-page {
  min-height: 100vh;
  margin: 0;
  background: #f7f8fc;
  color: #17243b;
}

.course-reader {
  box-sizing: border-box;
  width: min(860px, calc(100% - 40px));
  margin: 38px auto 72px;
  padding: clamp(22px, 5vw, 48px);
  border: 1px solid #e6e9f1;
  border-radius: 16px;
  background: #fff;
  color: #253149;
  font: 16px/1.75 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  box-shadow: 0 16px 42px rgba(34, 52, 103, .07);
}

.course-reader h1,
.course-reader h2,
.course-reader h3,
.course-reader h4 {
  color: #17243b;
  line-height: 1.2;
  letter-spacing: -.035em;
}

.course-reader h1 { font-size: clamp(32px, 5vw, 48px); }
.course-reader h2 { margin-top: 1.8em; font-size: clamp(25px, 4vw, 34px); }
.course-reader h3 { margin-top: 1.5em; font-size: 21px; }
.algorithms-book-page .course-reader :target {
  scroll-margin-block-start: max(16px, calc(50vh - .6em));
}
.course-reader p,
.course-reader li { color: #53617b; }
.course-reader a { color: #3455db; }
.course-reader blockquote {
  margin: 24px 0;
  padding: 3px 20px;
  border-left: 3px solid #5d7cff;
  background: #f5f6ff;
}
.course-reader pre {
  overflow-x: auto;
  margin: 20px 0;
  padding: 20px;
  border: 1px solid #293754;
  border-radius: 10px;
  background: #172239;
  color: #e1e9fa;
  font: 13px/1.75 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  tab-size: 4;
}
.course-reader pre code { color: inherit; }
.course-reader :not(pre) > code {
  padding: 2px 5px;
  border-radius: 4px;
  background: #f0f2f8;
  color: #253149;
  font: .9em ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.course-reader table {
  display: block;
  overflow-x: auto;
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}
.course-reader .editorial-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 26px 0;
}
.course-reader .editorial-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  padding: 19px;
  border: 1px solid #e1e5ef;
  border-radius: 12px;
  background: #fbfcff;
  text-decoration: none;
}
.course-reader .editorial-card:hover,
.course-reader .editorial-card:focus-visible {
  border-color: #9eace3;
  box-shadow: 0 8px 22px rgba(34, 52, 103, .08);
}
.course-reader .editorial-card h2 {
  margin: 10px 0 0;
  font-size: 21px;
}
.course-reader .editorial-card p {
  margin: 9px 0 0;
}
.course-reader .editorial-card .editorial-card-link {
  margin-top: auto;
  padding-top: 16px;
  font-size: 13px;
  font-weight: 750;
}
.course-reader .editorial-tag {
  align-self: flex-start;
  padding: 4px 8px;
  border-radius: 99px;
  background: #eef0ff;
  color: #3455db;
  font-size: 10px;
  font-weight: 800;
}
.course-reader .editorial-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 16px;
  margin: 18px 0 24px;
  color: #68758c;
  font-size: 12px;
}
.course-reader .editorial-note {
  margin: 24px 0;
  padding: 13px 16px;
  border-left: 3px solid #5d7cff;
  border-radius: 0 7px 7px 0;
  background: #f5f6ff;
}
.course-reader .editorial-figure {
  margin: 28px 0;
  padding: 18px;
  border: 1px solid #e1e5ef;
  border-radius: 12px;
  background: #fbfcff;
}
.course-reader .editorial-figure svg {
  display: block;
  width: 100%;
  height: auto;
}
.course-reader .editorial-figure figcaption {
  margin-top: 12px;
  color: #68758c;
  font-size: 12px;
  line-height: 1.6;
}
.course-reader .editorial-source {
  padding-top: 17px;
  border-top: 1px solid #e6e9f1;
  font-size: 13px;
}
.course-reader th,
.course-reader td {
  padding: 9px 12px;
  border: 1px solid #e1e5ef;
  overflow-wrap: anywhere;
  text-align: left;
}
.course-reader th { background: #f5f6fb; color: #253149; }
.course-reader hr { margin: 32px 0; border: 0; border-top: 1px solid #e6e9f1; }
.course-reader .course-index-intro { margin-bottom: 24px; }
.course-reader .course-chapter-kicker {
  margin: 0 0 18px;
  color: #3455db;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .13em;
  text-transform: uppercase;
}
.algorithms-book-page .course-reader .book-deck {
  max-width: 680px;
  margin: 12px 0 18px;
  color: #53617b;
  font-size: clamp(18px, 2.4vw, 22px);
  line-height: 1.55;
}
.algorithms-book-page .book-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin: 20px 0 30px;
  color: #68758c;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .11em;
}
.algorithms-book-page .book-meta span:first-child {
  color: #3455db;
}
.algorithms-book-page .book-contents {
  margin: 28px 0;
  padding: 22px 24px;
  border: 1px solid #e3e7f2;
  border-radius: 12px;
  background: #f8f9ff;
}
.algorithms-book-page .book-contents h2 {
  margin: 0 0 14px;
  font-size: 19px;
}
.algorithms-book-page .book-contents ol {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.algorithms-book-page .book-contents li {
  position: relative;
  min-width: 0;
  counter-increment: book-topic;
}
.algorithms-book-page .book-contents ol {
  counter-reset: book-topic;
}
.algorithms-book-page .book-contents a {
  position: relative;
  display: flex;
  min-height: 104px;
  align-items: center;
  overflow: hidden;
  padding: 18px 90px 18px 54px;
  border: 1px solid #e1e6f2;
  border-radius: 13px;
  background-color: #fff;
  background-image: linear-gradient(110deg, #fff 0%, #fff 58%, var(--topic-tint, #eef2ff) 100%);
  box-shadow: 0 3px 10px rgb(34 51 84 / 4%);
  color: #23345f;
  font-size: 14px;
  font-weight: 750;
  line-height: 1.45;
  text-decoration: none;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}
.algorithms-book-page .book-contents li::before {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 14px;
  display: grid;
  width: 28px;
  height: 28px;
  transform: translateY(-50%);
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--topic-color, #5369c7) 24%, white);
  border-radius: 9px;
  background: color-mix(in srgb, var(--topic-color, #5369c7) 10%, white);
  color: var(--topic-color, #5369c7);
  content: counter(book-topic, decimal-leading-zero);
  font-size: 10px;
  font-weight: 850;
  pointer-events: none;
}
.algorithms-book-page .book-contents a::after {
  position: absolute;
  top: 50%;
  right: 12px;
  width: 76px;
  height: 76px;
  transform: translateY(-50%);
  background-image: var(--topic-art);
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  content: "";
  opacity: .58;
  pointer-events: none;
  transition: transform 180ms ease, opacity 180ms ease;
}
.algorithms-book-page .book-contents li:nth-child(1) {
  --topic-color: #5064bd;
  --topic-tint: #e9edff;
  --topic-art: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 96 96' fill='none' stroke='%235064bd' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 24h56v48H20z'/%3E%3Cpath d='M31 38h34M31 49h22M31 60h28'/%3E%3Ccircle cx='67' cy='61' r='8' fill='%23e9edff'/%3E%3C/svg%3E");
}
.algorithms-book-page .book-contents li:nth-child(2) {
  --topic-color: #18866f;
  --topic-tint: #e4f6f1;
  --topic-art: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 96 96' fill='none' stroke='%2318866f' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M16 28h16v16H16zM40 28h16v16H40zM64 28h16v16H64zM16 54h16v16H16zM40 54h16v16H40zM64 54h16v16H64z'/%3E%3Cpath d='M32 36h8m16 0h8M24 44v10m24-10v10m24-10v10' stroke-dasharray='3 4'/%3E%3C/svg%3E");
}
.algorithms-book-page .book-contents li:nth-child(3) {
  --topic-color: #3976c8;
  --topic-tint: #e8f2ff;
  --topic-art: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 96 96' fill='none' stroke='%233976c8' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 76h62M22 72V53h12v19M42 72V39h12v33M62 72V22h12v50'/%3E%3Cpath d='m22 43 20-12 16 4 20-19' stroke-dasharray='4 4'/%3E%3C/svg%3E");
}
.algorithms-book-page .book-contents li:nth-child(4) {
  --topic-color: #9662b8;
  --topic-tint: #f3eafd;
  --topic-art: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 96 96' fill='none' stroke='%239662b8' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='24' cy='29' r='9'/%3E%3Ccircle cx='70' cy='29' r='9'/%3E%3Ccircle cx='47' cy='67' r='9'/%3E%3Cpath d='m32 34 10 24m22-24L53 58M33 29h28'/%3E%3C/svg%3E");
}
.algorithms-book-page .book-contents li:nth-child(5) {
  --topic-color: #d0713d;
  --topic-tint: #fff0e5;
  --topic-art: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 96 96' fill='none' stroke='%23d0713d' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='41' cy='41' r='21'/%3E%3Cpath d='m57 57 20 20M29 41h24M41 29v24'/%3E%3C/svg%3E");
}
.algorithms-book-page .book-contents li:nth-child(6) {
  --topic-color: #357f9d;
  --topic-tint: #e4f5f8;
  --topic-art: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 96 96' fill='none' stroke='%23357f9d' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m25 25 46 12-29 34-17-46Z'/%3E%3Ccircle cx='25' cy='25' r='7' fill='%23e4f5f8'/%3E%3Ccircle cx='71' cy='37' r='7' fill='%23e4f5f8'/%3E%3Ccircle cx='42' cy='71' r='7' fill='%23e4f5f8'/%3E%3C/svg%3E");
}
.algorithms-book-page .book-contents li:nth-child(7) {
  --topic-color: #42865c;
  --topic-tint: #e8f5e9;
  --topic-art: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 96 96' fill='none' stroke='%2342865c' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M48 16 73 26v20c0 17-11 27-25 34C34 73 23 63 23 46V26l25-10Z'/%3E%3Cpath d='m36 47 8 8 17-18'/%3E%3C/svg%3E");
}
.algorithms-book-page .book-contents li:nth-child(8) {
  --topic-color: #5973c5;
  --topic-tint: #e9edff;
  --topic-art: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 96 96' fill='none' stroke='%235973c5' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='19' y='22' width='58' height='52' rx='8'/%3E%3Cpath d='m30 38 8 7-8 7m17 0h17'/%3E%3Ccircle cx='68' cy='67' r='4' fill='%235973c5' stroke='none'/%3E%3C/svg%3E");
}
.algorithms-book-page .book-contents li:nth-child(9) {
  --topic-color: #b27634;
  --topic-tint: #fff4df;
  --topic-art: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 96 96' fill='none' stroke='%23b27634' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='48' cy='48' r='29' stroke-dasharray='6 5'/%3E%3Cpath d='m48 28 7 20-7 20-7-20 7-20Z' fill='%23fff4df'/%3E%3C/svg%3E");
}
.algorithms-book-page .book-contents li:nth-child(10) {
  --topic-color: #657187;
  --topic-tint: #edf0f5;
  --topic-art: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 96 96' fill='none' stroke='%23657187' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 27c12-5 22-2 30 5v43c-8-7-18-10-30-5V27Zm60 0c-12-5-22-2-30 5v43c8-7 18-10 30-5V27Z'/%3E%3Cpath d='M27 39h12m-12 11h12m18-11h12m-12 11h12'/%3E%3C/svg%3E");
}
.algorithms-book-page .book-contents a:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--topic-color, #5369c7) 48%, white);
  box-shadow: 0 12px 24px rgb(34 51 84 / 12%);
}
.algorithms-book-page .book-contents a:hover::after,
.algorithms-book-page .book-contents a:focus-visible::after {
  transform: translateY(-50%) scale(1.12) rotate(-5deg);
  opacity: .9;
}
.algorithms-book-page .book-contents a:active {
  transform: translateY(-1px) scale(.99);
}
.algorithms-book-page .book-contents a:focus-visible {
  outline: 3px solid #526bd1;
  outline-offset: 3px;
}
.algorithms-book-page .book-figure {
  overflow: hidden;
  margin: 28px 0;
  padding: 18px 18px 12px;
  border: 1px solid #e5e9f2;
  border-radius: 12px;
  background: #fbfcff;
}
.algorithms-book-page .book-figure svg {
  display: block;
  width: 100%;
  height: auto;
}
.algorithms-book-page .book-figure figcaption {
  margin-top: 12px;
  color: #68758c;
  font-size: 13px;
  line-height: 1.55;
}
.algorithms-book-page .book-flow-figure {
  padding: 12px 12px 10px;
}
.algorithms-book-page .book-glossary {
  display: grid;
  grid-template-columns: minmax(130px, .34fr) 1fr;
  gap: 8px 18px;
  margin: 18px 0;
}
.algorithms-book-page .book-glossary dt {
  color: #253149;
  font-weight: 750;
}
.algorithms-book-page .book-glossary dd {
  margin: 0;
  color: #53617b;
}
.algorithms-book-page .book-references {
  padding-left: 24px;
}
.algorithms-book-page .book-references li {
  margin: 12px 0;
}
.course-reader .course-chapter-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding-left: 0;
  list-style-position: inside;
}
.course-reader .course-chapter-list li { min-width: 0; }
.course-reader .course-chapter-list a { display: inline; }
.language-course-index .course-chapter-list {
  gap: 14px;
  list-style: none;
}
.language-course-index .course-chapter-list li {
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 13px;
  background: transparent;
}
.language-course-index .course-chapter-list .course-chapter-link {
  position: relative;
  display: flex;
  min-height: 88px;
  align-items: center;
  gap: 13px;
  overflow: hidden;
  padding: 15px 86px 15px 16px;
  border: 1px solid #e1e6f2;
  border-radius: 13px;
  background: linear-gradient(112deg, #fff 0%, #fbfcff 54%, #edf1ff 100%);
  box-shadow: 0 3px 10px rgb(34 51 84 / 5%);
  color: #23345f;
  text-decoration: none;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}
.language-course-index .course-chapter-number,
.language-course-index .course-chapter-title,
.language-course-index .course-chapter-art {
  position: relative;
  z-index: 1;
}
.language-course-index .course-chapter-number {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  place-items: center;
  border: 1px solid #dfe5ff;
  border-radius: 11px;
  background: #edf0ff;
  color: #4258bb;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .04em;
}
.language-course-index .course-chapter-title {
  max-width: 100%;
  color: inherit;
  font-size: 14px;
  font-weight: 750;
  line-height: 1.45;
}
.language-course-index .course-chapter-art {
  position: absolute;
  z-index: 0;
  top: 50%;
  right: 12px;
  width: 68px;
  height: 68px;
  transform: translateY(-50%);
  color: #526bd1;
  opacity: .16;
  pointer-events: none;
  transition: transform 180ms ease, opacity 180ms ease;
}
.language-course-index .course-chapter-link:hover {
  transform: translateY(-3px);
  border-color: #9eafff;
  background: linear-gradient(112deg, #fff 0%, #f8f9ff 48%, #e5eaff 100%);
  box-shadow: 0 12px 24px rgb(34 51 84 / 12%);
}
.language-course-index .course-chapter-link:hover .course-chapter-art,
.language-course-index .course-chapter-link:focus-visible .course-chapter-art {
  transform: translateY(-50%) scale(1.12) rotate(-5deg);
  opacity: .35;
}
.language-course-index .course-chapter-link:active {
  transform: translateY(-1px) scale(.99);
}
.language-course-index .course-chapter-link:focus-visible {
  outline: 3px solid #526bd1;
  outline-offset: 3px;
}
html[data-theme="light"] .language-course-index .course-chapter-list .course-chapter-link {
  border-color: #d7ddea;
  background: linear-gradient(112deg, #eef1f7 0%, #e9edf5 54%, #e2e8f3 100%);
  box-shadow: 0 3px 10px rgb(34 51 84 / 7%);
}
html[data-theme="light"] .language-course-index .course-chapter-list .course-chapter-link:hover {
  border-color: #aab8d2;
  background: linear-gradient(112deg, #e6eaf2 0%, #e1e7f1 54%, #d7e0ef 100%);
}
html[data-theme="light"] .language-course-index .course-chapter-number {
  border-color: #d4dbea;
  background: #e0e6f2;
}

@media (max-width: 620px) {
  .course-reader {
    width: calc(100% - 24px);
    margin: 20px auto 48px;
    padding: 22px 18px;
  }
  .course-reader .course-chapter-list { grid-template-columns: 1fr; }
  .language-course-index .course-chapter-list { gap: 10px; }
  .language-course-index .course-chapter-link { min-height: 78px; }
  .course-reader .editorial-list { grid-template-columns: 1fr; }
  .course-reader pre { padding: 15px; font-size: 12px; }
  .course-reader pre code { white-space: pre-wrap; overflow-wrap: anywhere; }
  .algorithms-book-page .book-contents { padding: 18px; }
  .algorithms-book-page .book-contents ol { grid-template-columns: 1fr; gap: 6px; }
  .algorithms-book-page .book-contents a { min-height: 88px; }
  .algorithms-book-page .book-figure { padding: 12px 10px 9px; }
  .algorithms-book-page .book-glossary { grid-template-columns: 1fr; gap: 2px; }
  .algorithms-book-page .book-glossary dd { margin-bottom: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .algorithms-book-page .book-contents a,
  .algorithms-book-page .book-contents a::after {
    transition: none;
  }

  .algorithms-book-page .book-contents a:hover,
  .algorithms-book-page .book-contents a:active {
    transform: none;
  }

  .algorithms-book-page .book-contents a:hover::after,
  .algorithms-book-page .book-contents a:focus-visible::after {
    transform: translateY(-50%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .language-course-index .course-chapter-link,
  .language-course-index .course-chapter-art {
    transition: none;
  }

  .language-course-index .course-chapter-link:hover,
  .language-course-index .course-chapter-link:active {
    transform: none;
  }

  .language-course-index .course-chapter-link:hover .course-chapter-art,
  .language-course-index .course-chapter-link:focus-visible .course-chapter-art {
    transform: translateY(-50%);
  }
}

.theme-toggle {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  padding: 0;
  border: 1px solid #dfe3ed;
  border-radius: 9px;
  background: transparent;
  color: #53617b;
  cursor: pointer;
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
  border-color: #9eace3;
  color: #3455db;
}

.theme-toggle svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

html:not([data-theme="light"]) {
  color-scheme: dark;
  --ink: #e8edf8;
  --muted: #aab6cb;
  --blue: #9eafff;
  --blue-dark: #bac6ff;
  --paper: #111827;
  --line: #2a354a;
  --white: #1b2537;
  --mint: #1d3b38;
  --shadow: 0 16px 42px rgba(0, 0, 0, .24);
}

html:not([data-theme="light"]) body {
  background-color: #111827;
  color: #e8edf8;
}

html:not([data-theme="light"]) .nav-menu-toggle,
html:not([data-theme="light"]) .nav-links:not([hidden]),
html:not([data-theme="light"]) .academy-course-links:not([hidden]) {
  border-color: #354158;
  background: #1b2537;
  color: #e8edf8;
}

html:not([data-theme="light"]) .header-actions .nav-menu-toggle,
html:not([data-theme="light"]) .header-actions .theme-toggle {
  border-color: #3a4760;
  background: #1b2537;
  color: #e8edf8;
}

html:not([data-theme="light"]) .skip-link {
  background: #5268d6;
  color: #fff;
}

html:not([data-theme="light"]) .header,
html:not([data-theme="light"]) .academy-course-header {
  border-color: #2a354a;
  background: rgba(17, 24, 39, .94);
  color: #e8edf8;
}

html:not([data-theme="light"]) .academy-course-brand,
html:not([data-theme="light"]) .footer-brand {
  color: #e8edf8;
}

html:not([data-theme="light"]) .academy-course-links a:not(.academy-course-home),
html:not([data-theme="light"]) .nav-links {
  color: #b6c1d5;
}

html:not([data-theme="light"]) .theme-toggle {
  border-color: #3a4760;
  color: #d7dfef;
}

html:not([data-theme="light"]) .academy-reading-status {
  border-color: #354158;
  background: rgba(27, 37, 55, .96);
  color: #d7dfef;
}

html:not([data-theme="light"]) .course-reader-page,
html:not([data-theme="light"]) .course-placeholder-page {
  background: #111827;
  color: #e8edf8;
}

html:not([data-theme="light"]) .course-reader {
  border-color: #2a354a;
  background: #1b2537;
  color: #d7dfef;
}

html:not([data-theme="light"]) .course-reader h1,
html:not([data-theme="light"]) .course-reader h2,
html:not([data-theme="light"]) .course-reader h3,
html:not([data-theme="light"]) .course-reader h4,
html:not([data-theme="light"]) .course-placeholder h1,
html:not([data-theme="light"]) .course-topic-suggestions h2,
html:not([data-theme="light"]) .topic-suggestion h2 {
  color: #f0f3fa;
}

html:not([data-theme="light"]) .course-reader p,
html:not([data-theme="light"]) .course-reader li,
html:not([data-theme="light"]) .course-placeholder p,
html:not([data-theme="light"]) .course-placeholder .placeholder-note,
html:not([data-theme="light"]) .topic-suggestion p:not(.placeholder-kicker) {
  color: #b6c1d5;
}

html:not([data-theme="light"]) .course-reader a,
html:not([data-theme="light"]) .course-reader .course-chapter-kicker,
html:not([data-theme="light"]) .course-placeholder .placeholder-kicker,
html:not([data-theme="light"]) .algorithms-book-page .book-meta span:first-child {
  color: #aabaff;
}

html:not([data-theme="light"]) .course-reader blockquote,
html:not([data-theme="light"]) .course-reader th {
  background: #222f47;
}

html:not([data-theme="light"]) .course-reader :not(pre) > code {
  background: #2a354a;
  color: #e1e9fa;
}

html:not([data-theme="light"]) .course-reader th,
html:not([data-theme="light"]) .course-reader td {
  border-color: #354158;
}

html:not([data-theme="light"]) .course-reader th {
  color: #e1e9fa;
}

html:not([data-theme="light"]) .course-reader .editorial-card {
  border-color: #354158;
  background: #151e2e;
}

html:not([data-theme="light"]) .course-reader .editorial-tag {
  background: #29344f;
  color: #aabaff;
}

html:not([data-theme="light"]) .course-reader .editorial-meta {
  color: #aab6cb;
}

html:not([data-theme="light"]) .course-reader .editorial-note {
  background: #222f47;
}

html:not([data-theme="light"]) .course-reader .editorial-figure {
  border-color: #354158;
  background: #151e2e;
}

html:not([data-theme="light"]) .course-reader .editorial-figure figcaption {
  color: #aab6cb;
}

html:not([data-theme="light"]) .course-reader .editorial-source {
  border-color: #354158;
}

html:not([data-theme="light"]) .course-reader hr,
html:not([data-theme="light"]) .course-topic-suggestions,
html:not([data-theme="light"]) .topic-suggestion {
  border-color: #354158;
}

html:not([data-theme="light"]) .course-chapter-list li,
html:not([data-theme="light"]) .course-placeholder,
html:not([data-theme="light"]) .course-topic-suggestions li {
  border-color: #2a354a;
  background: #1b2537;
  color: #e8edf8;
}

html:not([data-theme="light"]) .course-chapter-list a,
html:not([data-theme="light"]) .academy-chapter-navigation a {
  color: #aabaff;
}

html:not([data-theme="light"]) .language-course-index .course-chapter-list .course-chapter-link {
  border-color: #394761;
  background: linear-gradient(112deg, #202b40 0%, #202b40 54%, #29354d 100%);
  color: #e8edf8;
}

html:not([data-theme="light"]) .language-course-index .course-chapter-list .course-chapter-link:hover {
  border-color: #687bc4;
  background: linear-gradient(112deg, #253149 0%, #253149 48%, #303d5c 100%);
}

html:not([data-theme="light"]) .language-course-index .course-chapter-number {
  border-color: #414f70;
  background: #303b59;
  color: #c1ccff;
}

html:not([data-theme="light"]) .academy-chapter-navigation {
  border-color: #2a354a;
  background: #151e2e;
}

html:not([data-theme="light"]) .course-placeholder .placeholder-note {
  background: #202b40;
}

html:not([data-theme="light"]) .algorithms-book-page .course-reader .book-deck,
html:not([data-theme="light"]) .algorithms-book-page .book-glossary dd {
  color: #b6c1d5;
}

html:not([data-theme="light"]) .algorithms-book-page .book-meta,
html:not([data-theme="light"]) .algorithms-book-page .book-figure figcaption {
  color: #aab6cb;
}

html:not([data-theme="light"]) .algorithms-book-page .book-contents {
  border-color: #354158;
  background: #222f47;
}

html:not([data-theme="light"]) .algorithms-book-page .book-contents a {
  border-color: #394761;
  background-color: #202b40;
  background-image: linear-gradient(110deg, #202b40 0%, #202b40 58%, color-mix(in srgb, var(--topic-color, #5369c7) 20%, #202b40) 100%);
  color: #e8edf8;
}

html:not([data-theme="light"]) .algorithms-book-page .book-contents li::before {
  border-color: color-mix(in srgb, var(--topic-color, #5369c7) 42%, #202b40);
  background: color-mix(in srgb, var(--topic-color, #5369c7) 24%, #202b40);
  color: color-mix(in srgb, var(--topic-color, #5369c7) 65%, white);
}

html:not([data-theme="light"]) .algorithms-book-page .book-figure {
  border-color: #354158;
  background: #f8f9fc;
}

html:not([data-theme="light"]) .algorithms-book-page .book-glossary dt {
  color: #e1e9fa;
}

html:not([data-theme="light"]) .hero {
  background: linear-gradient(120deg, #151e31 0%, #1b2742 100%);
}

html:not([data-theme="light"]) .header,
html:not([data-theme="light"]) .stats,
html:not([data-theme="light"]) .concept-section,
html:not([data-theme="light"]) footer {
  background-color: #151e2e;
}

html:not([data-theme="light"]) .language-card,
html:not([data-theme="light"]) .concept-card {
  border-color: #2e3b54;
  background-color: #1b2537;
}

html:not([data-theme="light"]) .language-card.disabled {
  background-color: #182235;
}

html:not([data-theme="light"]) .language-card.disabled .language-icon,
html:not([data-theme="light"]) .coming {
  background: #29344a;
  color: #b6c1d5;
}

html:not([data-theme="light"]) .language-icon,
html:not([data-theme="light"]) .concept-icon,
html:not([data-theme="light"]) .chip-symbol {
  background: #29344f;
  color: #aabaff;
}

html:not([data-theme="light"]) .search {
  border-color: #3a4760;
  background: #1b2537;
  color: #e8edf8;
}

html:not([data-theme="light"]) .button-light {
  border-color: #3a4760;
  background: #1b2537;
  color: #e8edf8;
}

html:not([data-theme="light"]) .button-light:hover {
  border-color: #8297ee;
  background: #222f47;
  color: #fff;
}

html:not([data-theme="light"]) .hero-actions .button:not(.button-light),
html:not([data-theme="light"]) .nav-links .nav-join {
  background: #5268d6;
  color: #fff;
}

html:not([data-theme="light"]) .eyebrow {
  border-color: #354158;
  background: #1b2537;
}

html:not([data-theme="light"]) .hero-caption {
  color: #aab6cb;
}
