:root {
  color-scheme: light;
  scrollbar-gutter: stable;
  font-family: "Aptos", "Segoe UI", system-ui, sans-serif;
  color: var(--navy);
  background: var(--canvas);
  --navy: #1d3148;
  --muted: #4c6278;
  --accent: #2e5d86;
  --canvas: #fcfdff;
  --wash: #e8f2fc;
  --line: #dce8f3;
  --blue-border: #b7cde3;
  --radius: 26px;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
h1:focus-visible { outline-offset: 7px; }

.topbar { border-bottom: 1px solid var(--line); }
.topbar-inner, .shell { width: min(1120px, calc(100% - 88px)); margin-inline: auto; }
.topbar-inner { height: 74px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; border-radius: 7px; font-size: 1.075rem; font-weight: 720; }
.brand-home-icon {
  display: grid;
  place-items: center;
  flex: 0 0 35px;
  width: 35px;
  height: 35px;
  border: 1px solid var(--blue-border);
  border-radius: 10px;
  background: var(--wash);
}
.brand-home-icon img { display: block; object-fit: contain; }
.brand:hover .brand-home-icon { border-color: var(--accent); }
.secondary, .primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border-radius: 999px;
  padding: 8px 17px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--navy);
  font-weight: 650;
  font-size: .875rem;
}
.secondary:hover { background: var(--wash); border-color: var(--blue-border); }
.primary { background: var(--navy); border-color: var(--navy); color: white; }
.primary:hover { background: var(--accent); border-color: var(--accent); }

.hero { display: grid; grid-template-columns: 1.12fr .88fr; align-items: center; gap: clamp(32px, 6vw, 90px); padding-top: 40px; }
.hero-copy { min-width: 0; }
h1, h2, p { margin: 0; }
h1 {
  font-size: clamp(3rem, 6.1vw, 5.4rem);
  font-weight: 760;
  line-height: .96;
  letter-spacing: -.083em;
  max-width: 10ch;
}
.subtitle {
  margin-top: 15px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.35rem, 2.45vw, 2rem);
  font-style: italic;
  letter-spacing: -.04em;
  color: var(--accent);
}
.intro { margin-top: 25px; max-width: 48ch; font-size: 1rem; line-height: 1.48; color: var(--muted); }
.intro p + p { margin-top: 9px; }
.intro .intro-last { color: var(--navy); font-weight: 700; }

.portrait {
  position: relative;
  isolation: isolate;
  align-self: stretch;
  justify-self: stretch;
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 350px;
  border: 1px solid var(--line);
  border-radius: 36px;
  overflow: hidden;
  background: radial-gradient(ellipse at 50% 49%, #dbeaf8 0 46%, var(--wash) 80%, #f0f7fe);
  transition: background-color .25s, border-color .25s;
}
.portrait img {
  width: min(100%, 400px);
  height: auto;
  display: block;
}
.portrait-sparkles i {
  position: absolute;
  top: 29%;
  left: 16%;
  width: 27px;
  aspect-ratio: 1;
  background: #fafdff;
  clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
  pointer-events: none;
}
.portrait-sparkles i:nth-child(2) { top: 19%; left: auto; right: 16%; width: 36px; }
.portrait-sparkles i:nth-child(3) { top: 33%; left: auto; right: 12%; width: 16px; }

.chapters { margin-top: 40px; }
.chapters-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; }
.chapters-heading h2 { font-size: clamp(1.5rem, 3vw, 2.13rem); line-height: 1.1; letter-spacing: -.055em; font-weight: 750; }
.chapter-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; }
.peach { --paper: #fff0e8; --edge: #f4dfd2; --art: #df896c; --art-light: #ffd1b9; --ink: #723a2d; }
.lilac { --paper: #f3edfd; --edge: #e8dcf6; --art: #9474cc; --art-light: #d7c3f6; --ink: #553d80; }
.mint { --paper: #eaf6ef; --edge: #d9eae0; --art: #68a487; --art-light: #b7dfc7; --ink: #32644d; }
.chapter-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 32px;
  align-items: end;
  position: relative;
  min-height: 152px;
  gap: 8px;
  padding: 84px 17px 17px 20px;
  border: 1px solid var(--edge);
  border-radius: var(--radius);
  background: var(--paper);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.chapter-card:hover { transform: translateY(-4px); box-shadow: 0 8px 21px #1d314810; border-color: var(--art); }
.chapter-card[aria-current] { border-color: var(--art); box-shadow: inset 0 0 0 1px var(--art); }
.card-copy { display: flex; flex-direction: column; gap: 3px; z-index: 1; }
.card-copy strong { font-size: clamp(1.1rem, 2vw, 1.34rem); letter-spacing: -.045em; line-height: 1.15; }
.card-copy > span { font-size: .875rem; line-height: 1.35; color: var(--ink); overflow-wrap: anywhere; }
.card-action { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; color: var(--ink); background: #ffffffb8; }
.card-action::before { content: ""; width: 7px; height: 7px; border-top: 1.6px solid; border-right: 1.6px solid; transform: translateX(-1px) rotate(45deg); }

.card-art { position: absolute; top: 13px; right: 23px; width: 116px; height: 73px; pointer-events: none; }
.card-art i { position: absolute; display: block; }
.route .shape-one {
  width: 100px; height: 27px; top: 38px; left: 2px;
  border-radius: 50%; transform: rotate(-12deg);
  background: linear-gradient(155deg, #ffdbbd 15%, #eaaa86 90%);
  box-shadow: 0 4px 0 #d89273;
}
.route .shape-two {
  width: 49px; height: 27px; top: 32px; left: 23px;
  border: 4px dashed #fff8f1; border-right: 0; border-radius: 50%; transform: rotate(-18deg);
}
.route .shape-three {
  width: 28px; height: 36px; top: 5px; left: 74px;
  border-left: 3px solid #ab6048; border-radius: 2px;
}
.route .shape-three::before {
  content: ""; display: block; height: 19px; background: linear-gradient(125deg,#ffcaa8,#d87960);
  clip-path: polygon(0 0, 100% 50%, 0 100%);
}
.spark i {
  clip-path: polygon(50% 0, 65% 35%, 100% 50%, 65% 65%, 50% 100%, 35% 65%, 0 50%, 35% 35%);
  background: linear-gradient(145deg, #fff 5%, var(--art-light) 35%, var(--art) 85%);
}
.spark .shape-one { width: 65px; height: 65px; left: 28px; top: 4px; transform: rotate(12deg); }
.spark .shape-two { width: 26px; height: 26px; left: 6px; top: 8px; transform: rotate(-12deg); }
.spark .shape-three { width: 25px; height: 25px; right: 0; top: 39px; transform: rotate(17deg); }
.horizon .shape-one { width: 37px; height: 37px; left: 54px; top: 8px; border-radius: 50%; background: linear-gradient(145deg,#fff3bd,#edce77); }
.horizon .shape-two { width: 72px; height: 36px; left: 7px; top: 34px; border-radius: 80% 85% 13% 19%; transform: rotate(-7deg); background: linear-gradient(152deg,#bce3c7,#7cb898); }
.horizon .shape-three { width: 65px; height: 39px; left: 50px; top: 32px; border-radius: 85% 85% 23% 12%; transform: rotate(10deg); background: linear-gradient(150deg,#a5d6b7,#63a587); }
.horizon .shape-three::before { content: ""; position: absolute; bottom: 1px; left: 13px; width: 28px; height: 27px; border: 3px solid #e1f3e5; border-right: 0; border-bottom: 0; border-radius: 48% 0 0; transform: rotate(20deg); }

footer { margin-top: 24px; padding: 16px 0 25px; border-top: 1px solid var(--line); color: var(--muted); font-size: .875rem; }
.chapter-title { font-size: clamp(2.6rem, 5vw, 4.55rem); }
.chapter-description { color: var(--accent); margin-top: 12px; font-size: 1.12rem; overflow-wrap: anywhere; }
.stop-controls { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 19px; }
.stop { border: 1px solid var(--line); border-radius: 999px; padding: 7px 12px; background: #fff; color: var(--navy); min-height: 40px; font-size: .875rem; }
.stop:hover, .stop[aria-pressed="true"] { border-color: var(--blue-border); background: var(--wash); }
.stop-detail { margin-top: 10px; min-height: 109px; background: #fbfdff; border: 1px solid var(--line); border-radius: 17px; padding: 13px 15px; }
.stop-detail h2 { font-size: 1.14rem; letter-spacing: -.025em; }
.placeholder { font-size: .8rem; color: var(--muted); margin-bottom: 3px; }
.stop-text { margin-top: 4px; line-height: 1.4; color: var(--muted); }
.chapter-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 15px; }
body[data-scene="peach"] .portrait { border-color: #efcfc1; }
body[data-scene="lilac"] .portrait { border-color: #d7c1ed; }
body[data-scene="mint"] .portrait { border-color: #c3e1cb; }
body[data-scene="lilac"] .portrait-sparkles i { background: #efe5ff; }
body[data-scene="mint"] .portrait-sparkles i { background: #e2fbec; }

footer p { overflow-wrap: anywhere; }

@media (max-width: 800px) {
  .topbar-inner, .shell { width: calc(100% - 48px); }
  .hero { gap: 24px; padding-top: 32px; }
  .portrait { min-height: 265px; border-radius: 26px; }
  .chapter-card { padding-inline: 14px; }
  .card-art { right: 13px; }
}
@media (max-width: 740px) {
  .chapter-grid { grid-template-columns: 1fr; gap: 10px; }
  .chapter-card { min-height: 104px; grid-template-columns: minmax(0, 1fr) 32px; align-items: center; padding: 13px 14px 13px 16px; }
  .card-copy { padding-right: 91px; }
  .card-art { top: 14px; right: 50px; transform: scale(.74); transform-origin: right center; }
}
@media (max-width: 620px) {
  .topbar-inner, .shell { width: calc(100% - 36px); }
  .topbar-inner { height: 63px; }
  .hero { grid-template-columns: 1fr; gap: 23px; }
  h1 { font-size: clamp(2.95rem, 12vw, 4.55rem); }
  .intro { margin-top: 19px; }
  .portrait { min-height: 0; }
  .portrait img { width: min(76%, 300px); }
  .chapters { margin-top: 30px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
  .chapter-card:hover { transform: none; }
}

/* The opening scene keeps the avatar and its dialogue on a single canvas. */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.scene-pattern { display: none; }
body[data-scene="home"] {
  position: relative;
  isolation: isolate;
  min-height: 100svh;
  background: var(--canvas);
}
[data-scene="home"] .scene-pattern {
  display: block;
  position: absolute;
  z-index: -1;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  mask-image: radial-gradient(ellipse at 50% 42%, #0001 9%, #000 68%, #0005 100%);
}
.scene-pattern i {
  position: absolute;
  top: var(--y);
  left: var(--x);
  width: clamp(42px, 5.3vw, 88px);
  height: clamp(33px, 4.1vw, 63px);
  border-radius: 22%;
  background: #e6eff9;
  opacity: .26;
  transform: rotate(var(--turn));
}
.scene-pattern .scene-dot { border-radius: 50%; width: clamp(30px, 3.2vw, 51px); }
[data-scene="home"] .topbar { border: 0; }
[data-scene="home"] .topbar-inner { height: 64px; }
[data-scene="home"] .shell { max-width: 860px; padding-bottom: 20px; }
[data-scene="home"] .hero {
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
  gap: 5px;
  padding-top: clamp(12px, 3.5vh, 37px);
}
[data-scene="home"] .hero-copy {
  position: relative;
  z-index: 1;
  width: min(100%, 550px);
}
.speech {
  position: relative;
  padding: 21px 25px 19px;
  border-radius: 27px;
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: 0 10px 38px #1d31480b, 0 2px 6px #1d314808;
}
.speech::after {
  content: "";
  position: absolute;
  left: calc(50% - 9px);
  bottom: -7px;
  width: 16px;
  aspect-ratio: 1;
  border: solid var(--line);
  border-width: 0 1px 1px 0;
  border-radius: 0 0 5px;
  background: #fff;
  transform: rotate(45deg);
}
[data-intro="playing"] .speech { animation: speech-enter 480ms cubic-bezier(.2,.8,.2,1) both; }
@keyframes speech-enter {
  0%, 25% { opacity: 0; transform: translateY(9px) scale(.97); }
  100% { opacity: 1; transform: none; }
}
.speech-copy p {
  position: relative;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.4;
  margin-top: 6px;
}
.speech-copy .speech-title {
  margin-top: 0;
  color: var(--navy);
  font-size: clamp(1.43rem, 3.5vw, 1.85rem);
  font-weight: 750;
  letter-spacing: -.055em;
  line-height: 1.1;
}
.speech-copy .speech-subtitle { color: var(--accent); font-family: Georgia, serif; font-style: italic; margin: 3px 0 9px; }
.speech-copy .speech-last { color: var(--navy); font-weight: 700; }
.line-space { visibility: hidden; }
.line-text { position: absolute; inset: 0; }
.typing::after { content: ""; display: inline-block; vertical-align: -.1em; width: 1px; height: 1em; margin-left: 2px; background: var(--accent); }

[data-scene="home"] .portrait {
  position: relative;
  width: min(49vw, 218px);
  min-height: 0;
  aspect-ratio: 1;
  justify-self: center;
  justify-items: center;
  align-self: center;
  border: 0;
  overflow: visible;
  background: transparent;
  margin-top: 11px;
  cursor: default;
}
[data-scene="home"] .portrait::before {
  content: "";
  position: absolute;
  z-index: -1;
  width: 61%;
  height: 9%;
  left: 19.5%;
  bottom: 3%;
  border-radius: 50%;
  background: #1d314824;
  filter: blur(4px);
}
[data-scene="home"] .portrait .portrait-cutout { width: 100%; }
[data-scene="home"] .portrait-sparkles { display: none; }

.profile-overview {
  max-width: 620px;
  margin: 8px auto 23px;
  padding: 0 clamp(2px, 2vw, 14px);
}
.profile-overview h2 {
  margin-bottom: 5px;
  font-size: 1.08rem;
  letter-spacing: -.025em;
}
.profile-overview p {
  color: var(--muted);
  font-size: .9375rem;
  line-height: 1.5;
}
.profile-expertise {
  margin-top: 11px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}
.profile-expertise summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 42px;
  padding: 7px 12px;
  list-style: none;
  color: var(--accent);
  font-size: .875rem;
  font-weight: 690;
  cursor: pointer;
  border-radius: inherit;
}
.profile-expertise summary::-webkit-details-marker { display: none; }
.profile-expertise summary::after {
  content: "";
  width: 7px;
  height: 7px;
  margin-right: 4px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
}
.profile-expertise[open] summary::after { transform: translateY(2px) rotate(225deg); }
.profile-expertise summary:hover { background: var(--wash); }
.profile-expertise dl {
  display: grid;
  gap: 11px;
  margin: 0;
  padding: 11px 12px 14px;
  border-top: 1px solid var(--line);
  font-size: .875rem;
  line-height: 1.45;
}
.profile-expertise dt { font-weight: 690; }
.profile-expertise dd { margin: 2px 0 0; color: var(--muted); }
#road-start { margin-top: 13px; }

[data-scene="home"] .chapters { max-width: 570px; margin: 8px auto 0; }
[data-scene="home"] .chapters-heading { justify-content: center; gap: 0; margin-bottom: 13px; }
[data-scene="home"] .chapters-heading h2 {
  font-size: .96rem;
  line-height: 1.3;
  font-weight: 650;
  letter-spacing: -.01em;
  color: var(--muted);
}
[data-scene="home"] .chapter-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 5vw, 42px); }
[data-scene="home"] .chapter-card, .ai-hub, .ai-topic {
  aspect-ratio: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 9px;
  border-radius: 26%;
  box-shadow: 0 9px 16px #1d314810, 0 2px 4px #1d31480b;
  text-align: center;
}
[data-scene="home"] .chapter-card:hover { transform: translateY(-7px) scale(1.03); box-shadow: 0 16px 27px #1d314818; }
[data-scene="home"] .chapter-card[aria-current] { transform: none; }
[data-scene="home"] .card-art { position: relative; inset: auto; flex: 0 0 69px; margin-top: -6px; transform: scale(.74); transform-origin: center; }
[data-scene="home"] .card-copy { padding: 0; gap: 4px; }
[data-scene="home"] .card-copy strong {
  font-size: clamp(.65rem, 2.4vw, .975rem);
  white-space: nowrap;
}
[data-scene="home"] .card-description { font-size: clamp(.65rem, 1.35vw, .72rem); white-space: nowrap; }
[data-scene="home"] .card-action { display: none; }
[data-intro="complete"] .chapters-heading { animation: options-enter 340ms both; }
[data-intro="complete"] .chapter-card {
  --arrival: 0ms;
  animation: options-enter 500ms cubic-bezier(.22,.85,.25,1) var(--arrival) both,
    bubble-float 1.65s ease-in-out calc(500ms + var(--arrival)) 2;
}
[data-intro="complete"] .chapter-card:nth-child(2) { --arrival: 80ms; }
[data-intro="complete"] .chapter-card:nth-child(3) { --arrival: 160ms; }
@keyframes options-enter {
  from { opacity: 0; translate: 0 14px; scale: .94; }
  to { opacity: 1; translate: 0 0; scale: 1; }
}
@keyframes bubble-float {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -5px; }
}
[data-scene="home"] footer { max-width: 570px; margin: 21px auto 0; padding: 0; border-top: 0; text-align: center; }
[data-intro="playing"] footer { visibility: hidden; }

@media (min-width: 471px) and (max-height: 790px) {
  [data-scene="home"] .topbar-inner { height: 56px; }
  [data-scene="home"] .hero { padding-top: 15px; }
  [data-scene="home"] .portrait { width: 184px; }
  [data-scene="home"] .chapters { max-width: 475px; }
  [data-scene="home"] .card-art { flex-basis: 60px; transform: scale(.65); }
}
@media (max-width: 470px) {
  [data-scene="home"] .topbar-inner { height: 61px; }
  [data-scene="home"] .hero { padding-top: 22px; }
  [data-scene="home"] .chapter-grid { gap: clamp(14px, 4.5vw, 21px); }
  .speech { padding: 17px 17px 15px; border-radius: 21px; }
  [data-scene="home"] .chapter-card { padding: 7px 4px; }
  [data-scene="home"] .card-art { flex-basis: 39px; height: 39px; transform: scale(.48); transform-origin: center top; }
  [data-scene="home"] .card-copy > span { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  [data-intro] .speech, [data-intro] .chapters-heading, [data-intro] .chapter-card { animation: none; }
  [data-scene="home"] .chapter-card:hover { transform: none; }
}

[hidden] { display: none !important; }
.chapter-dock { padding: 5px 0; }
.topbar:has(.chapter-dock:not([hidden])) {
  position: sticky;
  top: 0;
  z-index: 4;
  background: #f3f8fdea;
  backdrop-filter: blur(13px);
}
.topbar:has(.chapter-dock:not([hidden])) .topbar-inner { height: auto; min-height: 65px; }
.chapter-dock .chapter-grid { display: flex; gap: 6px; }
.chapter-dock .chapter-card {
  --dock-size: clamp(50px, 8vw, 56px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  width: var(--dock-size);
  height: var(--dock-size);
  min-height: 0;
  padding: 3px 4px 5px;
  border-radius: 20%;
  box-shadow: 0 3px 8px #1d314810;
  text-align: center;
  transform-origin: top left;
}
.chapter-dock .chapter-card:hover { transform: translateY(-2px); }
.chapter-dock .card-art {
  position: relative; inset: auto; flex: 0 0 22px; width: 116px; height: 22px;
  margin: 0 -29px;
  transform: scale(.29);
  transform-origin: center top;
}
.chapter-dock .card-copy { width: 100%; padding: 0; gap: 0; }
.chapter-dock .card-copy strong { font-size: .5625rem; line-height: 1.06; letter-spacing: -.025em; }
.chapter-dock .card-copy > span, .chapter-dock .card-action { display: none; }
.speech-departure { position: fixed; z-index: 3; pointer-events: none; }

body[data-scene="road"] { position: relative; isolation: isolate; min-height: 100svh; background: var(--canvas); overflow-x: clip; overflow-anchor: none; }
[data-scene="road"] .scene-pattern {
  display: block; position: absolute; z-index: -1; inset: 0; overflow: hidden; pointer-events: none;
  mask-image: radial-gradient(ellipse at 50% 50%, #0001 12%, #000b 82%);
}
[data-scene="road"] .shell { max-width: 1030px; }
.road-module { padding-top: clamp(17px, 3.3vh, 34px); }
.road-module h1 {
  max-width: none;
  font-size: clamp(1.7rem, 4.8vw, 2.85rem);
  letter-spacing: -.045em;
  line-height: 1.04;
}
.road-track {
  --road-start: 15%;
  --road-destination: 75%;
  --traveller-size: clamp(128px, 23vw, 185px);
  position: relative;
  margin-top: 10px;
  min-height: clamp(220px, 29vh, 248px);
  overflow: clip visible;
}
.road-world {
  position: absolute;
  inset: 0;
  transform: translateX(var(--road-camera, 0%));
}
.road-scenery {
  position: absolute;
  bottom: 28px;
  left: 0;
  width: var(--road-length, 100%);
  height: 72px;
  opacity: .8;
  background:
    radial-gradient(ellipse 20px 11px at 61px 48px, #cddff1 70%, transparent 76%) 0 0 / 195px 72px,
    radial-gradient(ellipse 24px 13px at 96px 46px, #e8eee1 70%, transparent 76%) 0 0 / 161px 72px,
    radial-gradient(ellipse 37px 9px at 37px 63px, #e0edf8 69%, transparent 75%) 0 0 / 126px 72px;
}
.road-world::before, .road-world::after {
  content: "";
  position: absolute;
  bottom: 20px;
  left: 0;
  width: var(--road-length, 100%);
  height: 13px;
  border-radius: 999px;
  background: #d7e7f5;
}
.road-world::after {
  bottom: 26px;
  height: 1px;
  background: repeating-linear-gradient(90deg, #fcfeff 0 10px, transparent 10px 19px);
}
.road-marker {
  position: absolute;
  display: grid;
  place-items: center;
  bottom: 13px;
  z-index: 1;
  width: 28px;
  aspect-ratio: 1;
  padding: 0;
  border: 2px solid #7197bb;
  border-radius: 50%;
  background: #fbfdff;
  color: var(--navy);
  font-size: .75rem;
  font-weight: 720;
  transform: translateX(-50%);
  opacity: 0;
  translate: 0 8px;
  scale: .8;
  visibility: hidden;
  transition: opacity .42s ease, translate .42s ease, scale .42s ease, box-shadow .25s ease, background-color .25s ease;
}
.road-marker[data-revealed] { opacity: 1; translate: 0 0; scale: 1; visibility: visible; }
.road-marker[aria-current="step"] { box-shadow: 0 0 0 4px #deebf7; background: #cfdfef; }
.road-marker:hover:not([aria-disabled="true"]) { background: #cfdfef; }
.road-marker[aria-disabled="true"], .road-controls button[aria-disabled="true"] { cursor: default; }
.road-controls button[aria-disabled="true"] { opacity: .53; }
.road-avatar {
  position: absolute;
  isolation: isolate;
  left: calc(var(--road-start) - var(--traveller-size) / 2);
  bottom: 35px;
  width: var(--traveller-size);
  aspect-ratio: 1;
  transform-origin: left top;
}
[data-phase="arrived"] .road-avatar { left: calc(var(--road-destination) - var(--traveller-size) / 2); }
.road-avatar.is-entering > * { visibility: hidden; }
.road-avatar.is-entering::after { animation: road-hop-shadow var(--road-hop-duration) both; }
@keyframes road-hop-shadow {
  0%, 62% { opacity: 0; scale: .72; }
  80% { opacity: 1; scale: 1.06; }
  100% { opacity: 1; scale: 1; }
}
.road-avatar.road-entry {
  position: fixed;
  z-index: 4;
  bottom: auto;
  transform-origin: center 94%;
  pointer-events: none;
}
.road-avatar.road-entry::after { display: none; }
.road-jump-pose {
  position: absolute;
  inset: 0;
  translate: calc(var(--pose-x, 0%) * var(--pose-facing, 1)) var(--pose-y, 0%);
  scale: var(--pose-facing, 1) 1;
  opacity: 0;
  background: url("assets/rebecka-jump-gold.png") no-repeat var(--pose-cell) / 200% 200%;
}
[data-direction="left"] .road-jump-pose { --pose-facing: -1; }
.road-jump-bend { --pose-cell: 0 0; --pose-x: 1.5%; --pose-y: -3%; }
.road-jump-crouch { --pose-cell: 100% 0; --pose-y: -3%; }
.road-jump-push { --pose-cell: 0 100%; --pose-x: 2.5%; --pose-y: -2%; }
.road-jump-air { --pose-cell: 100% 100%; }
.road-avatar::after {
  content: ""; position: absolute; z-index: -1; left: 31%; right: 31%; bottom: 5%; height: 8%;
  border-radius: 50%; background: #1d314830; filter: blur(4px);
}
.road-front, .road-side { position: absolute; inset: 0; width: 100%; height: 100%; }
.road-front { object-fit: contain; transition: opacity 190ms ease-in-out; }
.road-side {
  --walk-sheet: url("assets/rebecka-walk-gold.png");
  isolation: isolate;
  mix-blend-mode: plus-lighter;
  opacity: 0;
  transition: opacity 190ms ease-in-out;
}
[data-direction="left"] .road-side { scale: -1 1; }
.road-side::before, .road-side::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--walk-sheet) no-repeat 0 0 / 200% 200%;
  transition: opacity 120ms ease-in-out;
}
.road-side::after { opacity: 0; background-position: 0 100%; mix-blend-mode: plus-lighter; }
.road-track:not([data-phase="ready"]) .road-side { opacity: 1; }
.road-track:not([data-phase="ready"]) .road-front { opacity: 0; }
[data-phase="walking"] .road-side::before, [data-phase="walking"] .road-side::after { transition-delay: 105ms; }
[data-phase="walking"] .road-side::before { opacity: 0; }
[data-phase="walking"] .road-side::after, [data-phase="settling"] .road-side::after {
  animation: walking var(--walk-cycle, 640ms) steps(1, end) 105ms infinite;
}
[data-phase="walking"] .road-side::after {
  opacity: 1;
}
[data-phase="settling"] .road-side::before, [data-phase="settling"] .road-side::after {
  transition-duration: 215ms;
}
[data-phase="settling"] .road-side::after {
  animation-play-state: paused;
}
@keyframes walking {
  0%, 50% { background-position: 0 100%; }
  25% { background-position: 100% 0; }
  75% { background-position: 100% 100%; }
}
.road-content { display: grid; }
.road-content > * { grid-area: 1 / 1; min-width: 0; }
.road-content.is-resizing { overflow: clip; }
.road-arrival { min-height: 126px; }
.road-content:has(.profile-overview:not([hidden])) #road-project-view { pointer-events: none; }
.road-content:has(.profile-overview:not([hidden])) .road-arrival { min-height: 0; }
.road-stop {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  width: min(650px, 100%);
  margin-inline: auto;
  padding: 17px 19px;
  border: 1px solid var(--line);
  border-radius: 21px;
  background: #fbfdff;
  box-shadow: 0 9px 22px #1d31480d;
}
.road-stop-marker { flex: 0 0 11px; aspect-ratio: 1; margin-top: 7px; border-radius: 50%; background: #7197bb; box-shadow: 0 0 0 5px var(--wash); }
.road-stop h2 { font-size: 1.3rem; letter-spacing: -.04em; }
.road-stop-meta { color: var(--muted); font-size: .875rem; margin-bottom: 4px; }
.road-stop-role { font-size: .875rem; font-weight: 650; color: var(--navy); margin: 3px 0 7px; }
.road-controls { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 9px; margin-top: 11px; }
.road-controls button { min-height: 38px; padding-inline: 12px; }
.road-count { min-width: 46px; text-align: center; color: var(--muted); font-size: .875rem; }
.road-next-modules { max-width: 650px; margin: 20px auto 0; text-align: center; }
.road-next-modules h2 { font-size: 1rem; margin-bottom: 9px; }
.road-next-modules div { display: flex; flex-wrap: wrap; justify-content: center; gap: 9px; }
.road-next-modules a {
  padding: 10px 15px;
  border: 1px solid var(--edge);
  border-radius: 999px;
  background: var(--paper);
  font-size: .9rem;
  font-weight: 650;
}
.road-next-modules a:hover { border-color: var(--ink); }
[data-scene="road"] footer { margin-top: 12px; }

[data-scene="lilac"] .shell { max-width: 1030px; }
.ai-module {
  margin: clamp(16px, 3vh, 30px) auto 0;
  max-width: 890px;
  container-type: inline-size;
}
.ai-overview {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: center;
  gap: 12px;
}
.ai-overview.ai-map {
  position: relative;
  display: block;
  height: clamp(495px, 59vw, 520px);
}
.ai-hub {
  grid-column: 1 / -1;
  justify-self: center;
  width: clamp(132px, 26%, 185px);
  border: 1px solid var(--edge);
  background: var(--paper);
}
.ai-map .ai-hub, .ai-map .ai-topic {
  position: absolute;
  left: var(--map-x, 50%);
  top: var(--map-y, 50%);
  translate: -50% calc(-50% + var(--map-hover, 0px));
}
.ai-hub .card-art { position: relative; inset: auto; flex: 0 0 64px; transform: scale(.72); }
.ai-title {
  max-width: none;
  font-size: clamp(1.18rem, 3.1cqw, 1.62rem);
  letter-spacing: -.045em;
  line-height: 1.1;
}
.ai-branches { position: absolute; inset: 0; pointer-events: none; }
.ai-branches i {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, #d8c8e8, #ece4f4 75%);
  opacity: .58;
  clip-path: polygon(
    50% calc(50% - .8px), var(--map-x) calc(var(--map-y) - .8px),
    var(--map-x) calc(var(--map-y) + .8px), 50% calc(50% + .8px)
  );
}
[data-orbit="1"] { --map-x: 29%; --map-y: 16%; }
[data-orbit="2"] { --map-x: 67%; --map-y: 17%; }
[data-orbit="3"] { --map-x: 13%; --map-y: 46%; }
[data-orbit="4"] { --map-x: 87%; --map-y: 54%; }
[data-orbit="5"] { --map-x: 32%; --map-y: 82%; }
[data-orbit="6"] { --map-x: 67%; --map-y: 84%; }
.ai-bubble {
  color: var(--navy);
  border: 1px solid #e3d9ef;
  background: #faf6ff;
  box-shadow: 0 8px 22px #4c326b0e;
}
.ai-topic {
  justify-self: center;
  width: min(100%, 146px);
  gap: 6px;
  padding: 9px;
  background: linear-gradient(150deg, #fcfaff, #f3edf9);
  border-color: #e4d8ee;
  transition: translate .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.ai-map .ai-topic { width: min(24%, 146px); }
.ai-topic:has(.ai-type-case) { background: linear-gradient(150deg, #fafcff, #edf2f9); border-color: #dce5f1; }
.ai-topic:hover { --map-hover: -4px; border-color: #bda6df; box-shadow: 0 12px 25px #4c326b1b; }
.ai-topic-title { max-width: 16ch; font-size: clamp(.88rem, 1.85cqw, 1.02rem); font-weight: 720; letter-spacing: -.025em; line-height: 1.12; }
.ai-type { display: inline-flex; align-items: center; justify-self: center; padding: 3px 8px; border-radius: 999px; font-size: .73rem; font-weight: 700; line-height: 1.15; }
.ai-topic .ai-type { background: transparent; padding: 0; font-size: .69rem; font-weight: 650; }
.ai-type-view { background: #eee3fa; color: #60407d; }
.ai-type-case { background: #e6eff9; color: #285578; }
.ai-topic-art {
  position: relative;
  flex: 0 0 37px;
  width: 45px;
  --icon-fill: linear-gradient(150deg, #e0d1ef, #a185c2);
}
.ai-topic:has(.ai-type-case) .ai-topic-art {
  --icon-fill: linear-gradient(150deg, #d0e0f3, #7899c1);
}
.ai-topic-art::before, .ai-topic-art::after { content: ""; position: absolute; }
.ai-topic-art-orchestration::before {
  inset: 4px 4px 4px 5px;
  background: linear-gradient(28deg, transparent 46%, #b29acb 48% 53%, transparent 55%) bottom / 100% 50% no-repeat,
    linear-gradient(-28deg, transparent 46%, #b29acb 48% 53%, transparent 55%) top / 100% 50% no-repeat;
}
.ai-topic-art-orchestration::after {
  left: 3px; top: 13px; width: 12px; height: 12px; border-radius: 50%;
  background: var(--icon-fill);
  box-shadow: 26px -10px 0 -1px #b19acb, 26px 10px 0 -1px #9d7cbd;
}
.ai-topic-art-accountability::before {
  inset: 2px 8px 1px;
  background: var(--icon-fill);
  clip-path: polygon(50% 0, 94% 16%, 91% 61%, 78% 79%, 50% 100%, 22% 79%, 9% 61%, 6% 16%);
}
.ai-topic-art-accountability::after {
  top: 12px; left: 16px; width: 13px; height: 8px;
  border-left: 2px solid #fff; border-bottom: 2px solid #fff;
  transform: rotate(-45deg);
}
.ai-topic-art-testing::before {
  inset: 2px 9px 2px;
  border-radius: 5px;
  background: var(--icon-fill);
  box-shadow: inset 0 0 0 1px #7797bb55;
}
.ai-topic-art-testing::after {
  inset: 10px 14px;
  background: radial-gradient(circle, #f8fbff 1px, transparent 1.5px) left top / 4px 6px repeat-y,
    repeating-linear-gradient(#f8fbff 0 2px, transparent 2px 6px) right 2px / 11px 15px no-repeat;
}
.ai-topic-art-filter::before {
  inset: 5px 13px 3px 3px;
  background: var(--icon-fill);
  clip-path: polygon(3% 0, 97% 0, 97% 15%, 62% 55%, 62% 87%, 39% 100%, 39% 55%, 3% 15%);
}
.ai-topic-art-filter::after {
  width: 13px; height: 13px; top: 11px; right: 2px;
  background: var(--icon-fill);
  clip-path: polygon(50% 0, 64% 36%, 100% 50%, 64% 64%, 50% 100%, 36% 64%, 0 50%, 36% 36%);
}
.ai-topic-art-knowledge::before {
  inset: 7px 7px 3px;
  border-radius: 50% / 25%;
  background: var(--icon-fill);
}
.ai-topic-art-knowledge::after {
  inset: 3px 7px auto;
  height: 11px;
  border-radius: 50%;
  background: #d4e4f6;
  box-shadow: 0 7px 0 -1px #afc5df, 0 14px 0 -1px #91aecf;
}
.ai-topic-art-skills::before, .ai-topic-art-skills::after {
  width: 12px; height: 12px; border-radius: 3px;
}
.ai-topic-art-skills::before {
  top: 6px; left: 9px; background: var(--icon-fill);
  box-shadow: 0 14px #9cb6d3, 14px 14px #7f9ec4;
}
.ai-topic-art-skills::after {
  top: 5px; left: 24px; background: #c1d5ec; transform: rotate(12deg);
}
.ai-detail {
  display: grid;
  justify-items: start;
  align-content: center;
  gap: 14px;
  max-width: 680px;
  min-height: clamp(320px, 48vh, 465px);
  margin: 0 auto;
  padding: clamp(25px, 5vw, 54px);
  border-radius: clamp(30px, 6vw, 64px);
}
.ai-detail .ai-type { justify-self: start; }
.ai-detail-title { max-width: none; font-size: clamp(1.85rem, 4vw, 3.1rem); line-height: 1.07; letter-spacing: -.06em; }
.ai-detail p { max-width: 60ch; color: var(--muted); line-height: 1.62; }
.ai-back { margin-bottom: 5px; background: #ffffffab; color: var(--ink); border-color: var(--edge); }

.ai-arrival .ai-topic { animation: ai-bubble-in 320ms ease-out both; }
.ai-arrival .ai-topic:nth-of-type(2) { animation-delay: 50ms; }
.ai-arrival .ai-topic:nth-of-type(3) { animation-delay: 100ms; }
.ai-arrival .ai-topic:nth-of-type(4) { animation-delay: 150ms; }
.ai-arrival .ai-topic:nth-of-type(5) { animation-delay: 200ms; }
.ai-arrival .ai-topic:nth-of-type(6) { animation-delay: 250ms; }
@keyframes ai-bubble-in {
  from { opacity: 0; transform: translateY(8px) scale(.96); }
  to { opacity: 1; transform: none; }
}
.ai-home-switch [data-scene="home"] [data-destination="my-view-on-ai"],
.ai-home-switch .ai-hub { view-transition-name: ai-hub; }
.ai-home-switch [data-scene="home"] .portrait { view-transition-name: ai-traveller; }
.ai-home-switch::view-transition-group(ai-hub),
.ai-topic-switch::view-transition-group(ai-bubble) {
  z-index: 3;
  animation-duration: 460ms;
  animation-timing-function: cubic-bezier(.22,.74,.24,1);
}
.ai-home-switch::view-transition-old(ai-traveller) { animation: ai-traveller-away 300ms ease-out both; }
.ai-home-switch::view-transition-new(root),
.ai-topic-switch::view-transition-new(root) { animation-duration: 330ms; }
.ai-home-switch .ai-arrival { --ai-entry-delay: 240ms; }
.ai-home-switch .ai-arrival .ai-topic { animation-delay: calc(var(--ai-entry-delay) + var(--ai-topic-delay, 0ms)); }
.ai-home-switch .ai-topic:nth-of-type(2) { --ai-topic-delay: 50ms; }
.ai-home-switch .ai-topic:nth-of-type(3) { --ai-topic-delay: 100ms; }
.ai-home-switch .ai-topic:nth-of-type(4) { --ai-topic-delay: 150ms; }
.ai-home-switch .ai-topic:nth-of-type(5) { --ai-topic-delay: 200ms; }
.ai-home-switch .ai-topic:nth-of-type(6) { --ai-topic-delay: 250ms; }
.ai-topic-switch .ai-expanding { view-transition-name: ai-bubble; }
@keyframes ai-traveller-away { 65% { opacity: 1; } to { opacity: 0; transform: translateY(6px); } }

@container (max-width: 530px) {
  .ai-overview.ai-map { height: 660px; }
  .ai-map .ai-topic { width: min(44%, 114px); gap: 4px; padding: 5px; }
  .ai-hub { width: clamp(128px, 35%, 158px); }
  .ai-hub .card-art { flex-basis: 55px; transform: scale(.62); }
  .ai-topic-art { flex-basis: 31px; transform: scale(.83); transform-origin: center top; }
  .ai-topic-title { font-size: clamp(.79rem, 3.5cqw, .92rem); }
  .ai-topic .ai-type { font-size: .66rem; }
  [data-orbit="1"] { --map-x: 25%; --map-y: 10%; }
  [data-orbit="2"] { --map-x: 75%; --map-y: 17%; }
  [data-orbit="3"] { --map-x: 23%; --map-y: 28%; }
  [data-orbit="4"] { --map-x: 76%; --map-y: 72%; }
  [data-orbit="5"] { --map-x: 25%; --map-y: 83%; }
  [data-orbit="6"] { --map-x: 73%; --map-y: 91%; }
}
@media (prefers-reduced-motion: reduce) {
  .ai-arrival .ai-topic { animation: none; }
  .ai-topic { transition: none; }
  .ai-topic:hover { --map-hover: 0px; }
}

@media (max-width: 620px) {
  .road-track { min-height: clamp(165px, 28vh, 205px); }
}
@media (max-width: 380px) {
  .topbar:has(.chapter-dock:not([hidden])) .topbar-inner { min-height: 0; flex-wrap: wrap; gap: 5px; padding-block: 7px; }
  .chapter-dock { margin-left: auto; padding: 0; }
}
@media (prefers-reduced-motion: reduce) {
  [data-phase="walking"] .road-side::after, [data-phase="settling"] .road-side::after { animation: none; }
  .chapter-dock .chapter-card:hover { transform: none; }
}
