/* Homepage learning journey — the curriculum rendered as a playable map. */

.journey-home {
  --journey-bg: #f7f8ff;
  --journey-surface: #ffffff;
  --journey-surface-soft: #eef1ff;
  --journey-ink: #161a32;
  --journey-muted: #626985;
  --journey-blue: #3553ff;
  --journey-blue-dark: #263dd1;
  --journey-blue-soft: #e6eaff;
  --journey-coral: #f35d50;
  --journey-yellow: #ffd45a;
  --journey-mint: #2caa8b;
  --journey-violet: #7657d8;
  --journey-line: #cfd5f3;
  --journey-border: #dfe3f5;
  --journey-shadow: 0 18px 45px rgba(47, 57, 110, 0.12);
  --journey-font: 'Manrope', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--journey-bg);
  background-image: none;
  color: var(--journey-ink);
  font-family: var(--journey-font);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: clip;
}

.journey-home[data-theme="dark"],
[data-theme="dark"] .journey-home {
  --journey-bg: #0f1328;
  --journey-surface: #191f3c;
  --journey-surface-soft: #22294c;
  --journey-ink: #f5f6ff;
  --journey-muted: #b7bdd8;
  --journey-blue: #8298ff;
  --journey-blue-dark: #a8b7ff;
  --journey-blue-soft: #293460;
  --journey-coral: #ff8176;
  --journey-yellow: #ffdc76;
  --journey-mint: #5cd8b8;
  --journey-violet: #a98df7;
  --journey-line: #3c466f;
  --journey-border: #30395e;
  --journey-shadow: 0 22px 50px rgba(0, 0, 0, 0.26);
}

.journey-home h1,
.journey-home h2,
.journey-home h3,
.journey-home h4,
.journey-home p,
.journey-home button,
.journey-home a {
  font-family: var(--journey-font);
}

.journey-home h1,
.journey-home h2,
.journey-home h3,
.journey-home h4 {
  color: var(--journey-ink);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.08;
  text-transform: none;
  text-wrap: balance;
}

.journey-home p {
  color: var(--journey-muted);
  font-family: var(--journey-font);
  text-wrap: pretty;
}

.journey-home a {
  color: inherit;
}

.journey-home a:hover {
  border-bottom-color: transparent;
}

.journey-home .container {
  max-width: 1180px;
}

.journey-home .site-header {
  background: color-mix(in srgb, var(--journey-bg) 88%, transparent);
  border-color: color-mix(in srgb, var(--journey-border) 82%, transparent);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.journey-home .header-inner {
  height: 72px;
}

.journey-home .logo {
  align-items: center;
  color: var(--journey-ink);
  font-family: var(--journey-font);
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0.035em;
}

.logo-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: var(--journey-blue);
  box-shadow: 0 5px 0 var(--journey-blue-dark);
  color: #ffffff;
  font-size: 0.9rem;
  transform: translateY(-2px);
}

.logo-copy {
  white-space: nowrap;
}

.journey-home .header-nav {
  gap: 24px;
}

.journey-home .header-nav > a:not(.header-github) {
  color: var(--journey-muted);
  font-family: var(--journey-font);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
}

.journey-home .header-nav > a:not(.header-github):hover {
  color: var(--journey-blue);
}

.journey-home .header-github {
  min-height: 38px;
  padding: 7px 12px;
  border: 1px solid var(--journey-border);
  border-radius: 12px;
  background: var(--journey-surface);
  color: var(--journey-ink);
  font-family: var(--journey-font);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: none;
  box-shadow: 0 3px 0 var(--journey-border);
}

.journey-home .header-github:hover {
  border: 1px solid var(--journey-blue);
  color: var(--journey-blue);
  transform: translateY(-1px);
  box-shadow: 0 4px 0 var(--journey-line);
}

.journey-home .search-toggle,
.journey-home .theme-toggle {
  width: 38px;
  height: 38px;
  border: 1px solid var(--journey-border);
  border-radius: 12px;
  background: var(--journey-surface);
  color: var(--journey-ink);
}

.journey-home .search-toggle:hover,
.journey-home .theme-toggle:hover {
  border-color: var(--journey-blue);
  color: var(--journey-blue);
}

.journey-home :where(a, button):focus-visible {
  outline: 3px solid var(--journey-yellow);
  outline-offset: 3px;
}

.journey-hero {
  position: relative;
  min-height: 710px;
  padding: 162px 0 96px;
  background:
    radial-gradient(circle at 82% 25%, color-mix(in srgb, var(--journey-yellow) 24%, transparent) 0 90px, transparent 91px),
    radial-gradient(circle at 12% 82%, color-mix(in srgb, var(--journey-mint) 15%, transparent) 0 130px, transparent 131px),
    var(--journey-bg);
  overflow: hidden;
}

.journey-hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--journey-border);
}

.journey-hero__scene {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.orbit {
  position: absolute;
  display: block;
  border: 1px solid color-mix(in srgb, var(--journey-blue) 16%, transparent);
  border-radius: 50%;
}

.orbit--one {
  width: 360px;
  height: 360px;
  top: 96px;
  right: -140px;
}

.orbit--two {
  width: 190px;
  height: 190px;
  right: 135px;
  bottom: 28px;
}

.pixel-star {
  position: absolute;
  color: var(--journey-blue);
  font-family: var(--journey-font);
  line-height: 1;
}

.pixel-star--one { top: 138px; left: 8%; font-size: 1.4rem; }
.pixel-star--two { top: 41%; right: 8%; color: var(--journey-coral); font-size: 1.1rem; }
.pixel-star--three { bottom: 10%; left: 47%; color: var(--journey-violet); font-size: 3rem; }

.journey-hero__layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(340px, 0.72fr);
  align-items: center;
  gap: 84px;
}

.hero-chip {
  width: max-content;
  max-width: 100%;
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 26px;
  padding: 8px 12px;
  border: 1px solid var(--journey-border);
  border-radius: 999px;
  background: var(--journey-surface);
  color: var(--journey-muted);
  font-size: 0.76rem;
  font-weight: 700;
  box-shadow: 0 5px 15px rgba(57, 66, 120, 0.06);
}

.hero-chip__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--journey-mint);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--journey-mint) 16%, transparent);
}

.journey-hero h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(3.6rem, 7vw, 5.8rem);
  line-height: 0.98;
  letter-spacing: -0.04em;
}

.journey-hero h1 span {
  color: var(--journey-blue);
}

.journey-hero__lead {
  max-width: 620px;
  margin-top: 28px;
  font-size: 1.08rem;
  line-height: 1.72;
}

.journey-hero__actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.journey-button {
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 18px;
  border: 1px solid transparent;
  border-radius: 15px;
  font-size: 0.88rem;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
  transition: transform 180ms cubic-bezier(0.22, 1, 0.36, 1), box-shadow 180ms cubic-bezier(0.22, 1, 0.36, 1), background 180ms;
}

.journey-button--primary {
  background: var(--journey-blue);
  box-shadow: 0 6px 0 var(--journey-blue-dark);
  color: #ffffff !important;
  transform: translateY(-3px);
}

.journey-button--primary:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 0 var(--journey-blue-dark);
}

.journey-button--primary:active {
  transform: translateY(0);
  box-shadow: 0 2px 0 var(--journey-blue-dark);
}

.journey-button--ghost {
  border-color: var(--journey-border);
  background: var(--journey-surface);
  color: var(--journey-ink) !important;
}

.journey-button--ghost:hover {
  border-color: var(--journey-blue);
  color: var(--journey-blue) !important;
}

.hero-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 9px 22px;
  margin: 30px 0 0;
  padding: 0;
  color: var(--journey-muted);
  font-size: 0.78rem;
  list-style: none;
}

.hero-facts li {
  display: flex;
  align-items: baseline;
  gap: 5px;
}

.hero-facts strong {
  color: var(--journey-ink);
  font-size: 0.95rem;
  font-variant-numeric: tabular-nums;
}

.next-stop {
  position: relative;
  padding: 22px;
  border: 1px solid var(--journey-border);
  border-radius: 26px;
  background: var(--journey-surface);
  box-shadow: var(--journey-shadow), 0 8px 0 var(--journey-line);
  transform: rotate(1.2deg);
}

.next-stop::before {
  content: "";
  position: absolute;
  width: 50px;
  height: 12px;
  top: -7px;
  left: calc(50% - 25px);
  border-radius: 4px;
  background: color-mix(in srgb, var(--journey-yellow) 78%, transparent);
  transform: rotate(-2deg);
}

.next-stop__topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--journey-border);
  color: var(--journey-ink);
  font-size: 0.78rem;
  font-weight: 800;
}

.next-stop__saved {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--journey-muted);
  font-size: 0.68rem;
  font-weight: 600;
}

.next-stop__body {
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr);
  align-items: center;
  gap: 20px;
  padding: 24px 0 20px;
}

.progress-orb {
  width: 112px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(var(--journey-blue) var(--journey-progress), var(--journey-blue-soft) 0);
  transform: rotate(-3deg);
}

.progress-orb__inner {
  width: 82px;
  aspect-ratio: 1;
  display: grid;
  align-content: center;
  justify-items: center;
  border-radius: 50%;
  background: var(--journey-surface);
  box-shadow: inset 0 0 0 1px var(--journey-border);
  transform: rotate(3deg);
}

.progress-orb__inner strong {
  color: var(--journey-ink);
  font-size: 1.75rem;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.progress-orb__inner span {
  margin-top: 3px;
  color: var(--journey-muted);
  font-size: 0.65rem;
  font-weight: 700;
}

.next-stop__phase {
  display: block;
  margin-bottom: 7px;
  color: var(--journey-coral);
  font-size: 0.72rem;
  font-weight: 800;
}

.next-stop h2 {
  margin: 0;
  font-size: 1.32rem;
  line-height: 1.18;
}

.next-stop__copy p {
  margin-top: 8px;
  font-size: 0.78rem;
  line-height: 1.55;
}

.next-stop__action {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border: 0;
  border-radius: 13px;
  background: var(--journey-surface-soft);
  color: var(--journey-blue);
  cursor: pointer;
  font-size: 0.76rem;
  font-weight: 800;
  transition: background 160ms, transform 160ms;
}

.next-stop__action:hover {
  background: var(--journey-blue-soft);
  transform: translateY(-1px);
}

.journey-overview {
  display: grid;
  grid-template-columns: 0.72fr 1.45fr;
  align-items: center;
  gap: 72px;
  padding-top: 84px !important;
  padding-bottom: 84px !important;
}

.overview-statement h2 {
  margin: 0;
  font-size: 2.25rem;
  line-height: 1.18;
}

.overview-loop {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.overview-loop > div {
  min-width: 0;
}

.overview-loop span {
  display: block;
  margin-bottom: 7px;
  color: var(--journey-blue);
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.68rem;
  font-weight: 700;
}

.overview-loop strong,
.overview-loop small {
  display: block;
}

.overview-loop strong {
  color: var(--journey-ink);
  font-size: 0.88rem;
}

.overview-loop small {
  margin-top: 3px;
  color: var(--journey-muted);
  font-size: 0.68rem;
  line-height: 1.4;
}

.overview-loop i {
  color: var(--journey-line);
  font-style: normal;
  font-size: 1.2rem;
}

.map-section {
  position: relative;
  padding: 96px 0 110px;
  background:
    linear-gradient(var(--journey-border) 1px, transparent 1px),
    linear-gradient(90deg, var(--journey-border) 1px, transparent 1px),
    var(--journey-surface-soft);
  background-size: 40px 40px;
  border-top: 1px solid var(--journey-border);
  border-bottom: 1px solid var(--journey-border);
}

.map-section__heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 64px;
}

.map-section__heading > div:first-child {
  max-width: 650px;
}

.map-section__label {
  margin-bottom: 13px;
  color: var(--journey-blue) !important;
  font-size: 0.8rem;
  font-weight: 800;
}

.map-section__heading h2 {
  margin: 0;
  font-size: clamp(2.55rem, 5vw, 4.25rem);
  line-height: 1.02;
}

.map-section__heading > div:first-child > p:last-child {
  max-width: 580px;
  margin-top: 22px;
  font-size: 0.94rem;
}

.map-controls {
  min-width: 280px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 18px;
}

.map-locate {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 9px 13px;
  border: 1px solid var(--journey-border);
  border-radius: 13px;
  background: var(--journey-surface);
  color: var(--journey-blue);
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 800;
  box-shadow: 0 4px 0 var(--journey-line);
}

.map-locate:hover {
  transform: translateY(-1px);
  box-shadow: 0 5px 0 var(--journey-line);
}

.map-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px;
  color: var(--journey-muted);
  font-size: 0.68rem;
  font-weight: 700;
}

.map-legend span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.legend-dot {
  width: 10px;
  height: 10px;
  display: inline-block;
  border: 2px solid var(--journey-line);
  border-radius: 50%;
  background: var(--journey-surface);
}

.legend-dot--done {
  border-color: var(--journey-blue);
  background: var(--journey-blue);
}

.legend-dot--current {
  border-color: var(--journey-coral);
  background: var(--journey-coral);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--journey-coral) 18%, transparent);
}

.translation-status {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  margin-top: 46px !important;
  padding-top: 16px !important;
  padding-bottom: 16px !important;
  border: 1px solid color-mix(in srgb, var(--journey-yellow) 62%, var(--journey-border));
  border-radius: 18px;
  background: color-mix(in srgb, var(--journey-yellow) 13%, var(--journey-surface));
}

.translation-status__icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--journey-yellow);
  color: #483606;
  font-size: 0.95rem;
  font-weight: 800;
}

.translation-status strong {
  display: block;
  color: var(--journey-ink);
  font-size: 0.8rem;
}

.translation-status p {
  margin: 3px 0 0;
  font-size: 0.72rem;
  line-height: 1.5;
}

.translation-status a {
  color: var(--journey-blue);
  font-size: 0.73rem;
  font-weight: 800;
  white-space: nowrap;
}

.translation-status a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.journey-map-shell {
  position: relative;
  min-height: 3400px;
  margin-top: 58px !important;
  padding-top: 68px !important;
  padding-bottom: 68px !important;
  border: 1px solid var(--journey-border);
  border-radius: 44px;
  background: color-mix(in srgb, var(--journey-surface) 90%, transparent);
  box-shadow: 0 22px 60px rgba(54, 66, 130, 0.1);
  overflow: hidden;
  isolation: isolate;
}

.journey-path {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  border: 0;
}

.journey-stop {
  position: relative;
  height: 160px;
}

.journey-stop__content {
  position: absolute;
  top: 20px;
  left: var(--lane-x);
  width: 270px;
  display: flex;
  align-items: center;
  gap: 15px;
  transform: translateX(-45px);
}

.journey-stop--right .journey-stop__content,
.journey-stop--far-right .journey-stop__content {
  flex-direction: row-reverse;
  transform: translateX(-225px);
  text-align: right;
}

.journey-stop--left { --lane-x: 25%; }
.journey-stop--far-left { --lane-x: 17%; }
.journey-stop--center { --lane-x: 50%; }
.journey-stop--right { --lane-x: 75%; }
.journey-stop--far-right { --lane-x: 83%; }

.toc-row.journey-node {
  position: relative;
  width: 88px;
  height: 88px;
  flex: 0 0 88px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 4px solid var(--journey-blue);
  border-radius: 50%;
  background: var(--journey-surface);
  color: var(--journey-blue);
  cursor: pointer;
  box-shadow: 0 7px 0 var(--journey-line), 0 12px 22px rgba(51, 64, 133, 0.13);
  transition: transform 190ms cubic-bezier(0.22, 1, 0.36, 1), box-shadow 190ms cubic-bezier(0.22, 1, 0.36, 1), border-color 190ms, background 190ms;
}

.toc-row.journey-node:hover {
  background: var(--journey-surface);
  transform: translateY(-5px) scale(1.035);
  box-shadow: 0 11px 0 var(--journey-line), 0 18px 30px rgba(51, 64, 133, 0.18);
}

.journey-node__number {
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.journey-node__check {
  display: none;
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1;
}

.journey-node--done {
  border-color: var(--journey-blue) !important;
  background: var(--journey-blue) !important;
  color: #ffffff !important;
  box-shadow: 0 7px 0 var(--journey-blue-dark), 0 12px 22px rgba(53, 83, 255, 0.2) !important;
}

.journey-node--done .journey-node__number {
  display: none;
}

.journey-node--done .journey-node__check {
  display: block;
}

.journey-node--current {
  border-color: #be3d34 !important;
  background: var(--journey-coral) !important;
  color: #ffffff !important;
  box-shadow: 0 7px 0 #b53d35, 0 0 0 9px color-mix(in srgb, var(--journey-coral) 17%, transparent), 0 20px 32px rgba(192, 65, 54, 0.24) !important;
}

.journey-node--current::before {
  content: attr(data-next-label);
  position: absolute;
  top: -25px;
  left: 50%;
  padding: 4px 8px;
  border-radius: 7px;
  background: var(--journey-yellow);
  color: #463405;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.55rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  white-space: nowrap;
  transform: translateX(-50%);
}

.journey-node--current::after {
  content: "";
  position: absolute;
  top: -5px;
  left: 50%;
  width: 8px;
  height: 8px;
  background: var(--journey-yellow);
  transform: translateX(-50%) rotate(45deg);
}

.journey-node--planned {
  border-color: var(--journey-line) !important;
  border-style: dashed !important;
  color: var(--journey-muted) !important;
  box-shadow: 0 6px 0 var(--journey-border) !important;
}

.journey-stop__label {
  min-width: 0;
}

.journey-stop__label .toc-num {
  display: block;
  margin-bottom: 4px;
  color: var(--journey-blue);
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.61rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.journey-stop__label .toc-name {
  display: block;
  color: var(--journey-ink);
  font-size: 0.91rem;
  font-weight: 800;
  letter-spacing: -0.015em;
  line-height: 1.25;
}

.journey-stop__label .toc-meta {
  display: block;
  margin-top: 5px;
  color: var(--journey-muted);
  font-size: 0.64rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.journey-stop--current .journey-stop__label .toc-num {
  color: var(--journey-coral);
}

.journey-rail {
  position: absolute;
  z-index: 2;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.journey-rail path {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.journey-rail__track {
  stroke: var(--journey-line);
  stroke-width: 9;
  stroke-dasharray: 3 18;
}

.journey-rail__progress {
  stroke: var(--journey-blue);
  stroke-width: 9;
  stroke-dasharray: 3 18;
}

.map-world {
  position: absolute;
  z-index: 1;
  display: block;
  border-radius: 48% 52% 58% 42% / 52% 42% 58% 48%;
  opacity: 0.72;
  pointer-events: none;
}

.map-world::after {
  position: absolute;
  color: var(--journey-muted);
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.map-world--math {
  width: 440px;
  height: 480px;
  top: 100px;
  left: -120px;
  background: color-mix(in srgb, var(--journey-yellow) 18%, transparent);
  transform: rotate(8deg);
}

.map-world--math::after {
  content: "FOUNDATIONS";
  top: 70px;
  right: 50px;
}

.map-world--models {
  width: 520px;
  height: 620px;
  top: 840px;
  right: -155px;
  background: color-mix(in srgb, var(--journey-mint) 14%, transparent);
  transform: rotate(-7deg);
}

.map-world--models::after {
  content: "MODELS";
  top: 90px;
  left: 70px;
}

.map-world--systems {
  width: 530px;
  height: 650px;
  top: 1760px;
  left: -190px;
  background: color-mix(in srgb, var(--journey-blue) 11%, transparent);
  transform: rotate(10deg);
}

.map-world--systems::after {
  content: "SYSTEMS";
  top: 110px;
  right: 70px;
}

.map-world--agents {
  width: 520px;
  height: 680px;
  right: -155px;
  bottom: 90px;
  background: color-mix(in srgb, var(--journey-violet) 12%, transparent);
  transform: rotate(-8deg);
}

.map-world--agents::after {
  content: "AGENTS";
  top: 100px;
  left: 70px;
}

.github-callout {
  padding: 78px 0;
  background: var(--journey-blue);
  color: #ffffff;
}

.github-callout__inner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 28px;
}

.github-callout__mark {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.12);
}

.github-callout h2 {
  margin: 0;
  color: #ffffff;
  font-size: 1.9rem;
}

.github-callout p {
  max-width: 690px;
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.86rem;
}

.github-star-button {
  min-height: 54px;
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 13px 16px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 15px;
  background: #ffffff;
  color: #1f2d91 !important;
  font-size: 0.72rem;
  font-weight: 800;
  box-shadow: 0 6px 0 #2337bd;
}

.github-star-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 0 #2337bd;
}

.github-star-button strong {
  min-width: 2ch;
  padding-left: 12px;
  border-left: 1px solid #d8dcf4;
  font-variant-numeric: tabular-nums;
}

.clone-strip {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  align-items: center;
  gap: 48px;
  padding-top: 70px !important;
  padding-bottom: 70px !important;
}

.clone-strip span,
.clone-strip strong {
  display: block;
}

.clone-strip span {
  color: var(--journey-blue);
  font-size: 0.76rem;
  font-weight: 800;
}

.clone-strip strong {
  max-width: 420px;
  margin-top: 5px;
  color: var(--journey-ink);
  font-size: 1.12rem;
  line-height: 1.45;
}

.clone-command {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 13px 12px 17px;
  border: 1px solid var(--journey-border);
  border-radius: 16px;
  background: var(--journey-surface);
}

.clone-command code {
  min-width: 0;
  flex: 1;
  overflow-x: auto;
  color: var(--journey-muted);
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.69rem;
  white-space: nowrap;
  scrollbar-width: thin;
}

.clone-command button {
  flex: 0 0 auto;
  padding: 8px 12px;
  border: 0;
  border-radius: 10px;
  background: var(--journey-blue-soft);
  color: var(--journey-blue);
  cursor: pointer;
  font-size: 0.7rem;
  font-weight: 800;
}

.journey-home .modal-overlay {
  background: rgba(18, 23, 53, 0.68);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
}

.journey-home .journey-modal {
  width: min(720px, calc(100vw - 28px));
  max-height: min(760px, calc(100vh - 32px));
  max-height: min(760px, calc(100dvh - 32px));
  display: flex;
  flex-direction: column;
  border: 1px solid var(--journey-border);
  border-radius: 26px;
  background: var(--journey-surface);
  box-shadow: 0 28px 80px rgba(10, 16, 52, 0.3);
  overflow: hidden;
}

.journey-home .modal-header {
  flex: 0 0 auto;
  padding: 28px 30px 22px;
  border-bottom-color: var(--journey-border);
  background: var(--journey-surface-soft);
}

.journey-home .modal-phase-num {
  color: var(--journey-coral);
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.68rem;
  font-weight: 800;
}

.journey-home .modal-title {
  margin-top: 6px;
  color: var(--journey-ink);
  font-family: var(--journey-font);
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.journey-home .modal-desc {
  max-width: 64ch;
  margin-top: 10px;
  color: var(--journey-muted);
  font-size: 0.84rem;
  line-height: 1.55;
}

.journey-home .modal-close {
  z-index: 2;
  top: 18px;
  right: 18px;
  width: 36px;
  height: 36px;
  border: 1px solid var(--journey-border);
  border-radius: 11px;
  background: var(--journey-surface);
  color: var(--journey-muted);
}

.journey-home .modal-close:hover {
  border-color: var(--journey-coral);
  color: var(--journey-coral);
}

.journey-home .modal-progress {
  color: var(--journey-muted);
  font-family: var(--journey-font);
  font-size: 0.7rem;
}

.journey-home .modal-progress-count,
.journey-home .modal-progress-pct {
  color: var(--journey-blue);
}

.journey-home .modal-progress-bar {
  height: 7px;
  border: 0;
  border-radius: 999px;
  background: var(--journey-blue-soft);
  overflow: hidden;
}

.journey-home .modal-progress-bar-fill {
  background: var(--journey-blue);
}

.journey-home .modal-lessons {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-color: var(--journey-blue) var(--journey-surface-soft);
  scrollbar-width: auto;
  padding: 8px 20px;
  background: var(--journey-surface);
}

.journey-home .modal-lessons::-webkit-scrollbar {
  width: 10px;
}

.journey-home .modal-lessons::-webkit-scrollbar-track {
  border-radius: 999px;
  background: var(--journey-surface-soft);
}

.journey-home .modal-lessons::-webkit-scrollbar-thumb {
  border: 2px solid var(--journey-surface-soft);
  border-radius: 999px;
  background: var(--journey-blue);
}

.journey-home .modal-lesson {
  grid-template-columns: 12px minmax(0, 1fr) auto auto auto 32px;
  gap: 10px;
  min-height: 52px;
  padding: 9px 8px;
  border-bottom-color: var(--journey-border);
  border-radius: 10px;
}

.journey-home .modal-lesson:hover {
  background: var(--journey-surface-soft);
}

.journey-home .modal-lesson > a {
  color: var(--journey-ink);
  font-family: var(--journey-font);
  font-size: 0.76rem;
  font-weight: 700;
}

.journey-home .modal-lesson-type,
.journey-home .modal-lesson-lang {
  border-color: var(--journey-border);
  border-radius: 7px;
  color: var(--journey-muted);
  font-family: var(--journey-font);
  font-size: 0.58rem;
  font-weight: 700;
}

.journey-home .modal-lesson .modal-lesson-read {
  border-radius: 8px;
  background: var(--journey-blue-soft);
  color: var(--journey-blue);
  font-family: var(--journey-font);
  font-weight: 800;
}

.journey-home .modal-lesson-toggle {
  border-color: var(--journey-border);
  border-radius: 9px;
  color: var(--journey-blue);
}

.journey-home .modal-lesson-toggle.done {
  border-color: var(--journey-blue);
  background: var(--journey-blue);
  color: #ffffff;
}

.journey-home .modal-footer {
  flex: 0 0 auto;
  border-top-color: var(--journey-border);
  background: var(--journey-surface-soft);
}

.journey-home .modal-footer-note,
.journey-home .modal-reset {
  color: var(--journey-muted);
  font-family: var(--journey-font);
  font-size: 0.66rem;
}

.journey-home .modal-reset {
  border-color: var(--journey-border);
  border-radius: 9px;
  background: var(--journey-surface);
}

.journey-home .site-footer {
  border-top-color: var(--journey-border);
  background: var(--journey-surface);
}

.journey-home .site-footer p,
.journey-home .site-footer a {
  color: var(--journey-muted);
  font-family: var(--journey-font);
  font-size: 0.7rem;
  letter-spacing: 0;
  text-transform: none;
}

@media (max-width: 980px) {
  .journey-hero {
    min-height: auto;
    padding-top: 132px;
  }

  .journey-hero__layout {
    grid-template-columns: 1fr;
    gap: 56px;
  }

  .journey-hero__copy {
    max-width: 760px;
  }

  .next-stop {
    width: min(560px, 100%);
    transform: none;
  }

  .journey-overview {
    grid-template-columns: 1fr;
    gap: 38px;
  }

  .overview-statement h2 br {
    display: none;
  }

  .map-section__heading {
    align-items: flex-start;
  }

  .journey-stop--far-left { --lane-x: 20%; }
  .journey-stop--far-right { --lane-x: 80%; }

  .github-callout__inner {
    grid-template-columns: auto 1fr;
  }

  .github-star-button {
    grid-column: 2;
    width: max-content;
    max-width: 100%;
  }
}

@media (max-width: 768px) {
  .journey-home .header-inner {
    padding: 0 18px;
  }

  .logo-copy {
    display: none;
  }

  .journey-home .header-nav {
    margin-left: auto;
  }

  .journey-home .header-nav > a:not(.header-github) {
    display: none;
  }

  .journey-home .header-github span:not(.star-count) {
    display: none;
  }

  .journey-home .header-github {
    width: 38px;
    justify-content: center;
    padding: 0;
  }

  .journey-home .header-github .star-count {
    display: none;
  }

  .journey-hero {
    padding: 118px 0 72px;
  }

  .journey-hero h1 {
    font-size: clamp(3.05rem, 14vw, 4.65rem);
  }

  .journey-hero__lead {
    font-size: 1rem;
  }

  .journey-overview {
    padding-top: 64px !important;
    padding-bottom: 64px !important;
  }

  .overview-loop {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }

  .overview-loop i {
    display: none;
  }

  .map-section {
    padding: 72px 0 82px;
  }

  .map-section__heading {
    display: block;
  }

  .map-controls {
    align-items: flex-start;
    margin-top: 28px;
  }

  .map-legend {
    justify-content: flex-start;
  }

  .translation-status {
    grid-template-columns: auto 1fr;
    margin-inline: 18px !important;
  }

  .translation-status a {
    grid-column: 2;
  }

  .journey-map-shell {
    min-height: 3260px;
    margin: 40px 18px 0 !important;
    padding-inline: 12px !important;
    border-radius: 30px;
  }

  .journey-stop {
    height: 152px;
  }

  .journey-stop--left,
  .journey-stop--far-left { --lane-x: 28%; }
  .journey-stop--center { --lane-x: 50%; }
  .journey-stop--right,
  .journey-stop--far-right { --lane-x: 72%; }

  .journey-stop__content {
    width: 220px;
    transform: translateX(-42px);
  }

  .journey-stop--right .journey-stop__content,
  .journey-stop--far-right .journey-stop__content {
    transform: translateX(-178px);
  }

  .toc-row.journey-node {
    width: 80px;
    height: 80px;
    flex-basis: 80px;
  }

  .journey-stop__label .toc-name {
    font-size: 0.8rem;
  }

  .map-world {
    transform: scale(0.82);
  }

  .github-callout__inner {
    grid-template-columns: 1fr;
  }

  .github-callout__mark {
    width: 64px;
    height: 64px;
  }

  .github-star-button {
    grid-column: auto;
  }

  .clone-strip {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .journey-home .modal-lesson {
    grid-template-columns: 10px minmax(0, 1fr) auto 32px;
  }

  .journey-home .modal-lesson-lang,
  .journey-home .modal-lesson-type {
    display: none;
  }
}

@media (max-width: 520px) {
  .journey-home .container {
    padding-left: 20px;
    padding-right: 20px;
  }

  .journey-hero {
    background:
      radial-gradient(circle at 94% 18%, color-mix(in srgb, var(--journey-yellow) 22%, transparent) 0 68px, transparent 69px),
      var(--journey-bg);
  }

  .hero-chip {
    font-size: 0.68rem;
  }

  .journey-hero h1 {
    font-size: clamp(2.8rem, 15vw, 4rem);
  }

  .journey-hero__actions {
    align-items: stretch;
    flex-direction: column;
  }

  .journey-button {
    width: 100%;
  }

  .hero-facts {
    gap: 8px 15px;
  }

  .next-stop {
    padding: 18px;
    border-radius: 22px;
  }

  .next-stop__topline {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }

  .next-stop__body {
    grid-template-columns: 86px 1fr;
    gap: 15px;
  }

  .progress-orb {
    width: 84px;
  }

  .progress-orb__inner {
    width: 62px;
  }

  .progress-orb__inner strong {
    font-size: 1.35rem;
  }

  .next-stop h2 {
    font-size: 1.12rem;
  }

  .overview-statement h2 {
    font-size: 1.9rem;
  }

  .overview-loop {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .overview-loop > div {
    display: grid;
    grid-template-columns: 34px 1fr;
    align-items: center;
    column-gap: 10px;
  }

  .overview-loop span {
    grid-row: 1 / span 2;
    margin: 0;
  }

  .overview-loop small {
    margin: 0;
  }

  .map-section__heading h2 {
    font-size: 2.55rem;
  }

  .translation-status {
    grid-template-columns: 1fr;
    margin-inline: 12px !important;
    padding: 17px !important;
  }

  .translation-status a {
    grid-column: auto;
  }

  .journey-map-shell {
    min-height: 3140px;
    margin-inline: 10px !important;
    padding-top: 58px !important;
    border-radius: 24px;
  }

  .journey-stop {
    height: 146px;
  }

  .journey-stop--left,
  .journey-stop--far-left { --lane-x: 25%; }
  .journey-stop--center { --lane-x: 50%; }
  .journey-stop--right,
  .journey-stop--far-right { --lane-x: 75%; }

  .journey-stop__content {
    width: 178px;
    gap: 9px;
    transform: translateX(-37px);
  }

  .journey-stop--right .journey-stop__content,
  .journey-stop--far-right .journey-stop__content {
    transform: translateX(-141px);
  }

  .toc-row.journey-node {
    width: 72px;
    height: 72px;
    flex-basis: 72px;
    border-width: 3px;
  }

  .journey-stop__label .toc-num {
    font-size: 0.54rem;
  }

  .journey-stop__label .toc-name {
    font-size: 0.7rem;
  }

  .journey-stop__label .toc-meta {
    font-size: 0.57rem;
  }

  .journey-node--current::before {
    top: -22px;
    font-size: 0.5rem;
  }

  .map-world {
    opacity: 0.48;
  }

  .github-callout {
    padding: 62px 0;
  }

  .github-callout h2 {
    font-size: 1.6rem;
  }

  .github-star-button {
    width: 100%;
    justify-content: space-between;
  }

  .github-star-button span {
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .clone-command {
    align-items: stretch;
    flex-direction: column;
  }

  .clone-command button {
    min-height: 40px;
  }

  .journey-home .modal-header {
    padding: 24px 20px 18px;
  }

  .journey-home .modal-title {
    padding-right: 28px;
    font-size: 1.5rem;
  }

  .journey-home .modal-lessons {
    padding-inline: 10px;
  }

  .journey-home .modal-lesson {
    grid-template-columns: 10px minmax(0, 1fr) 31px;
  }

  .journey-home .modal-lesson .modal-lesson-read,
  .journey-home .modal-lesson-read-placeholder {
    display: none;
  }
}

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