:root {
  --ink: #14141f;
  --ink-2: #1d1d2b;
  --paper: #f4efe6;
  --paper-2: #e9e0d1;
  --paper-3: #faf7f1;
  --orange: #ff6b45;
  --yellow: #ffde59;
  --blue: #00569e;
  --blue-light: #5aa9e6;
  --emerald: #0f9d78;
  --serif: "Fraunces", Georgia, serif;
  --sans: "Manrope", "Helvetica Neue", sans-serif;
  --mono: "IBM Plex Mono", monospace;
  --max: 1240px;
  --ease: cubic-bezier(0.22, 0.72, 0.24, 1);
  --topbar: 70px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--topbar) + 64px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

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

button {
  font: inherit;
  cursor: pointer;
}

h1,
h2,
h3,
h4,
p,
ol,
ul,
figure {
  margin: 0;
}

ol,
ul {
  padding: 0;
}

::selection {
  background: var(--orange);
  color: var(--ink);
}

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

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 1000;
  padding: 10px 16px;
  background: var(--orange);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 10px;
  transform: translateY(-160%);
  transition: transform 0.2s ease;
}

.skip-link:focus {
  transform: none;
}

.container {
  width: min(calc(100% - 64px), var(--max));
  margin-inline: auto;
}

.micro {
  display: inline-block;
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted, #6d685f);
}

.fine {
  font-family: var(--mono);
  font-size: 8px;
  line-height: 1.6;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted, #6d685f);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--topbar);
  background: rgba(20, 20, 31, 0.94);
  color: var(--paper);
  border-bottom: 1px solid rgba(244, 239, 230, 0.14);
  backdrop-filter: blur(16px) saturate(140%);
}

.topbar__inner {
  width: min(calc(100% - 64px), var(--max));
  height: 100%;
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: 30px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.brand__mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  background: var(--orange);
  color: var(--ink);
  border-radius: 10px;
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.04em;
}

.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand__text strong {
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 550;
  letter-spacing: -0.02em;
}

.brand__text small {
  margin-top: 2px;
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(244, 239, 230, 0.48);
}

.topnav {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-left: auto;
}

.topnav a {
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(244, 239, 230, 0.58);
  transition: color 0.2s ease;
}

.topnav a:hover {
  color: var(--orange);
}

.topbar__actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.progress-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--paper);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.08em;
}

.progress-chip svg {
  width: 30px;
  height: 30px;
  transform: rotate(-90deg);
}

.progress-chip circle {
  fill: none;
  stroke-width: 3;
}

.progress-chip__bg {
  stroke: rgba(244, 239, 230, 0.16);
}

.progress-chip__fg {
  stroke: var(--orange);
  stroke-linecap: round;
  stroke-dasharray: 88;
  stroke-dashoffset: 88;
  transition: stroke-dashoffset 0.5s var(--ease);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 23px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 1;
  transition: background 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease), transform 0.3s var(--ease);
}

.btn:hover {
  transform: translateY(-2px);
}

.btn--primary {
  background: var(--orange);
  color: var(--ink);
}

.btn--primary:hover {
  background: var(--yellow);
}

.btn--ghost {
  border-color: rgba(244, 239, 230, 0.28);
  color: var(--paper);
}

.btn--ghost:hover {
  background: var(--paper);
  color: var(--ink);
}

.btn--small {
  padding: 11px 16px;
  font-size: 8px;
}

.btn--outline {
  border-color: currentColor;
  color: currentColor;
  background: transparent;
}

.btn--outline:hover {
  background: var(--ink);
  color: var(--paper);
}

.hero {
  position: relative;
  overflow: hidden;
  background: var(--ink);
  color: var(--paper);
  padding: 88px 0 82px;
  isolation: isolate;
}

.hero__grid-bg {
  position: absolute;
  inset: 0;
  z-index: -3;
  background-image: linear-gradient(rgba(244, 239, 230, 0.05) 1px, transparent 1px), linear-gradient(90deg, rgba(244, 239, 230, 0.05) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(ellipse at 50% 40%, #000, transparent 78%);
}

.hero__glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  z-index: -2;
  pointer-events: none;
}

.hero__glow--one {
  width: 600px;
  height: 600px;
  right: -170px;
  top: -220px;
  background: rgba(255, 107, 69, 0.2);
}

.hero__glow--two {
  width: 500px;
  height: 500px;
  left: -160px;
  bottom: -220px;
  background: rgba(0, 86, 158, 0.32);
}

.hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.16fr) minmax(0, 0.84fr);
  gap: 60px;
  align-items: center;
}

.hero__eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(244, 239, 230, 0.62);
}

.pulse {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 0 0 0 rgba(255, 107, 69, 0.55);
  animation: pulse 2.4s ease-out infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(255, 107, 69, 0.5); }
  70% { box-shadow: 0 0 0 9px rgba(255, 107, 69, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 107, 69, 0); }
}

.hero h1 {
  margin: 24px 0 28px;
  font-family: var(--serif);
  font-size: clamp(3.8rem, 6.35vw, 5.7rem);
  font-weight: 400;
  line-height: 0.9;
  letter-spacing: -0.055em;
  color: var(--paper);
}

.hero h1 em {
  color: var(--orange);
  font-weight: 300;
  font-style: italic;
}

.hero__lead {
  max-width: 600px;
  font-size: 1.03rem;
  line-height: 1.8;
  color: rgba(244, 239, 230, 0.68);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 34px;
  padding-top: 22px;
  border-top: 1px solid rgba(244, 239, 230, 0.14);
}

.hero__meta span {
  padding: 6px 10px;
  border: 1px solid rgba(244, 239, 230, 0.16);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 7.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(244, 239, 230, 0.55);
}

.map-card {
  background: rgba(244, 239, 230, 0.045);
  border: 1px solid rgba(244, 239, 230, 0.16);
  border-radius: 18px;
  padding: 24px;
  backdrop-filter: blur(18px);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.3);
}

.map-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(244, 239, 230, 0.12);
}

.map-card__top .micro {
  color: rgba(244, 239, 230, 0.5);
}

.map-card__status {
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--yellow);
}

.map-list {
  list-style: none;
}

.map-list li {
  border-bottom: 1px solid rgba(244, 239, 230, 0.12);
}

.map-list a {
  display: grid;
  grid-template-columns: 32px 1fr 20px;
  gap: 14px;
  align-items: center;
  padding: 15px 0;
  transition: color 0.25s ease, padding-left 0.25s ease;
}

.map-list a:hover {
  color: var(--orange);
  padding-left: 4px;
}

.map-num {
  font-family: var(--mono);
  font-size: 9px;
  color: var(--orange);
}

.map-list strong {
  display: block;
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: 500;
}

.map-list small {
  display: block;
  margin-top: 1px;
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(244, 239, 230, 0.42);
}

.map-list i {
  font-style: normal;
  color: rgba(244, 239, 230, 0.38);
}

.map-card__note {
  margin-top: 16px;
  font-size: 0.78rem;
  line-height: 1.6;
  color: rgba(244, 239, 230, 0.45);
}

.levelbar {
  position: sticky;
  top: var(--topbar);
  z-index: 60;
  background: rgba(20, 20, 31, 0.97);
  border-bottom: 1px solid rgba(244, 239, 230, 0.14);
  color: var(--paper);
}

.levelbar__inner {
  display: flex;
  align-items: center;
  gap: 26px;
  height: 50px;
  overflow-x: auto;
  scrollbar-width: none;
}

.levelbar__inner::-webkit-scrollbar {
  display: none;
}

.levelbar__label {
  font-family: var(--mono);
  font-size: 7.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(244, 239, 230, 0.35);
  white-space: nowrap;
}

.levelbar a {
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(244, 239, 230, 0.6);
  white-space: nowrap;
  transition: color 0.2s ease;
}

.levelbar a:hover {
  color: var(--orange);
}

.level {
  --panel: var(--paper-3);
  --panel-strong: var(--paper-2);
  --line: rgba(20, 20, 31, 0.14);
  --muted: #6d685f;
  --link: var(--blue);
  padding: 104px 0;
  background: var(--paper);
  color: var(--ink);
}

.level--paper {
  background: var(--paper);
}

.level--dark {
  --panel: rgba(244, 239, 230, 0.055);
  --panel-strong: rgba(244, 239, 230, 0.09);
  --line: rgba(244, 239, 230, 0.15);
  --muted: rgba(244, 239, 230, 0.52);
  --link: var(--blue-light);
  background: var(--ink);
  color: var(--paper);
}

.level--beginner { --level-accent: #a75a00; }
.level--intermediate { --level-accent: var(--blue-light); }
.level--advanced { --level-accent: var(--orange); }
.level--expert { --level-accent: #5fe0b5; }

.level-head {
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr) 220px;
  gap: 38px;
  align-items: start;
  margin-bottom: 72px;
}

.level-head__index {
  font-family: var(--serif);
  font-size: clamp(5rem, 8vw, 8rem);
  font-weight: 300;
  font-style: italic;
  line-height: 0.8;
  letter-spacing: -0.05em;
  color: transparent;
  -webkit-text-stroke: 1px var(--level-accent);
  opacity: 0.95;
}

.level-head__copy .micro {
  margin-bottom: 10px;
  color: var(--level-accent);
}

.level-head__copy h2 {
  font-family: var(--serif);
  font-size: clamp(2.8rem, 5vw, 4.9rem);
  font-weight: 400;
  line-height: 0.95;
  letter-spacing: -0.04em;
  margin-bottom: 20px;
}

.level-head__copy > p:last-child {
  max-width: 690px;
  font-size: 1rem;
  line-height: 1.75;
  color: var(--muted);
}

.level-head__aside {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 7px;
  padding-top: 6px;
}

.level-tag {
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 7.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.block {
  margin-bottom: 92px;
}

.block-head {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) 360px;
  gap: 28px;
  align-items: end;
  margin-bottom: 30px;
}

.block-num {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  color: var(--level-accent);
  padding-top: 6px;
}

.block-head h3 {
  font-family: var(--serif);
  font-size: clamp(1.9rem, 3.1vw, 2.7rem);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.block-head p {
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--muted);
  padding-bottom: 4px;
}

.block-head--compact {
  display: block;
  margin-bottom: 24px;
}

.block-head--compact .block-num {
  display: block;
  margin-bottom: 10px;
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.tool-card {
  display: flex;
  flex-direction: column;
  min-height: 185px;
  padding: 24px;
  background: var(--panel);
  transition: background 0.3s ease, color 0.3s ease;
}

.tool-card:hover {
  background: var(--level-accent);
  color: var(--ink);
}

.tool-card__kicker {
  font-family: var(--mono);
  font-size: 7.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--level-accent);
}

.tool-card:hover .tool-card__kicker,
.tool-card:hover p,
.tool-card:hover .tool-card__link {
  color: var(--ink);
}

.tool-card strong {
  display: block;
  margin: 10px 0 8px;
  font-family: var(--serif);
  font-size: 1.55rem;
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.025em;
}

.tool-card p {
  max-width: 420px;
  font-size: 0.86rem;
  line-height: 1.65;
  color: var(--muted);
  transition: color 0.3s ease;
}

.tool-card__link {
  margin-top: auto;
  padding-top: 18px;
  font-family: var(--mono);
  font-size: 7.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--link);
}

.feature-block {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
  gap: 44px;
  padding: 42px;
  border: 1px solid var(--line);
  background: var(--panel);
  margin-bottom: 92px;
}

.feature-block--dark {
  --panel: rgba(244, 239, 230, 0.045);
  --line: rgba(244, 239, 230, 0.15);
  --muted: rgba(244, 239, 230, 0.52);
  --link: var(--blue-light);
  background: var(--ink);
  color: var(--paper);
}

.feature-block--light {
  background: var(--paper-3);
  border: 1px solid var(--line);
  padding: 32px;
  margin-bottom: 0;
}

.feature-block .micro {
  color: var(--level-accent);
}

.feature-block h3 {
  margin: 12px 0 16px;
  font-family: var(--serif);
  font-size: clamp(2rem, 3.5vw, 3.2rem);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: -0.035em;
}

.feature-block p {
  font-size: 0.94rem;
  line-height: 1.75;
  color: var(--muted);
}

.prompt-formula {
  list-style: none;
  margin-top: 26px;
  border-top: 1px solid var(--line);
}

.prompt-formula li {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}

.prompt-formula li > span {
  font-family: var(--mono);
  font-size: 8px;
  color: var(--level-accent);
  padding-top: 4px;
}

.prompt-formula strong {
  display: block;
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: 500;
}

.prompt-formula p {
  margin-top: 2px;
  font-size: 0.8rem;
  line-height: 1.55;
}

.prompt-examples {
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-self: center;
}

.prompt-card {
  padding: 20px;
  border: 1px solid var(--line);
  background: rgba(244, 239, 230, 0.04);
}

.prompt-card--weak {
  opacity: 0.65;
}

.prompt-card--strong {
  border-color: rgba(255, 107, 69, 0.55);
  background: rgba(255, 107, 69, 0.08);
}

.prompt-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  font-family: var(--mono);
  font-size: 7.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.prompt-card--strong .prompt-card__top {
  color: var(--orange);
}

.prompt-card p {
  font-size: 0.88rem;
  line-height: 1.7;
  color: var(--paper);
}

.tag {
  padding: 3px 6px;
  border: 1px solid var(--line);
  border-radius: 4px;
  font-size: 7px;
}

.copy-prompt {
  padding: 4px 8px;
  border: 1px solid rgba(255, 107, 69, 0.4);
  border-radius: 4px;
  background: transparent;
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--orange);
}

.prompt-note {
  font-size: 0.78rem !important;
  color: var(--muted) !important;
}

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

.pattern-card {
  min-height: 190px;
  padding: 24px;
  background: var(--panel);
}

.pattern-num {
  display: inline-grid;
  place-items: center;
  width: 25px;
  height: 25px;
  border: 1px solid var(--line);
  border-radius: 50%;
  font-family: var(--mono);
  font-size: 8px;
  color: var(--level-accent);
}

.pattern-card h4 {
  margin: 18px 0 8px;
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 500;
}

.pattern-card p {
  font-size: 0.84rem;
  line-height: 1.65;
  color: var(--muted);
}

.split-block {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: 58px;
  align-items: start;
  margin-bottom: 92px;
}

.check-list {
  list-style: none;
  border-top: 1px solid var(--line);
}

.check-list li {
  position: relative;
  padding: 14px 0 14px 24px;
  border-bottom: 1px solid var(--line);
  font-size: 0.9rem;
  line-height: 1.65;
  color: var(--muted);
}

.check-list li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 22px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--level-accent, var(--orange));
}

.check-list strong {
  color: currentColor;
}

.check-list--compact li {
  font-size: 0.84rem;
  padding-top: 10px;
  padding-bottom: 10px;
}

.check-list--compact li::before {
  top: 18px;
}

.plan-card,
.safety-card {
  background: var(--panel-strong);
  border: 1px solid var(--line);
  padding: 26px;
}

.plan-card .micro,
.safety-card .micro {
  color: var(--level-accent);
}

.plan-list {
  list-style: none;
  margin-top: 16px;
}

.plan-list li {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 10px;
  padding: 11px 0;
  border-top: 1px solid var(--line);
}

.plan-list span {
  font-family: var(--mono);
  font-size: 7.5px;
  letter-spacing: 0.05em;
  color: var(--level-accent);
  padding-top: 4px;
}

.plan-list p {
  font-size: 0.82rem;
  line-height: 1.6;
  color: var(--muted);
}

.level-finish {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 24px 0 0;
  border-top: 1px solid var(--line);
}

.level-finish .micro {
  display: block;
  margin-bottom: 6px;
  color: var(--level-accent);
}

.level-finish strong {
  font-family: var(--serif);
  font-size: 1.18rem;
  font-weight: 500;
  line-height: 1.35;
}

.complete-btn {
  flex-shrink: 0;
  padding: 13px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.complete-btn:hover {
  border-color: var(--level-accent);
  color: var(--level-accent);
}

.complete-btn.is-complete {
  background: var(--level-accent);
  border-color: var(--level-accent);
  color: var(--ink);
}


.stack-grid,
.split-block,
.feature-block,
.decision-card,
.capstone,
.self-check,
.table-wrap {
  min-width: 0;
}

.stack-card,
.stack-card > *,
.feature-block > *,
.split-block > *,
.code-block,
.code-block > *,
.feature-block--light,
.feature-block--light > * {
  min-width: 0;
  max-width: 100%;
}

.code-block {
  overflow: hidden;
}

.code-block pre {
  max-width: 100%;
}

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

.stack-card {
  padding: 26px;
  border: 1px solid var(--line);
  background: var(--panel);
}

.stack-card--wide {
  grid-column: span 2;
}

.stack-card .micro {
  color: var(--level-accent);
}

.stack-card h3 {
  margin: 12px 0 10px;
  font-family: var(--serif);
  font-size: 1.7rem;
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.02em;
}

.stack-card p {
  font-size: 0.88rem;
  line-height: 1.7;
  color: var(--muted);
}

.text-link {
  display: inline-block;
  margin-top: 18px;
  padding-bottom: 3px;
  border-bottom: 1px solid currentColor;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--link);
}

.code-block {
  margin-top: 20px;
  border: 1px solid rgba(244, 239, 230, 0.16);
  background: #090a10;
  color: #f4efe6;
}

.code-block--tall {
  margin-top: 0;
}

.code-block__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(244, 239, 230, 0.14);
  font-family: var(--mono);
  font-size: 7.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(244, 239, 230, 0.5);
}

.copy-code {
  padding: 4px 8px;
  border: 1px solid rgba(244, 239, 230, 0.24);
  border-radius: 4px;
  background: transparent;
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(244, 239, 230, 0.62);
}

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

.code-block pre {
  margin: 0;
  padding: 18px;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 11.5px;
  line-height: 1.75;
  color: #e8e2d8;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 650px;
}

.data-table th,
.data-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-size: 0.86rem;
  line-height: 1.55;
}

.data-table th {
  font-family: var(--mono);
  font-size: 7.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--level-accent);
  background: var(--panel-strong);
}

.data-table td {
  color: var(--muted);
}

.data-table td:first-child {
  color: currentColor;
  font-weight: 600;
}

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

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

.model-card {
  padding: 22px;
  background: var(--panel);
  transition: background 0.3s ease;
}

.model-card:hover {
  background: var(--panel-strong);
}

.model-card__size {
  font-family: var(--mono);
  font-size: 7.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--level-accent);
}

.model-card strong {
  display: block;
  margin: 9px 0 7px;
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 500;
}

.model-card p {
  font-size: 0.82rem;
  line-height: 1.6;
  color: var(--muted);
}

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

.agent-card {
  padding: 20px;
  background: var(--panel);
}

.agent-card__type {
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--level-accent);
}

.agent-card h4 {
  margin: 8px 0 6px;
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 500;
}

.agent-card p {
  font-size: 0.82rem;
  line-height: 1.6;
  color: var(--muted);
}

.agent-card a {
  display: inline-block;
  margin-top: 12px;
  font-family: var(--mono);
  font-size: 7.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--link);
}

.split-block--dark {
  padding: 38px;
  border: 1px solid var(--line);
  background: var(--panel);
}

.split-block--dark h3 {
  margin: 10px 0 14px;
  font-family: var(--serif);
  font-size: clamp(1.9rem, 3vw, 2.7rem);
  font-weight: 400;
  line-height: 1.05;
}

.split-block--dark > div > p:not(.micro) {
  max-width: 620px;
  font-size: 0.92rem;
  line-height: 1.75;
  color: var(--muted);
}

.agent-highlight-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 24px;
}

.agent-highlight {
  padding: 18px;
  border: 1px solid var(--line);
  background: rgba(244, 239, 230, 0.03);
}

.agent-highlight > span {
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--orange);
}

.agent-highlight strong {
  display: block;
  margin: 8px 0 6px;
  font-family: var(--serif);
  font-size: 1.1rem;
  font-weight: 500;
}

.agent-highlight p {
  font-size: 0.8rem;
  line-height: 1.6;
  color: var(--muted);
}

.repo-shortlist {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  border: 1px solid var(--line);
  background: var(--line);
}

.repo-shortlist a {
  padding: 16px;
  background: var(--panel);
  transition: background 0.25s ease;
}

.repo-shortlist a:hover {
  background: var(--panel-strong);
}

.repo-shortlist strong {
  display: block;
  font-family: var(--serif);
  font-size: 1rem;
  font-weight: 500;
}

.repo-shortlist span {
  display: block;
  margin-top: 3px;
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.decision-card {
  display: grid;
  grid-template-columns: 310px 1fr;
  gap: 32px;
  align-items: start;
  margin-bottom: 86px;
  padding: 32px;
  border: 1px solid var(--line);
  background: var(--panel);
}

.decision-card__head .micro {
  color: var(--level-accent);
}

.decision-card__head h3 {
  margin-top: 10px;
  font-family: var(--serif);
  font-size: 1.8rem;
  font-weight: 500;
  line-height: 1.08;
}

.decision-flow {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.decision-flow > div {
  padding: 16px;
  background: var(--paper-3);
}

.decision-flow span {
  font-family: var(--mono);
  font-size: 7.5px;
  color: var(--level-accent);
}

.decision-flow strong {
  display: block;
  margin: 8px 0 5px;
  font-family: var(--serif);
  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1.2;
}

.decision-flow p {
  font-size: 0.72rem;
  line-height: 1.5;
  color: var(--muted);
}

.roadmap-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.roadmap-card {
  padding: 22px;
  background: var(--panel);
}

.roadmap-card > span {
  font-family: var(--mono);
  font-size: 7.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--level-accent);
}

.roadmap-card h4 {
  margin: 8px 0 12px;
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 500;
}

.roadmap-card ul {
  list-style: none;
  border-top: 1px solid var(--line);
}

.roadmap-card li {
  padding: 7px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.78rem;
  line-height: 1.5;
  color: var(--muted);
}

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

.numbered-list {
  list-style: none;
  counter-reset: item;
  margin-top: 18px;
}

.numbered-list li {
  position: relative;
  padding: 11px 0 11px 32px;
  border-top: 1px solid var(--line);
  counter-increment: item;
  font-size: 0.86rem;
  line-height: 1.65;
  color: var(--muted);
}

.numbered-list li::before {
  content: counter(item, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 13px;
  font-family: var(--mono);
  font-size: 8px;
  color: var(--level-accent);
}

.numbered-list strong {
  color: currentColor;
}

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

.automation-card {
  padding: 22px;
  background: var(--panel);
}

.automation-card__tag {
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--level-accent);
}

.automation-card h4 {
  margin: 8px 0 7px;
  font-family: var(--serif);
  font-size: 1.22rem;
  font-weight: 500;
  line-height: 1.15;
}

.automation-card p {
  font-size: 0.82rem;
  line-height: 1.6;
  color: var(--muted);
}

.automation-card__stack {
  margin-top: 14px;
  padding-top: 11px;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 6.8px !important;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--level-accent) !important;
}

.callout {
  margin-top: 20px;
  padding: 18px 20px;
  border-left: 3px solid var(--orange);
  background: rgba(255, 107, 69, 0.06);
  font-size: 0.88rem;
  line-height: 1.65;
  color: var(--muted);
}

.callout strong {
  color: currentColor;
}

.edge-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.edge-grid > article {
  padding: 22px;
  background: var(--panel);
}

.edge-grid h4 {
  margin-bottom: 8px;
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 500;
}

.edge-grid p {
  font-size: 0.82rem;
  line-height: 1.6;
  color: var(--muted);
}

.research-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.live-dot {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 7.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.live-dot span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 0 3px rgba(15, 157, 120, 0.15);
}

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

.research-card {
  min-height: 210px;
  padding: 21px;
  background: var(--panel);
}

.research-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-family: var(--mono);
  font-size: 6.8px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--level-accent);
}

.research-card h4 {
  margin: 12px 0 8px;
  font-family: var(--serif);
  font-size: 1.12rem;
  font-weight: 500;
  line-height: 1.28;
}

.research-card p {
  font-size: 0.72rem;
  line-height: 1.55;
  color: var(--muted);
}

.research-card a {
  display: inline-block;
  margin-top: 14px;
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--link);
}

.loading-card {
  grid-column: 1 / -1;
  padding: 40px;
  text-align: center;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--panel);
}

.preprint-panel {
  margin-top: 24px;
  border: 1px solid var(--line);
  background: var(--panel);
}

.preprint-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}

.preprint-panel__head h4 {
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 500;
}

.preprint-panel__head a {
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--link);
}

.preprint-list {
  padding: 6px 20px;
}

.preprint-item {
  display: grid;
  grid-template-columns: 62px 1fr;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.preprint-item:last-child {
  border-bottom: 0;
}

.preprint-item span {
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.04em;
  color: var(--muted);
  padding-top: 3px;
}

.preprint-item a {
  font-family: var(--serif);
  font-size: 1rem;
  line-height: 1.35;
  color: currentColor;
}

.preprint-item a:hover {
  color: var(--level-accent);
}

.theme-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-top: 24px;
  background: var(--line);
  border: 1px solid var(--line);
}

.theme-grid article {
  padding: 20px;
  background: var(--panel);
}

.theme-grid span {
  font-family: var(--mono);
  font-size: 7.5px;
  color: var(--level-accent);
}

.theme-grid h4 {
  margin: 8px 0 7px;
  font-family: var(--serif);
  font-size: 1.1rem;
  font-weight: 500;
}

.theme-grid p {
  font-size: 0.78rem;
  line-height: 1.6;
  color: var(--muted);
}

.expert-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  margin-bottom: 80px;
}

.expert-card {
  min-height: 200px;
  padding: 25px;
  background: var(--panel);
}

.expert-card span {
  font-family: var(--mono);
  font-size: 8px;
  color: var(--level-accent);
}

.expert-card h3 {
  margin: 22px 0 9px;
  font-family: var(--serif);
  font-size: 1.45rem;
  font-weight: 500;
}

.expert-card p {
  font-size: 0.84rem;
  line-height: 1.65;
  color: var(--muted);
}

.capstone {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
  gap: 38px;
  align-items: start;
  padding: 38px;
  border: 1px solid var(--line);
  background: var(--panel);
  margin-bottom: 86px;
}

.capstone__copy .micro,
.expert-stack .micro {
  color: var(--level-accent);
}

.capstone__copy h3 {
  margin: 10px 0 14px;
  font-family: var(--serif);
  font-size: clamp(2rem, 3.4vw, 3rem);
  font-weight: 400;
  line-height: 1.04;
  letter-spacing: -0.035em;
}

.capstone__copy > p {
  font-size: 0.92rem;
  line-height: 1.75;
  color: var(--muted);
}

.expert-stack {
  border: 1px solid var(--line);
  padding: 24px;
  background: rgba(244, 239, 230, 0.03);
}

.expert-stack__row {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.expert-stack__row:last-child {
  border-bottom: 0;
}

.expert-stack__row strong {
  font-family: var(--mono);
  font-size: 7.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--paper);
}

.expert-stack__row span {
  font-size: 0.76rem;
  line-height: 1.5;
  color: var(--muted);
}

.reading-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  border: 1px solid var(--line);
  background: var(--line);
}

.reading-grid a {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 15px 18px;
  background: var(--panel);
  transition: background 0.25s ease;
}

.reading-grid a:hover {
  background: var(--panel-strong);
}

.reading-grid strong {
  font-family: var(--serif);
  font-size: 1.02rem;
  font-weight: 500;
}

.reading-grid span {
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.self-check {
  margin-top: 80px;
  padding: 34px;
  border: 1px solid var(--line);
  background: rgba(255, 107, 69, 0.045);
}

.self-check .micro {
  color: var(--level-accent);
}

.self-check h3 {
  margin: 10px 0 18px;
  font-family: var(--serif);
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  font-weight: 400;
  line-height: 1.06;
}

.self-check ol {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 30px;
  padding-left: 20px;
}

.self-check li {
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--muted);
}

.live {
  padding: 104px 0;
  background: var(--paper);
}

.live-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
  margin-bottom: 36px;
}

.live-head .micro {
  color: var(--orange);
}

.live-head h2 {
  margin: 10px 0 12px;
  font-family: var(--serif);
  font-size: clamp(2.6rem, 4.6vw, 4.4rem);
  font-weight: 400;
  line-height: 0.98;
  letter-spacing: -0.04em;
}

.live-head p {
  max-width: 660px;
  font-size: 0.94rem;
  line-height: 1.7;
  color: var(--muted);
}

.live-head__actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  flex-shrink: 0;
}

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

.repo-card {
  display: flex;
  flex-direction: column;
  min-height: 205px;
  padding: 20px;
  background: var(--paper-3);
  transition: background 0.3s ease;
}

.repo-card:hover {
  background: var(--paper-2);
}

.repo-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.repo-card__category {
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--orange);
}

.repo-card__stars {
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.repo-card h3 {
  margin: 11px 0 7px;
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 500;
  line-height: 1.1;
}

.repo-card p {
  font-size: 0.78rem;
  line-height: 1.55;
  color: var(--muted);
}

.repo-card__release {
  margin-top: 13px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 6.8px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.repo-card__release strong {
  color: var(--ink);
}

.repo-card__link {
  margin-top: auto;
  padding-top: 12px;
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--blue);
}

.trending-panel {
  margin-top: 28px;
  border: 1px solid var(--line);
  background: var(--paper-3);
}

.trending-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 17px 20px;
  border-bottom: 1px solid var(--line);
}

.trending-panel__head h3 {
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 500;
}

.trending-panel__head a {
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--blue);
}

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

.trending-item {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  min-width: 0;
  padding: 12px 20px;
  border-bottom: 1px solid var(--line);
}

.trending-item a {
  min-width: 0;
  flex: 1;
  overflow-wrap: anywhere;
}

.trending-item:nth-child(odd) {
  border-right: 1px solid var(--line);
}

.trending-item a {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--ink);
}

.trending-item span {
  font-family: var(--mono);
  font-size: 7px;
  color: var(--muted);
  white-space: nowrap;
}

.end-cta {
  padding: 96px 0;
  background: var(--ink);
  color: var(--paper);
  position: relative;
  overflow: hidden;
}

.end-cta::before {
  content: "";
  position: absolute;
  width: 600px;
  height: 600px;
  right: -200px;
  bottom: -300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 107, 69, 0.24), transparent 62%);
}

.end-cta__inner {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 50px;
}

.end-cta .micro {
  color: var(--orange);
}

.end-cta h2 {
  margin: 12px 0 16px;
  font-family: var(--serif);
  font-size: clamp(2.8rem, 5.5vw, 5.2rem);
  font-weight: 400;
  line-height: 0.94;
  letter-spacing: -0.045em;
}

.end-cta p {
  max-width: 560px;
  font-size: 0.94rem;
  line-height: 1.7;
  color: rgba(244, 239, 230, 0.58);
}

.end-cta__actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex-shrink: 0;
}

.footer {
  background: var(--ink);
  border-top: 1px solid rgba(244, 239, 230, 0.12);
  padding: 26px 0;
  color: var(--paper);
}

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  flex-wrap: wrap;
}

.footer__brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer__brand strong {
  display: block;
  font-family: var(--serif);
  font-size: 0.95rem;
  font-weight: 500;
}

.footer__brand span:not(.brand__mark) {
  display: block;
  margin-top: 2px;
  font-family: var(--mono);
  font-size: 6.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(244, 239, 230, 0.4);
}

.footer p {
  max-width: 520px;
  font-size: 0.7rem;
  line-height: 1.6;
  color: rgba(244, 239, 230, 0.4);
}

.footer a {
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(244, 239, 230, 0.4);
}

@media (max-width: 1100px) {
  .hero__inner {
    gap: 40px;
  }

  .level-head {
    grid-template-columns: 96px minmax(0, 1fr) 180px;
    gap: 28px;
  }

  .block-head {
    grid-template-columns: 46px minmax(0, 1fr) 300px;
    gap: 22px;
  }

  .decision-card {
    grid-template-columns: 260px 1fr;
    gap: 24px;
  }

  .decision-flow {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 960px) {
  .topnav {
    display: none;
  }

  .topbar__actions {
    margin-left: auto;
  }

  .hero {
    padding: 64px 0 60px;
  }

  .hero__inner {
    grid-template-columns: 1fr;
    gap: 42px;
  }

  .hero h1 {
    font-size: clamp(3.6rem, 8vw, 5.4rem);
  }

  .map-card {
    max-width: 560px;
  }

  .level {
    padding: 82px 0;
  }

  .level-head {
    grid-template-columns: 70px 1fr;
    gap: 22px;
    margin-bottom: 58px;
  }

  .level-head__aside {
    grid-column: 2;
    flex-direction: row;
    flex-wrap: wrap;
    padding-top: 0;
  }

  .level-head__index {
    font-size: 5.4rem;
  }

  .block-head {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .block-head p {
    max-width: 620px;
  }

  .block-num {
    padding-top: 0;
  }

  .feature-block {
    grid-template-columns: 1fr;
    padding: 30px;
  }

  .split-block {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .pattern-grid,
  .model-grid,
  .agent-grid,
  .automation-grid,
  .theme-grid,
  .research-grid,
  .ecosystem-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

  .stack-card--wide {
    grid-column: span 2;
  }

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

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

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

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

  .capstone {
    grid-template-columns: 1fr;
    padding: 28px;
  }

  .live-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }

  .live-head__actions {
    align-items: flex-start;
  }

  .end-cta__inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 30px;
  }

  .end-cta__actions {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .self-check ol {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 640px) {
  .container {
    width: min(calc(100% - 36px), var(--max));
  }

  .topbar__inner {
    width: min(calc(100% - 36px), var(--max));
    gap: 14px;
  }

  .brand__text small {
    display: none;
  }

  .topbar .btn--small {
    display: none;
  }

  .progress-chip {
    display: none;
  }

  .levelbar__inner {
    width: min(calc(100% - 36px), var(--max));
    gap: 20px;
  }

  .hero h1 {
    font-size: clamp(2.5rem, 12vw, 4rem);
  }

  .hero__lead {
    font-size: 0.96rem;
  }

  .hero__actions .btn {
    width: 100%;
  }

  .level-head {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .level-head__index {
    font-size: 4rem;
  }

  .level-head__aside {
    grid-column: auto;
  }

  .level-head__copy h2 {
    font-size: clamp(2.4rem, 10vw, 3.4rem);
  }

  .tool-grid,
  .pattern-grid,
  .model-grid,
  .agent-grid,
  .automation-grid,
  .theme-grid,
  .research-grid,
  .ecosystem-grid,
  .roadmap-grid,
  .stack-grid,
  .edge-grid,
  .expert-grid,
  .reading-grid {
    grid-template-columns: 1fr;
  }

  .stack-card--wide {
    grid-column: auto;
  }

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

  .feature-block,
  .split-block--dark,
  .decision-card,
  .capstone,
  .self-check {
    padding: 22px;
  }

  .feature-block--light {
    padding: 22px;
  }

  .agent-highlight-grid {
    grid-template-columns: 1fr;
  }

  .level-finish {
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
  }

  .complete-btn {
    width: 100%;
  }

  .research-toolbar {
    flex-wrap: wrap;
    justify-content: flex-start;
  }

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

  .trending-item:nth-child(odd) {
    border-right: 0;
  }

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

  .end-cta__actions {
    flex-direction: column;
    width: 100%;
  }

  .end-cta__actions .btn {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ==========================================================================
   2026 trilingual edition — capability-first additions
   ========================================================================== */

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border: 1px solid rgba(244, 239, 230, 0.16);
  border-radius: 999px;
  background: rgba(244, 239, 230, 0.04);
}

.lang-switch a {
  padding: 5px 7px;
  border-radius: 999px;
  color: rgba(244, 239, 230, 0.45);
  font-family: var(--mono);
  font-size: 7.5px;
  font-weight: 500;
  letter-spacing: 0.08em;
  line-height: 1;
}

.lang-switch a:hover {
  color: var(--paper);
}

.lang-switch a[aria-current="page"] {
  background: var(--orange);
  color: var(--ink);
}

.section-head {
  max-width: 900px;
  margin-bottom: 48px;
}

.section-head h2 {
  margin-top: 12px;
  font-family: var(--serif);
  font-size: clamp(2.7rem, 5vw, 4.9rem);
  font-weight: 400;
  line-height: 0.98;
  letter-spacing: -0.045em;
}

.section-head > p:last-child {
  max-width: 700px;
  margin-top: 18px;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.75;
}

.level--dark .section-head > p:last-child {
  color: rgba(244, 239, 230, 0.6);
}

.level--stack,
.level--lab,
.level--knowledge,
.level--atlas,
.level--frontier,
.level--sources {
  --level-accent: var(--orange);
}

.level--stack {
  background: radial-gradient(circle at 90% 10%, rgba(255, 107, 69, 0.13), transparent 32%), #101018;
  border-top: 1px solid rgba(244, 239, 230, 0.12);
}

.stack-layers {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid rgba(244, 239, 230, 0.14);
  border-left: 1px solid rgba(244, 239, 230, 0.14);
}

.stack-layer {
  min-height: 250px;
  padding: 24px 22px;
  border-right: 1px solid rgba(244, 239, 230, 0.14);
  border-bottom: 1px solid rgba(244, 239, 230, 0.14);
  background: rgba(244, 239, 230, 0.025);
}

.stack-layer__num {
  display: block;
  margin-bottom: 38px;
  color: var(--orange);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.12em;
}

.stack-layer h3 {
  margin-bottom: 10px;
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 450;
  line-height: 1.1;
  letter-spacing: -0.025em;
}

.stack-layer p {
  color: rgba(244, 239, 230, 0.6);
  font-size: 0.82rem;
  line-height: 1.6;
}

.stack-layer small {
  display: block;
  margin-top: 18px;
  color: rgba(244, 239, 230, 0.38);
  font-family: var(--mono);
  font-size: 7.5px;
  line-height: 1.6;
  letter-spacing: 0.04em;
}

.changes-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  margin-top: 40px;
  padding: 28px;
  border: 1px solid rgba(244, 239, 230, 0.12);
  background: rgba(244, 239, 230, 0.025);
}

.changes-grid .check-list li {
  color: rgba(244, 239, 230, 0.68);
  font-size: 0.88rem;
}

.changes-grid .check-list li::before {
  color: var(--orange);
}

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

.cap-card {
  display: flex;
  flex-direction: column;
  min-height: 190px;
  padding: 22px;
  border: 1px solid rgba(20, 20, 31, 0.12);
  border-radius: 14px;
  background: var(--paper-3);
  transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.cap-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 107, 69, 0.42);
  background: #fff;
}

.level--dark .cap-card {
  border-color: rgba(244, 239, 230, 0.13);
  background: rgba(244, 239, 230, 0.035);
}

.level--dark .cap-card:hover {
  border-color: rgba(255, 107, 69, 0.6);
  background: rgba(255, 107, 69, 0.07);
}

.cap-card__tag {
  margin-bottom: 16px;
  color: var(--orange);
  font-family: var(--mono);
  font-size: 7.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.cap-card h4 {
  margin-bottom: 8px;
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 450;
  line-height: 1.12;
  letter-spacing: -0.02em;
}

.cap-card p {
  color: var(--muted);
  font-size: 0.83rem;
  line-height: 1.6;
}

.level--dark .cap-card p {
  color: rgba(244, 239, 230, 0.6);
}

.cap-card .cap-card__learn {
  margin-top: auto;
  padding-top: 16px;
  color: var(--ink);
  font-size: 0.78rem;
}

.level--dark .cap-card .cap-card__learn {
  color: rgba(244, 239, 230, 0.8);
}

.cap-card .cap-card__learn strong {
  color: var(--orange);
  font-family: var(--mono);
  font-size: 7px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.cap-card small {
  display: block;
  margin-top: 12px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 7px;
  line-height: 1.55;
  letter-spacing: 0.02em;
}

.level--dark .cap-card small {
  color: rgba(244, 239, 230, 0.35);
}

.cap-grid--atlas {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.atlas-note,
.sources-note {
  margin-top: 24px;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.7;
}

.level--dark .atlas-note {
  color: rgba(244, 239, 230, 0.42);
}

.module-lead,
.module-text {
  max-width: 820px;
  margin-top: 14px;
  color: var(--ink);
  font-size: 0.96rem;
  line-height: 1.75;
}

.level--dark .module-lead,
.level--dark .module-text {
  color: rgba(244, 239, 230, 0.7);
}

.step-list {
  list-style: none;
  display: grid;
  gap: 0;
  margin-top: 26px;
  border-top: 1px solid rgba(20, 20, 31, 0.12);
}

.level--dark .step-list {
  border-color: rgba(244, 239, 230, 0.12);
}

.step-list li {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 18px;
  padding: 20px 0;
  border-bottom: 1px solid rgba(20, 20, 31, 0.12);
}

.level--dark .step-list li {
  border-color: rgba(244, 239, 230, 0.12);
}

.step-list li > span {
  color: var(--orange);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  padding-top: 4px;
}

.step-list h4 {
  margin-bottom: 4px;
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 450;
  line-height: 1.2;
  letter-spacing: -0.015em;
}

.step-list p {
  max-width: 760px;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.65;
}

.level--dark .step-list p {
  color: rgba(244, 239, 230, 0.58);
}

.skill-file,
.skill-canvas {
  margin-top: 24px;
  border: 1px solid rgba(244, 239, 230, 0.16);
  border-radius: 12px;
  background: #101018;
  color: var(--paper);
  overflow: hidden;
}

.skill-file__top,
.skill-canvas__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 18px;
  border-bottom: 1px solid rgba(244, 239, 230, 0.12);
  color: rgba(244, 239, 230, 0.45);
  font-family: var(--mono);
  font-size: 7.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.skill-file pre {
  margin: 0;
  padding: 22px 18px;
  overflow-x: auto;
  color: #ffb59f;
  font-family: var(--mono);
  font-size: 0.78rem;
  line-height: 1.7;
}

.skill-canvas {
  border-color: rgba(20, 20, 31, 0.12);
  background: var(--paper-3);
  color: var(--ink);
}

.skill-canvas__top {
  border-color: rgba(20, 20, 31, 0.12);
  color: var(--muted);
}

.skill-canvas .data-table {
  margin: 0;
}

.lab-download {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  margin-top: 48px;
  padding: 28px;
  border: 1px solid rgba(255, 107, 69, 0.3);
  border-radius: 14px;
  background: rgba(255, 107, 69, 0.06);
}

.lab-download h3 {
  margin: 8px 0 6px;
  font-family: var(--serif);
  font-size: 1.6rem;
  font-weight: 450;
  letter-spacing: -0.025em;
}

.lab-download p:last-child {
  max-width: 700px;
  color: var(--muted);
  font-size: 0.86rem;
}

.level--lab {
  background: radial-gradient(circle at 92% 5%, rgba(255, 107, 69, 0.09), transparent 28%), var(--paper);
}

.provenance-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 24px;
}

.provenance-card {
  padding: 20px;
  border: 1px solid rgba(244, 239, 230, 0.13);
  border-radius: 12px;
  background: rgba(244, 239, 230, 0.035);
}

.provenance-card h4 {
  margin-bottom: 8px;
  font-family: var(--serif);
  font-size: 1.1rem;
  font-weight: 450;
}

.provenance-card p {
  color: rgba(244, 239, 230, 0.6);
  font-size: 0.82rem;
  line-height: 1.6;
}

.provenance-card small {
  display: block;
  margin-top: 12px;
  color: rgba(244, 239, 230, 0.35);
  font-family: var(--mono);
  font-size: 7px;
  line-height: 1.6;
}

.frontier-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  border-top: 1px solid rgba(20, 20, 31, 0.12);
  border-left: 1px solid rgba(20, 20, 31, 0.12);
}

.frontier-card {
  padding: 24px;
  border-right: 1px solid rgba(20, 20, 31, 0.12);
  border-bottom: 1px solid rgba(20, 20, 31, 0.12);
}

.frontier-card > span {
  display: block;
  margin-bottom: 22px;
  color: var(--orange);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.1em;
}

.frontier-card h3 {
  margin-bottom: 8px;
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 450;
  line-height: 1.1;
}

.frontier-card p {
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.65;
}

.frontier-card small {
  display: block;
  margin-top: 14px;
  color: var(--orange);
  font-family: var(--mono);
  font-size: 7px;
  line-height: 1.55;
  letter-spacing: 0.05em;
}

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

.source-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 170px;
  padding: 20px;
  border: 1px solid rgba(20, 20, 31, 0.12);
  border-radius: 12px;
  background: var(--paper-3);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.source-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 107, 69, 0.4);
}

.source-card span {
  margin-bottom: 18px;
  color: var(--orange);
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.source-card strong {
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 450;
  line-height: 1.15;
}

.source-card p {
  margin-top: 7px;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.55;
}

.source-card i {
  position: absolute;
  top: 18px;
  right: 18px;
  color: var(--orange);
  font-style: normal;
  font-size: 0.9rem;
}

.faq-list {
  max-width: 900px;
  margin-top: 58px;
}

.faq-list h3 {
  margin-bottom: 14px;
  font-family: var(--serif);
  font-size: 2rem;
  font-weight: 450;
  letter-spacing: -0.03em;
}

.faq-list details {
  border-top: 1px solid rgba(20, 20, 31, 0.12);
}

.faq-list details:last-child {
  border-bottom: 1px solid rgba(20, 20, 31, 0.12);
}

.faq-list summary {
  padding: 17px 0;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 600;
  list-style: none;
}

.faq-list summary::-webkit-details-marker {
  display: none;
}

.faq-list summary::after {
  content: "+";
  float: right;
  color: var(--orange);
  font-family: var(--mono);
  font-weight: 400;
}

.faq-list details[open] summary::after {
  content: "−";
}

.faq-list details p {
  max-width: 760px;
  padding: 0 0 20px;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.7;
}

.footer__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 18px;
}

.footer__links a {
  color: rgba(244, 239, 230, 0.55);
  font-family: var(--mono);
  font-size: 7.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.footer__links a:hover {
  color: var(--orange);
}

.module-download {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 18px;
}

/* Arabic typography and RTL layout */
html[lang="ar"] body {
  font-family: "IBM Plex Sans Arabic", "Geeza Pro", Tahoma, sans-serif;
  line-height: 1.8;
}

html[lang="ar"] h1,
html[lang="ar"] h2,
html[lang="ar"] h3,
html[lang="ar"] h4,
html[lang="ar"] .section-head h2,
html[lang="ar"] .level-head__copy h2,
html[lang="ar"] .block-head h3,
html[lang="ar"] .cap-card h4,
html[lang="ar"] .step-list h4,
html[lang="ar"] .frontier-card h3,
html[lang="ar"] .source-card strong,
html[lang="ar"] .stack-layer h3 {
  font-family: "Noto Naskh Arabic", "Traditional Arabic", serif;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.35;
}

html[lang="ar"] .micro,
html[lang="ar"] .fine,
html[lang="ar"] .nav,
html[lang="ar"] .topnav a,
html[lang="ar"] .btn,
html[lang="ar"] .level-tag,
html[lang="ar"] .brand__text small,
html[lang="ar"] .cap-card__tag,
html[lang="ar"] .stack-layer small,
html[lang="ar"] .source-card span,
html[lang="ar"] .faq-list summary::after,
html[lang="ar"] .footer__links a {
  font-family: "IBM Plex Sans Arabic", Tahoma, sans-serif;
  letter-spacing: 0;
  text-transform: none;
}

html[lang="ar"] .brand__text strong {
  font-family: "IBM Plex Sans Arabic", Tahoma, sans-serif;
}

html[lang="ar"] .hero h1,
html[lang="ar"] .section-head h2,
html[lang="ar"] .level-head__copy h2 {
  font-size: clamp(2.6rem, 5.2vw, 5rem);
}

html[lang="ar"] .hero h1 {
  line-height: 1.2;
}

html[lang="ar"] .hero__copy,
html[lang="ar"] .level-head__copy,
html[lang="ar"] .block-head,
html[lang="ar"] .section-head {
  text-align: right;
}

html[lang="ar"] .map-list i {
  transform: scaleX(-1);
}

html[lang="ar"] .topnav {
  margin-left: 0;
  margin-right: auto;
}

html[lang="ar"] .topbar__actions {
  direction: ltr;
}

html[lang="ar"] .lang-switch {
  direction: ltr;
}

html[lang="ar"] .code-block,
html[lang="ar"] pre {
  direction: ltr;
  text-align: left;
}

html[lang="ar"] .source-card i {
  right: auto;
  left: 18px;
}

html[lang="ar"] .faq-list summary::after {
  float: left;
}

html[lang="ar"] .levelbar__inner {
  direction: rtl;
}

html[lang="ar"] .step-list li > span,
html[lang="ar"] .frontier-card > span,
html[lang="ar"] .stack-layer__num {
  direction: ltr;
  text-align: right;
}

@media (max-width: 1100px) {
  .stack-layers {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (max-width: 960px) {
  .section-head {
    margin-bottom: 34px;
  }

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

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

  .lab-download {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 640px) {
  .lang-switch {
    gap: 0;
  }

  .lang-switch a {
    padding: 5px 5px;
    font-size: 7px;
  }

  .stack-layers,
  .cap-grid,
  .cap-grid--atlas,
  .sources-grid,
  .provenance-grid,
  .frontier-grid {
    grid-template-columns: 1fr;
  }

  .stack-layer {
    min-height: 0;
  }

  .stack-layer__num {
    margin-bottom: 18px;
  }

  .section-head h2 {
    font-size: clamp(2.3rem, 9vw, 3.4rem);
  }

  .cap-card,
  .source-card {
    min-height: 0;
  }

  .step-list li {
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 12px;
  }

  .skill-file pre {
    font-size: 0.7rem;
  }
}

.repo-card__example {
  display: block;
  margin-top: 10px;
  color: rgba(20, 20, 31, 0.48);
  font-family: var(--mono);
  font-size: 7px;
  line-height: 1.5;
  letter-spacing: 0.04em;
}

@media (max-width: 360px) {
  .progress-chip {
    display: none;
  }

  .lang-switch a {
    padding: 4px;
    font-size: 6.5px;
  }

  html[lang="ar"] .brand__text strong {
    font-size: 13px;
  }

  html[lang="ar"] .brand {
    gap: 8px;
  }
}

html[dir="rtl"] .check-list li {
  padding-left: 0;
  padding-right: 24px;
  text-align: right;
}

html[dir="rtl"] .check-list li::before {
  left: auto;
  right: 2px;
}

html[dir="rtl"] .changes-grid .check-list li,
html[dir="rtl"] .level--dark .check-list li {
  padding-left: 0;
  padding-right: 24px;
}

html[dir="rtl"] .prompt-card p,
html[dir="rtl"] .quote-text {
  text-align: right;
}

@media (min-width: 641px) {
  html[dir="rtl"] .block-head {
    grid-template-columns: 58px minmax(0, 1fr);
  }

  html[dir="rtl"] .block-head > p:empty {
    display: none;
  }
}

html[dir="rtl"] .skip-link {
  left: auto;
  right: 10px;
}
