/* Locked chapter preview.
   Missing from the asset pack: a cyber rule sheen image. The sheen is the gradient below.
   Missing a tutor screen capture. Card 1 uses tutor-v1-poster-1280.webp.
   The closed-fold still is not referenced. The graded poster is the intro picture. */

:root {
  --bg: #0b111a;
  --fg: #c5d0da;
  --fg-strong: #e8dcc0;
  --fg-muted: #9aa7b5;
  --link: #8ed4ce;
  --focus: #8ed4ce;
  --champagne: #e8dcc0;
  --welcome-mid: #e8dcc0;
  --cyan: #8ed4ce;
  --frost: #cfe3ea;
  --glass: rgba(17, 26, 37, 0.5);
  --glass-line: rgba(202, 218, 235, 0.1);
  --solid: #121a24;
  --header-h: 60px;
  --font-display: "Cormorant Garamond", "Times New Roman", serif;
  --font-body: "Public Sans", sans-serif;
  --font-pixel: "MaQkrs Pixel", sans-serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --glass-sheen: rgba(232, 220, 192, 0.12);
  color-scheme: dark;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 100%;
  line-height: 1.5;
  scroll-padding-top: var(--header-h);
}

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

html {
  background: var(--bg);
  scroll-padding-top: var(--header-h);
  overflow-x: clip;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  overflow-x: clip;
}

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

img {
  height: auto;
}

:focus {
  outline: none;
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  scroll-margin-top: var(--header-h);
}

@supports not selector(:focus-visible) {
  :focus {
    outline: 2px solid var(--focus);
    outline-offset: 3px;
  }
}

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

.skip-link {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 40;
  transform: translateY(-160%);
  background: var(--solid);
  color: var(--fg-strong);
  padding: 12px 16px;
  min-height: 44px;
  text-decoration: none;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 12px;
  background: rgba(11, 17, 26, 0.94);
  border-bottom: 1px solid var(--glass-line);
}

.brand {
  color: var(--fg-strong);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: -0.02em;
  text-decoration: none;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.brand img {
  width: 44px;
  height: 44px;
  object-fit: contain;
}

.brand .brand-logo-lockup,
.brand .brand-logo-crest-small {
  display: none;
  object-fit: contain;
}

.brand .brand-logo-crest-small {
  display: block;
  width: 44px;
  height: 44px;
}

@media (max-width: 240px) {
  .brand .brand-logo-crest-small {
    width: 40px;
    height: 40px;
  }
}

@media (min-width: 900px) {
  .brand .brand-logo-crest-small {
    display: none;
  }

  .brand .brand-logo-lockup {
    display: block;
    width: 240px;
    height: auto;
  }

  :root { --header-h: 96px; }

  .site-header {
    height: auto;
    min-height: 96px;
  }
}

.menu {
  position: relative;
}

.menu summary {
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  list-style: none;
  cursor: pointer;
  color: var(--fg-strong);
  font: 600 1rem/1 var(--font-body);
}

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

.menu-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  width: min(280px, calc(100vw - 24px));
  max-height: calc(100dvh - var(--header-h) - 16px);
  overflow: auto;
  padding: 8px;
  background: var(--solid);
  border: 1px solid var(--glass-line);
  border-radius: 12px;
}

.chapter-nav {
  display: flex;
  flex-direction: column;
}

.chapter-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 8px 10px;
  color: var(--link);
  text-decoration: none;
  border-radius: 8px;
}

.chapter-nav a[aria-current="true"] {
  color: var(--fg-strong);
  box-shadow: inset 3px 0 0 var(--cyan);
}

.chapter-nav img,
.guide-btn img {
  width: 24px;
  height: 24px;
  flex: none;
}

.guide-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  margin-top: 4px;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--fg-strong);
  font: 600 1rem/1.2 var(--font-body);
  text-align: left;
  cursor: pointer;
}

.chapter {
  position: relative;
  padding: 48px 16px 72px;
  background:
    linear-gradient(180deg, var(--glass-sheen), transparent 200px),
    var(--bg);
  color: var(--fg);
}

.chapter h1,
.chapter h2,
.chapter h3 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.05;
  color: #e8dcc0;
  margin: 0 0 12px;
  scroll-margin-top: calc(var(--header-h) + 8px);
}

.chapter h2 {
  font-size: clamp(1.7rem, 6vw, 2.5rem);
  max-width: 20ch;
}

.chapter h3 {
  font-family: var(--font-body);
  font-size: 1.125rem;
  margin-bottom: 4px;
}

.chapter p,
.chapter li {
  font-variant-numeric: tabular-nums;
}

.lede,
.prose,
.caption,
.founder,
.role {
  max-width: 40rem;
  margin: 0 0 12px;
  color: var(--fg);
  font-size: 1rem;
}

.muted {
  color: var(--fg-muted);
  font-size: 1rem;
}

a {
  color: var(--link);
}

a:visited {
  color: var(--link);
}

.text-link,
.contact-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 0;
}

.site-footer {
  padding: 8px 16px 32px;
  background: var(--bg);
  border-top: 1px solid var(--glass-line);
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  max-width: 40rem;
}

.site-footer a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 0;
  color: var(--link);
  text-decoration: none;
}

.site-footer .sep {
  margin: 0 10px;
  color: var(--fg-muted);
}

.title-pending {
  opacity: 0;
  transform: translateY(8px);
}

.title-pending.is-in {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}

.title-pending.is-in.delay {
  transition-delay: 60ms;
}

#intro {
  --glass-sheen: rgba(232, 220, 192, 0.12);
  min-height: calc(100svh - var(--header-h));
  min-height: calc(100dvh - var(--header-h));
  height: calc(100dvh - var(--header-h));
  display: flex;
  flex-direction: column;
  padding: 0 0 12px;
  overflow: hidden;
}

.hero-stage {
  position: relative;
  flex: 0 0 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.hero-film {
  position: relative;
  flex: 0 0 auto;
  width: 100%;
  aspect-ratio: 16 / 9;
  min-height: 0;
  margin-top: 64px;
  overflow: hidden;
}

.hero-video,
.hero-poster {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  background: #0b111a;
}

.hero-video {
  position: absolute;
  inset: 0;
}

.hero-film:not(.is-playing) .hero-video,
.hero-film.is-fallback .hero-video {
  opacity: 0;
}

.hero-film.is-fallback .hero-poster {
  animation: none;
}

@keyframes hero-drift {
  from { transform: scale(1); opacity: 1; }
  to { transform: scale(1.06); opacity: 0.9; }
}

.film-pause {
  position: absolute;
  top: calc(var(--header-h) + 8px);
  right: 12px;
  z-index: 25;
  margin: 0;
  scroll-margin-top: var(--header-h);
}

.js .film-pause {
  position: fixed;
}

.scene-frame {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  transform: scale(0.82);
  transform-origin: 50% 70%;
}

.scene-frame picture,
.scene-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: 62% 42%;
  background: #0b111a;
}

.intro-copy {
  margin-top: 21px;
  padding: 8px 20px 8px;
}

.welcome-mark {
  --welcome-p: 1;
  display: inline-block;
  margin: 0 0 8px;
  color: var(--welcome-mid);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .welcome-mark {
    background-image: linear-gradient(100deg, #f7f2e8, #e8dcc0 42%, #8ed4ce);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
  }
}

.welcome-rule {
  display: block;
  height: 2px;
  margin-top: 6px;
  background: linear-gradient(90deg, #e8dcc0, #8ed4ce);
  transform: scaleX(1);
  transform-origin: 0 50%;
}

.intro-copy h1 {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 11vw, 4.25rem);
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.02;
  color: #e8dcc0;
  margin: 0 0 6px;
}

.brand-slot {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 4px 0 8px;
}

.brand-slot img {
  width: 48px;
  height: 48px;
  image-rendering: auto;
}

.brand-word {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.75rem;
  line-height: 1;
  color: #8ed4ce;
}

.eyebrow,
.hero-location {
  margin: 8px 0 0;
  color: #8ed4ce;
}

.hero-description {
  margin: 8px 0 0;
  max-width: 38rem;
}

.subhead {
  margin: 0;
  font-size: 1.125rem;
  color: var(--fg);
}

#workshop {
  --glass-sheen: rgba(142, 212, 206, 0.1);
}

.pilot-spacer {
  height: 40vh;
}

.pilot-sticky {
  position: sticky;
  top: calc(var(--header-h) + 12px);
  z-index: 2;
  padding-bottom: 8px;
  background: #0b111a;
}

.workshop-screen {
  transform: scale(1);
  transform-origin: 50% 60%;
  max-width: 960px;
  margin: 0 auto 16px;
  touch-action: pan-y;
}

.stage {
  position: relative;
  display: grid;
  width: 100%;
}

.stage > .fold,
.stage > .poster {
  grid-area: 1 / 1;
  width: 100%;
  height: auto;
  display: block;
}

.poster {
  z-index: 3;
  opacity: 1;
  image-rendering: pixelated;
}

.fold {
  z-index: 1;
}

.sign-canvas {
  z-index: 2;
  position: absolute;
  left: 25%;
  top: 20.3703703704%;
  width: 50%;
  height: 59.2592592593%;
  image-rendering: pixelated;
  pointer-events: none;
}

.pilots {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 12px;
}

.pilot {
  width: 100%;
  min-height: 44px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 4px;
  padding: 6px 4px 8px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--fg-strong);
  cursor: default;
  touch-action: pan-y;
}

.pilot-still,
.pilot canvas {
  width: 64px;
  height: 64px;
  image-rendering: pixelated;
}

.pilot-still {
  display: block;
  background-repeat: no-repeat;
  background-position: 0 0;
  background-size: 100% 100%;
  image-rendering: pixelated;
}

.pilot[data-agent="portfolio-bot"] .pilot-still,
.hero-pilot[data-agent="portfolio-bot"] .pilot-still { background-image: url("../assets/pilots/portfolio_bot-idle-4x.webp"); }
.pilot[data-agent="launchpad"] .pilot-still,
.hero-pilot[data-agent="launchpad"] .pilot-still { background-image: url("../assets/pilots/launchpad-idle-4x.webp"); }
.pilot[data-agent="forge"] .pilot-still,
.hero-pilot[data-agent="forge"] .pilot-still { background-image: url("../assets/pilots/forge-idle-4x.webp"); }
.pilot[data-agent="oracle"] .pilot-still,
.hero-pilot[data-agent="oracle"] .pilot-still { background-image: url("../assets/pilots/oracle-idle-4x.webp"); }
.pilot[data-agent="course-tracker"] .pilot-still,
.hero-pilot[data-agent="course-tracker"] .pilot-still { background-image: url("../assets/pilots/course_tracker-idle-4x.webp"); }
.pilot[data-agent="calendia"] .pilot-still,
.hero-pilot[data-agent="calendia"] .pilot-still { background-image: url("../assets/pilots/calendia-idle-4x.webp"); }

.pilot canvas {
  margin-top: -64px;
  pointer-events: none;
  background: transparent;
}

.pixel {
  font-family: var(--font-pixel);
  font-size: 16px;
  line-height: 16px;
  font-weight: 400;
  letter-spacing: 0;
  -webkit-font-smoothing: none;
  text-align: center;
  color: var(--champagne);
}

.pilot .role {
  font-size: 0.875rem;
  line-height: 1.3;
  text-align: center;
  margin: 0;
  color: var(--fg);
}

.pilot.is-on {
  box-shadow: inset 0 0 0 2px var(--cyan);
}

.founder {
  margin-top: 16px;
}

.pause-btn {
  min-width: 44px;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--glass-line);
  background: var(--solid);
  color: var(--fg-strong);
  font: 600 1rem/1 var(--font-body);
  cursor: pointer;
}

.seam {
  height: 28px;
  margin: 0 16px;
  background: linear-gradient(115deg, transparent, rgba(142, 212, 206, 0.45) 35%, rgba(232, 220, 192, 0.7) 50%, transparent 70%);
  pointer-events: none;
  transform-origin: 0 50%;
}

#cyber {
  --glass-sheen: rgba(142, 212, 206, 0.08);
}

.cyber-stage {
  position: relative;
  max-width: 40rem;
  min-height: 280px;
  padding-top: 8px;
}

.lattice {
  position: absolute;
  inset: 0 auto auto 0;
  width: min(100%, 430px);
  height: auto;
  opacity: 0.9;
  pointer-events: none;
}

.cyber-sheen {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 80px;
  opacity: 0.35;
  pointer-events: none;
  background: linear-gradient(100deg, rgba(232, 220, 192, 0.55), rgba(142, 212, 206, 0.22) 46%, transparent 72%);
}

.scan {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  pointer-events: none;
  z-index: 2;
}

.bar {
  flex: 1 1 0;
  background: #0b111a;
  transform: scaleY(0);
  transform-origin: top center;
  border-bottom: 1px solid rgba(142, 212, 206, 0.28);
}

.cyber-copy {
  position: relative;
  z-index: 1;
  padding-top: 72px;
}

.sfs-line {
  max-width: 16em;
  font-size: clamp(1.45rem, 5.2vw, 2.05rem);
}

.chips {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0;
  padding: 0;
}

.chips li {
  margin: 0;
  padding: 8px 12px;
  border: 1px solid rgba(142, 212, 206, 0.45);
  border-radius: 999px;
  color: var(--fg-strong);
  background: var(--glass);
}

.figurine {
  width: 64px;
  height: 64px;
  margin-top: 8px;
}

#build {
  --glass-sheen: rgba(142, 212, 206, 0.16);
}

.build-pin {
  max-width: 100%;
}

.build-viewport {
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: 16px;
  width: 100%;
  max-width: 100%;
  padding-bottom: 8px;
}

.snap-hint {
  margin: 8px 0 0;
  color: var(--fg-muted);
  font-size: 0.875rem;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  margin: 0 0 8px;
  padding: 2px 10px;
  border-radius: 999px;
  border: 1px solid rgba(142, 212, 206, 0.45);
  color: var(--fg-strong);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.icon-frame {
  display: grid;
  justify-items: center;
  gap: 8px;
  margin: 8px 0 4px;
  padding: 16px;
  border: 1px solid rgba(142, 212, 206, 0.55);
  border-radius: 16px;
  background: #121a24;
  text-align: center;
}

.card-note {
  margin: 0;
  color: var(--fg-muted);
  font-size: 0.875rem;
}

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

.repo-name {
  margin: 0;
  color: var(--fg-muted);
  font-size: 0.875rem;
}

.build-track {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.motion .build-card,
.build-card {
  width: min(84vw, 320px);
  flex: none;
  scroll-snap-align: center;
}

.build-card {
  margin: 0;
  padding: 16px;
  border-radius: 18px;
  background: var(--glass);
  border: 1px solid var(--glass-line);
  position: relative;
}

.build-card::before,
.glass-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--glass-sheen);
  pointer-events: none;
}

.card-kicker {
  margin: 0 0 8px;
  color: var(--fg);
}

.card-visual {
  position: relative;
  display: grid;
  aspect-ratio: 16 / 9;
  height: auto;
  margin: 8px 0 4px;
  border-radius: 16px;
  overflow: hidden;
  background: #0b111a;
  border: 1px solid var(--glass-line);
}

.motion .build-card {
  box-shadow: none;
  filter: none;
}

.motion .build-card::before {
  content: none;
}

.card-visual img {
  grid-area: 1 / 1;
  justify-self: center;
  align-self: center;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.layer-hex,
.layer-icon {
  opacity: 0;
}

.layer-screen {
  opacity: 1;
}

.layer-icon {
  width: 88px;
  height: 88px;
}

.caption {
  margin-top: 20px;
}

#teach {
  --bg: #f5f7fa;
  --fg: #0b111a;
  --fg-strong: #0b111a;
  --fg-muted: #243140;
  --link: #0c4f4a;
  --focus: #0c4f4a;
  --glass-sheen: rgba(232, 220, 192, 0.18);
  color-scheme: light;
}

#teach-title {
  color: var(--fg-strong);
}

.board {
  --fg: #c5d0da;
  --fg-strong: #e8dcc0;
  --fg-muted: #9aa7b5;
  --link: #8ed4ce;
  --focus: #8ed4ce;
  --glass-sheen: rgba(232, 220, 192, 0.18);
  position: relative;
  margin-top: 16px;
  padding: 16px;
  border-radius: 18px;
  background: #0b111a;
  color: var(--fg);
  color-scheme: dark;
  overflow: hidden;
}

.chalks {
  position: absolute;
  left: 12px;
  right: 12px;
  top: 8px;
  height: 112px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  pointer-events: none;
}

.chalk {
  width: 100%;
  height: 112px;
  object-fit: contain;
  object-position: center;
  opacity: 0.25;
}

.teach-reveal {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 12px;
  min-height: 280px;
  padding-top: 124px;
}

.light-sheet {
  position: absolute;
  inset: 0 0 auto;
  height: 112px;
  background: linear-gradient(#e8dcc0, transparent);
  pointer-events: none;
  opacity: 0.14;
}

.glass-card {
  position: relative;
  padding: 16px;
  border-radius: 16px;
  background: rgba(17, 26, 37, 0.72);
  border: 1px solid var(--glass-line);
  color: #c5d0da;
}

.glass-card p {
  margin: 0;
  color: #c5d0da;
}

.more {
  margin-top: 16px;
  max-width: 40rem;
}

.more summary {
  min-height: 44px;
  display: flex;
  align-items: center;
  cursor: pointer;
  color: var(--link);
  font-weight: 600;
}

.more p {
  margin: 8px 0 0;
}

#roots {
  --glass-sheen: rgba(207, 227, 234, 0.14);
}

.roots-reveal {
  position: relative;
  max-width: 430px;
  margin-top: 8px;
}

.roots-art {
  display: grid;
  width: 100%;
}

.roots-art img {
  grid-area: 1 / 1;
  width: 100%;
  height: auto;
}

.notes {
  position: relative;
  z-index: 1;
  margin: 12px 0 0;
  padding: 0 0 0 1.1rem;
  max-width: 40rem;
}

.notes li {
  margin: 0 0 12px;
  padding-left: 4px;
}

#contact {
  --glass-sheen: rgba(207, 227, 234, 0.08);
}

.doors {
  position: relative;
  height: auto;
  max-width: 220px;
  margin: 8px auto 4px;
  overflow: visible;
  display: grid;
  place-items: center;
}

.pane {
  display: none;
}

.pane {
  position: absolute;
  top: 0;
  width: 52%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.pane-left {
  left: 0;
  transform: translateX(-100%);
}

.pane-right {
  right: 0;
  transform: translateX(100%);
}

.medallion {
  position: relative;
  width: 168px;
  height: 168px;
  display: grid;
  place-items: center;
  border-radius: 50%;
}

.medallion {
  background: transparent;
}

.medallion .portrait {
  width: 168px;
  height: 168px;
  object-fit: cover;
  border-radius: 50%;
  background: transparent;
  -webkit-mask-image: radial-gradient(circle, #000 60%, transparent 74%);
  mask-image: radial-gradient(circle, #000 60%, transparent 74%);
}

.medallion .rim-pilot {
  position: absolute;
  right: -4px;
  bottom: 8px;
  width: 24px;
  height: 24px;
}

.medallion.is-settled {
  background: transparent;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.contact-links {
  list-style: none;
  margin: 12px auto 0;
  padding: 0;
  max-width: 40rem;
}

.contact-links a {
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 2px;
  font-weight: 600;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.contact-links .addr {
  color: var(--fg);
  font-weight: 400;
}

@media (min-width: 720px) {
  .chapter {
    padding-left: 32px;
    padding-right: 32px;
  }

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

  .intro-copy {
    padding-left: 32px;
    padding-right: 32px;
  }
}

@media (min-width: 1000px) {
  .pilots {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

@media (max-width: 359px) {
  .pilot-still,
  .pilot canvas {
    width: 32px;
    height: 32px;
    background-size: 32px 32px;
  }

  .pilot canvas {
    margin-top: -32px;
  }
}

@media (pointer: coarse) {
  .seam {
    display: none;
  }
}

.chapter-nav img.nav-pilot,
.mq-badge img.mq-pixel {
  width: 32px;
  height: 32px;
  image-rendering: pixelated;
}

#ecosystem {
  overflow-x: clip;
}

.crew-bot {
  position: absolute;
  top: 56px;
  right: 12px;
  z-index: 4;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.crew-walk,
.crew-hop {
  display: block;
  width: 100%;
  height: 100%;
}

.crew-hop {
  background-color: transparent;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 32px 32px;
  image-rendering: pixelated;
}

.crew-bot {
  --crew-travel: -72px;
  --crew-lift: -14px;
}

.motion-soft .crew-bot {
  --crew-travel: -18px;
  --crew-lift: -4px;
}

.crew-walk.is-walking {
  animation: crew-walk 2.4s linear 1 forwards;
}

.crew-hop.is-hop {
  animation: crew-hop 0.45s cubic-bezier(0.16, 1, 0.3, 1) 1;
}

.scene-background .crew-walk,
.scene-background .crew-hop,
.crew-bot.is-paused .crew-walk,
.crew-bot.is-paused .crew-hop {
  animation-play-state: paused;
}

@keyframes crew-walk {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(var(--crew-travel), 0, 0); }
}

@keyframes crew-hop {
  0% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(0, var(--crew-lift), 0); }
  100% { transform: translate3d(0, 0, 0); }
}

.scroll-tail {
  height: 0;
}

.motion .scroll-tail {
  height: 0;
}

.scenes-still .crew-walk,
.scenes-still .crew-hop,
.scenes-still .hero-film.is-fallback .hero-poster {
  animation: none;
}

@media (prefers-contrast: more), (prefers-reduced-transparency: reduce) {
  .site-header,
  .menu-panel,
  .build-card,
  .glass-card,
  .pause-btn,
  .medallion.is-settled {
    background: #121a24;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  .chips li {
    background: #121a24;
  }

  .pane {
    display: none;
  }

  .chapter-light .glass-card,
  #teach .glass-card {
    background: #121a24;
    color: #c5d0da;
  }
}

.chapter-nav img.nav-logo {
  width: 32px;
  height: 32px;
}

[data-chapter="ecosystem"],
[data-chapter="record"] {
  color-scheme: dark;
  --t-bg: var(--midnight-navy, #0e1622);
  --t-text: #f4f7fb;
  --t-heading: var(--champagne-50, #f7f2e8);
  --t-muted: var(--frost-300, #c5d0dc);
  --t-link: var(--cyan-200, #b7ebe6);
  --t-focus: var(--cyan-300, #8ed4ce);
}

[data-chapter] {
  --bg: var(--t-bg, var(--bg));
  --fg: var(--t-text, var(--fg));
  --fg-strong: var(--t-heading, var(--fg-strong));
  --fg-muted: var(--t-muted, var(--fg-muted));
  --link: var(--t-link, var(--link));
  --focus: var(--t-focus, var(--focus));
}

.eco-list,
.record-list {
  display: grid;
  gap: 16px;
  max-width: 40rem;
  margin-top: 16px;
}

.eco-card {
  margin: 0;
  padding: 16px;
  border-radius: 18px;
  background: var(--glass);
  border: 1px solid var(--glass-line);
}

.eco-shot {
  display: block;
  width: 100%;
  height: auto;
  margin: 8px 0;
  border-radius: 12px;
  background: var(--solid);
}

.eco-meta,
.record-meta {
  margin: 0 0 8px;
  color: var(--fg-muted);
  font-size: 0.875rem;
}

.record-list details {
  border-bottom: 1px solid var(--glass-line);
  padding-bottom: 8px;
}

.record-list summary {
  min-height: 44px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  cursor: pointer;
  color: var(--fg-strong);
  font-weight: 600;
}

.record-list summary .record-meta {
  font-weight: 400;
}

.record-list ul {
  margin: 8px 0 0;
  padding-left: 1.2rem;
}

.record-list li {
  margin: 0 0 8px;
}

.skill-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.skill-pills li {
  margin: 0;
  padding: 8px 12px;
  border: 1px solid rgba(142, 212, 206, 0.45);
  border-radius: 999px;
  color: var(--fg-strong);
}

.mce-badge {
  width: 96px;
  height: 96px;
}

.site-footer .footer-copy,
.site-footer .footer-note {
  margin: 8px 0;
  color: var(--fg-muted);
  max-width: 40rem;
}

.site-footer a.mq-badge,
.site-footer a.mq-badge:visited {
  color: #ffffff;
  text-decoration: none;
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: var(--space-fib-4) 0;
  min-height: 44px;
}

.site-footer a.mq-badge img {
  width: 120px;
  height: 20px;
  image-rendering: auto;
}

.brand-logo {
  image-rendering: auto;
}

.walk-pilots {
  margin: 12px 0 0;
}

.walk-pilots:disabled {
  opacity: 0.55;
}

.media-trigger {
  display: grid;
  width: 100%;
  min-height: 44px;
  margin: 8px 0;
  padding: 0;
  border: 0;
  background: #0b111a;
  color: #e8dcc0;
  cursor: pointer;
  position: relative;
  text-align: left;
}

.preview-poster {
  width: 100%;
  height: auto;
  display: block;
}

.preview-cue {
  position: absolute;
  left: 8px;
  bottom: 8px;
  min-height: 44px;
  display: grid;
  place-items: center;
  padding: 0 12px;
  background: #0b111a;
  color: #e8dcc0;
}

.card-video {
  width: min(960px, calc(100vw - 24px));
  border: 0;
  padding: 12px;
  background: #0b111a;
  color: #e8dcc0;
}

.card-video::backdrop {
  background: rgba(11, 17, 26, 0.72);
}

.card-video video {
  width: 100%;
  height: auto;
  background: #0b111a;
}

.card-video h2 {
  margin: 0 0 8px;
  font-family: "Cormorant Garamond", "Times New Roman", serif;
  font-weight: 600;
  font-size: 1.75rem;
  color: #e8dcc0;
}

.card-video button,
#print-portfolio {
  min-width: 44px;
  min-height: 44px;
}

.repo-grid {
  display: grid;
  gap: 16px;
  margin-top: 8px;
}

.repo-grid h3 {
  margin-bottom: 4px;
}

.record-meta {
  margin: 0 0 4px;
  color: #8ed4ce;
}

.crew-bot {
  pointer-events: none;
}

html.motion-paused .crew-walk,
html.motion-paused .crew-hop {
  animation-play-state: paused;
}

.menu-access {
  margin-top: var(--space-fib-5);
  padding-top: var(--space-fib-4);
  border-top: 1px solid var(--glass-line);
}

.menu-kicker {
  margin: 0 0 var(--space-fib-3);
  color: var(--fg-muted);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

#reduce-motion {
  min-width: 44px;
  min-height: 44px;
  padding: 0 var(--space-fib-4);
  border: 1px solid var(--glass-line);
  border-radius: 8px;
  background: transparent;
  color: var(--fg);
  font: 600 0.875rem/1 var(--font-body);
}

#reduce-motion[aria-pressed="true"] {
  color: var(--champagne);
  border-color: var(--cyan);
}

.hero-lockup {
  display: block;
  width: min(240px, 100%);
  height: auto;
}

.resume-item {
  padding: var(--space-fib-5) 0;
  border-bottom: 1px solid var(--glass-line);
}

.resume-role {
  margin: 0 0 var(--space-fib-3);
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  line-height: 1.25;
}

.resume-meta,
.resume-item .resume-meta {
  margin: 0 0 var(--space-fib-4);
  color: var(--cyan);
}

.resume-item ul {
  margin: 0;
  padding-left: 1.1rem;
}

.resume-item li {
  margin: 0 0 var(--space-fib-3);
}

.source-list {
  list-style: none;
  margin: var(--space-fib-5) 0 0;
  padding: 0;
  display: grid;
  gap: var(--space-fib-5);
}

.source-list li {
  margin: 0;
  padding: var(--space-fib-5);
  border: 1px solid var(--glass-line);
  border-radius: 12px;
  background: rgba(17, 26, 37, 0.5);
}

.contact-cards {
  display: grid;
  gap: var(--space-fib-4);
  margin: var(--space-fib-6) 0 0;
  padding: 0;
  list-style: none;
}

.contact-cards li {
  margin: 0;
  padding: 0 var(--space-fib-5);
  border: 1px solid var(--glass-line);
  border-radius: 12px;
}

.contact-cards a {
  text-underline-offset: 0.18em;
}

.site-footer {
  display: grid;
  gap: var(--space-fib-4);
  padding: var(--space-fib-6) var(--space-fib-5) var(--space-fib-7);
}

.invasion-banner {
  position: relative;
  width: 100%;
  margin: var(--space-fib-5) auto var(--space-fib-6);
}

.invasion-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 16px;
  overflow: hidden;
  background: #0b111a;
}

.invasion-banner.is-scroll-stage.can-hold {
  height: calc(var(--invasion-height) + var(--invasion-hold));
}

.invasion-banner.can-hold .invasion-stage {
  position: sticky;
  top: var(--invasion-top);
}

.invasion-poster,
.invasion-banner canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.invasion-banner.is-playing .invasion-poster {
  opacity: 0;
}

.eco-tabs {
  display: flex;
  gap: var(--space-fib-4);
  overflow-x: auto;
  margin: var(--space-fib-5) 0;
}

.eco-tab {
  flex: none;
  min-height: 44px;
  padding: 0 var(--space-fib-5);
  border-radius: 999px;
  border: 1px solid var(--glass-line);
  background: transparent;
  color: var(--fg);
  font: 600 0.875rem/1 var(--font-body);
}

.eco-tab[aria-selected="true"] {
  color: var(--champagne);
  border-color: var(--cyan);
}

.eco-track {
  position: relative;
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: auto;
}

.eco-panel {
  flex: 0 0 100%;
  min-width: 0;
  scroll-snap-align: start;
}

.eco-row {
  padding: var(--space-fib-5) 0;
  border-bottom: 1px solid var(--glass-line);
}

.eco-row h3,
.eco-row p {
  margin: 0 0 var(--space-fib-3);
}

.card-poster {
  display: grid;
  align-items: end;
  aspect-ratio: 16 / 9;
  margin: 8px 0;
  padding: var(--space-fib-5);
  border-radius: 12px;
  background: #0b111a;
  color: #e8dcc0;
  border: 1px solid rgba(142, 212, 206, 0.35);
}

.card-poster p {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.35rem;
}

@media print {
  html,
  body {
    overflow: visible !important;
    height: auto !important;
    background: #fff;
    color: #111;
  }

  .film-pause,
  .hero-video,
  .crew-bot,
  .menu,
  .pilot-spacer,
  .card-video {
    display: none !important;
  }

  .invasion-banner.is-scroll-stage.can-hold {
    height: auto;
  }

  .invasion-stage {
    position: relative !important;
    top: auto !important;
  }

  .invasion-banner canvas,
  .sign-canvas { display: none; }

  .invasion-banner .invasion-poster,
  .poster { opacity: 1 !important; }

  .pin-spacer,
  .chapter,
  .pilot-sticky,
  .intro-copy,
  #intro {
    position: static !important;
    transform: none !important;
    height: auto !important;
    min-height: 0 !important;
    overflow: visible !important;
  }
}
