@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/zYXzKVElMYYaJe8bpLHnCwDKr932-G7dytD-Dmu1syxeKYY.woff2") format("woff2");
}

@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/jetbrains-mono/jbm-400-latin.woff2") format("woff2");
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  color-scheme: light;
  --page: #f5f7f9;
  --card: #ffffff;
  --ink: #14181d;
  --dim: #49515b;
  --faint: #727b87;
  --line: #dfe5ea;
  --line-strong: #c8d0d8;
  --dark: #11151b;
  --dark-2: #171c23;
  --blue: #1557e8;
  --blue-dark: #0e44b6;
  --green: #147a45;
  --green-soft: #e7f1eb;
  --orange: #e6502b;
  --code: #11161c;
  --code-line: #26313d;
  --code-ink: #d9e0e7;
  --mono: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
  --sans: "IBM Plex Sans", Arial, Helvetica, sans-serif;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow-x: clip;
  color: var(--ink);
  background: var(--page);
  font-family: var(--sans);
  line-height: 1.55;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

code {
  font-family: var(--mono);
}

::selection {
  color: #ffffff;
  background: var(--blue);
}

:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 3px;
}

.learn-shell {
  width: min(calc(100% - 48px), 1180px);
  margin-inline: auto;
}

.learn-header {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(17, 21, 27, 0.94);
  backdrop-filter: blur(14px);
}

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

.learn-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #eef3f8;
}

.learn-brand-mark {
  display: block;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
}

.learn-brand strong {
  font-size: 16px;
  line-height: 1;
}

.learn-brand small {
  display: block;
  margin-top: 2px;
  color: #9da8b4;
  font-size: 12px;
}

.learn-nav {
  display: flex;
  align-items: center;
  gap: 22px;
}

.learn-nav a {
  color: #b8c1cb;
  font-size: 13px;
  font-weight: 700;
}

.learn-nav a:hover,
.learn-nav a[aria-current="page"] {
  color: #ffffff;
}

.learn-button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 0 17px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.learn-button.primary {
  color: #ffffff;
  background: var(--blue);
}

.learn-button.primary:hover {
  background: var(--blue-dark);
}

.learn-button.secondary {
  border-color: #aeb8c2;
  color: var(--ink);
  background: transparent;
}

.learn-button.secondary:hover {
  border-color: var(--ink);
  background: #ffffff;
}

.learn-button.light {
  color: var(--dark);
  background: #eef3f8;
}

.learn-button.light:hover {
  background: #ffffff;
}

.learn-poster {
  color: #eef3f8;
  background:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    radial-gradient(900px 520px at 86% 2%, rgba(21, 87, 232, 0.22), transparent 64%),
    var(--dark);
  background-size: 34px 34px, 34px 34px, auto, auto;
  border-bottom: 1px solid #313944;
}

.learn-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
  gap: 56px;
  align-items: end;
  padding: 72px 0 58px;
}

.learn-eyebrow,
.learn-section-label,
.reader-kicker {
  margin: 0;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
  text-transform: uppercase;
}

.learn-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #9ebaff;
}

.learn-eyebrow::before {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #46c083;
  box-shadow: 0 0 0 4px rgba(70, 192, 131, 0.13);
  content: "";
}

.learn-hero h1 {
  max-width: 760px;
  margin: 24px 0 24px;
  font-size: clamp(44px, 7vw, 76px);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: 0;
}

.learn-hero h1 span {
  color: #8fafed;
}

.learn-hero p {
  max-width: 680px;
  margin: 0;
  color: #c5ced8;
  font-size: 19px;
  line-height: 1.6;
}

.learn-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.compiler-card {
  border: 1px solid #303944;
  border-radius: 8px;
  background: #0c1015;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
  overflow: hidden;
}

.compiler-card-head {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid #27313c;
  padding: 0 16px;
  color: #9da8b4;
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
}

.compiler-card-body {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(160px, 0.72fr);
}

.compiler-code {
  min-width: 0;
  margin: 0;
  border-right: 1px solid #27313c;
  padding: 18px 20px 20px;
  color: var(--code-ink);
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.75;
  overflow: auto;
}

.compiler-code .kw {
  color: #89b4ff;
}

.compiler-code .num {
  color: #f3b57a;
}

.compiler-code .type {
  color: #7fd0a1;
}

.compiler-side {
  display: grid;
  align-content: stretch;
}

.compiler-metric {
  border-bottom: 1px solid #27313c;
  padding: 16px;
}

.compiler-metric:last-child {
  border-bottom: 0;
}

.compiler-metric strong {
  display: block;
  color: #eef3f8;
  font-family: var(--mono);
  font-size: 18px;
  line-height: 1;
}

.compiler-metric span {
  display: block;
  margin-top: 7px;
  color: #9da8b4;
  font-size: 12px;
}

.learn-dark-section {
  padding: 48px 0 64px;
}

.learn-section-head {
  display: grid;
  grid-template-columns: minmax(160px, 0.45fr) minmax(0, 1fr);
  gap: 44px;
  align-items: end;
  margin-bottom: 26px;
}

.learn-section-label {
  color: #9ebaff;
}

.learn-section-head h2 {
  max-width: 760px;
  margin: 0;
  font-size: 36px;
  line-height: 1.18;
}

.chapter-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border: 1px solid #303944;
  border-radius: 8px;
  overflow: hidden;
}

.chapter-card {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 16px;
  min-height: 170px;
  border-right: 1px solid #303944;
  border-bottom: 1px solid #303944;
  padding: 24px;
  background: rgba(255, 255, 255, 0.02);
}

.chapter-card:nth-child(2n) {
  border-right: 0;
}

.chapter-card:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.chapter-card.is-live {
  background: rgba(21, 87, 232, 0.14);
}

.chapter-card .num {
  color: #7f8b99;
  font-family: var(--mono);
  font-size: 12px;
}

.chapter-card h3 {
  margin: 0 0 10px;
  font-size: 21px;
  line-height: 1.25;
}

.chapter-card p {
  margin: 0 0 18px;
  color: #c5ced8;
  font-size: 15px;
}

.chapter-card a {
  color: #9ebaff;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.learn-light {
  padding: 72px 0 86px;
  background: var(--page);
}

.station-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
  overflow: hidden;
}

.station-card {
  min-width: 0;
  padding: 24px;
  background: var(--card);
}

.station-card h3 {
  margin: 0 0 10px;
  font-size: 23px;
  line-height: 1.25;
}

.station-card p {
  margin: 0 0 22px;
  color: var(--dim);
  font-size: 15px;
}

.station-card .tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.station-card .tag-row span,
.reader-chip {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 9px;
  color: var(--dim);
  font-family: var(--mono);
  font-size: 11px;
}

.workflow-band {
  margin-top: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.workflow-row {
  display: grid;
  grid-template-columns: 130px minmax(220px, 0.7fr) minmax(0, 1fr);
  gap: 26px;
  border-bottom: 1px solid var(--line);
  padding: 22px 24px;
}

.workflow-row:last-child {
  border-bottom: 0;
}

.workflow-row .idx {
  color: var(--blue);
  font-family: var(--mono);
  font-size: 12px;
  text-transform: uppercase;
}

.workflow-row h3 {
  margin: 0;
  font-size: 22px;
}

.workflow-row p {
  margin: 0;
  color: var(--dim);
}

.reader-layout {
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr) 188px;
  gap: 38px;
  align-items: start;
  padding: 58px 0 88px;
}

.reader-nav,
.reader-rail {
  position: sticky;
  top: 92px;
}

.reader-nav {
  font-family: var(--mono);
  font-size: 12px;
  max-height: calc(100vh - 116px);
  overflow: auto;
  padding-right: 4px;
  scrollbar-width: thin;
}

.reader-nav a {
  display: block;
  border-left: 2px solid transparent;
  padding: 7px 10px 7px 12px;
  color: var(--dim);
}

.reader-nav a.active {
  border-left-color: var(--green);
  background: var(--green-soft);
  color: var(--ink);
}

.reader-nav a.muted {
  color: var(--faint);
}

.reader-rail {
  border-left: 1px solid var(--line);
  padding-left: 18px;
  color: var(--dim);
  font-size: 13px;
}

.reader-rail strong {
  display: block;
  margin-bottom: 10px;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
}

.reader-rail a {
  display: block;
  margin: 8px 0;
}

.reader-main {
  min-width: 0;
}

.reader-main article {
  max-width: 72ch;
}

.reader-kicker {
  color: var(--green);
}

.reader-main h1 {
  margin: 18px 0 18px;
  font-size: clamp(36px, 6vw, 58px);
  line-height: 1.05;
  letter-spacing: 0;
}

.reader-main h2 {
  margin: 52px 0 14px;
  font-size: 28px;
  line-height: 1.22;
}

.reader-main p {
  margin: 0 0 18px;
  color: var(--dim);
  font-size: 17px;
}

.reader-main ul {
  margin: 0 0 22px;
  padding-left: 20px;
  color: var(--dim);
}

.reader-main li + li {
  margin-top: 8px;
}

.language-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 26px;
}

.language-switch a,
.language-switch span {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  padding: 0 12px;
  color: var(--dim);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.language-switch span {
  border-color: var(--green);
  color: var(--green);
}

.learn-notice {
  margin: 24px 0;
  border: 1px solid #d7dee5;
  border-radius: 8px;
  background: #ffffff;
  padding: 16px 18px;
  color: var(--dim);
  font-size: 15px;
}

.learn-notice strong {
  color: var(--ink);
}

.coverage-grid,
.link-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin: 24px 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
  overflow: hidden;
}

.coverage-card,
.link-card {
  min-width: 0;
  background: #ffffff;
  padding: 18px;
}

.coverage-card span,
.link-card span {
  display: inline-block;
  margin-bottom: 10px;
  color: var(--blue);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.coverage-card h3,
.link-card h3 {
  margin: 0 0 8px;
  font-size: 18px;
}

.coverage-card p,
.link-card p {
  margin: 0;
  color: var(--dim);
  font-size: 15px;
}

.coverage-card p + p,
.link-card p + p {
  margin-top: 14px;
}

.coverage-card a,
.link-card a {
  color: var(--blue);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.callout {
  border: 1px solid #c4d9cc;
  border-radius: 8px;
  background: var(--green-soft);
  padding: 18px 20px;
  color: #1b4f32;
}

.callout strong {
  color: #113c25;
}

.code-panel {
  margin: 26px 0;
  border: 1px solid #252f39;
  border-radius: 8px;
  background: var(--code);
  overflow: hidden;
}

.code-panel header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--code-line);
  padding: 12px 16px;
  color: #9da8b4;
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
}

.code-panel pre {
  margin: 0;
  padding: 18px;
  color: var(--code-ink);
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.7;
  overflow: auto;
  tab-size: 2;
}

.code-panel pre code {
  display: block;
  min-width: max-content;
  white-space: pre;
}

.tok-attr {
  color: #8fafed;
  font-weight: 700;
}

.tok-builtin {
  color: #f0d074;
}

.tok-comment {
  color: #7e8998;
  font-style: italic;
}

.tok-function {
  color: #cfe3ff;
}

.tok-keyword {
  color: #ff9a8b;
}

.tok-number {
  color: #f3b57a;
}

.tok-qualifier {
  color: #c7b8ff;
}

.tok-string {
  color: #f6c177;
}

.tok-type {
  color: #7fd0a1;
}

.reader-main h3 {
  margin: 30px 0 10px;
  font-size: 20px;
  line-height: 1.28;
}

.lesson-grid,
.surface-grid,
.mistake-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin: 24px 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
  overflow: hidden;
}

.learn-table {
  width: 100%;
  margin: 24px 0;
  border-collapse: collapse;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  overflow: hidden;
}

.learn-table th,
.learn-table td {
  border-bottom: 1px solid var(--line);
  padding: 12px 14px;
  text-align: left;
  vertical-align: top;
}

.learn-table th {
  color: var(--ink);
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
}

.learn-table td {
  color: var(--dim);
  font-size: 15px;
}

.learn-table tr:last-child td {
  border-bottom: 0;
}

.stage-stack {
  display: grid;
  gap: 28px;
  margin: 28px 0;
}

.stage-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  overflow: hidden;
}

.stage-card-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: start;
  border-bottom: 1px solid var(--line);
  padding: 20px;
}

.stage-card-head h2 {
  margin: 0 0 8px;
}

.stage-card-head p {
  margin: 0;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
}

.stage-card-body {
  padding: 20px;
}

.stage-card-body p {
  font-size: 16px;
}

.stage-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.reference-content {
  max-width: 86ch;
}

.reference-content h1 {
  font-size: clamp(34px, 5vw, 52px);
}

.reference-content h2,
.reference-content h3,
.reference-content h4,
.reference-content h5 {
  scroll-margin-top: 98px;
}

.reference-content h4 {
  margin: 28px 0 8px;
  font-size: 18px;
}

.reference-content h5 {
  margin: 24px 0 8px;
  color: var(--dim);
  font-size: 16px;
}

.reference-content pre {
  max-width: 100%;
}

.reference-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 24px 0;
}

.lesson-card,
.surface-card,
.mistake-card {
  min-width: 0;
  background: #ffffff;
  padding: 18px;
}

.lesson-card span,
.surface-card span,
.mistake-card span {
  display: inline-block;
  margin-bottom: 10px;
  color: var(--blue);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.lesson-card h3,
.surface-card h3,
.mistake-card h3 {
  margin: 0 0 8px;
  font-size: 18px;
}

.lesson-card p,
.surface-card p,
.mistake-card p {
  margin: 0;
  font-size: 15px;
}

.equation-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin: 24px 0;
  border: 1px solid #252f39;
  border-radius: 8px;
  background: #252f39;
  overflow: hidden;
}

.equation-strip div {
  min-width: 0;
  background: var(--dark);
  padding: 16px;
  color: #c5ced8;
}

.equation-strip strong {
  display: block;
  margin-bottom: 8px;
  color: #ffffff;
  font-family: var(--mono);
  font-size: 13px;
}

.study-loop {
  counter-reset: study-step;
  display: grid;
  gap: 10px;
  margin: 24px 0;
  padding: 0;
}

.study-loop li {
  counter-increment: study-step;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 14px 16px;
  list-style: none;
}

.study-loop li::before {
  content: counter(study-step, decimal-leading-zero);
  color: var(--green);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
}

.syntax-key {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 24px;
}

.syntax-key > span {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  padding: 4px 9px;
  font-family: var(--mono);
  font-size: 11px;
}

.syntax-key > span > span {
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0;
  font-size: inherit;
}

.embed-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 20px;
}

.embed-card h3 {
  margin: 0 0 8px;
  font-size: 21px;
}

.embed-card p {
  margin: 0;
  font-size: 15px;
}

.learn-footer {
  border-top: 1px solid #303944;
  color: #b8c1cb;
  background: var(--dark);
}

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

.learn-footer nav {
  display: flex;
  gap: 20px;
  font-size: 13px;
  font-weight: 700;
}

.learn-footer a:hover {
  color: #ffffff;
}

@media (max-width: 980px) {
  .learn-hero,
  .learn-section-head,
  .reader-layout {
    grid-template-columns: 1fr;
  }

  .reader-nav,
  .reader-rail {
    position: static;
  }

  .reader-nav {
    max-height: none;
    overflow: visible;
    padding-right: 0;
  }

  .reader-rail {
    border-left: 0;
    border-top: 1px solid var(--line);
    padding: 18px 0 0;
  }

  .compiler-card-body,
  .coverage-grid,
  .equation-strip,
  .link-grid,
  .lesson-grid,
  .mistake-grid,
  .surface-grid,
  .station-grid {
    grid-template-columns: 1fr;
  }

  .compiler-code {
    border-right: 0;
    border-bottom: 1px solid #27313c;
  }

  .workflow-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

@media (max-width: 760px) {
  .learn-shell {
    width: min(calc(100% - 32px), 1180px);
  }

  .learn-header-inner,
  .learn-footer-inner {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    padding: 14px 0;
  }

  .learn-nav {
    width: 100%;
    gap: 14px;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .learn-hero {
    padding: 48px 0;
  }

  .chapter-grid {
    grid-template-columns: 1fr;
  }

  .chapter-card,
  .chapter-card:nth-child(2n),
  .chapter-card:nth-last-child(-n + 2) {
    border-right: 0;
    border-bottom: 1px solid #303944;
  }

  .chapter-card:last-child {
    border-bottom: 0;
  }

  .embed-card {
    grid-template-columns: 1fr;
  }

  .stage-card-head {
    grid-template-columns: 1fr;
  }
}
