/* ==========================================================================
   FomoFantasy: index (tool chooser)
   Page-only styles. Tokens, base, chips, kbd, avatars, sparkline parts,
   nav, footer and motion keyframes all come from fomo.css. Prefix: ix-

   1 stage · 2 intro · 3 choices + card · 4 visuals (shared) · 5 trade visual
   6 sniper visual · 7 foot note · 8 the choice moment · 9 short screens
   10 touch + no-js · 11 reduced motion
   ========================================================================== */

/* 1. stage ----------------------------------------------------------------- */
.ix {
  /* space left for the footer under the fold; 0 = the chooser owns the screen */
  --ix-foot-allow: 0px;
  --ix-pad-t: clamp(24px, 4.5vh, 56px);
  --ix-pad-b: clamp(32px, 5.5vh, 64px);
  --ix-gap: clamp(28px, 4.2vh, 48px);
  /* height of the note under the cards; the planet rim runs just above it */
  --ix-note-h: 56px;
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  padding-block: var(--ix-pad-t) var(--ix-pad-b);
}

/* the note wraps to 2 lines under 560px and to 3 under 360px */
@media (max-width: 559.98px) {
  .ix {
    --ix-note-h: 84px;
  }
}

@media (max-width: 359.98px) {
  .ix {
    --ix-note-h: 100px;
  }
}

/* touch: the "press 1 or 2" line is hidden, so the foot is just the note */
@media (hover: none) and (pointer: coarse) {
  .ix {
    --ix-note-h: 36px;
  }
}

@media (hover: none) and (pointer: coarse) and (max-width: 559.98px) {
  .ix {
    --ix-note-h: 48px;
  }
}

@media (hover: none) and (pointer: coarse) and (max-width: 359.98px) {
  .ix {
    --ix-note-h: 68px;
  }
}

@media (min-width: 760px) and (min-height: 700px) {
  .ix {
    min-height: calc(100vh - var(--nav-h) - var(--ix-foot-allow));
    min-height: calc(100svh - var(--nav-h) - var(--ix-foot-allow));
  }
}

/* the stage carries its own bottom space, so the footer sits right under it */
.ix + .footer {
  margin-top: 0;
}

/* earth-limb backdrop: a dark planet whose glowing rim runs just under the cards */
.ix-sky {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  isolation: isolate;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, black 0, black calc(100% - 120px), transparent);
  mask-image: linear-gradient(to bottom, black 0, black calc(100% - 120px), transparent);
}

.ix-sky .horizon {
  --horizon-top: calc(100% - var(--ix-pad-b) - var(--ix-note-h) - clamp(16px, 2.6vh, 28px));
}

/* intro + cards float centred in the sky; the note rests on the planet below */
.ix-stage {
  position: relative;
  display: flex;
  flex: 1 0 auto;
  flex-direction: column;
  align-items: center;
  gap: var(--ix-gap);
}

.ix-stage > * {
  min-width: 0;
  max-width: 100%;
}

.ix-intro,
.ix-foot {
  margin-top: auto;
}

/* 2. intro ----------------------------------------------------------------- */
.ix-intro {
  display: grid;
  justify-items: center;
  gap: var(--space-4);
  max-width: 720px;
  text-align: center;
  transition:
    opacity var(--dur-ui) var(--ease-in-out),
    translate 520ms var(--ease-out),
    filter var(--dur-ui) var(--ease-in-out);
}

.ix-intro > * {
  min-width: 0;
  max-width: 100%;
}

.ix-intro__chip svg {
  color: var(--lavender);
}

.ix-intro__title {
  margin-top: var(--space-1);
}

.ix-intro__lead {
  max-width: 52ch;
  margin-inline: auto;
  text-wrap: balance;
}

/* 3. choices + card -------------------------------------------------------- */
.ix-choices {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-4);
  width: 100%;
  max-width: 1040px;
  margin: 0;
}

/* stacked on phones and small tablets: keep the cards card-shaped */
@media (max-width: 759.98px) {
  .ix-choices {
    max-width: 620px;
  }
}

@media (min-width: 760px) {
  .ix-choices {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-6);
  }
}

.ix-choices__item {
  --i: 0;
  display: flex;
  min-width: 0;
  animation: ix-card-in var(--dur-enter-long) var(--ease-out) backwards;
  animation-delay: calc(340ms + var(--i) * 110ms);
}

.ix-choices__item:nth-child(2) {
  --i: 1;
}

.ix-choice {
  /* accent: primary (trade helper) by default, green for the sniper */
  --ix-accent: var(--primary-2);
  --ix-accent-strong: var(--primary);
  --ix-accent-soft: var(--primary-soft);
  --ix-accent-line: color-mix(in srgb, var(--primary-2) 58%, transparent);
  --ix-glow:
    0 0 0 1px color-mix(in srgb, var(--primary-2) 26%, transparent),
    0 22px 60px -22px color-mix(in srgb, var(--primary) 80%, transparent),
    0 0 90px -34px color-mix(in srgb, var(--primary) 70%, transparent);
  --ix-glow-strong:
    0 0 0 1px color-mix(in srgb, var(--primary-2) 45%, transparent),
    0 26px 80px -20px color-mix(in srgb, var(--primary) 90%, transparent),
    0 0 140px -30px color-mix(in srgb, var(--primary) 80%, transparent);

  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  width: 100%;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--r-2xl);
  background:
    linear-gradient(180deg, var(--glass), transparent 38%),
    color-mix(in srgb, var(--surface) 82%, transparent);
  -webkit-backdrop-filter: blur(var(--blur)) saturate(130%);
  backdrop-filter: blur(var(--blur)) saturate(130%);
  box-shadow: var(--inner-hi), var(--shadow-lg);
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transform: perspective(1100px) rotateX(var(--ix-rx, 0deg)) rotateY(var(--ix-ry, 0deg)) translateY(var(--ix-lift, 0px));
  transition:
    transform var(--ix-tilt-dur, 620ms) var(--ease-out),
    border-color var(--dur-ui) var(--ease-out),
    box-shadow var(--dur-ui) var(--ease-out),
    opacity var(--dur-ui) var(--ease-out),
    scale 560ms var(--ease-out),
    translate 640ms var(--ease-out),
    filter 380ms var(--ease-in-out);
}

.ix-choice[data-accent="green"] {
  --ix-accent: var(--green);
  --ix-accent-strong: var(--green);
  --ix-accent-soft: var(--green-soft);
  --ix-accent-line: color-mix(in srgb, var(--green) 55%, transparent);
  --ix-glow:
    0 0 0 1px color-mix(in srgb, var(--green) 24%, transparent),
    0 22px 60px -24px color-mix(in srgb, var(--green) 60%, transparent),
    0 0 90px -36px color-mix(in srgb, var(--green) 55%, transparent);
  --ix-glow-strong:
    0 0 0 1px color-mix(in srgb, var(--green) 42%, transparent),
    0 26px 80px -22px color-mix(in srgb, var(--green) 72%, transparent),
    0 0 140px -32px color-mix(in srgb, var(--green) 65%, transparent);
  /* tints the shared pointer glow ([data-glow]) green on the sniper card */
  --glow-tint: color-mix(in srgb, var(--green) 9%, transparent);
}

.ix-choice.is-tilting {
  --ix-tilt-dur: 140ms;
}

.ix-choice:hover,
.ix-choice:focus-visible {
  --ix-lift: -2px;
  border-color: var(--ix-accent-line);
  box-shadow: var(--inner-hi), var(--shadow-lg), var(--ix-glow);
}

.ix-choice:focus-visible {
  outline-color: var(--ix-accent);
  outline-offset: 4px;
}

/* the card you are not pointing at steps back */
@media (hover: hover) {
  .ix:not(.is-choosing) .ix-choices:has(.ix-choice:hover) .ix-choice:not(:hover) {
    opacity: .72;
  }
}

.ix:not(.is-choosing) .ix-choices:has(.ix-choice:focus-visible) .ix-choice:not(:focus-visible) {
  opacity: .72;
}

/* align rows across both cards (visual, head, text, list, foot) */
@media (min-width: 760px) {
  @supports (grid-template-rows: subgrid) {
    .ix-choices {
      grid-template-rows: repeat(5, auto);
      row-gap: 0;
    }

    .ix-choices__item {
      display: grid;
      grid-row: span 5;
      grid-template-rows: subgrid;
    }

    .ix-choice {
      display: grid;
      grid-row: span 5;
      grid-template-rows: subgrid;
      row-gap: 0;
    }
  }
}

.ix-choice__fx {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  border-radius: inherit;
  pointer-events: none;
}

.ix-choice__flash {
  position: absolute;
  left: var(--fx-x, 50%);
  top: var(--fx-y, 40%);
  width: 240%;
  aspect-ratio: 1;
  border-radius: 50%;
  translate: -50% -50%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--ix-accent-strong) 30%, transparent), color-mix(in srgb, var(--ix-accent-strong) 8%, transparent) 55%, transparent);
  opacity: 0;
  scale: 0;
}

.ix-choice__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  min-width: 0;
  padding: 22px 14px 0;
}

.ix-choice__title {
  min-width: 0;
}

.ix-choice__key {
  flex: none;
  min-width: 26px;
  justify-content: center;
  color: var(--muted);
  transition: color var(--dur-hover) var(--ease-out), border-color var(--dur-hover) var(--ease-out), box-shadow var(--dur-hover) var(--ease-out);
}

.ix-choice:hover .ix-choice__key,
.ix-choice:focus-visible .ix-choice__key {
  color: var(--text-head);
  border-color: var(--ix-accent-line);
  box-shadow: 0 0 14px -4px var(--ix-accent-line);
}

.ix-choice__desc {
  max-width: 46ch;
  padding: 8px 14px 0;
  color: var(--muted);
  text-wrap: pretty;
}

/* balanced two-line descriptions once the cards sit side by side */
@media (min-width: 760px) {
  .ix-choice__desc {
    text-wrap: balance;
  }
}

.ix-choice__list {
  display: grid;
  align-content: start;
  gap: 9px;
  margin: 0;
  padding: 18px 14px 22px;
}

.ix-choice__list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
  color: var(--text);
  font-size: var(--fs-14);
  line-height: 1.45;
}

.ix-choice__list li > span:last-child {
  min-width: 0;
}

.ix-check {
  display: grid;
  place-items: center;
  flex: none;
  width: 18px;
  height: 18px;
  margin-top: 1px;
  border-radius: 50%;
  background: var(--ix-accent-soft);
  color: var(--ix-accent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ix-accent) 30%, transparent);
}

.ix-check svg {
  width: 11px;
  height: 11px;
}

.ix-choice__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  min-width: 0;
  margin: auto 4px 0;
  padding: 14px 10px 6px;
  border-top: 1px solid var(--line-soft);
}

.ix-choice__cta {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-width: 0;
  color: var(--text-head);
  font-size: var(--fs-16);
  font-weight: 700;
  letter-spacing: -0.01em;
  transition: color var(--dur-hover) var(--ease-out);
}

.ix-choice__arrow {
  flex: none;
  width: 18px;
  height: 18px;
  transition: translate var(--dur-ui) var(--ease-out);
}

.ix-choice:hover .ix-choice__cta,
.ix-choice:focus-visible .ix-choice__cta {
  color: var(--ix-accent);
}

.ix-choice:hover .ix-choice__arrow,
.ix-choice:focus-visible .ix-choice__arrow {
  translate: 4px 0;
}

.ix-choice__last {
  flex: none;
}

/* 4. visuals (shared frame) ------------------------------------------------ */
.ix-viz {
  position: relative;
  isolation: isolate;
  container-type: inline-size;
  height: 180px;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: var(--r-lg);
  background:
    radial-gradient(90% 80% at 50% 118%, color-mix(in srgb, var(--ix-accent-strong) 16%, transparent), transparent 70%),
    var(--inset);
  box-shadow: inset 0 1px 0 color-mix(in srgb, var(--lavender) 5%, transparent);
  transition: border-color var(--dur-ui) var(--ease-out);
}

/* faint chart grid, fading out toward the edges */
.ix-viz::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(var(--line-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-soft) 1px, transparent 1px);
  background-size: 28px 28px;
  background-position: center center;
  -webkit-mask-image: radial-gradient(75% 85% at 50% 50%, black 20%, transparent 80%);
  mask-image: radial-gradient(75% 85% at 50% 50%, black 20%, transparent 80%);
  opacity: .8;
  pointer-events: none;
}

.ix-choice:hover .ix-viz,
.ix-choice:focus-visible .ix-viz {
  border-color: var(--line);
}

.ix-viz__row {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.ix-viz__row > * {
  min-width: 0;
}

.ix-readout {
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
  line-height: 1.3;
  text-align: right;
  white-space: nowrap;
}

/* off screen, in a hidden tab or under reduced motion, Fomo.whenVisible() adds
   .is-asleep, which freezes the CSS animations inside (see fomo.css) */

/* 5. trade visual ---------------------------------------------------------- */
.ix-viz--trade {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 12px 14px;
}

.ix-token {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-width: 0;
}

.ix-token__text {
  display: grid;
  gap: 3px;
  min-width: 0;
  line-height: 1.1;
}

.ix-token__tk {
  overflow: hidden;
  color: var(--text-head);
  font-size: var(--fs-14);
  font-weight: 600;
  letter-spacing: -0.01em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ix-token__mc {
  overflow: hidden;
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* floating PnL readout; .up / .down from fomo.css set its color */
.ix-pnl {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: none;
  height: 28px;
  padding: 0 11px;
  border: 1px solid color-mix(in srgb, currentColor 30%, transparent);
  border-radius: var(--r-pill);
  background: color-mix(in srgb, currentColor 12%, transparent);
  -webkit-backdrop-filter: blur(var(--blur));
  backdrop-filter: blur(var(--blur));
  box-shadow: 0 10px 26px -12px color-mix(in srgb, currentColor 60%, transparent);
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  white-space: nowrap;
  animation: float 4.4s var(--ease-in-out) infinite;
  transition: color var(--dur-ui) var(--ease-out);
}

.ix-pnl__usd {
  min-width: 8ch;
  text-align: right;
}

.ix-pnl__pct {
  min-width: 6ch;
}

.ix-pnl__sep {
  color: var(--muted);
}

.ix-chart {
  position: absolute;
  top: 56px;
  right: 22px;
  bottom: 44px;
  left: -12px;
  color: var(--primary-2);
  pointer-events: none;
}

.ix-spark {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.ix-spark .spark__line {
  filter: drop-shadow(0 0 6px color-mix(in srgb, var(--primary) 70%, transparent));
}

/* the live end of the line: bright core inside the pulsing blue halo */
.ix-spark .spark__dot {
  stroke: var(--text-head);
}

.ix-spark .spark__area {
  pointer-events: none;
}

.ix-spark__stop-top {
  stop-color: var(--primary-2);
  stop-opacity: .34;
}

.ix-spark__stop-bottom {
  stop-color: var(--primary-2);
  stop-opacity: 0;
}

.ix-entry {
  position: absolute;
  right: -22px;
  left: 12px;
  height: 0;
  border-top: 1px dashed color-mix(in srgb, var(--lavender) 32%, transparent);
  transition: top 700ms var(--ease-out);
}

.ix-entry__tag {
  position: absolute;
  top: 0;
  right: 40px;
  translate: 0 -50%;
  padding: 1px 6px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: var(--inset);
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1.4;
}

.ix-presets {
  display: inline-flex;
  gap: 6px;
  flex: none;
}

.ix-preset {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: var(--r-xs);
  background: color-mix(in srgb, var(--surface) 75%, transparent);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.ix-preset.is-on {
  border-color: color-mix(in srgb, var(--primary-2) 55%, transparent);
  background: var(--primary-soft);
  color: var(--text-head);
  box-shadow: 0 0 16px -4px color-mix(in srgb, var(--primary) 75%, transparent);
}

/* 6. sniper visual --------------------------------------------------------- */
.ix-viz--sniper {
  display: flex;
  align-items: stretch;
  gap: 16px;
  padding: 14px;
}

.ix-radar {
  --ix-sweep-rest: 64deg;
  position: relative;
  flex: none;
  align-self: center;
  width: 152px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--green) 9%, transparent), transparent);
  box-shadow: 0 0 44px -14px color-mix(in srgb, var(--green) 45%, transparent);
}

.ix-radar__grid {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  fill: none;
}

.ix-radar__ring {
  stroke: var(--line-strong);
  stroke-width: 1px;
  vector-effect: non-scaling-stroke;
}

.ix-radar__ring--soft {
  stroke: var(--line);
}

.ix-radar__cross {
  stroke: var(--line-soft);
  stroke-width: 1px;
  stroke-dasharray: 2 3;
  vector-effect: non-scaling-stroke;
}

.ix-radar__sweep {
  position: absolute;
  inset: 1px;
  border-radius: 50%;
  background: conic-gradient(
    from 0deg,
    transparent 0deg 236deg,
    color-mix(in srgb, var(--green) 4%, transparent) 280deg,
    color-mix(in srgb, var(--green) 26%, transparent) 355deg,
    color-mix(in srgb, var(--green) 48%, transparent) 360deg
  );
  transform: rotate(var(--ix-sweep-rest));
  will-change: transform;
}

/* the beam's leading edge */
.ix-radar__sweep::after {
  content: "";
  position: absolute;
  top: 0;
  left: calc(50% - .5px);
  width: 1px;
  height: 50%;
  background: linear-gradient(to bottom, var(--green), color-mix(in srgb, var(--green) 15%, transparent));
  box-shadow: 0 0 8px color-mix(in srgb, var(--green) 80%, transparent);
}

.ix-radar__blips {
  position: absolute;
  inset: 0;
}

.ix-radar__core {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 5px;
  height: 5px;
  margin: -2.5px 0 0 -2.5px;
  border-radius: 50%;
  background: var(--lavender);
  box-shadow: 0 0 10px var(--lavender);
}

.ix-blip {
  position: absolute;
  width: 5px;
  height: 5px;
  margin: -2.5px 0 0 -2.5px;
  border-radius: 50%;
  background: var(--lavender);
  opacity: 0;
}

.ix-blip.is-match {
  width: 7px;
  height: 7px;
  margin: -3.5px 0 0 -3.5px;
  background: var(--green);
  box-shadow: 0 0 10px 1px color-mix(in srgb, var(--green) 70%, transparent);
}

.ix-blip::after {
  content: "";
  position: absolute;
  inset: -3px;
  border: 1px solid currentColor;
  border-radius: 50%;
  color: var(--lavender);
  opacity: 0;
}

.ix-blip.is-match::after {
  color: var(--green);
}

/* first frame shipped in the HTML (and the reduced-motion state) */
.ix-blip.is-static {
  opacity: var(--o, .6);
}

.ix-blip.is-live {
  animation: ix-blip-miss 4.2s linear forwards;
  animation-delay: calc(var(--age, 0ms) * -1);
}

.ix-blip.is-live.is-match {
  animation-name: ix-blip-match;
  animation-duration: 8s;
}

.ix-blip.is-live::after {
  animation: ping 1.3s var(--ease-out) forwards;
  animation-delay: calc(var(--age, 0ms) * -1);
}

.ix-scan {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-2);
  min-width: 0;
}

.ix-armed {
  flex: none;
}

.ix-feed {
  display: grid;
  gap: 3px;
  width: 100%;
  min-width: 0;
  margin: 0;
}

.ix-feed__row {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  min-width: 0;
  height: 26px;
  padding: 0 8px 0 4px;
  border-radius: var(--r-sm);
  font-family: var(--font-mono);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  white-space: nowrap;
  transition: background-color var(--dur-ui) var(--ease-out), box-shadow var(--dur-ui) var(--ease-out);
}

.ix-feed__row:first-child {
  background: color-mix(in srgb, var(--surface-2) 85%, transparent);
  box-shadow: inset 0 0 0 1px var(--line-soft);
}

.ix-feed__row.is-new {
  animation: ix-row-in 520ms var(--ease-out) backwards;
}

.ix-feed__tk {
  min-width: 0;
  overflow: hidden;
  color: var(--text-head);
  text-overflow: ellipsis;
}

.ix-feed__why {
  overflow: hidden;
  color: var(--muted-2);
  text-overflow: ellipsis;
}

.ix-feed__st {
  color: var(--muted-2);
}

.ix-feed__row.is-match .ix-feed__st {
  color: var(--green);
}

.ix-readout__part {
  white-space: nowrap;
}

.ix-readout__n {
  display: inline-block;
  color: var(--green);
  font-weight: 500;
}

.ix-readout__n.is-bump {
  animation: toast-bump 360ms var(--ease-out);
}

/* narrow cards: keep the radar, trim the text around it */
@container (max-width: 440px) {
  .ix-feed__why {
    display: none;
  }

  .ix-feed__row {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .ix-feed__row:nth-child(n + 3) {
    display: none;
  }
}

@container (max-width: 360px) {
  .ix-radar {
    width: 136px;
  }

  .ix-feed__row:nth-child(n + 2) {
    display: none;
  }

  /* "3 matches · last 5 min" stacks onto two lines beside the radar */
  .ix-readout__part {
    display: block;
  }

  .ix-readout__sep {
    display: none;
  }
}

/* container sizes are content-box widths (the visual minus its padding).
   290px covers phones under 375px and the narrowest two-column cards. */
@container (max-width: 290px) {
  /* a smaller radar and no feed avatar so ticker + status fit beside it */
  .ix-radar {
    width: 112px;
    margin-right: -4px;
  }

  .ix-feed__row .avatar {
    display: none;
  }

  .ix-feed__row {
    grid-template-columns: minmax(0, 1fr) auto;
    padding-left: 8px;
  }
}

@container (max-width: 270px) {
  .ix-token__mc,
  .ix-viz--trade .ix-readout {
    display: none;
  }
}

@container (max-width: 250px) {
  .ix-token .avatar {
    display: none;
  }
}

/* 7. foot note ------------------------------------------------------------- */
.ix-foot {
  display: grid;
  justify-items: center;
  gap: var(--space-2);
  text-align: center;
  animation: fade-in var(--dur-enter-long) var(--ease-out) 640ms backwards;
  transition: opacity var(--dur-ui) var(--ease-in-out);
}

.ix-note {
  max-width: 92ch;
  color: var(--muted);
  font-size: var(--fs-14);
  text-wrap: balance;
}

.ix-keys {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: var(--fs-12);
}

/* 8. the choice moment ----------------------------------------------------- */
/* index.js adds .is-choosing to .ix, .is-chosen / .is-dropped to the cards,
   then hands over to Fomo.navigate() for the shared warp. */
.ix.is-choosing .ix-intro {
  opacity: 0;
  translate: 0 -16px;
  filter: blur(3px);
}

.ix.is-choosing .ix-foot {
  opacity: 0;
}

.ix.is-choosing .ix-choice {
  pointer-events: none;
}

.ix-choice.is-chosen {
  --ix-lift: 0px;
  scale: 1.035;
  translate: var(--ix-pull-x, 0px) var(--ix-pull-y, 0px);
  border-color: var(--ix-accent-line);
  box-shadow: var(--inner-hi), var(--shadow-lg), var(--ix-glow-strong);
}

.ix-choice.is-chosen .ix-choice__flash {
  animation: ix-flash 900ms var(--ease-out) forwards;
}

.ix-choice.is-chosen .ix-viz {
  border-color: var(--ix-accent-line);
}

/* the card stops taking the pointer while choosing, so keep its hover light on */
.ix-choice.is-chosen::before,
.ix-choice.is-chosen::after {
  opacity: 1;
}

.ix-choice.is-chosen .ix-choice__key {
  color: var(--text-head);
  border-color: var(--ix-accent-line);
  box-shadow: 0 0 14px -4px var(--ix-accent-line);
}

.ix-choice.is-chosen .ix-choice__cta {
  color: var(--ix-accent);
}

.ix-choice.is-chosen .ix-choice__arrow {
  translate: 8px 0;
}

.ix-choice.is-dropped {
  opacity: 0;
  scale: .94;
  translate: 0 28px;
  filter: blur(3px);
}

/* 9. short screens (laptops): keep the chooser on the first screen --------- */
@media (min-width: 760px) and (max-height: 940px) {
  .ix {
    --ix-gap: clamp(22px, 3.2vh, 32px);
  }

  .ix-intro {
    gap: var(--space-3);
  }

  .ix-intro__title {
    font-size: clamp(2.4rem, 5vw, 3.8rem);
  }

  .ix-choice__head {
    padding-top: 18px;
  }

  .ix-choice__list {
    padding-top: 15px;
    padding-bottom: 18px;
  }
}

@media (min-width: 760px) and (max-height: 820px) {
  .ix {
    --ix-pad-t: 20px;
    --ix-gap: 22px;
  }

  .ix-intro__title {
    font-size: clamp(2.4rem, 4.6vw, 3.3rem);
  }

  .ix-viz {
    height: 156px;
  }

  .ix-radar {
    width: 128px;
  }

  .ix-chart {
    top: 52px;
    bottom: 40px;
  }

  .ix-choice__head {
    padding-top: 14px;
  }

  .ix-choice__list {
    gap: 7px;
    padding-top: 12px;
    padding-bottom: 14px;
  }

  .ix-choice__foot {
    padding-top: 12px;
  }
}

/* 1366x768-class laptops (about 650px of viewport): both cards still fit */
@media (min-width: 760px) and (max-height: 700px) {
  .ix {
    --ix-pad-t: 12px;
    --ix-gap: 18px;
  }

  .ix-intro {
    gap: var(--space-2);
  }

  .ix-intro__title {
    font-size: clamp(2.2rem, 4vw, 2.75rem);
  }

  .ix-viz {
    height: 136px;
  }

  .ix-radar {
    width: 108px;
  }

  .ix-chart {
    top: 48px;
    bottom: 38px;
  }

  .ix-choice__head {
    padding-top: 12px;
  }

  .ix-choice__list {
    gap: 6px;
    padding-top: 10px;
    padding-bottom: 12px;
  }

  .ix-choice__foot {
    padding-top: 10px;
  }
}

/* 10. touch + no-js -------------------------------------------------------- */
/* keyboard shortcuts need JS and a keyboard */
html:not(.js) .ix-keys,
html:not(.js) .ix-choice__key {
  display: none;
}

@media (hover: none) and (pointer: coarse) {
  .ix-keys,
  .ix-choice__key {
    display: none;
  }
}

/* keyframes (page-only) */
@keyframes ix-card-in {
  from {
    opacity: 0;
    translate: 0 26px;
    scale: .985;
  }

  to {
    opacity: 1;
    translate: 0 0;
    scale: 1;
  }
}

@keyframes ix-flash {
  0% {
    opacity: .95;
    scale: 0;
  }

  100% {
    opacity: .6;
    scale: 1;
  }
}

@keyframes ix-blip-miss {
  0% {
    opacity: 0;
    scale: 2;
  }

  6% {
    opacity: .85;
    scale: 1;
  }

  100% {
    opacity: 0;
    scale: .8;
  }
}

@keyframes ix-blip-match {
  0% {
    opacity: 0;
    scale: 2.2;
  }

  5% {
    opacity: 1;
    scale: 1;
  }

  55% {
    opacity: .8;
  }

  100% {
    opacity: .38;
  }
}

@keyframes ix-row-in {
  from {
    opacity: 0;
    translate: 0 -6px;
  }

  to {
    opacity: 1;
    translate: 0 0;
  }
}

/* 11. reduced motion ------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .ix-choice {
    transform: none !important;
  }

  .ix-choice.is-chosen,
  .ix-choice.is-dropped,
  .ix.is-choosing .ix-intro {
    scale: none;
    translate: none;
    filter: none;
  }

  .ix-choice:hover .ix-choice__arrow,
  .ix-choice:focus-visible .ix-choice__arrow,
  .ix-choice.is-chosen .ix-choice__arrow {
    translate: none;
  }

  .ix-pnl,
  .ix-choice__flash,
  .ix-feed__row.is-new,
  .ix-readout__n.is-bump,
  .ix-blip.is-live::after {
    animation: none !important;
  }

  .ix-blip.is-live {
    animation: none !important;
    opacity: .5;
  }

  .ix-blip.is-live.is-match {
    opacity: .9;
  }

  .ix-radar__sweep {
    will-change: auto;
  }
}
