:root {
  --ink: #242424;
  --muted: #6f737a;
  --line: #e6e6e6;
  --soft: #f7f8fa;
  --blue: #184786;
  --blue-2: #2c74b3;
  --accent: #f59e0b;
  --panel: #ffffff;
  --shadow: rgba(32, 39, 52, 0.12);
  --sans: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --serif: Charter, Georgia, "Times New Roman", serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scrollbar-gutter: stable;
}

body {
  margin: 0;
  color: var(--ink);
  background: #fff;
  font-family: var(--sans);
  overflow-x: hidden;
}

img {
  max-width: 100%;
}

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

.site-nav {
  position: sticky;
  top: 0;
  z-index: 10;
  height: 76px;
  border-bottom: none;
  background: #fff;
}

.site-nav__inner {
  display: flex;
  align-items: center;
  height: 76px;
  max-width: none;
  margin: 0 auto;
  padding: 0 10%;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
}

.brand img {
  width: auto;
  height: 48px;
  display: block;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  flex: 1 1 auto;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.nav-links::-webkit-scrollbar {
  display: none;
}

.nav-links a {
  position: relative;
  display: inline-flex;
  align-items: center;
  color: #1e293b;
  font-size: 21px;
  line-height: 1;
  white-space: nowrap;
  padding: 8px 0 11px;
}

.nav-links a.is-active,
.nav-links a:hover {
  color: var(--blue-2);
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: var(--blue-2);
  opacity: 0;
}

.nav-links a.is-active::after {
  opacity: 1;
}

.language-pill {
  display: inline-flex;
  align-items: center;
  gap: 0;
  flex: 0 0 auto;
  margin-left: auto;
  border: 1px solid #cfe0f1;
  border-radius: 999px;
  padding: 3px;
  background: #f6f9fc;
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
}

.language-pill span {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 9px;
}

.language-pill span + span {
  border-left: 1px solid #d8e3ee;
}

.language-pill .is-current {
  border-left: 0;
  border-radius: 999px;
  background: var(--blue-2);
  color: #fff;
  box-shadow: 0 1px 2px rgba(24, 71, 134, 0.18);
}

.language-pill .is-current + span {
  border-left: 0;
}

.nav-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  flex: 0 0 auto;
  gap: 8px;
  margin-left: auto;
}

.github-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(44, 116, 179, 0.16);
  border-radius: 999px;
  color: #475569;
  background: #fff;
}

.github-link:hover {
  color: var(--blue-2);
  border-color: rgba(44, 116, 179, 0.34);
  background: #f8fbff;
}

.github-link svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.menu-toggle,
.nav-backdrop,
.nav-drawer-title {
  display: none;
}

.menu-toggle {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(44, 116, 179, 0.18);
  border-radius: 8px;
  background: rgba(248, 251, 255, 0.72);
  color: #1e293b;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 16px;
  height: 2px;
  margin: 3px auto;
  border-radius: 999px;
  background: currentColor;
  transition: transform 180ms ease, opacity 180ms ease;
}

body.nav-open .menu-toggle span:nth-child(1) {
  transform: translateY(5px) rotate(45deg);
}

body.nav-open .menu-toggle span:nth-child(2) {
  opacity: 0;
}

body.nav-open .menu-toggle span:nth-child(3) {
  transform: translateY(-5px) rotate(-45deg);
}

.home-page {
  max-width: none;
  margin: 0 auto;
  padding: 0 10% 90px;
}

.site-footer {
  border-top: 1px solid #e5e9ef;
  padding: 24px 10% 34px;
  color: #7a8494;
  font-size: 14px;
  text-align: center;
}

.legacy-hero {
  color: #fff;
  background: linear-gradient(110deg, #205295 0%, #2c74b3 15%, #ffdddd 50%, #ffb4b4 85%, #e23e57 100%);
}

.legacy-hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 36px;
  align-items: center;
  padding: 24px 10%;
}

.legacy-hero__text h1 {
  margin: 0 0 14px;
  color: #fff;
  font-family: var(--mono);
  font-size: clamp(48px, 7vw, 72px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: 0.1em;
  text-shadow: 0 0 8px #4f626b;
}

.legacy-hero__text p {
  margin: 0 0 18px;
  color: #fff;
  font-size: clamp(20px, 3vw, 28px);
  font-style: italic;
  font-weight: 600;
  line-height: 1.4;
  text-shadow: 0 0 8px #4f626b;
  min-height: 2.8em;
}

.legacy-hero__actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.legacy-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 20px;
  font-weight: 700;
}

.legacy-btn-primary {
  background: #f59e0b;
  color: #1f2937;
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.15);
}

.legacy-btn-secondary {
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.legacy-hero__features ul {
  margin: 0;
  padding-left: 24px;
}

.legacy-hero__features li {
  margin-bottom: 12px;
  color: #212529;
  font-size: 19px;
  font-weight: 500;
  line-height: 1.6;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 0.55fr);
  gap: 56px;
  align-items: end;
  padding-bottom: 44px;
  border-bottom: 1px solid var(--line);
}

.kicker {
  display: inline-flex;
  margin-bottom: 18px;
  color: var(--blue);
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.14em;
  line-height: 1;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 780px;
  margin: 0;
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(54px, 7vw, 92px);
  font-weight: 760;
  line-height: 0.98;
  letter-spacing: 0;
}

.hero-copy {
  margin: 0;
  color: var(--muted);
  font-size: 19px;
  line-height: 1.7;
}

.section {
  padding: 72px 0 0;
}

.section-head {
  margin-bottom: 28px;
}

.section-head h2 {
  margin: 0 0 10px;
  color: #202124;
  font-size: clamp(32px, 2.5vw, 42px);
  font-weight: 700;
  line-height: 1.15;
}

.section-head p {
  max-width: 980px;
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
}

.workflow-lab {
  display: grid;
  grid-template-columns: minmax(260px, 0.72fr) minmax(0, 1.28fr);
  gap: 20px;
  padding: 18px;
  border: 1px solid #dde8f2;
  border-radius: 28px;
  background:
    linear-gradient(#b8cbe0 1px, transparent 1px),
    linear-gradient(90deg, #b8cbe0 1px, transparent 1px),
    linear-gradient(135deg, #f8fbff 0%, #ffffff 52%, #fff8f1 100%);
  background-size: 42px 42px, 42px 42px, auto;
  background-blend-mode: soft-light, soft-light, normal;
  box-shadow: 0 18px 44px var(--shadow);
}

.workflow-lab > * {
  min-width: 0;
}

.workflow-panel,
.architecture-panel {
  border: 1px solid #dfe8f2;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.92);
}

.workflow-panel {
  display: flex;
  flex-direction: column;
  padding: 26px;
  box-shadow: inset 4px 0 0 var(--accent);
}

.panel-label {
  display: inline-flex;
  margin-bottom: 18px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.steps {
  display: grid;
  flex: 1 1 auto;
  align-content: space-evenly;
  gap: clamp(12px, 2.2vh, 28px);
  padding: 0;
  margin: 0;
  list-style: none;
}

.step {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 13px;
  position: relative;
  min-height: 82px;
  min-width: 0;
}

.step > div {
  min-width: 0;
}

.step:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 20px;
  top: 44px;
  bottom: -8px;
  width: 2px;
  background: #b8cbe0;
}

.step-index {
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid #dfe8f2;
  border-radius: 14px;
  background: #fff;
  color: var(--blue);
  font-weight: 800;
  animation: step-focus 6s ease-in-out infinite;
}

.step:nth-child(2) .step-index {
  color: #1b9a75;
  animation-delay: 2s;
}

.step:nth-child(3) .step-index {
  color: #d95f3d;
  animation-delay: 4s;
}

.step h3 {
  margin: 0 0 6px;
  font-size: 18px;
  line-height: 1.25;
}

.step p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.chip {
  display: inline-flex;
  max-width: 100%;
  margin-top: 9px;
  border: 1px solid rgba(24, 71, 134, 0.18);
  border-radius: 999px;
  padding: 4px 9px;
  background: rgba(24, 71, 134, 0.08);
  color: var(--blue);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
  white-space: normal;
  overflow-wrap: anywhere;
}

.actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: auto;
  padding-top: 18px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border-radius: 999px;
  padding: 10px 17px;
  font-weight: 700;
}

.btn-primary {
  border: 1px solid var(--blue);
  background: linear-gradient(180deg, #245898 0%, var(--blue) 100%);
  color: #fff;
}

.btn-light {
  border: 1px solid #d6dbe3;
  background: #fff;
  color: #202124;
}

.architecture-panel {
  padding: 22px;
}

.architecture-panel img {
  width: 100%;
  max-height: 520px;
  object-fit: contain;
  border-radius: 18px;
  background: #fff;
}

.module-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.home-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.module-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  border: 1px solid #eceff3;
  border-radius: 30px;
  padding: 0;
  background: #fff;
  overflow: hidden;
  transform: translateY(0);
  box-shadow: 0 7px 16px rgba(32, 39, 52, 0.1);
  transition: transform 0.34s cubic-bezier(0.2, 0.9, 0.22, 1.22), box-shadow 0.28s cubic-bezier(0.2, 0.9, 0.22, 1), border-color 0.24s ease, background-color 0.24s ease;
}

.module-card:hover {
  border-color: #e5e9ef;
  transform: translateY(-6px);
  box-shadow: 0 14px 28px rgba(32, 39, 52, 0.17);
}

.module-card__head,
.module-card > h3 {
  padding: 30px 30px 0;
}

.module-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.module-card__head h3,
.module-card > h3 {
  margin: 0;
  font-size: 22px;
  line-height: 1.35;
}

.module-card__head span {
  display: inline-flex;
  min-width: 38px;
  justify-content: center;
  border: 1px solid rgba(24, 71, 134, 0.18);
  border-radius: 999px;
  padding: 5px 10px;
  background: rgba(24, 71, 134, 0.08);
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
}

.module-card p {
  min-height: 70px;
  margin: 10px 30px 0;
  color: var(--muted);
  line-height: 1.78;
}

.module-card__media {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 240px;
  margin: 24px 24px 18px;
  border: 1px solid #f1f3f6;
  border-radius: 24px;
  background: linear-gradient(180deg, #fbfcfe 0%, #f6f8fb 100%);
}

.module-card__media img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.tag-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0;
  padding: 0 26px 22px;
}

.tag {
  border: 1px solid rgba(24, 71, 134, 0.18);
  border-radius: 999px;
  padding: 5px 10px;
  background: rgba(24, 71, 134, 0.08);
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
}

.module-card__button {
  margin: 0 26px 26px;
}

.module-card__button.btn-primary {
  box-shadow: 0 8px 18px rgba(24, 71, 134, 0.18);
  transform: translateY(0);
  transition: transform 0.28s cubic-bezier(0.2, 0.9, 0.22, 1.18), box-shadow 0.24s cubic-bezier(0.2, 0.9, 0.22, 1), background 0.2s ease, border-color 0.2s ease;
}

.module-card__button.btn-primary:hover {
  border-color: #143a72;
  background: linear-gradient(180deg, #1e4f8d 0%, #143a72 100%);
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(24, 71, 134, 0.24);
}

.case-card .module-card__media {
  margin-top: 18px;
}

.start-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
}

.start-card {
  display: block;
  min-height: 150px;
  border: 1px solid #eceff3;
  border-radius: 28px;
  padding: 27px;
  background: #fff;
  transform: translateY(0);
  box-shadow: 0 6px 14px rgba(32, 39, 52, 0.1);
  transition: transform 0.34s cubic-bezier(0.2, 0.9, 0.22, 1.22), box-shadow 0.28s cubic-bezier(0.2, 0.9, 0.22, 1), border-color 0.24s ease, background-color 0.24s ease;
}

.start-card:hover {
  border-color: #e5e9ef;
  transform: translateY(-6px);
  box-shadow: 0 12px 24px rgba(32, 39, 52, 0.16);
}

.start-card strong {
  display: block;
  margin-bottom: 11px;
  color: #202124;
  font-size: 17px;
}

.start-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.article-shell {
  display: grid;
  grid-template-columns: clamp(150px, 12vw, 190px) minmax(0, 800px) clamp(170px, 14vw, 220px);
  gap: clamp(24px, 3vw, 46px);
  justify-content: center;
  width: min(calc(100% - 64px), 1360px);
  max-width: none;
  margin: 0 auto;
  padding: 18px 0 96px;
}

.article-shell.no-left {
  grid-template-columns: clamp(150px, 12vw, 190px) minmax(0, 800px) clamp(170px, 14vw, 220px);
  width: min(calc(100% - 64px), 1360px);
  max-width: none;
  gap: clamp(24px, 3vw, 46px);
}

.article-shell.no-left::before {
  content: "";
}

.article {
  min-width: 0;
  max-width: 800px;
  font-family: var(--serif);
}

.article-shell > * {
  min-width: 0;
}

.article h1 {
  margin: 0 0 26px;
  color: var(--ink);
  font-size: clamp(64px, 8vw, 96px);
  font-weight: 760;
  line-height: 0.98;
}

.subtitle {
  margin: 0 0 32px;
  color: #5d6672;
  font-family: var(--sans);
  font-size: 25px;
  line-height: 1.58;
}

.byline {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 54px;
  color: #4b5563;
  font-family: var(--sans);
  font-size: 15px;
}

.avatar {
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid #dce5ef;
  background: #fff url("assets/img/favicon.png") center / 74% auto no-repeat;
}

.article p,
.article li {
  font-size: 20px;
  line-height: 1.78;
}

.article p {
  margin: 0 0 24px;
}

.article a {
  color: var(--blue-2);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.article h2 {
  margin: 48px 0 14px;
  font-family: var(--sans);
  font-size: 30px;
  line-height: 1.18;
}

.article h3 {
  margin: 34px 0 12px;
  font-family: var(--sans);
  font-size: 23px;
}

.article code {
  font-family: var(--mono);
  font-size: 0.94em;
}

.article table code {
  font-size: 0.98em;
}

.article pre {
  position: relative;
  max-width: 100%;
  margin: 30px 0;
  padding: 44px 20px 20px;
  border: 1px solid #dce5ef;
  border-radius: 10px;
  background: #f7fafc !important;
  color: #18324d;
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.7;
  overflow-x: hidden;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.code-copy {
  position: absolute;
  top: 10px;
  right: 10px;
  border: 1px solid #cbd8e6;
  border-radius: 7px;
  padding: 5px 9px;
  background: rgba(255, 255, 255, 0.86);
  color: #35516f;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
}

.code-copy:hover {
  border-color: var(--blue-2);
  color: var(--blue-2);
}

.article pre code {
  white-space: inherit;
  font-family: inherit;
  font-size: inherit;
}

.article pre[class*="language-"],
.article code[class*="language-"] {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  text-shadow: none;
}

.article figure {
  margin: 30px 0;
}

.article figure img {
  width: 100%;
  border: 1px solid #e5e9ef;
  border-radius: 12px;
  background: #fff;
}

.article table {
  width: 100%;
  max-width: 100%;
  margin: 22px 0 30px;
  border-collapse: collapse;
  font-family: var(--sans);
  font-size: 16px;
  display: block;
  overflow-x: auto;
  white-space: nowrap;
}

.article th,
.article td {
  padding: 12px 13px;
  border: 1px solid #e5e9ef;
  vertical-align: top;
  white-space: normal;
}

.article th {
  background: #f7fafc;
  text-align: left;
}

.doc-sidebar,
.toc {
  position: sticky;
  top: 112px;
  align-self: start;
  color: #777;
  font-family: var(--sans);
}

.doc-sidebar {
  padding-right: 22px;
  overflow: hidden;
}

.toc {
  padding-left: 24px;
}

.doc-sidebar::after,
.toc::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--line);
}

.doc-sidebar::after {
  right: 0;
}

.toc::before {
  left: 0;
}

.doc-sidebar strong,
.toc strong {
  display: block;
  margin-bottom: 12px;
  color: var(--ink);
  font-size: 15px;
}

.doc-sidebar a,
.doc-sidebar span,
.toc a {
  display: block;
  padding: 5px 0;
  color: #777;
  font-size: 15px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.doc-sidebar span {
  margin-top: 12px;
  color: #a0a4aa;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.doc-sidebar a.is-active {
  color: var(--blue-2);
  font-weight: 700;
}

.doc-sidebar a:hover,
.toc a:hover {
  color: var(--ink);
}

@media (max-width: 1500px) {
  .workflow-lab {
    grid-template-columns: minmax(300px, 0.8fr) minmax(0, 1.2fr);
  }

  .architecture-panel img {
    max-height: 460px;
  }

  .article-shell,
  .article-shell.no-left {
    grid-template-columns: 170px minmax(0, 800px);
    width: calc(100% - 48px);
    gap: 28px;
    justify-content: center;
  }

  .article-shell.no-left {
    grid-template-columns: minmax(0, 800px);
    max-width: 860px;
  }

  .article-shell.no-left::before,
  .toc {
    display: none;
  }

  .article {
    max-width: 800px;
  }
}

@media (max-width: 1180px) {
  .workflow-lab {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .workflow-panel {
    padding: 22px;
  }

  .architecture-panel img {
    max-height: none;
  }

  .step h3 {
    font-size: 17px;
  }

  .step p {
    font-size: 13px;
  }
}

@media (max-width: 1180px) {
  .article-shell {
    grid-template-columns: minmax(0, 800px);
    width: calc(100% - 40px);
    max-width: 860px;
    gap: 0;
    justify-content: center;
  }

  .article-shell.no-left {
    grid-template-columns: minmax(0, 800px);
    width: calc(100% - 40px);
    max-width: 860px;
  }

  .article-shell.no-left::before {
    display: none;
  }

  .doc-sidebar,
  .toc {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .module-card,
  .start-card,
  .btn,
  .legacy-btn {
    transition: none;
  }

  .module-card:hover,
  .start-card:hover {
    transform: none;
  }
}

@keyframes step-focus {
  0%,
  42%,
  100% {
    box-shadow: 0 8px 18px rgba(24, 71, 134, 0.12);
    transform: scale(1);
  }

  10%,
  24% {
    box-shadow: 0 10px 24px rgba(24, 71, 134, 0.2), 0 0 0 5px rgba(24, 71, 134, 0.09);
    transform: scale(1.035);
  }
}

@media (max-width: 1320px) {
  .site-nav {
    height: 72px;
  }

  .site-nav__inner {
    height: 72px;
    padding: 0 20px;
    gap: 18px;
    min-height: 0;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 30;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: min(220px, 64vw);
    height: 100dvh;
    padding: 62px 12px 16px;
    gap: 4px;
    border-left: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 18px 0 0 18px;
    background:
      linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    box-shadow: -14px 0 32px rgba(15, 23, 42, 0.14);
    overflow-y: auto;
    transform: translateX(104%);
    transition: transform 220ms ease;
  }

  .nav-links a {
    justify-content: flex-start;
    border-bottom: 0;
    border-radius: 10px;
    padding: 9px 10px;
    color: #475569;
    font-size: 14px;
    font-weight: 650;
    line-height: 1.2;
    transition: background-color 160ms ease, color 160ms ease, transform 160ms ease;
  }

  .nav-links a:hover,
  .nav-links a.is-active {
    background: rgba(44, 116, 179, 0.1);
    color: var(--blue-2);
  }

  .nav-links a:hover {
    transform: translateX(2px);
  }

  .nav-links a::after {
    display: none;
  }

  .nav-drawer-title {
    display: block;
    margin: 0 8px 8px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e5e9ef;
    color: #1e293b;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

.language-pill {
    margin-left: 0;
  }

  .menu-toggle {
    z-index: 40;
    display: block;
  }

  .nav-backdrop {
    position: fixed;
    inset: 0;
    z-index: 20;
    border: 0;
    background: rgba(15, 23, 42, 0.22);
    opacity: 0;
    pointer-events: none;
    transition: opacity 180ms ease;
  }

  body.nav-open {
    overflow: hidden;
  }

  body.nav-open .nav-links {
    transform: translateX(0);
  }

  body.nav-open .nav-backdrop {
    display: block;
    opacity: 1;
    pointer-events: auto;
  }
}

@media (max-width: 980px) {
  .hero,
  .workflow-lab,
  .article-shell {
    grid-template-columns: 1fr;
  }

  .article-shell.no-left {
    grid-template-columns: 1fr;
  }

  .article-shell.no-left::before {
    display: none;
  }

  .legacy-hero__inner {
    grid-template-columns: 1fr;
    padding: 30px 20px;
  }

  .home-page {
    padding: 0 20px 72px;
  }

  .home-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .start-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .doc-sidebar,
  .toc {
    display: none;
  }

  .module-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .site-nav {
    height: 64px;
  }

  .site-nav__inner {
    height: 64px;
    padding: 0 14px;
    gap: 12px;
  }

  .brand img {
    height: 36px;
  }

  .nav-links {
    width: min(210px, 68vw);
    margin: 0;
    padding: 58px 10px 14px;
    gap: 4px;
  }

  .nav-links a {
    font-size: 13px;
    padding: 9px 10px;
  }

  .nav-actions {
    gap: 6px;
  }

  .github-link,
  .menu-toggle {
    width: 32px;
    height: 32px;
  }

  .language-pill {
    display: inline-flex;
    font-size: 11px;
    padding: 2px;
  }

  .language-pill span {
    min-height: 20px;
    padding: 0 7px;
  }

  .legacy-hero__text h1 {
    font-size: 46px;
  }

  .legacy-hero__text p {
    font-size: 20px;
  }

  .legacy-btn {
    width: 100%;
    min-height: 42px;
    font-size: 17px;
  }

  .home-page {
    padding-left: 16px;
    padding-right: 16px;
  }

  .article-shell,
  .article-shell.no-left {
    width: calc(100% - 32px);
  }

  .section {
    padding-top: 48px;
  }

  .section-head {
    margin-bottom: 18px;
  }

  .section-head h2 {
    font-size: 30px;
  }

  .workflow-lab {
    padding: 12px;
    border-radius: 20px;
    background-size: 30px 30px, 30px 30px, auto;
  }

  .workflow-panel,
  .architecture-panel {
    border-radius: 16px;
  }

  .workflow-panel,
  .architecture-panel {
    padding: 18px;
  }

  .step {
    grid-template-columns: 36px 1fr;
    gap: 11px;
  }

  .step-index {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    font-size: 13px;
  }

  .step:not(:last-child)::after {
    left: 17px;
    top: 38px;
  }

  .chip {
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  .home-card-grid,
  .module-grid,
  .start-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .module-card {
    border-radius: 20px;
  }

  .module-card__head,
  .module-card > h3 {
    padding: 22px 22px 0;
  }

  .module-card p {
    min-height: 0;
    margin: 10px 22px 0;
  }

  .module-card__media {
    height: 190px;
    margin: 18px 18px 14px;
    border-radius: 16px;
  }

  .tag-row {
    padding: 0 22px 18px;
  }

  .module-card__button {
    margin: 0 22px 22px;
  }

  .article-shell {
    padding-top: 18px;
    padding-bottom: 72px;
  }

  .article {
    max-width: 100%;
  }

  .article h1 {
    font-size: 42px;
  }

  .subtitle {
    font-size: 19px;
    line-height: 1.5;
  }

  .byline {
    align-items: flex-start;
    margin-bottom: 34px;
  }

  .avatar {
    width: 42px;
    height: 42px;
  }

  .article p,
  .article li {
    font-size: 18px;
    line-height: 1.68;
  }

  .article pre,
  .article table {
    font-size: 13px;
  }

  .article pre {
    padding: 16px;
  }
}
