:root {
  --bg: #f2f6fc;
  --elevated: #e8eff9;
  --surface: #ffffff;
  --navy: #0a1e45;
  --accent: #2a7d42;
  --cyan: #1a8fb8;
  --ink: #1a2b44;
  --muted: #5c7294;
  --border: color-mix(in srgb, #4a7bc4 28%, transparent);
  --tint: #ffffff;
  --grid: color-mix(in srgb, #4a7bc4 10%, transparent);
  --shadow: #0a1e45;
  color-scheme: light;
}

html[data-theme="dark"] {
  --bg: #0a1220;
  --elevated: #121b2e;
  --surface: #152033;
  --navy: #e8eef8;
  --accent: #45b064;
  --cyan: #3eb6db;
  --ink: #d5deee;
  --muted: #8fa3c0;
  --border: color-mix(in srgb, #6a90c8 32%, transparent);
  --tint: #0f1828;
  --grid: color-mix(in srgb, #6a90c8 12%, transparent);
  --shadow: #000000;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--ink);
  font-family: Outfit, "Segoe UI", sans-serif;
}

.page {
  background:
    linear-gradient(var(--grid) 1px, transparent 1px) 0 0 / 48px 48px,
    linear-gradient(90deg, var(--grid) 1px, transparent 1px) 0 0 / 48px 48px,
    radial-gradient(900px 480px at 80% 0%, color-mix(in srgb, var(--cyan) 14%, transparent), transparent 60%),
    radial-gradient(700px 420px at 10% 30%, color-mix(in srgb, var(--accent) 10%, transparent), transparent 55%),
    var(--bg);
  transition: background-color 180ms ease-out, color 180ms ease-out;
}

.nav {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: 72px;
  padding: 0 1.25rem;
  backdrop-filter: blur(16px);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  border-bottom: 1px solid var(--border);
}

.nav__left, .nav__actions {
  display: flex;
  align-items: center;
  gap: .65rem;
}

.nav__links {
  display: none;
  gap: 1rem;
  margin-left: .5rem;
}

@media (min-width: 860px) {
  .nav__links { display: flex; }
}

.nav__links a {
  color: var(--muted);
  text-decoration: none;
  font-size: .92rem;
  font-weight: 500;
}

.nav__links a:hover,
.nav__links a.is-active {
  color: var(--navy);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  color: var(--navy);
  text-decoration: none;
  font-weight: 600;
  letter-spacing: -.04em;
  font-size: 1.05rem;
}

.brand__mark {
  width: 2rem;
  height: 2rem;
  border-radius: .55rem;
  object-fit: cover;
  display: block;
  flex-shrink: 0;
  box-shadow: 0 0 14px color-mix(in srgb, var(--cyan) 28%, transparent);
}

.lang {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: .65rem;
  overflow: hidden;
  background: var(--surface);
}

.lang button {
  border: 0;
  background: transparent;
  color: var(--muted);
  font: 600 .72rem "IBM Plex Mono", ui-monospace, monospace;
  letter-spacing: .04em;
  padding: .45rem .55rem;
  cursor: pointer;
}

.lang button.is-active {
  background: color-mix(in srgb, var(--accent) 12%, var(--tint));
  color: var(--accent);
}

.theme-toggle {
  width: 2.45rem;
  height: 2.45rem;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: .65rem;
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
  transition: color 160ms ease-out, border-color 160ms ease-out, background 160ms ease-out, transform 120ms ease-out;
}

.theme-toggle:hover {
  color: var(--navy);
  border-color: color-mix(in srgb, var(--cyan) 45%, transparent);
}

.theme-toggle:active {
  transform: scale(0.96);
}

.theme-toggle svg {
  width: 1.05rem;
  height: 1.05rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

html[data-theme="dark"] .theme-toggle__moon { display: none; }
html:not([data-theme="dark"]) .theme-toggle__sun { display: none; }
html:not([data-theme]) .theme-toggle__sun { display: none; }

.theme-toggle__moon {
  fill: currentColor;
  stroke: none;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.45rem;
  padding: 0 1rem;
  border-radius: .75rem;
  text-decoration: none;
  font-size: .92rem;
  font-weight: 600;
  transition: transform .15s ease, filter .15s ease, background .15s ease;
}

.btn:active { transform: scale(.98); }
.btn[hidden] { display: none; }
.btn-play { background: var(--accent); color: #fff; }
.btn-play:hover { filter: brightness(1.05); }
.btn-plain { background: none; border: 1px solid transparent; color: var(--navy); font-weight: 500; }
.btn-plain:hover { border-color: color-mix(in srgb, var(--cyan) 40%, transparent); background: var(--tint); }
.btn-enter {
  border: 1px solid color-mix(in srgb, var(--cyan) 55%, transparent);
  color: var(--navy);
  font-weight: 500;
  background: var(--surface);
}
.btn-enter:hover { background: color-mix(in srgb, var(--cyan) 10%, var(--tint)); }
.btn-wide {
  min-height: 2.75rem;
  background: var(--surface);
  border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
  color: var(--navy);
  box-shadow: inset 3px 0 0 var(--accent);
}

.hero {
  display: grid;
  gap: 2.5rem;
  max-width: 72rem;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 4rem;
  min-height: calc(100dvh - 72px);
  align-items: center;
}

@media (min-width: 980px) {
  .hero {
    grid-template-columns: 1.05fr .95fr;
    gap: 3rem;
    padding-top: 1.5rem;
  }
}

.eyebrow {
  margin: 0 0 .85rem;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: .78rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--cyan);
}

.hero h1 {
  margin: 0;
  font-size: clamp(2.4rem, 5.5vw, 4.2rem);
  line-height: .98;
  letter-spacing: -.055em;
  max-width: 11ch;
  color: var(--navy);
}

.hero h1 em {
  font-style: normal;
  color: var(--accent);
}

.hero-lead {
  margin: 1.1rem 0 0;
  max-width: 38ch;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.55;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin-top: 1.6rem;
}

.flow {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: 1.6rem;
  align-items: center;
}

.flow span {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: .74rem;
  padding: .4rem .65rem;
  border-radius: .55rem;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
}

.flow span.is-accent {
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
  color: var(--accent);
}

.flow i {
  font-style: normal;
  color: var(--muted);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: .8rem;
}

.device {
  position: relative;
  justify-self: center;
  width: min(100%, 380px);
  border-radius: 1.6rem;
  padding: .7rem;
  background: linear-gradient(160deg, #dfe8f6, #f7faff);
  border: 1px solid var(--border);
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--cyan) 12%, transparent),
    0 24px 60px color-mix(in srgb, var(--shadow) 12%, transparent);
}

.device__screen {
  border-radius: 1.15rem;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
}

.device__bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: .85rem 1rem .55rem;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: .72rem;
  color: var(--muted);
}

.device__title {
  padding: 0 1rem .85rem;
  font-size: 1.15rem;
  font-weight: 650;
  letter-spacing: -.03em;
  color: var(--navy);
}

.card-row {
  display: grid;
  gap: .55rem;
  padding: 0 1rem 1rem;
}

.word-card {
  display: grid;
  gap: .2rem;
  padding: .85rem .9rem;
  border-radius: .85rem;
  background: var(--elevated);
  border: 1px solid var(--border);
}

.word-card strong {
  font-size: 1.02rem;
  letter-spacing: -.02em;
  color: var(--navy);
}

.word-card span {
  color: var(--muted);
  font-size: .88rem;
}

.lamps-mini {
  display: flex;
  gap: .35rem;
  margin-top: .35rem;
}

.dot {
  width: .55rem;
  height: .55rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--muted) 30%, transparent);
}

.dot.on {
  background: var(--accent);
  box-shadow: 0 0 8px color-mix(in srgb, var(--accent) 35%, transparent);
}

.modes-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .45rem;
  padding: 0 1rem 1.1rem;
}

.modes-strip button {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  border-radius: .7rem;
  min-height: 2.4rem;
  font: 600 .78rem Outfit, sans-serif;
  cursor: default;
}

.modes-strip button.active {
  border-color: color-mix(in srgb, var(--accent) 50%, transparent);
  background: color-mix(in srgb, var(--accent) 12%, var(--tint));
  color: var(--accent);
}

.studio-line {
  margin: 0 1rem 1.15rem;
  padding: .85rem;
  border-radius: .85rem;
  background: #f4f8fd;
  border: 1px solid color-mix(in srgb, var(--cyan) 28%, transparent);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: .72rem;
  color: var(--muted);
}

.wave {
  display: flex;
  align-items: end;
  gap: 3px;
  height: 28px;
  margin-top: .55rem;
}

.wave i {
  display: block;
  width: 4px;
  border-radius: 99px;
  background: linear-gradient(180deg, var(--cyan), var(--accent));
  font-style: normal;
  animation: pulse 1.4s ease-in-out infinite;
}

.wave i:nth-child(1) { height: 30%; }
.wave i:nth-child(2) { height: 55%; animation-delay: .08s; }
.wave i:nth-child(3) { height: 80%; animation-delay: .16s; }
.wave i:nth-child(4) { height: 45%; animation-delay: .24s; }
.wave i:nth-child(5) { height: 95%; animation-delay: .32s; }
.wave i:nth-child(6) { height: 60%; animation-delay: .4s; }
.wave i:nth-child(7) { height: 35%; animation-delay: .48s; }
.wave i:nth-child(8) { height: 70%; animation-delay: .56s; }
.wave i:nth-child(9) { height: 50%; animation-delay: .64s; }
.wave i:nth-child(10) { height: 85%; animation-delay: .72s; }

@keyframes pulse {
  0%, 100% { transform: scaleY(.7); opacity: .7; }
  50% { transform: scaleY(1); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .wave i { animation: none; }
}

.section {
  max-width: 72rem;
  margin: 0 auto;
  padding: 4.5rem 1.25rem;
}

.display {
  margin: 0;
  font-size: clamp(1.9rem, 3.8vw, 3rem);
  line-height: 1.02;
  letter-spacing: -.05em;
  font-weight: 650;
  max-width: 16ch;
  color: var(--navy);
}

.lead {
  margin: 1rem 0 0;
  max-width: 46ch;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.55;
}

.rail {
  list-style: none;
  margin: 2.2rem 0 0;
  padding: 0;
  display: grid;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 1rem;
  overflow: hidden;
}

@media (min-width: 900px) {
  .rail { grid-template-columns: repeat(3, 1fr); }
}

.rail li {
  display: grid;
  gap: .55rem;
  padding: 1.35rem 1.2rem 1.5rem;
  background: var(--surface);
}

.rail__idx {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: .78rem;
  letter-spacing: .08em;
  color: var(--cyan);
}

.rail strong { font-size: 1.12rem; letter-spacing: -.03em; color: var(--navy); }
.rail span:last-child { color: var(--muted); line-height: 1.45; font-size: .95rem; }

.modes {
  margin-top: 2rem;
  display: grid;
  gap: 1rem;
}

@media (min-width: 900px) {
  .modes {
    grid-template-columns: 1.4fr 1fr;
    grid-template-rows: auto auto;
  }
  .mode--studio { grid-row: 1 / span 2; min-height: 22rem; }
}

.mode {
  padding: 1.45rem;
  border-radius: 1rem;
  border: 1px solid var(--border);
  background: linear-gradient(160deg, #eef4fb, var(--surface));
}

.mode--studio {
  border-color: color-mix(in srgb, var(--accent) 35%, transparent);
}

.mode h3 { margin: 0; font-size: 1.3rem; letter-spacing: -.03em; color: var(--navy); }
.mode p { margin: .75rem 0 0; color: var(--muted); line-height: 1.5; max-width: 34ch; }

.pipeline-viz {
  margin-top: 1.4rem;
  display: grid;
  gap: .55rem;
}

.pipeline-viz div {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .7rem .8rem;
  border-radius: .7rem;
  background: var(--elevated);
  border: 1px solid var(--border);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: .78rem;
  color: var(--ink);
}

.pipeline-viz b {
  color: var(--accent);
  font-weight: 500;
  min-width: 4.5rem;
}

.lamps-block {
  display: grid;
  gap: 2rem;
  align-items: center;
}

@media (min-width: 900px) {
  .lamps-block { grid-template-columns: 1.1fr .9fr; }
}

.lamps-viz {
  display: flex;
  gap: .85rem;
  padding: 2rem;
  border-radius: 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
}

.lamp {
  width: 1.4rem;
  height: 1.4rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--muted) 22%, transparent);
  border: 1px solid var(--border);
}

.lamp.on {
  background: var(--accent);
  box-shadow: 0 0 14px color-mix(in srgb, var(--accent) 35%, transparent);
}

.sync-panel {
  margin-top: 1.8rem;
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  padding: 1.25rem;
  border-radius: 1rem;
  background: linear-gradient(120deg, #e7eef9, #f8fbff);
  border: 1px solid color-mix(in srgb, var(--accent) 28%, transparent);
  box-shadow: 0 12px 36px color-mix(in srgb, var(--shadow) 8%, transparent);
}

.prose {
  max-width: 62ch;
}

.prose p {
  color: var(--muted);
  line-height: 1.6;
  font-size: 1.02rem;
}

.prose h2 {
  margin: 2.2rem 0 .8rem;
  color: var(--navy);
  letter-spacing: -.03em;
  font-size: 1.45rem;
}

.feature-list {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
  display: grid;
  gap: .75rem;
}

.feature-list li {
  padding: 1rem 1.1rem;
  border-radius: .9rem;
  border: 1px solid var(--border);
  background: var(--surface);
}

.feature-list strong {
  display: block;
  color: var(--navy);
  margin-bottom: .25rem;
}

.feature-list span {
  color: var(--muted);
  line-height: 1.45;
  font-size: .95rem;
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
  max-width: 72rem;
  margin: 0 auto;
  padding: 2rem 1.25rem 3rem;
  color: var(--muted);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: .8rem;
}

.footer a { color: var(--muted); text-decoration: none; }
.footer nav { display: flex; gap: 1rem; flex-wrap: wrap; }

.badge {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 50;
  padding: .45rem .7rem;
  border-radius: .6rem;
  background: var(--surface);
  border: 1px solid color-mix(in srgb, var(--cyan) 40%, transparent);
  color: var(--muted);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: .72rem;
}

/* --- Learning flow walkthrough --- */
.flow-hero {
  max-width: 56rem;
  margin: 0 auto;
  padding: 1.75rem 1.25rem .85rem;
}

.flow-hero .display {
  font-size: clamp(1.85rem, 3.5vw, 2.55rem);
}

.flow-hero .lead {
  max-width: none;
  margin-top: .65rem;
  font-size: .95rem;
  line-height: 1.45;
  text-wrap: pretty;
}

.flow-path {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .2rem .35rem;
  margin-top: 1.1rem;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: .72rem;
}

.flow-path a {
  min-width: 1.85rem;
  height: 1.85rem;
  padding: 0 .4rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: .45rem;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
  transition: color 160ms ease-out, border-color 160ms ease-out, transform 120ms ease-out;
}

.flow-path a:hover {
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
}

.flow-path a:active {
  transform: scale(0.96);
}

.flow-path span {
  color: color-mix(in srgb, var(--cyan) 70%, var(--muted));
  font-size: .85rem;
  line-height: 1;
  user-select: none;
}

.flow-track {
  --flow-phone: 96px;
  max-width: 56rem;
  margin: 0 auto;
  padding: 0 1.25rem 2.5rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  column-gap: .45rem;
  row-gap: .55rem;
  align-items: stretch;
  position: relative;
}

@media (min-width: 900px) {
  .flow-track { --flow-phone: 108px; }
}

.flow-step {
  display: grid;
  grid-template-rows: auto 1fr;
  grid-template-columns: 1fr;
  gap: .55rem;
  align-content: start;
  padding: .7rem .7rem .75rem;
  border: 1px solid var(--border);
  border-radius: .9rem;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  box-shadow: 0 6px 16px color-mix(in srgb, var(--shadow) 4%, transparent);
  position: relative;
  scroll-margin-top: 5.5rem;
  min-width: 0;
  z-index: 0;
  overflow: visible;
  transition:
    transform 200ms ease-out,
    border-color 200ms ease-out,
    box-shadow 200ms ease-out,
    background-color 200ms ease-out;
}

.flow-step:hover {
  z-index: 3;
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--cyan) 58%, transparent);
  background: color-mix(in srgb, var(--surface) 98%, transparent);
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--cyan) 24%, transparent),
    0 0 32px color-mix(in srgb, var(--cyan) 20%, transparent),
    0 16px 36px color-mix(in srgb, var(--shadow) 14%, transparent);
}

.flow-step:hover .flow-step__idx {
  background: color-mix(in srgb, var(--cyan) 18%, var(--tint));
  border-color: color-mix(in srgb, var(--cyan) 50%, transparent);
  color: var(--cyan);
}

.flow-step:target {
  border-color: color-mix(in srgb, var(--accent) 42%, transparent);
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--accent) 18%, transparent),
    0 10px 26px color-mix(in srgb, var(--shadow) 8%, transparent);
}

.flow-step:target .flow-step__idx {
  background: color-mix(in srgb, var(--accent) 16%, var(--tint));
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
  color: var(--accent);
}

.flow-path a:focus-visible,
.flow-step:target {
  outline: none;
}

/* Horizontal → between paired steps (after 01,03,05,07,09) */
.flow-arrow:nth-child(4n + 2) {
  display: flex;
  justify-content: center;
  align-items: center;
  align-self: center;
  width: 1.35rem;
  height: auto;
  position: relative;
  z-index: 1;
}

.flow-arrow:nth-child(4n + 2)::before {
  display: none;
}

.flow-arrow:nth-child(4n + 2) span::before {
  content: "→";
}

/* Vertical ↓ between rows (after 02,04,06,08) */
.flow-arrow:nth-child(4n) {
  grid-column: 1 / -1;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 1.15rem;
  position: relative;
  z-index: 1;
}

.flow-arrow:nth-child(4n)::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -4px;
  bottom: -4px;
  width: 1px;
  transform: translateX(-50%);
  background: color-mix(in srgb, var(--cyan) 30%, transparent);
  z-index: 0;
}

.flow-arrow:nth-child(4n) span::before {
  content: "↓";
}

.flow-arrow span {
  width: 1.2rem;
  height: 1.2rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--surface);
  border: 1px solid color-mix(in srgb, var(--cyan) 45%, transparent);
  color: var(--cyan);
  position: relative;
  z-index: 1;
  box-shadow: 0 2px 8px color-mix(in srgb, var(--shadow) 6%, transparent);
}

.flow-arrow span::before {
  font-size: .78rem;
  font-weight: 600;
  line-height: 1;
  transform: translateY(-0.5px);
}

.flow-step__copy {
  min-width: 0;
  order: 2;
}

.flow-step__idx {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.9rem;
  height: 1.35rem;
  padding: 0 .4rem;
  margin-bottom: .3rem;
  border-radius: .4rem;
  background: color-mix(in srgb, var(--cyan) 14%, var(--tint));
  border: 1px solid color-mix(in srgb, var(--cyan) 35%, transparent);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: .68rem;
  letter-spacing: .08em;
  color: var(--cyan);
}

.flow-step__copy h2 {
  margin: 0;
  font-size: clamp(.98rem, 1.5vw, 1.12rem);
  letter-spacing: -.03em;
  line-height: 1.2;
  color: var(--navy);
}

.flow-step__copy p {
  margin: .3rem 0 0;
  color: var(--muted);
  line-height: 1.35;
  max-width: none;
  font-size: .82rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.flow-track .phone {
  margin: 0;
  order: 1;
  width: var(--flow-phone);
  justify-self: start;
  position: relative;
  transform-origin: 50% 60%;
  transition:
    transform 220ms ease-out,
    box-shadow 220ms ease-out,
    filter 220ms ease-out;
}

.flow-step:hover .phone {
  transform: scale(1.08);
  filter: brightness(1.06) saturate(1.05);
}

.flow-track .phone__shot {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 576 / 1280;
  object-fit: fill;
  object-position: center top;
  border-radius: .75rem;
  background: #050b18;
}

.flow-track .phone.has-shot {
  padding: .18rem;
  border-radius: .95rem;
  background: linear-gradient(160deg, #243552, #0a1224 55%, #050b18);
  border: 1px solid color-mix(in srgb, #6a90c8 40%, transparent);
  box-shadow:
    0 0 0 1px color-mix(in srgb, #00d2ff 10%, transparent),
    0 8px 18px color-mix(in srgb, #050b18 26%, transparent);
  overflow: hidden;
}

.flow-step:hover .phone.has-shot {
  box-shadow:
    0 0 0 1px color-mix(in srgb, #00d2ff 35%, transparent),
    0 0 22px color-mix(in srgb, var(--cyan) 35%, transparent),
    0 18px 34px color-mix(in srgb, #050b18 45%, transparent);
}

.flow-track .phone.has-shot .phone__bezel { display: none; }

.flow-track .phone:not(.has-shot) .phone__shot { display: none; }

.flow-track .phone__bezel {
  border-radius: .85rem;
  padding: .22rem;
  background: linear-gradient(160deg, #1a2740, #0a1224);
  border: 1px solid color-mix(in srgb, #4a7bc4 35%, transparent);
}

.flow-track .phone__ui {
  border-radius: .65rem;
  overflow: hidden;
  min-height: 0;
  aspect-ratio: 576 / 1280;
  padding: .4rem .45rem .5rem;
  background:
    radial-gradient(220px 120px at 80% 0%, color-mix(in srgb, #00d2ff 12%, transparent), transparent 55%),
    #050b18;
  color: #e8eef8;
  display: flex;
  flex-direction: column;
  gap: .28rem;
  font-size: .5rem;
}

/* Phone + copy side-by-side inside each cell when wide enough */
@media (min-width: 720px) {
  .flow-step {
    grid-template-columns: minmax(0, 1fr) var(--flow-phone);
    grid-template-rows: auto;
    gap: .65rem .75rem;
    align-items: center;
    padding: .65rem .7rem;
  }
  .flow-step__copy { order: 1; }
  .flow-track .phone {
    order: 2;
    justify-self: end;
  }
}

/* Stack to one column on narrow screens */
@media (max-width: 700px) {
  .flow-track {
    --flow-phone: 100px;
    grid-template-columns: 1fr;
    max-width: 28rem;
  }

  .flow-arrow:nth-child(4n + 2),
  .flow-arrow:nth-child(4n) {
    grid-column: 1;
    width: auto;
    height: 1.15rem;
    align-self: stretch;
  }

  .flow-arrow:nth-child(4n + 2)::before {
    display: block;
    content: "";
    position: absolute;
    left: 50%;
    top: -4px;
    bottom: -4px;
    width: 1px;
    transform: translateX(-50%);
    background: color-mix(in srgb, var(--cyan) 30%, transparent);
    z-index: 0;
  }

  .flow-arrow:nth-child(4n + 2) span::before,
  .flow-arrow:nth-child(4n) span::before {
    content: "↓";
  }

  .flow-step {
    grid-template-columns: minmax(0, 1fr) var(--flow-phone);
    align-items: center;
  }
  .flow-step__copy { order: 1; }
  .flow-track .phone {
    order: 2;
    justify-self: end;
  }
}

.flow-close {
  padding-top: 1.5rem;
}

@media (prefers-reduced-motion: reduce) {
  .flow-step,
  .flow-track .phone {
    transition: none;
  }
  .flow-step:hover {
    transform: none;
  }
  .flow-step:hover .phone {
    transform: none;
    filter: none;
  }
}

.pu-top {
  display: flex;
  justify-content: space-between;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: .65rem;
  letter-spacing: .06em;
  color: #8ba3c7;
}

.pu-heading {
  font-size: 1.05rem;
  font-weight: 650;
  letter-spacing: -.03em;
  color: #fff;
}

.pu-title {
  font-weight: 600;
  color: #fff;
  letter-spacing: -.02em;
}

.pu-meta {
  color: #8ba3c7;
  font-size: .75rem;
}

.pu-player {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: .7rem;
  overflow: hidden;
  background: #101e36;
  border: 1px solid color-mix(in srgb, #4a7bc4 35%, transparent);
}

.pu-thumb {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, #142440, #0c172c 55%, #1a3a2a);
}

.pu-play {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 999px;
  background: color-mix(in srgb, #7ee887 85%, white);
  box-shadow: 0 0 20px color-mix(in srgb, #7ee887 40%, transparent);
}

.pu-play::after {
  content: "";
  position: absolute;
  left: 55%;
  top: 50%;
  transform: translate(-40%, -50%);
  border-style: solid;
  border-width: .45rem 0 .45rem .7rem;
  border-color: transparent transparent transparent #050b18;
}

.pu-bar {
  height: 4px;
  border-radius: 99px;
  background: #142440;
  overflow: hidden;
}

.pu-bar i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #7ee887, #00d2ff);
  font-style: normal;
}

.pu-caption {
  margin-top: .4rem;
  padding: .9rem;
  border-radius: .75rem;
  background: #101e36;
  border: 1px solid color-mix(in srgb, #4a7bc4 30%, transparent);
  line-height: 1.55;
  color: #c8d6eb;
}

.pu-caption mark,
.pu-targets mark,
.pu-write mark {
  background: color-mix(in srgb, #7ee887 28%, transparent);
  color: #7ee887;
  border-radius: .25rem;
  padding: 0 .15rem;
}

.pu-chip {
  align-self: flex-start;
  padding: .35rem .6rem;
  border-radius: .5rem;
  background: color-mix(in srgb, #00d2ff 18%, transparent);
  color: #00d2ff;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: .68rem;
}

.pu-cta {
  margin-top: auto;
  border: 0;
  border-radius: .7rem;
  min-height: 2.4rem;
  background: linear-gradient(90deg, #7ee887, #00d2ff);
  color: #050b18;
  font: 650 .85rem Outfit, sans-serif;
  cursor: default;
}

.pu-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .5rem;
  padding: .7rem .75rem;
  border-radius: .7rem;
  background: #101e36;
  border: 1px solid color-mix(in srgb, #4a7bc4 28%, transparent);
}

.pu-row.is-new {
  border-color: color-mix(in srgb, #7ee887 40%, transparent);
  box-shadow: inset 3px 0 0 #7ee887;
}

.pu-row b {
  display: block;
  color: #fff;
  font-size: .95rem;
  letter-spacing: -.02em;
}

.pu-row span {
  color: #8ba3c7;
  font-size: .78rem;
}

.pu-check {
  color: #7ee887 !important;
  font-weight: 700;
}

.pu-lamps {
  display: flex;
  gap: .25rem;
}

.pu-lamps i {
  width: .45rem;
  height: .45rem;
  border-radius: 999px;
  background: color-mix(in srgb, #8ba3c7 35%, transparent);
  font-style: normal;
}

.pu-lamps i.on {
  background: #7ee887;
  box-shadow: 0 0 8px color-mix(in srgb, #7ee887 50%, transparent);
}

.pu-lamps.big {
  margin-top: auto;
  gap: .45rem;
  padding: .4rem 0;
}

.pu-lamps.big i {
  width: .7rem;
  height: .7rem;
}

.pu-modes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .35rem;
  margin-top: .35rem;
}

.pu-modes span {
  text-align: center;
  padding: .55rem .2rem;
  border-radius: .55rem;
  border: 1px solid color-mix(in srgb, #4a7bc4 30%, transparent);
  background: #0c172c;
  color: #8ba3c7;
  font-size: .72rem;
  font-weight: 600;
}

.pu-modes span:first-child {
  border-color: color-mix(in srgb, #7ee887 45%, transparent);
  color: #7ee887;
  background: color-mix(in srgb, #7ee887 12%, #0c172c);
}

.pu-pipeline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .35rem;
  padding: .65rem .7rem;
  border-radius: .65rem;
  background: #0c172c;
  border: 1px solid color-mix(in srgb, #00d2ff 25%, transparent);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: .65rem;
  color: #8ba3c7;
}

.pu-pipeline i { font-style: normal; color: #5c7294; }

.pu-wave {
  display: flex;
  align-items: end;
  gap: 3px;
  height: 36px;
  margin: .4rem 0;
}

.pu-wave i {
  display: block;
  width: 4px;
  border-radius: 99px;
  background: linear-gradient(180deg, #00d2ff, #7ee887);
  font-style: normal;
  animation: pulse 1.4s ease-in-out infinite;
}

.pu-wave i:nth-child(odd) { height: 45%; }
.pu-wave i:nth-child(even) { height: 85%; }
.pu-wave i:nth-child(3n) { height: 60%; animation-delay: .2s; }

.pu-progress {
  height: 6px;
  border-radius: 99px;
  background: #142440;
  overflow: hidden;
}

.pu-progress i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #7ee887, #00d2ff);
  font-style: normal;
}

.pu-big {
  margin-top: 1.2rem;
  font-size: 1.85rem;
  font-weight: 700;
  letter-spacing: -.04em;
  color: #fff;
  text-align: center;
}

.pu-sub {
  text-align: center;
  color: #7ee887;
  font-size: 1rem;
}

.pu-ex {
  text-align: center;
  color: #8ba3c7;
  font-size: .85rem;
  margin: .4rem 0 1rem;
}

.pu-controls {
  margin-top: auto;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.4rem;
  color: #c8d6eb;
  font-size: 1.1rem;
}

.pu-playbtn {
  width: 2.6rem;
  height: 2.6rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: color-mix(in srgb, #7ee887 20%, #101e36);
  border: 1px solid color-mix(in srgb, #7ee887 50%, transparent);
  color: #7ee887;
  font-size: .85rem;
}

.pu-flash {
  margin: 1.2rem 0 auto;
  min-height: 11rem;
  display: grid;
  place-content: center;
  gap: .55rem;
  text-align: center;
  border-radius: 1rem;
  background: #101e36;
  border: 1px solid color-mix(in srgb, #4a7bc4 35%, transparent);
}

.pu-flash b {
  font-size: 1.6rem;
  letter-spacing: -.04em;
  color: #fff;
}

.pu-flash span {
  color: #5c7294;
  font-size: .78rem;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
}

.pu-rate {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .35rem;
}

.pu-rate button {
  border: 1px solid color-mix(in srgb, #4a7bc4 30%, transparent);
  background: #0c172c;
  color: #8ba3c7;
  border-radius: .55rem;
  min-height: 2.3rem;
  font: 600 .72rem Outfit, sans-serif;
  cursor: default;
}

.pu-rate button.is-ok {
  border-color: color-mix(in srgb, #7ee887 45%, transparent);
  color: #7ee887;
  background: color-mix(in srgb, #7ee887 14%, #0c172c);
}

.pu-q {
  margin: .5rem 0 .3rem;
  color: #c8d6eb;
  line-height: 1.4;
}

.pu-q b { color: #fff; }

.pu-opt {
  padding: .65rem .75rem;
  border-radius: .6rem;
  background: #101e36;
  border: 1px solid color-mix(in srgb, #4a7bc4 28%, transparent);
  color: #c8d6eb;
}

.pu-opt.is-ok {
  border-color: color-mix(in srgb, #7ee887 50%, transparent);
  background: color-mix(in srgb, #7ee887 14%, #101e36);
  color: #7ee887;
}

.pu-targets {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
}

.pu-targets mark {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: .72rem;
  padding: .3rem .5rem;
}

.pu-write {
  flex: 1;
  margin-top: .35rem;
  padding: .85rem;
  border-radius: .75rem;
  background: #101e36;
  border: 1px solid color-mix(in srgb, #4a7bc4 30%, transparent);
  line-height: 1.55;
  color: #c8d6eb;
  min-height: 8rem;
}

.flow-close .flow-shot-hint {
  margin: 1.2rem 0 0;
  max-width: 52ch;
  color: var(--muted);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: .74rem;
  line-height: 1.5;
}

@media (prefers-reduced-motion: reduce) {
  .pu-wave i { animation: none; }
}
