:root {
  color-scheme: light;
  --page: #f5f5f7;
  --surface: #ffffff;
  --surface-soft: #fafafa;
  --text: #1d1d1f;
  --text-secondary: #6e6e73;
  --text-tertiary: #86868b;
  --border: #d8d8dc;
  --border-soft: #e8e8ed;
  --blue: #0071e3;
  --blue-hover: #0077ed;
  --blue-soft: #eaf3ff;
  --red: #d70015;
  --red-soft: #fff0f1;
  --amber: #9a5b00;
  --amber-soft: #fff7e8;
  --green: #187a33;
  --green-soft: #eef9f0;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04), 0 8px 24px rgba(0, 0, 0, 0.035);
  --shadow-lg: 0 24px 70px rgba(0, 0, 0, 0.11);
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 24px;
  --topbar-height: 64px;
  --content-width: 1440px;
  --font: "PingFang SC", "SF Pro Text", "SF Pro Display", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--topbar-height) + 24px);
}

body {
  margin: 0;
  min-width: 0;
  color: var(--text);
  background: var(--page);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: var(--blue);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

button {
  color: inherit;
}

img,
svg {
  max-width: 100%;
}

svg.icon {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
}

:focus-visible {
  outline: 3px solid rgba(0, 113, 227, 0.42);
  outline-offset: 3px;
  border-radius: 6px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 200;
  padding: 10px 14px;
  color: #fff;
  background: var(--blue);
  border-radius: 10px;
  transform: translateY(-160%);
}

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

.topbar {
  position: sticky;
  top: 0;
  z-index: 90;
  height: var(--topbar-height);
  border-bottom: 1px solid rgba(0, 0, 0, 0.09);
  background: rgba(255, 255, 255, 0.9);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
}

.topbar-inner {
  width: min(100%, var(--content-width));
  height: 100%;
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: minmax(210px, 1fr) minmax(280px, 440px) minmax(210px, 1fr);
  align-items: center;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: max-content;
  color: var(--text);
  font-size: 17px;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.brand:hover {
  text-decoration: none;
}

.brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: grid;
  place-content: center;
  gap: 2px;
  background: var(--blue);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

.brand-mark span {
  display: block;
  width: 15px;
  height: 4px;
  border: 1.5px solid #fff;
  border-radius: 50%;
}

.global-search {
  height: 40px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-secondary);
  background: #f4f4f6;
  border: 1px solid #dfdfe3;
  border-radius: 11px;
  cursor: pointer;
  transition: border-color 180ms ease, background 180ms ease;
}

.global-search:hover {
  background: #f8f8fa;
  border-color: #c9c9ce;
}

.global-search span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

kbd {
  min-width: 26px;
  margin-left: auto;
  padding: 1px 6px;
  color: var(--text-tertiary);
  background: var(--surface);
  border: 1px solid var(--border);
  border-bottom-width: 2px;
  border-radius: 6px;
  font-family: var(--font);
  font-size: 12px;
  text-align: center;
}

.top-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
}

.top-plan-link,
.site-home-link {
  min-height: 44px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  color: var(--text);
  border-radius: 10px;
  font-size: 14px;
}

.top-plan-link:hover,
.top-plan-link.is-active,
.site-home-link:hover {
  color: var(--blue);
  background: var(--blue-soft);
  text-decoration: none;
}

.progress-pill {
  width: 44px;
  height: 44px;
  padding: 0;
  color: var(--blue);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 50%;
  font-size: 11px;
  font-weight: 650;
  cursor: pointer;
}

.icon-button {
  width: 44px;
  height: 44px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  background: transparent;
  border: 0;
  border-radius: 10px;
  cursor: pointer;
}

.icon-button:hover {
  background: rgba(0, 0, 0, 0.05);
}

.mobile-menu-button,
.drawer-close {
  display: none;
}

.reading-layout {
  width: min(100%, var(--content-width));
  min-height: calc(100vh - var(--topbar-height));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr) 220px;
}

.site-drawer {
  position: sticky;
  top: var(--topbar-height);
  height: calc(100vh - var(--topbar-height));
  padding: 26px 18px 30px;
  overflow-y: auto;
  border-right: 1px solid var(--border-soft);
  background: rgba(255, 255, 255, 0.74);
}

body.home-page > .site-drawer,
body.home-page > .drawer-scrim {
  display: none;
}

.drawer-head {
  display: none;
}

.drawer-progress {
  margin: 0 0 22px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
}

.drawer-progress > div:first-child {
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text-secondary);
  font-size: 13px;
}

.drawer-progress strong {
  color: var(--text);
}

.progress-track {
  height: 5px;
  overflow: hidden;
  background: #e5e5ea;
  border-radius: 999px;
}

.progress-track span {
  display: block;
  height: 100%;
  background: var(--blue);
  border-radius: inherit;
  transition: width 260ms ease;
}

.nav-group {
  margin-bottom: 8px;
}

.nav-group-title {
  width: 100%;
  min-height: 44px;
  padding: 0 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text-secondary);
  background: transparent;
  border: 0;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
}

.nav-group-title:hover {
  color: var(--text);
}

.nav-group-links {
  display: grid;
  gap: 2px;
}

.nav-group.is-collapsed .nav-group-links {
  display: none;
}

.nav-group-links a {
  min-height: 44px;
  padding: 8px 10px;
  display: grid;
  grid-template-columns: 14px 1fr;
  align-items: center;
  gap: 8px;
  color: #454547;
  border-radius: 9px;
  font-size: 13px;
  line-height: 1.35;
}

.nav-group-links a:hover {
  background: rgba(0, 0, 0, 0.035);
  text-decoration: none;
}

.nav-group-links a.is-active {
  color: var(--blue);
  background: var(--blue-soft);
  font-weight: 600;
}

.nav-status {
  width: 8px;
  height: 8px;
  border: 1px solid #b5b5ba;
  border-radius: 50%;
}

.nav-group-links a.is-complete .nav-status {
  border-color: var(--green);
  background: var(--green);
  box-shadow: inset 0 0 0 2px #fff;
}

.reset-progress {
  width: 100%;
  min-height: 44px;
  margin-top: 18px;
  color: var(--text-secondary);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 10px;
  font-size: 12px;
  cursor: pointer;
}

.reset-progress:hover {
  color: var(--red);
  background: var(--red-soft);
}

.drawer-scrim {
  display: none;
}

.article-main {
  min-width: 0;
  padding: 44px 50px 80px;
  background: var(--surface);
}

.article-card {
  max-width: 790px;
  margin: 0 auto;
}

.article-breadcrumb {
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--text-tertiary);
  font-size: 14px;
}

.article-track {
  display: inline-flex;
  margin-bottom: 14px;
  color: var(--blue);
  font-size: 14px;
  font-weight: 600;
}

.article-header h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(36px, 4vw, 46px);
  line-height: 1.12;
  letter-spacing: -0.045em;
}

.article-summary {
  max-width: 720px;
  margin: 20px 0 14px;
  color: var(--text-secondary);
  font-size: 18px;
  line-height: 1.65;
}

.article-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 18px;
  color: var(--text-tertiary);
  font-size: 14px;
}

.article-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.article-meta .icon {
  width: 17px;
  height: 17px;
}

.article-actions {
  margin-top: 26px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.reference-label {
  min-height: 44px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  color: var(--text-secondary);
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: 11px;
  font-size: 13px;
}

.complete-button,
.text-button {
  min-height: 44px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 11px;
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease;
}

.complete-button {
  color: #fff;
  background: var(--blue);
  border: 1px solid var(--blue);
}

.complete-button:hover {
  background: var(--blue-hover);
}

.complete-button.is-complete {
  color: var(--green);
  background: var(--green-soft);
  border-color: #b8dfc1;
}

.text-button {
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
}

.text-button:hover {
  background: var(--surface-soft);
}

.complete-button:active,
.text-button:active,
.primary-button:active,
.secondary-button:active {
  transform: scale(0.98);
}

.article-content {
  margin-top: 48px;
  color: #28282a;
  font-size: 17px;
  line-height: 1.78;
}

.article-content h2,
.article-content h3,
.article-content h4 {
  position: relative;
  color: var(--text);
  letter-spacing: -0.025em;
}

.article-content h2 {
  margin: 64px 0 20px;
  padding-top: 4px;
  font-size: 28px;
  line-height: 1.3;
}

.article-content h3 {
  margin: 38px 0 14px;
  font-size: 21px;
  line-height: 1.35;
}

.article-content h4 {
  margin: 30px 0 12px;
  font-size: 18px;
}

.heading-anchor {
  margin-left: 8px;
  color: transparent;
  font-size: 0.72em;
  font-weight: 400;
}

.article-content h2:hover .heading-anchor,
.article-content h3:hover .heading-anchor,
.heading-anchor:focus {
  color: var(--blue);
}

.article-content p {
  margin: 0 0 20px;
}

.article-content strong {
  color: var(--text);
  font-weight: 650;
}

.article-content a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.external-icon {
  width: 13px !important;
  height: 13px !important;
  margin-left: 3px;
  vertical-align: -2px;
}

.article-content ul,
.article-content ol {
  margin: 0 0 24px;
  padding-left: 1.5em;
}

.article-content li {
  margin: 7px 0;
  padding-left: 4px;
}

.article-content li::marker {
  color: var(--blue);
  font-weight: 600;
}

.check-item {
  list-style: none;
  margin-left: -1.4em !important;
  display: flex;
  align-items: flex-start;
  gap: 9px;
}

.check-item input {
  width: 18px;
  height: 18px;
  margin-top: 5px;
  accent-color: var(--green);
}

.article-callout {
  margin: 28px 0;
  padding: 18px 20px;
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 12px;
  color: #164c80;
  background: var(--blue-soft);
  border: 1px solid #c6def8;
  border-left: 3px solid var(--blue);
  border-radius: var(--radius-sm);
}

.article-callout .icon {
  margin-top: 2px;
  color: var(--blue);
}

.priority-marker {
  width: 9px;
  height: 9px;
  margin-right: 8px;
  display: inline-block;
  border-radius: 50%;
  vertical-align: 2px;
}

.priority-required {
  background: var(--red);
  box-shadow: 0 0 0 4px var(--red-soft);
}

.priority-understand {
  background: #c57600;
  box-shadow: 0 0 0 4px var(--amber-soft);
}

.priority-advanced {
  background: var(--green);
  box-shadow: 0 0 0 4px var(--green-soft);
}

.code-shell {
  margin: 26px 0 30px;
  overflow: hidden;
  color: #f1f1f3;
  background: #161618;
  border: 1px solid #2c2c2e;
  border-radius: 14px;
}

.code-toolbar {
  min-height: 44px;
  padding: 0 10px 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #a9a9af;
  background: #202023;
  border-bottom: 1px solid #303034;
  font-size: 12px;
}

.code-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.run-code,
.copy-code {
  min-height: 44px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: #d8d8dc;
  background: transparent;
  border: 0;
  border-radius: 7px;
  cursor: pointer;
}

.run-code {
  color: #a9e9b9;
}

.run-code:hover,
.copy-code:hover {
  background: rgba(255, 255, 255, 0.08);
}

.run-code .icon,
.copy-code .icon {
  width: 15px;
  height: 15px;
}

.copy-code {
  min-width: 68px;
}

.playground-dialog {
  width: min(1120px, calc(100% - 32px));
  max-width: none;
  height: min(760px, calc(100dvh - 32px));
  max-height: none;
  padding: 0;
  overflow: hidden;
  color: var(--text);
  background: var(--surface);
  border: 1px solid rgba(0, 0, 0, 0.14);
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
}

.playground-dialog::backdrop {
  background: rgba(17, 24, 39, 0.58);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.playground-panel {
  height: 100%;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.playground-head {
  min-height: 72px;
  padding: 10px 16px 10px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-soft);
}

.playground-head div {
  display: grid;
  gap: 2px;
}

.playground-head div > span,
.playground-editor label,
.playground-preview > div > span {
  color: var(--text-tertiary);
  font-size: 12px;
  font-weight: 650;
}

.playground-workspace {
  min-height: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.playground-editor,
.playground-preview {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: 48px minmax(0, 1fr);
}

.playground-editor {
  background: #171719;
}

.playground-editor label,
.playground-preview > div {
  padding: 0 18px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--border-soft);
}

.playground-editor label {
  color: #b7b7bd;
  border-color: #303034;
}

.playground-editor textarea {
  width: 100%;
  height: 100%;
  padding: 20px;
  resize: none;
  outline: 0;
  color: #f1f1f3;
  background: #171719;
  border: 0;
  font: 14px/1.65 "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  tab-size: 2;
}

.playground-editor textarea:focus-visible {
  box-shadow: inset 0 0 0 3px rgba(0, 113, 227, 0.7);
}

.playground-preview > div {
  justify-content: space-between;
}

.playground-preview button {
  min-height: 38px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #fff;
  background: var(--green);
  border: 0;
  border-radius: 9px;
  cursor: pointer;
}

.playground-preview button .icon {
  width: 16px;
  height: 16px;
}

.playground-preview iframe {
  width: 100%;
  height: 100%;
  background: #fff;
  border: 0;
}

.playground-panel > footer {
  min-height: 54px;
  padding: 8px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: var(--text-tertiary);
  border-top: 1px solid var(--border-soft);
  font-size: 12px;
}

.playground-panel > footer button {
  min-height: 38px;
  padding: 0 12px;
  color: var(--blue);
  background: var(--blue-soft);
  border: 0;
  border-radius: 9px;
  cursor: pointer;
}

pre {
  margin: 0;
  padding: 18px 20px 21px;
  overflow-x: auto;
  line-height: 1.65;
  tab-size: 2;
}

code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.88em;
}

.article-content p code,
.article-content li code,
.article-content td code {
  padding: 2px 5px;
  color: #7b2b00;
  background: #f7f1ed;
  border: 1px solid #eadfd7;
  border-radius: 5px;
}

.table-wrap {
  max-width: 100%;
  margin: 26px 0 30px;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 13px;
}

table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  font-size: 15px;
  line-height: 1.55;
}

th,
td {
  padding: 13px 15px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--border-soft);
}

th {
  color: var(--text);
  background: #f5f5f7;
  font-weight: 650;
}

tbody tr:last-child td {
  border-bottom: 0;
}

tbody tr:nth-child(even) td {
  background: #fcfcfd;
}

.article-content hr {
  height: 1px;
  margin: 54px 0;
  background: var(--border-soft);
  border: 0;
}

.lesson-directions {
  margin-top: 70px;
  padding-top: 28px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  border-top: 1px solid var(--border-soft);
}

.lesson-direction {
  min-height: 96px;
  padding: 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.lesson-direction:hover {
  background: var(--surface-soft);
  border-color: #bfbfc4;
  text-decoration: none;
  transform: translateY(-2px);
}

.lesson-direction.next {
  justify-content: flex-end;
  text-align: right;
}

.lesson-direction span {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.lesson-direction small {
  color: var(--text-tertiary);
}

.lesson-direction strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
}

.page-toc {
  position: sticky;
  top: var(--topbar-height);
  height: calc(100vh - var(--topbar-height));
  padding: 46px 22px 30px;
  overflow-y: auto;
  border-left: 1px solid var(--border-soft);
  background: rgba(255, 255, 255, 0.72);
}

.page-toc > strong {
  display: block;
  margin-bottom: 16px;
  font-size: 13px;
}

.page-toc nav {
  display: grid;
  gap: 2px;
}

.page-toc nav a {
  padding: 7px 9px;
  color: var(--text-secondary);
  border-left: 2px solid transparent;
  font-size: 12px;
  line-height: 1.4;
}

.page-toc nav a:hover {
  color: var(--text);
  text-decoration: none;
}

.page-toc nav a.is-active {
  color: var(--blue);
  border-left-color: var(--blue);
  background: linear-gradient(90deg, var(--blue-soft), transparent);
}

.page-toc .toc-level-3 {
  padding-left: 20px;
}

.toc-empty {
  color: var(--text-tertiary);
  font-size: 12px;
}

.back-to-top {
  min-height: 44px;
  margin-top: 20px;
  display: inline-flex;
  align-items: center;
  font-size: 12px;
}

.mobile-reading-bar {
  display: none;
}

.search-dialog {
  width: min(700px, calc(100% - 32px));
  max-height: min(720px, calc(100vh - 64px));
  padding: 0;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
}

.search-dialog::backdrop {
  background: rgba(0, 0, 0, 0.34);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.search-panel {
  max-height: inherit;
  display: flex;
  flex-direction: column;
}

.search-field-wrap {
  min-height: 68px;
  padding: 10px 12px 10px 20px;
  display: grid;
  grid-template-columns: 24px 1fr 44px;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--border-soft);
}

.search-field-wrap > .icon {
  color: var(--text-tertiary);
}

.search-field-wrap input {
  width: 100%;
  height: 46px;
  color: var(--text);
  background: transparent;
  border: 0;
  outline: 0;
  font-size: 18px;
}

.search-hint {
  padding: 8px 20px;
  display: flex;
  justify-content: space-between;
  color: var(--text-tertiary);
  background: #fafafa;
  border-bottom: 1px solid var(--border-soft);
  font-size: 12px;
}

.search-results {
  padding: 10px;
  overflow-y: auto;
}

.search-empty-initial,
.search-no-results {
  min-height: 260px;
  display: grid;
  place-content: center;
  gap: 6px;
  color: var(--text-secondary);
  text-align: center;
}

.search-empty-initial strong,
.search-no-results strong {
  color: var(--text);
  font-size: 18px;
}

.search-result {
  padding: 14px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 16px;
  color: var(--text);
  border-radius: 12px;
}

.search-result:hover,
.search-result:focus {
  background: var(--blue-soft);
  text-decoration: none;
}

.search-result h3 {
  margin: 0 0 4px;
  font-size: 16px;
}

.search-result p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 13px;
}

.search-result span {
  grid-row: span 2;
  align-self: center;
  color: var(--blue);
  font-size: 12px;
}

/* Homepage */
.home-page main {
  overflow: hidden;
}

.hero-section,
.section-wrap,
.site-footer {
  width: min(100% - 48px, 1240px);
  margin-inline: auto;
}

.hero-section {
  min-height: 620px;
  padding: 96px 0 84px;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(330px, 0.6fr);
  align-items: center;
  gap: 70px;
}

.hero-kicker,
.section-heading > span,
.beginner-section > div > span {
  color: var(--blue);
  font-size: 14px;
  font-weight: 650;
  letter-spacing: 0.02em;
}

.hero-copy h1 {
  max-width: 800px;
  margin: 16px 0 24px;
  font-size: clamp(52px, 7vw, 92px);
  line-height: 1.02;
  letter-spacing: -0.065em;
}

.hero-copy > p {
  max-width: 720px;
  margin: 0;
  color: var(--text-secondary);
  font-size: 20px;
  line-height: 1.65;
}

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

.primary-button,
.secondary-button {
  min-height: 50px;
  padding: 0 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border-radius: 999px;
  font-weight: 600;
  transition: transform 160ms ease, background 160ms ease;
}

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

.primary-button:hover {
  color: #fff;
  background: var(--blue-hover);
  text-decoration: none;
}

.secondary-button {
  color: var(--blue);
  background: var(--surface);
  border: 1px solid var(--border);
}

.secondary-button:hover {
  background: #fafafa;
  text-decoration: none;
}

.hero-progress-card {
  min-height: 320px;
  padding: 32px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 28px;
  text-align: center;
  background: var(--surface);
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 32px;
  box-shadow: var(--shadow-sm);
}

.progress-orbit {
  width: 132px;
  height: 132px;
  display: grid;
  place-content: center;
  background: radial-gradient(circle at center, #fff 61%, transparent 62%), conic-gradient(var(--blue) var(--progress-deg, 0deg), #e9e9ed 0);
  border-radius: 50%;
}

.progress-orbit strong {
  font-size: 30px;
  letter-spacing: -0.04em;
}

.progress-orbit span {
  color: var(--text-tertiary);
  font-size: 12px;
}

.hero-progress-card > div:last-child {
  display: grid;
  justify-items: center;
}

.progress-label {
  color: var(--text-tertiary);
  font-size: 13px;
}

.hero-progress-card strong {
  margin-top: 2px;
}

.hero-progress-card p {
  max-width: 270px;
  margin: 8px 0 14px;
  color: var(--text-secondary);
  font-size: 14px;
}

.hero-progress-card a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
}

.section-wrap {
  padding: 100px 0;
}

.section-heading {
  max-width: 820px;
  margin-bottom: 46px;
}

.section-heading h2,
.beginner-section h2 {
  margin: 10px 0 0;
  font-size: clamp(38px, 5vw, 58px);
  line-height: 1.08;
  letter-spacing: -0.05em;
}

.section-heading p {
  max-width: 700px;
  margin: 18px 0 0;
  color: var(--text-secondary);
  font-size: 18px;
}

.start-steps {
  border-top: 1px solid var(--border);
}

.start-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.start-grid article {
  min-height: 230px;
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
}

.start-grid article > span {
  color: var(--blue);
  font-size: 13px;
  font-weight: 650;
}

.start-grid h3 {
  margin: 60px 0 8px;
  font-size: 25px;
  letter-spacing: -0.03em;
}

.start-grid p {
  margin: 0;
  color: var(--text-secondary);
}

.tracks-section {
  width: 100%;
  max-width: none;
  padding-inline: max(24px, calc((100% - 1240px) / 2));
  background: #101012;
}

.tracks-section .section-heading > span {
  color: #5fb2ff;
}

.tracks-section .section-heading h2 {
  color: #f5f5f7;
}

.tracks-section .section-heading p {
  color: #a7a7ac;
}

.track-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 18px;
}

.track-card {
  min-height: 310px;
  padding: 26px;
  grid-column: span 4;
  display: flex;
  flex-direction: column;
  color: var(--text);
  background: #fff;
  border-radius: var(--radius-lg);
}

.track-card:nth-child(1),
.track-card:nth-child(4) {
  grid-column: span 6;
}

.track-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text-tertiary);
  font-size: 12px;
}

.track-number {
  color: var(--blue);
  font-weight: 700;
}

.track-card h3 {
  margin: 34px 0 8px;
  font-size: 31px;
  letter-spacing: -0.04em;
}

.track-card p {
  margin: 0;
  color: var(--text-secondary);
}

.track-progress {
  margin-top: auto;
}

.track-progress > span {
  color: var(--text-secondary);
  font-size: 12px;
}

.track-progress > div {
  height: 4px;
  margin-top: 6px;
  overflow: hidden;
  background: #ebebef;
  border-radius: 999px;
}

.track-progress i {
  display: block;
  width: 0;
  height: 100%;
  background: var(--blue);
  border-radius: inherit;
  transition: width 260ms ease;
}

.track-card > a {
  min-height: 44px;
  margin-top: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
}

.flow-section {
  border-bottom: 1px solid var(--border);
}

.flow-diagram {
  padding: 30px;
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
}

.flow-diagram > div {
  min-height: 130px;
  padding: 20px;
  display: grid;
  align-content: center;
  gap: 5px;
  background: #f7f7f9;
  border-radius: 16px;
}

.flow-diagram span {
  color: var(--text-tertiary);
  font-size: 12px;
}

.flow-diagram strong {
  font-size: 17px;
}

.flow-diagram i {
  color: var(--blue);
  font-style: normal;
  font-size: 24px;
}

.catalog-toolbar {
  position: sticky;
  top: var(--topbar-height);
  z-index: 10;
  margin-bottom: 24px;
  padding: 12px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: rgba(245, 245, 247, 0.92);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}

.filter-scroll {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  scrollbar-width: none;
}

.filter-scroll::-webkit-scrollbar {
  display: none;
}

.filter-scroll button,
.catalog-search-button {
  min-height: 44px;
  padding: 0 16px;
  flex: 0 0 auto;
  color: var(--text-secondary);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  cursor: pointer;
}

.filter-scroll button:hover,
.filter-scroll button.is-active {
  color: #fff;
  background: var(--text);
  border-color: var(--text);
}

.catalog-search-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.catalog-search-button:hover {
  color: var(--blue);
  border-color: #99c5ef;
}

.catalog-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.catalog-card {
  min-height: 176px;
  padding: 23px;
  display: grid;
  grid-template-columns: 22px 1fr 24px;
  gap: 14px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.catalog-card:hover {
  border-color: #c2c2c7;
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  transform: translateY(-2px);
}

.catalog-status {
  width: 18px;
  height: 18px;
  margin-top: 3px;
  display: grid;
  place-content: center;
  color: transparent;
  border: 1px solid #c0c0c5;
  border-radius: 50%;
}

.catalog-status .icon {
  width: 12px;
  height: 12px;
}

.catalog-card.is-complete .catalog-status {
  color: #fff;
  background: var(--green);
  border-color: var(--green);
}

.catalog-eyebrow,
.catalog-meta {
  color: var(--text-tertiary);
  font-size: 12px;
}

.catalog-card h3 {
  margin: 6px 0 8px;
  font-size: 19px;
  line-height: 1.35;
  letter-spacing: -0.02em;
}

.catalog-card p {
  margin: 0 0 12px;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.55;
}

.catalog-arrow {
  align-self: center;
  color: var(--blue);
}

.catalog-empty {
  padding: 40px;
  text-align: center;
  color: var(--text-secondary);
}

.beginner-section {
  margin-bottom: 100px;
  padding: 70px;
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  align-items: end;
  gap: 60px;
  color: #fff;
  background: var(--blue);
  border-radius: 32px;
}

.beginner-section > div > span {
  color: #dceeff;
}

.beginner-section p {
  max-width: 650px;
  margin: 20px 0 0;
  color: #e8f3ff;
  font-size: 18px;
}

.beginner-section ul {
  margin: 0;
  padding: 24px;
  list-style: none;
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
}

.beginner-section li {
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}

.beginner-section li:last-child {
  border-bottom: 0;
}

.site-footer {
  min-height: 180px;
  padding: 40px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  border-top: 1px solid var(--border);
}

.site-footer p {
  margin: 4px 0 0;
  color: var(--text-secondary);
}

.site-footer a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
}

.not-found-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.not-found-card {
  max-width: 520px;
  padding: 60px;
  display: grid;
  justify-items: start;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: 30px;
  box-shadow: var(--shadow-sm);
}

.not-found-card > span:not(.brand-mark) {
  margin-top: 50px;
  color: var(--blue);
  font-weight: 700;
}

.not-found-card h1 {
  margin: 8px 0;
  font-size: 42px;
  letter-spacing: -0.04em;
}

.not-found-card p {
  margin: 0 0 24px;
  color: var(--text-secondary);
}

@media (max-width: 1180px) {
  .reading-layout {
    grid-template-columns: 248px minmax(0, 1fr);
  }

  .page-toc {
    display: none;
  }

  .article-main {
    padding-inline: 42px;
  }

  .topbar-inner {
    grid-template-columns: 220px minmax(240px, 1fr) auto;
  }

  .track-card,
  .track-card:nth-child(1),
  .track-card:nth-child(4) {
    grid-column: span 6;
  }
}

@media (max-width: 900px) {
  .topbar-inner {
    padding: 0 16px;
    grid-template-columns: auto 1fr auto;
    gap: 8px;
  }

  .mobile-menu-button {
    display: inline-grid;
  }

  .topbar .brand > span:last-child {
    display: none;
  }

  .topbar .brand {
    justify-self: center;
  }

  .topbar .global-search {
    width: 44px;
    padding: 0;
    justify-self: end;
    justify-content: center;
    background: transparent;
    border-color: transparent;
    order: 3;
  }

  .global-search span,
  .global-search kbd,
  .top-plan-link {
    display: none;
  }

  .top-actions {
    display: none;
  }

  .reading-layout {
    display: block;
  }

  .site-drawer {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 120;
    width: min(360px, calc(100% - 42px));
    height: 100dvh;
    padding: 0 16px 28px;
    background: var(--surface);
    box-shadow: var(--shadow-lg);
    transform: translateX(-105%);
    transition: transform 240ms cubic-bezier(0.22, 1, 0.36, 1);
  }

  body.home-page > .site-drawer {
    display: block;
  }

  .drawer-head {
    position: sticky;
    top: 0;
    z-index: 2;
    height: 64px;
    margin: 0 -4px 16px;
    padding-left: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid var(--border-soft);
  }

  .drawer-title {
    font-weight: 650;
  }

  .drawer-close {
    display: inline-grid;
  }

  .drawer-scrim {
    position: fixed;
    inset: 0;
    z-index: 110;
    background: rgba(0, 0, 0, 0.36);
    border: 0;
  }

  body.drawer-open {
    overflow: hidden;
  }

  body.drawer-open .site-drawer {
    transform: translateX(0);
  }

  body.drawer-open .drawer-scrim,
  body.home-page.drawer-open > .drawer-scrim {
    display: block;
  }

  .article-main {
    padding: 34px 28px 100px;
  }

  .mobile-reading-bar {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 80;
    padding: 9px 14px max(9px, env(safe-area-inset-bottom));
    display: grid;
    grid-template-columns: 1fr 1.3fr;
    gap: 8px;
    background: rgba(255, 255, 255, 0.94);
    border-top: 1px solid var(--border);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
  }

  .mobile-reading-bar button,
  .mobile-reading-bar a {
    min-height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--text);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 11px;
    cursor: pointer;
  }

  .mobile-reading-bar a {
    color: #fff;
    background: var(--blue);
    border-color: var(--blue);
  }

  .hero-section {
    min-height: auto;
    padding-top: 70px;
    grid-template-columns: 1fr;
    gap: 50px;
  }

  .hero-progress-card {
    grid-template-columns: auto 1fr;
    justify-items: start;
    text-align: left;
  }

  .hero-progress-card > div:last-child {
    justify-items: start;
  }

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

  .start-grid article {
    min-height: 180px;
  }

  .start-grid h3 {
    margin-top: 36px;
  }

  .flow-diagram {
    grid-template-columns: 1fr;
  }

  .flow-diagram i {
    transform: rotate(90deg);
    justify-self: center;
  }

  .catalog-list {
    grid-template-columns: 1fr;
  }

  .beginner-section {
    padding: 50px;
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  :root {
    --topbar-height: 56px;
  }

  .topbar-inner {
    height: 56px;
  }

  .brand-mark {
    width: 28px;
    height: 28px;
  }

  .progress-pill {
    width: 40px;
    height: 40px;
  }

  .hero-section,
  .section-wrap,
  .site-footer {
    width: min(100% - 32px, 1240px);
  }

  .hero-section {
    padding: 58px 0 64px;
  }

  .hero-copy h1 {
    font-size: clamp(46px, 14vw, 64px);
  }

  .hero-copy > p {
    font-size: 17px;
  }

  .hero-actions {
    display: grid;
  }

  .hero-progress-card {
    min-height: 0;
    padding: 22px;
    grid-template-columns: 90px 1fr;
    gap: 18px;
    border-radius: 24px;
  }

  .progress-orbit {
    width: 88px;
    height: 88px;
  }

  .progress-orbit strong {
    font-size: 21px;
  }

  .hero-progress-card p {
    display: none;
  }

  .section-wrap {
    padding: 74px 0;
  }

  .section-heading {
    margin-bottom: 32px;
  }

  .section-heading h2,
  .beginner-section h2 {
    font-size: 38px;
  }

  .tracks-section {
    padding-inline: 16px;
  }

  .track-grid {
    display: grid;
    grid-template-columns: 1fr;
  }

  .track-card,
  .track-card:nth-child(1),
  .track-card:nth-child(4) {
    grid-column: auto;
    min-height: 280px;
  }

  .catalog-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .catalog-search-button {
    justify-content: center;
  }

  .catalog-card {
    min-height: 0;
    padding: 19px;
    grid-template-columns: 18px 1fr;
  }

  .catalog-card .catalog-arrow {
    display: none;
  }

  .beginner-section {
    margin-bottom: 70px;
    padding: 32px 24px;
    border-radius: 24px;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .article-main {
    padding: 28px 16px 100px;
  }

  .article-breadcrumb {
    font-size: 12px;
  }

  .article-header h1 {
    font-size: 34px;
    letter-spacing: -0.04em;
  }

  .article-summary {
    margin-top: 16px;
    font-size: 16px;
  }

  .article-actions {
    align-items: stretch;
  }

  .complete-button {
    flex: 1;
  }

  .text-button {
    width: 46px;
    padding: 0;
  }

  .text-button span {
    display: none;
  }

  .article-content {
    margin-top: 38px;
    font-size: 16px;
    line-height: 1.75;
  }

  .article-content h2 {
    margin-top: 50px;
    font-size: 25px;
  }

  .article-content h3 {
    font-size: 20px;
  }

  .article-callout {
    padding: 16px;
  }

  .code-shell {
    margin-right: -4px;
    margin-left: -4px;
    border-radius: 12px;
  }

  pre {
    padding: 16px;
    font-size: 13px;
  }

  .lesson-directions {
    grid-template-columns: 1fr;
  }

  .search-dialog {
    width: calc(100% - 16px);
    max-height: calc(100dvh - 16px);
    margin: auto;
    border-radius: 16px;
  }

  .search-hint span:first-child {
    display: none;
  }

  .search-hint {
    justify-content: flex-end;
  }

  .not-found-card {
    padding: 36px 26px;
  }

  .run-code span,
  .copy-code span {
    display: none;
  }

  .run-code,
  .copy-code {
    min-width: 44px;
    padding: 0;
  }

  .playground-dialog {
    width: calc(100% - 12px);
    height: calc(100dvh - 12px);
    border-radius: 15px;
  }

  .playground-workspace {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(260px, 1fr) minmax(240px, 1fr);
  }

  .playground-head {
    min-height: 62px;
  }

  .playground-panel > footer span {
    display: none;
  }

  .playground-panel > footer {
    justify-content: flex-end;
  }
}

@media print {
  .topbar,
  .site-drawer,
  .page-toc,
  .article-actions,
  .lesson-directions,
  .mobile-reading-bar,
  .search-dialog,
  .playground-dialog,
  .run-code {
    display: none !important;
  }

  body,
  .article-main {
    background: #fff;
  }

  .reading-layout {
    display: block;
  }

  .article-main {
    padding: 0;
  }

  .article-card {
    max-width: none;
  }

  .article-content a {
    color: #000;
  }

  .code-shell {
    color: #000;
    background: #f4f4f4;
    border-color: #ccc;
  }

  .code-toolbar {
    color: #333;
    background: #e8e8e8;
  }

  .copy-code {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
