/* Colors: tokens in the <style> of index.html. The rest is copied from random-english-terms/src/app/globals.css. */
:root {
  --font-sans: "Nunito", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;

  --text-2xs: 0.6875rem;
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-md: 1rem;
  --text-lg: 1.25rem;
  --text-xl: 1.75rem;
  --tracking-tight: -0.02em;

  --radius-sm: 12px;
  --radius-md: 20px;
  --radius-lg: 28px;
  --radius-full: 999px;
  --line-soft: 1px solid var(--color-border);

  --ease: cubic-bezier(0.2, 0.7, 0.1, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
  --duration-fast: 200ms;
  --duration: 320ms;
  --duration-slow: 640ms;
  --stagger: 90ms;

  --gutter: clamp(1rem, 4vw, 3rem);
  --max: 76rem;
}

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

html {
  scroll-behavior: smooth;
}

html,
body {
  margin: 0;
}

body {
  position: relative;
  overflow-x: clip;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: var(--text-md);
  line-height: 1.55;
  font-variant-numeric: lining-nums tabular-nums;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

::selection {
  background: var(--color-primary-soft);
}

:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
}

main,
.foot {
  max-width: var(--max);
  margin: 0 auto;
  padding-inline: var(--gutter);
}

/* Background: violet and pink blobs drifting very slowly. */
.blobs {
  position: absolute;
  inset: 0 0 auto;
  height: 120vh;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.blob {
  position: absolute;
  width: 46vmax;
  aspect-ratio: 1;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.55;
  animation: drift 22s var(--ease) infinite alternate;
}

.blob-a {
  top: -18vmax;
  right: -10vmax;
  background: var(--color-primary-soft);
}

.blob-b {
  top: 20vh;
  left: -20vmax;
  background: var(--color-accent-soft);
  animation-duration: 28s;
  animation-direction: alternate-reverse;
}

.blob-c {
  top: 50vh;
  right: 10vw;
  width: 26vmax;
  background: color-mix(in srgb, var(--color-primary) 22%, transparent);
  animation-duration: 18s;
}

@keyframes drift {
  to {
    transform: translate(6vmax, 4vmax) scale(1.12);
  }
}

/* Brand: same as the app's wordmark, "Lexio" + a pink dot. */
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-lg);
  font-weight: 800;
  letter-spacing: var(--tracking-tight);
  color: var(--color-primary);
  text-decoration: none;
}

.dot {
  margin-left: -0.45em;
  color: var(--color-accent);
}

/* Same drawing as the app icon (src-tauri/icons/source.svg), painted with the tokens. */
.mark {
  display: block;
  flex: none;
  width: 36px;
  height: 36px;
  transition: transform var(--duration) var(--ease-out);
}

.mark-tile {
  fill: var(--color-night);
}

.mark-glow {
  fill: var(--color-star-glow);
}

.mark-current {
  stroke: var(--color-current);
  stroke-opacity: 0.5;
}

.mark-star {
  fill: var(--color-star);
  stroke: none;
}

.mark-light {
  fill: var(--color-starlight);
  fill-opacity: 0.8;
  stroke: none;
}

.wordmark:hover .mark {
  transform: rotate(-8deg) scale(1.06);
}

/* Top bar */
.top {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  /* Full-width background; the content lines up with main. */
  padding: var(--space-4) max(var(--gutter), (100% - var(--max)) / 2 + var(--gutter));
  background: color-mix(in srgb, var(--color-bg) 72%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.top-nav {
  display: flex;
  align-items: center;
  gap: var(--space-5);
}

.top-link {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text-muted);
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease);
}

.top-link:hover {
  color: var(--color-text);
}

.pill {
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--color-primary-hover);
  background: var(--color-primary-soft);
  border-radius: var(--radius-full);
  text-decoration: none;
  transition:
    color var(--duration-fast) var(--ease),
    background var(--duration-fast) var(--ease);
}

.pill:hover {
  color: var(--color-text-inverse);
  background: var(--color-primary);
}

/* Language switch: two short pills, the current one filled. */
.lang {
  display: inline-flex;
  padding: 3px;
  background: var(--color-surface);
  border: var(--line-soft);
  border-radius: var(--radius-full);
}

.lang-option {
  min-width: 34px;
  padding: var(--space-1) var(--space-2);
  font: inherit;
  font-size: var(--text-xs);
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
  background: transparent;
  border: 0;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition:
    color var(--duration-fast) var(--ease),
    background var(--duration-fast) var(--ease);
}

.lang-option:hover {
  color: var(--color-text);
}

.lang-option[aria-pressed="true"] {
  color: var(--color-text-inverse);
  background: var(--color-ink);
}

/* Set by the head script until i18n.js has translated the page. */
.i18n-wait body {
  visibility: hidden;
}

/* Hero */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: var(--space-12);
  padding-block: clamp(2rem, 7vw, 5rem) clamp(4rem, 9vw, 7rem);
}

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

.badge {
  display: inline-flex;
  text-decoration: none;
  align-items: center;
  gap: var(--space-2);
  margin: 0 0 var(--space-6);
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--color-known);
  background: var(--color-surface);
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-sm);
}

.pulse {
  position: relative;
  width: 8px;
  height: 8px;
  background: var(--color-known);
  border-radius: var(--radius-full);
}

.pulse::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--color-known);
  animation: ping 1.8s var(--ease-out) infinite;
}

@keyframes ping {
  to {
    opacity: 0;
    transform: scale(3);
  }
}

h1 {
  margin: 0;
  font-size: clamp(2.5rem, 5.4vw, 3.9rem);
  font-weight: 900;
  line-height: 1.04;
  letter-spacing: -0.035em;
}

h1 > span {
  display: block;
}

/* Pink underline painted after the sentence comes in. */
h1 mark {
  color: var(--color-primary);
  background: linear-gradient(var(--color-accent-soft), var(--color-accent-soft))
    left 88% / 0% 38% no-repeat;
  animation: marker 900ms calc(var(--i) * var(--stagger) + 700ms)
    var(--ease-out) forwards;
}

@keyframes marker {
  to {
    background-size: 100% 38%;
  }
}

.lead {
  max-width: 34rem;
  margin: var(--space-6) 0 0;
  font-size: 1.125rem;
  color: var(--color-text-muted);
}

.download {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-4);
  margin-top: var(--space-10);
}

.button {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 56px;
  padding: 0 var(--space-8);
  overflow: hidden;
  font-weight: 700;
  color: var(--color-text-inverse);
  text-decoration: none;
  background: var(--color-primary);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-glow);
  transition:
    background var(--duration-fast) var(--ease),
    transform var(--duration-fast) var(--ease),
    box-shadow var(--duration-fast) var(--ease);
}

.button svg {
  width: 20px;
  height: 20px;
  stroke-width: 2.2;
}

/* A shine that crosses the button every so often. */
.button::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    110deg,
    transparent 35%,
    color-mix(in srgb, var(--color-surface) 35%, transparent) 50%,
    transparent 65%
  );
  transform: translateX(-100%);
  animation: shine 4.5s 2s var(--ease) infinite;
}

@keyframes shine {
  30%,
  100% {
    transform: translateX(100%);
  }
}

.button:hover {
  background: var(--color-primary-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.button:hover svg:not(.github) {
  animation: nudge 700ms var(--ease) infinite alternate;
}

@keyframes nudge {
  to {
    transform: translateY(3px);
  }
}

.button:active {
  transform: scale(0.98);
}

/* A filled mark, unlike the page's line icons. */
.github {
  fill: currentColor;
  stroke: none;
}

.alt {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text-muted);
  text-underline-offset: 3px;
}

.alt:hover {
  color: var(--color-primary);
}

.note {
  margin: 0;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.note-center {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  margin-top: var(--space-8);
}

/* Staggered hero entrance. */
.rise {
  animation: rise 900ms calc(var(--i, 0) * var(--stagger) + 100ms)
    var(--ease-out) both;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(24px);
    filter: blur(6px);
  }
}

/* App mock: window, top bar and the swipe card. */
.stage {
  position: relative;
  perspective: 1400px;
}

.app {
  --rx: 0deg;
  --ry: 0deg;
  overflow: hidden;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  transform: rotateX(var(--rx)) rotateY(var(--ry));
  transform-style: preserve-3d;
  transition: transform 500ms var(--ease-out);
  animation: float 7s var(--ease) infinite alternate;
}

@keyframes float {
  to {
    translate: 0 -10px;
  }
}

.app-bar {
  display: flex;
  gap: 6px;
  padding: var(--space-3) var(--space-4);
  background: var(--color-surface);
}

.app-bar i {
  width: 10px;
  height: 10px;
  border-radius: var(--radius-full);
  background: var(--color-danger);
}

.app-bar i:nth-child(2) {
  background: var(--color-learning);
}

.app-bar i:nth-child(3) {
  background: var(--color-known);
}

/* Same as top-bar.module.css. */
.app-top {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: 0 var(--space-4) var(--space-3);
  background: var(--color-surface);
  border-bottom: var(--line-soft);
  box-shadow: var(--shadow-sm);
}

.app-word {
  font-weight: 800;
  letter-spacing: var(--tracking-tight);
  color: var(--color-primary);
}

.app-word b {
  color: var(--color-accent);
}

.app-nav {
  display: flex;
  flex: 1;
  gap: var(--space-1);
  min-width: 0;
  overflow: hidden;
}

.nav-pill {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-1) var(--space-3);
  font-size: var(--text-2xs);
  font-weight: 700;
  color: var(--color-text-muted);
  white-space: nowrap;
  border-radius: var(--radius-full);
  transition:
    color var(--duration) var(--ease),
    background var(--duration) var(--ease),
    box-shadow var(--duration) var(--ease);
}

.nav-pill svg {
  width: 13px;
  height: 13px;
}

.nav-pill.is-active {
  color: var(--color-text-inverse);
  background: var(--color-primary);
  box-shadow: var(--shadow-glow);
}

.streak {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px var(--space-2);
  font-size: var(--text-xs);
  font-weight: 800;
  color: var(--color-learning);
  background: var(--color-learning-soft);
  border-radius: var(--radius-full);
}

.streak svg {
  width: 14px;
  height: 14px;
}

.streak.is-bump {
  animation: bump 600ms var(--ease-bounce);
}

@keyframes bump {
  40% {
    transform: scale(1.25);
  }
}

.app-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-6) var(--space-6) var(--space-5);
}

.swipe-step {
  margin: 0;
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--color-text-muted);
}

/* Type badges: one color per expression type, like badge.module.css. */
.type {
  display: inline-flex;
  align-items: center;
  padding: 2px var(--space-3);
  font-size: var(--text-2xs);
  font-weight: 700;
  white-space: nowrap;
  color: var(--color-type-phrasal);
  background: var(--color-type-phrasal-soft);
  border-radius: var(--radius-full);
}

.type[data-type="idiom"] {
  color: var(--color-type-idiom);
  background: var(--color-type-idiom-soft);
}

.type[data-type="collocation"] {
  color: var(--color-type-collocation);
  background: var(--color-type-collocation-soft);
}

.type[data-type="expression"] {
  color: var(--color-type-expression);
  background: var(--color-type-expression-soft);
}

/* Card stack: main.js sets data-depth (0 = top) or data-out (left / right). */
.deck {
  display: grid;
  width: 100%;
  margin-bottom: var(--space-3);
}

.swipe-card {
  grid-area: 1 / 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  min-height: 200px;
  padding: var(--space-8) var(--space-6);
  text-align: center;
  background: var(--color-surface);
  border: var(--line-soft);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition:
    transform 560ms var(--ease-out),
    opacity 420ms var(--ease-out),
    box-shadow var(--duration) var(--ease);
}

.swipe-card[data-depth="0"] {
  z-index: 3;
  box-shadow: var(--shadow-md);
}

.swipe-card[data-depth="1"] {
  z-index: 2;
  transform: translateY(12px) scale(0.95);
}

.swipe-card[data-depth="2"] {
  z-index: 1;
  transform: translateY(24px) scale(0.9);
  opacity: 0.7;
}

.swipe-card[data-depth="3"] {
  transform: translateY(24px) scale(0.9);
  opacity: 0;
}

.swipe-card[data-depth="1"] > *,
.swipe-card[data-depth="2"] > *,
.swipe-card[data-depth="3"] > * {
  opacity: 0;
}

.swipe-card > * {
  transition: opacity var(--duration) var(--ease);
}

.swipe-card[data-out="left"] {
  z-index: 4;
  transform: translateX(-120%) rotate(-14deg);
  opacity: 0;
}

.swipe-card[data-out="right"] {
  z-index: 4;
  transform: translateX(120%) rotate(14deg);
  opacity: 0;
}

/* A new round: the cards fade back in instead of flying back. */
.deck.is-reset .swipe-card {
  transition: none;
  opacity: 0;
}

.phrase {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: var(--tracking-tight);
}

.sentence {
  max-width: 30ch;
  margin: 0;
  font-size: var(--text-sm);
  font-style: italic;
  color: var(--color-text-muted);
}

.choices {
  display: flex;
  align-items: stretch;
  gap: var(--space-2);
  width: 100%;
}

.choice {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  gap: var(--space-1);
  min-height: 44px;
  padding: 0 var(--space-3);
  font-size: var(--text-sm);
  font-weight: 700;
  white-space: nowrap;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  transition:
    color var(--duration-fast) var(--ease),
    background var(--duration-fast) var(--ease),
    transform var(--duration-fast) var(--ease);
}

.choice svg {
  width: 16px;
  height: 16px;
  stroke-width: 2.2;
}

.choice-known {
  color: var(--color-known);
  background: var(--color-known-soft);
  border-color: var(--color-known);
}

.choice-learn {
  color: var(--color-learning);
  background: var(--color-learning-soft);
  border-color: var(--color-learning);
}

.choice-known.is-tap,
.choice-known.is-press {
  color: var(--color-text-inverse);
  background: var(--color-known);
}

.choice-learn.is-tap,
.choice-learn.is-press {
  color: var(--color-text-inverse);
  background: var(--color-learning);
}

.choice.is-tap {
  animation: tap 500ms var(--ease-out);
}

.choice.is-press {
  transform: scale(0.96);
}

@keyframes tap {
  40% {
    transform: scale(0.94);
  }
}

.choice-skip {
  display: grid;
  place-items: center;
  padding: 0 var(--space-2);
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--color-text-muted);
}

.keys {
  margin: 0;
  font-size: var(--text-2xs);
  color: var(--color-text-muted);
}

/* Floating toast: what the last swipe did. */
.toast {
  position: absolute;
  left: clamp(-1.5rem, -3vw, 0rem);
  bottom: -1.5rem;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-5) var(--space-3) var(--space-3);
  background: var(--color-surface);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: translateY(16px) scale(0.96);
  transition:
    opacity var(--duration) var(--ease-out),
    transform var(--duration-slow) var(--ease-out);
}

.toast.is-on {
  opacity: 1;
  transform: none;
}

.toast-avatar {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  color: var(--color-learning);
  background: var(--color-learning-soft);
  border-radius: var(--radius-full);
}

.toast-avatar svg {
  width: 18px;
  height: 18px;
  stroke-width: 2.6;
}

.toast[data-known] .toast-avatar {
  color: var(--color-known);
  background: var(--color-known-soft);
}

.toast[data-known] .toast-avatar svg {
  transform: scaleX(-1);
}

.toast-text {
  display: flex;
  flex-direction: column;
  font-size: var(--text-sm);
  line-height: 1.25;
}

.toast-text small {
  font-size: var(--text-2xs);
  font-weight: 600;
  color: var(--color-text-muted);
}

/* Sections */
.section {
  padding-block: clamp(3rem, 8vw, 6rem);
}

.section-head {
  max-width: 44rem;
  margin-bottom: var(--space-10);
}

.eyebrow {
  margin: 0 0 var(--space-3);
  font-size: var(--text-xs);
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-primary);
}

h2 {
  margin: 0;
  font-size: clamp(2rem, 4.4vw, 3rem);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.muted {
  color: var(--color-text-muted);
}

h3 {
  margin: 0;
  font-size: var(--text-lg);
  font-weight: 800;
  letter-spacing: var(--tracking-tight);
}

/* Reveal on scroll (main.js adds .is-in). */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(32px);
  transition:
    opacity 800ms var(--ease-out),
    transform 900ms var(--ease-out);
  transition-delay: calc(var(--i, 0) * 120ms);
}

.js [data-reveal].is-in {
  opacity: 1;
  transform: none;
}

/* Inner animations wait for the card to come in. */
.js [data-reveal]:not(.is-in) * {
  animation-play-state: paused !important;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(18rem, 100%), 1fr));
  gap: var(--space-6);
}

.card {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--space-6);
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.cards .card {
  transition:
    opacity 800ms var(--ease-out) calc(var(--i, 0) * 120ms),
    transform 900ms var(--ease-out) calc(var(--i, 0) * 120ms),
    box-shadow var(--duration) var(--ease);
}

.cards .card.is-in:hover,
html:not(.js) .cards .card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  transition-delay: 0s;
}

.card p {
  margin: 0;
  color: var(--color-text-muted);
}

.card-art {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 150px;
  margin-bottom: var(--space-3);
  background: var(--color-field);
  border-radius: var(--radius-md);
}

@keyframes pop {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.9);
  }
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-1) var(--space-3);
  font-size: var(--text-xs);
  font-weight: 700;
  background: var(--color-surface);
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-sm);
}

.chip svg {
  width: 14px;
  height: 14px;
  stroke-width: 2;
}

.chip-primary {
  color: var(--color-primary-hover);
  background: var(--color-primary-soft);
}

.chip-known {
  color: var(--color-known);
  background: var(--color-known-soft);
}

.chip-learn {
  color: var(--color-learning);
  background: var(--color-learning-soft);
}

.chip-ink {
  color: var(--color-text-inverse);
  background: var(--color-primary);
}

.op {
  font-weight: 800;
  color: var(--color-text-muted);
}

.bar {
  display: block;
  height: 6px;
  overflow: hidden;
  background: var(--color-track);
  border-radius: var(--radius-full);
}

.bar b {
  display: block;
  width: var(--v);
  height: 100%;
  background: var(--color-primary);
  border-radius: inherit;
  transform-origin: left;
  animation: grow 2.4s 300ms var(--ease-out) both;
}

.bar b.known {
  background: var(--color-known);
}

@keyframes grow {
  from {
    transform: scaleX(0);
  }
}

/* "Your texts": the phrases light up in their type's color. */
.text-art {
  padding: var(--space-4) var(--space-5);
}

.text-art p {
  font-size: var(--text-sm);
  line-height: 1.9;
  color: var(--color-text);
}

.text-art mark,
.reading mark {
  color: inherit;
  background: transparent;
  border-radius: 6px;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.text-art mark {
  padding: 1px 4px;
  font-weight: 700;
  animation: light 500ms calc(600ms + var(--i) * 500ms) var(--ease-out) forwards;
}

.text-art mark[data-type="idiom"] {
  --tint: var(--color-type-idiom);
  --tint-soft: var(--color-type-idiom-soft);
}

.text-art mark[data-type="collocation"] {
  --tint: var(--color-type-collocation);
  --tint-soft: var(--color-type-collocation-soft);
}

@keyframes light {
  to {
    color: var(--tint, var(--color-type-phrasal));
    background: var(--tint-soft, var(--color-type-phrasal-soft));
  }
}

/* Exercise kinds pop in one by one. */
.kinds {
  flex-wrap: wrap;
  align-content: center;
  gap: var(--space-2);
  padding: var(--space-4);
}

.kinds .chip,
.keys-art .chip,
.prompt-art > * {
  animation: pop 500ms calc(var(--i) * 150ms) var(--ease-out) both;
}

/* Vault: a lock with ripples. */
.vault {
  position: relative;
  flex-direction: column;
  gap: var(--space-3);
  overflow: hidden;
}

.vault-core {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  color: var(--color-text-inverse);
  background: var(--color-primary);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  animation: breathe 3s var(--ease) infinite alternate;
}

.vault-core svg {
  width: 26px;
  height: 26px;
  stroke-width: 2;
}

.vault-ring {
  position: absolute;
  top: calc(50% - 16px);
  left: 50%;
  width: 56px;
  height: 56px;
  margin: -28px 0 0 -28px;
  border: 2px solid var(--color-primary);
  border-radius: var(--radius-md);
  opacity: 0;
  animation: wave 3s var(--ease-out) infinite;
}

.vault-ring-2 {
  animation-delay: 1.5s;
}

@keyframes wave {
  from {
    opacity: 0.5;
    transform: scale(1);
  }

  to {
    opacity: 0;
    transform: scale(3);
  }
}

@keyframes breathe {
  to {
    transform: scale(1.06);
  }
}

.vault-file {
  position: relative;
  z-index: 1;
  padding: 2px var(--space-3);
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--color-known);
  background: var(--color-known-soft);
  border-radius: var(--radius-full);
}

/* "Your AI" cards */
.keys-art {
  display: grid;
  grid-template-columns: repeat(3, auto);
  place-content: center;
  align-items: center;
  gap: var(--space-3) var(--space-2);
}

.keys-art .key-pill {
  grid-column: 1 / -1;
  justify-self: center;
}

/* Copy → Claude → paste, top to bottom. */
.prompt-art {
  flex-direction: column;
  gap: 2px;
}

.prompt-art .op {
  font-size: var(--text-sm);
  line-height: 1;
}

.model-art {
  flex-direction: column;
  gap: var(--space-3);
}

.model-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  width: min(100% - 2rem, 14rem);
  padding: var(--space-3) var(--space-4);
  background: var(--color-surface);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  animation: pop 500ms var(--ease-out) both;
}

.model-name {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-2);
  font-size: var(--text-sm);
}

.model-name small,
.model-done {
  font-size: var(--text-2xs);
  font-weight: 700;
  color: var(--color-known);
}

.key-pill {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-1) var(--space-3);
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--color-text-inverse);
  background: var(--color-ink);
  border-radius: var(--radius-full);
  animation: pop 500ms 500ms var(--ease-out) both;
}

.key-pill svg {
  width: 14px;
  height: 14px;
  stroke-width: 2.2;
}

/* Progress: phrases move between levels (FLIP in main.js). */
.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: var(--space-12);
}

@media (min-width: 900px) {
  .split {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  }
}

.toggle {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 44px;
  margin-top: var(--space-8);
  padding: 0 var(--space-5);
  font: inherit;
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--color-primary-hover);
  background: var(--color-primary-soft);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition:
    color var(--duration-fast) var(--ease),
    background var(--duration-fast) var(--ease),
    transform var(--duration-fast) var(--ease);
}

.toggle svg {
  width: 18px;
  height: 18px;
}

.toggle:hover {
  color: var(--color-text-inverse);
  background: var(--color-primary);
}

.toggle:active {
  transform: scale(0.98);
}

.board {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-3);
  padding: var(--space-5);
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.lane {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  min-height: 220px;
  padding: var(--space-3);
  background: var(--color-field);
  border-radius: var(--radius-md);
}

.lane-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  margin: 0;
  font-size: var(--text-xs);
  font-weight: 800;
  color: var(--color-text-muted);
}

.lane-head b {
  display: grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  font-size: var(--text-2xs);
  color: var(--color-text-muted);
  background: var(--color-surface);
  border-radius: var(--radius-full);
}

.lane[data-level="learning"] .lane-head b {
  color: var(--color-learning);
  background: var(--color-learning-soft);
}

.lane[data-level="mastered"] .lane-head b {
  color: var(--color-known);
  background: var(--color-known-soft);
}

.lane ul {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin: 0;
  padding: 0;
  list-style: none;
}

.lane li {
  padding: var(--space-2) var(--space-3);
  font-size: var(--text-xs);
  font-weight: 700;
  background: var(--color-surface);
  border-left: 3px solid var(--color-border);
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
  transition: border-color var(--duration) var(--ease);
}

.lane[data-level="learning"] li {
  border-left-color: var(--color-learning);
}

.lane[data-level="mastered"] li {
  border-left-color: var(--color-known);
}

.lane li.is-moving {
  position: relative;
  z-index: 1;
  box-shadow: var(--shadow-md);
}

.board-streak {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  margin: 0;
  font-size: var(--text-sm);
  font-weight: 800;
  color: var(--color-learning);
}

.board-streak svg {
  width: 18px;
  height: 18px;
}

.board-streak.is-bump svg {
  animation: bump 600ms var(--ease-bounce);
}

/* Demo: main.js moves the data-* of .screen over time. */
.demo {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-8);
}

@media (min-width: 960px) {
  .demo {
    grid-template-columns: minmax(0, 18rem) minmax(0, 1fr);
    align-items: center;
    gap: var(--space-12);
  }
}

.chapters {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.chapter {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  column-gap: var(--space-3);
  row-gap: var(--space-1);
  padding: var(--space-4);
  font: inherit;
  text-align: left;
  color: var(--color-text-muted);
  background: none;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition:
    background var(--duration) var(--ease),
    box-shadow var(--duration) var(--ease);
}

.chapter:hover {
  background: color-mix(in srgb, var(--color-surface) 60%, transparent);
}

.chapter[aria-current] {
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
}

.chapter-bar {
  grid-column: 1 / -1;
  display: block;
  height: 3px;
  margin-bottom: var(--space-2);
  overflow: hidden;
  background: var(--color-track);
  border-radius: var(--radius-full);
}

.chapter-bar b {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--color-primary);
  transform: scaleX(var(--p, 0));
  transform-origin: left;
}

.chapter-n {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  font-size: var(--text-xs);
  font-weight: 800;
  background: var(--color-track);
  border-radius: var(--radius-full);
  transition:
    color var(--duration) var(--ease),
    background var(--duration) var(--ease);
}

.chapter[aria-current] .chapter-n {
  color: var(--color-text-inverse);
  background: var(--color-primary);
}

.chapter strong {
  color: var(--color-text);
}

.chapter small {
  grid-column: 2;
  font-size: var(--text-sm);
  line-height: 1.45;
}

.demo-stage {
  position: relative;
}

.demo-play {
  position: absolute;
  top: 5px;
  right: var(--space-3);
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  padding: 0;
  color: var(--color-text-muted);
  background: var(--color-field);
  border: var(--line-soft);
  border-radius: var(--radius-full);
  cursor: pointer;
}

.demo-play[hidden],
html:not(.js) .cursor {
  display: none;
}

.demo-play:hover {
  color: var(--color-primary);
}

.demo-play svg {
  width: 13px;
  height: 13px;
  stroke-width: 2.4;
}

.demo-play .i-play {
  fill: currentColor;
  stroke-width: 1.6;
}

.demo-play[aria-pressed="false"] .i-pause,
.demo-play[aria-pressed="true"] .i-play {
  display: none;
}

.screen {
  position: relative;
  overflow: hidden;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

/* All scenes share one cell, so the mock keeps the height of the tallest. */
.scenes {
  display: grid;
  padding: var(--space-6);
  transition: opacity 400ms var(--ease);
}

.screen[data-fade] .scenes,
.screen[data-fade] .cursor {
  opacity: 0;
}

.scene {
  grid-area: 1 / 1;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  min-width: 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px);
  transition:
    opacity 420ms var(--ease-out),
    transform 560ms var(--ease-out),
    visibility 0s 420ms;
}

.screen[data-scene="add"] .scene-add,
.screen[data-scene="material"] .scene-material,
.screen[data-scene="swipe"] .scene-swipe,
.screen[data-scene="practice"] .scene-practice {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition-delay: 120ms, 120ms, 0s;
}

.scene p {
  margin: 0;
}

.scene-title {
  font-size: var(--text-lg);
  font-weight: 800;
  letter-spacing: var(--tracking-tight);
}

.scene-sub {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.scene-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}

/* 1. Add a text */
.field {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.field small {
  font-size: var(--text-xs);
  font-weight: 700;
}

.input {
  display: block;
  min-height: 2.5rem;
  padding: var(--space-2) var(--space-3);
  font-size: var(--text-sm);
  background: var(--color-surface);
  border: var(--line-soft);
  border-radius: var(--radius-sm);
  transition:
    border-color var(--duration-fast) var(--ease),
    box-shadow var(--duration-fast) var(--ease);
}

.input-area {
  min-height: 8.5rem;
  line-height: 1.6;
}

.input.is-typing {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-soft);
}

.input.is-typing::after {
  content: "";
  display: inline-block;
  width: 2px;
  height: 1em;
  margin-left: 1px;
  vertical-align: -2px;
  background: var(--color-primary);
}

.s-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.s-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-2) var(--space-5);
  font-size: var(--text-sm);
  font-weight: 700;
  white-space: nowrap;
  color: var(--color-text-inverse);
  background: var(--color-primary);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-glow);
  transition:
    background var(--duration-fast) var(--ease),
    transform var(--duration-fast) var(--ease);
}

.s-btn.is-press {
  background: var(--color-primary-hover);
  transform: scale(0.96);
}

.s-ghost {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--color-text-muted);
}

/* 2. The text with its phrases */
.reading {
  min-height: 8.5rem;
  padding: var(--space-4) var(--space-5);
  font-size: var(--text-sm);
  line-height: 1.9;
  background: var(--color-surface);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.reading mark {
  padding: 1px 4px;
  transition:
    color var(--duration) var(--ease),
    background var(--duration) var(--ease);
}

.reading mark.is-on {
  font-weight: 700;
  color: var(--color-type-phrasal);
  background: var(--color-type-phrasal-soft);
}

.reading mark.is-on[data-type="idiom"] {
  color: var(--color-type-idiom);
  background: var(--color-type-idiom-soft);
}

.reading mark.is-on[data-type="collocation"] {
  color: var(--color-type-collocation);
  background: var(--color-type-collocation-soft);
}

.reading mark.is-on[data-type="expression"] {
  color: var(--color-type-expression);
  background: var(--color-type-expression-soft);
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

/* 3. Swipe */
.scene-swipe {
  align-items: center;
}

.scene-swipe .choices {
  max-width: 26rem;
}

/* 4. Lesson, then exercise */
.scene-practice {
  display: grid;
}

.lesson,
.exercise {
  grid-area: 1 / 1;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--space-5) var(--space-6);
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  transition:
    opacity 420ms var(--ease-out),
    transform 560ms var(--ease-out);
}

.screen:not([data-exercise]) .exercise,
.screen[data-exercise] .lesson {
  opacity: 0;
  transform: translateX(24px);
}

.screen[data-exercise] .lesson {
  transform: translateX(-24px);
}

.kicker {
  display: flex;
  justify-content: space-between;
  font-size: var(--text-2xs);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-primary);
}

.kicker small {
  font-size: inherit;
  color: var(--color-text-muted);
}

.lesson-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
}

.lesson-phrase {
  font-size: var(--text-xl);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: var(--tracking-tight);
}

.lesson-meaning {
  font-weight: 700;
}

.lesson-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(11rem, 100%), 1fr));
  gap: var(--space-3);
  font-size: var(--text-sm);
}

.lesson-label {
  font-size: var(--text-xs);
  font-weight: 800;
  color: var(--color-text-muted);
}

.dialog {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  margin-top: var(--space-1);
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-sm);
  background: var(--color-surface-2);
  border-radius: var(--radius-sm);
}

.lesson .s-btn {
  align-self: flex-start;
}

.ex-sentence {
  font-size: var(--text-lg);
  font-weight: 700;
  line-height: 1.4;
}

.gap {
  color: var(--color-primary);
  transition: color var(--duration) var(--ease);
}

.screen[data-correct] .gap {
  color: var(--color-known);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.options {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin: 0;
  padding: 0;
  list-style: none;
}

.options li {
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-sm);
  font-weight: 700;
  background: var(--color-field);
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  transition:
    color var(--duration-fast) var(--ease),
    background var(--duration-fast) var(--ease),
    border-color var(--duration-fast) var(--ease),
    transform var(--duration-fast) var(--ease);
}

.options li.is-press {
  border-color: var(--color-primary);
  transform: scale(0.98);
}

.screen[data-correct] .options li:first-child {
  color: var(--color-known);
  background: var(--color-known-soft);
  border-color: var(--color-known);
}

.feedback {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  font-weight: 800;
  color: var(--color-known);
  background: var(--color-known-soft);
  border-radius: var(--radius-sm);
  opacity: 0;
  transform: translateY(8px);
  transition:
    opacity var(--duration) var(--ease-out),
    transform var(--duration-slow) var(--ease-out);
}

.feedback svg {
  width: 18px;
  height: 18px;
  stroke-width: 2.6;
}

.screen[data-correct] .feedback {
  opacity: 1;
  transform: none;
}

/* Pointer: the tip is at (0, 0). */
.cursor {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 4;
  width: 20px;
  height: 24px;
  pointer-events: none;
  filter: drop-shadow(0 0 1px var(--color-surface)) drop-shadow(0 0 1px var(--color-surface))
    drop-shadow(0 3px 4px color-mix(in srgb, var(--color-ink) 30%, transparent));
  transform: translate(var(--x, 70%), var(--y, 70%));
  transition:
    transform 900ms var(--ease-out),
    opacity 400ms var(--ease);
}

.cursor::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--color-ink);
  clip-path: polygon(0 0, 0 80%, 24% 62%, 40% 98%, 56% 91%, 40% 57%, 76% 57%);
  transition: transform 120ms var(--ease);
}

.cursor::after {
  content: "";
  position: absolute;
  top: -16px;
  left: -16px;
  width: 32px;
  height: 32px;
  border: 2px solid var(--color-primary);
  border-radius: var(--radius-full);
  opacity: 0;
}

.cursor.is-click::before {
  transform: scale(0.85);
}

.cursor.is-click::after {
  animation: click 500ms var(--ease-out);
}

@keyframes click {
  from {
    opacity: 0.9;
    transform: scale(0.3);
  }

  to {
    opacity: 0;
    transform: scale(1.3);
  }
}

@media (max-width: 959px) {
  .demo-stage {
    order: -1;
  }

  /* On small screens only the current step's text shows. */
  .chapter:not([aria-current]) small {
    display: none;
  }
}

/* Open source: fork, run, PR. */
.fork-art {
  flex-direction: column;
  gap: var(--space-3);
}

.repo {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-sm);
  font-weight: 700;
  background: var(--color-surface);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  animation: pop 500ms var(--ease-out) both;
}

.repo svg {
  width: 18px;
  height: 18px;
}

.fork-chip {
  animation:
    pop 500ms 400ms var(--ease-out) both,
    breathe 1.6s 1s var(--ease) infinite alternate;
}

.term-art {
  padding: var(--space-4);
}

.term {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  width: min(100%, 15rem);
  padding: var(--space-4);
  font-size: var(--text-xs);
  line-height: 1.6;
  color: var(--color-text-inverse);
  background: var(--color-ink);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
}

.term span {
  animation: pop 400ms calc(300ms + var(--i) * 700ms) var(--ease-out) both;
}

.term i {
  font-style: normal;
  color: var(--color-star);
}

.term-ok {
  font-family: var(--font-sans);
  font-weight: 800;
  color: var(--color-known);
}

.bills {
  flex-direction: column;
  align-items: stretch;
  gap: var(--space-2);
  padding: var(--space-4) var(--space-6);
}

.bill {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-3);
  font-size: var(--text-sm);
  font-weight: 600;
  background: var(--color-surface);
  border-radius: var(--radius-sm);
  animation: pop 500ms calc(var(--i) * 150ms) var(--ease-out) both;
}

.bill-title {
  font-weight: 800;
  color: var(--color-primary);
}

.check {
  position: relative;
  display: block;
  flex: none;
  width: 18px;
  height: 18px;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-full);
  animation: passed 400ms calc(1s + var(--i) * 500ms) var(--ease-out) forwards;
}

.check::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 1px;
  width: 4px;
  height: 8px;
  border: solid var(--color-text-inverse);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) scale(0);
  animation: tick 300ms calc(1.1s + var(--i) * 500ms) var(--ease-out) forwards;
}

@keyframes passed {
  to {
    background: var(--color-known);
    border-color: var(--color-known);
  }
}

@keyframes tick {
  to {
    transform: rotate(45deg) scale(1);
  }
}

.ideas {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-10);
}

.ideas-title {
  margin: 0 var(--space-2) 0 0;
  font-size: var(--text-sm);
  font-weight: 800;
}

.code-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-4) var(--space-6);
  margin-top: var(--space-8);
}

/* First launch */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(20rem, 100%), 1fr));
  gap: var(--space-6);
}

.steps .card {
  gap: var(--space-5);
  padding: var(--space-8);
}

.os-tag {
  align-self: flex-start;
  padding: var(--space-1) var(--space-3);
  font-size: var(--text-xs);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-primary-hover);
  background: var(--color-primary-soft);
  border-radius: var(--radius-full);
}

ol {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

ol li {
  position: relative;
  padding-left: var(--space-10);
  counter-increment: step;
}

ol li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: -2px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  font-size: var(--text-xs);
  font-weight: 800;
  color: var(--color-text-inverse);
  background: var(--color-primary);
  border-radius: var(--radius-full);
}

details {
  font-size: var(--text-sm);
}

summary {
  cursor: pointer;
  color: var(--color-text-muted);
}

summary:hover {
  color: var(--color-primary);
}

pre {
  margin: var(--space-3) 0 0;
  padding: var(--space-3) var(--space-4);
  overflow-x: auto;
  background: var(--color-field);
  border-radius: var(--radius-sm);
}

code {
  font-size: 0.8125rem;
}

/* Closing */
.cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-6);
  margin-bottom: clamp(3rem, 8vw, 6rem);
  padding: clamp(3rem, 8vw, 5rem) var(--space-6);
  text-align: center;
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.cta h2 {
  max-width: 36rem;
}

.cta-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
}

.mark-lg {
  width: 64px;
  height: 64px;
  animation: spin-in 1s var(--ease-out) both;
}

@keyframes spin-in {
  from {
    opacity: 0;
    transform: rotate(-90deg) scale(0.6);
  }
}

/* Footer */
.foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-2);
  padding-block: var(--space-8) var(--space-12);
  border-top: var(--line-soft);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.foot a {
  overflow-wrap: anywhere;
  text-underline-offset: 3px;
}

.foot a:hover {
  color: var(--color-primary);
}

/* Small screens: fewer nav pills, tighter mocks. */
@media (max-width: 560px) {
  .top-link {
    display: none;
  }

  .app-main,
  .scenes {
    padding: var(--space-4);
  }

  .nav-pill:not(.is-active) span,
  .app-word {
    display: none;
  }

  .choice {
    padding: 0 var(--space-2);
    font-size: var(--text-xs);
  }

  .choice-skip {
    display: none;
  }

  .toast {
    left: var(--space-3);
    right: var(--space-3);
  }

  .board {
    padding: var(--space-3);
    gap: var(--space-2);
  }

  .lane {
    padding: var(--space-2);
  }

  .lane li {
    padding: var(--space-2);
    font-size: var(--text-2xs);
  }

}

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

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