/* Use-case pages (/use-cases and the pages below it). Builds on home.css and tools.css and their
   tokens. Each page has one stage: a product someone could build on the API, drawn and moved by
   use-cases.js. Every figure on a stage is example data. */

/* ---------- hero: the claim on the left, the stage on the right ---------- */
.uch {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 56px;
  align-items: center;
}
.uch h1 {
  font-size: clamp(36px, 4.5vw, 58px);
}
.uch .lead {
  margin-top: 20px;
  max-width: 44ch;
  text-wrap: pretty;
}
.uc-hero {
  padding-bottom: 96px;
}
.uc-hero ::selection,
.stage ::selection {
  background: var(--blue);
  color: var(--white);
}

/* ---------- the stage ---------- */
.stage {
  position: relative;
  display: flex;
  flex-direction: column;
  /* a fixed height: a view with more in it must not move the text beside the stage */
  height: 580px;
  overflow: hidden;
  box-shadow:
    0 1px 0 #ffffff0a inset,
    0 32px 64px -32px #000;
  font-variant-numeric: tabular-nums;
}
.stage .box-head {
  min-height: 52px;
}
.stage .box-foot {
  font-size: 12px;
  color: var(--ink-400);
}
.stage-title {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--white);
}
.stage .up {
  color: var(--green-300);
}
.stage .down {
  color: var(--red-300);
}

/* a row that grows into place, so the rows above it move up smoothly */
.grow {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.45s var(--ease);
}
.grow.on {
  grid-template-rows: 1fr;
}
.grow > * {
  min-height: 0;
  overflow: hidden;
}

/* ---------- stage: an agent answers with tool calls ---------- */
.convo {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 20px;
  overflow: hidden;
  -webkit-mask: linear-gradient(#0000, #000 56px);
  mask: linear-gradient(#0000, #000 56px);
}
.convo .grow {
  flex: none;
}
.msg {
  margin-top: 12px;
  opacity: 0;
  translate: 0 10px;
  transition:
    opacity 0.4s var(--ease),
    translate 0.4s var(--ease);
}
.on > .msg {
  opacity: 1;
  translate: none;
}
.msg.user {
  justify-self: end;
  max-width: 82%;
  padding: 10px 14px;
  border-radius: 16px 16px 4px 16px;
  background: var(--blue);
  color: var(--white);
  font-size: 15px;
  line-height: 1.45;
}
.msg.call {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 10px;
  padding: 9px 12px;
  border: 1px solid var(--ink-700);
  border-radius: var(--r-md);
  font: 13px/1.5 var(--mono);
  color: var(--ink-300);
}
.msg.call b {
  color: var(--blue-300);
  font-weight: 500;
}
.call-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--orange);
  animation: uc-blink 0.9s var(--ease-io) infinite alternate;
}
.done .call-dot {
  background: var(--green-300);
  animation: none;
}
.call-state {
  margin-left: auto;
  color: var(--ink-400);
}
.msg.card {
  padding: 6px 14px;
  border-radius: var(--r-md);
  background: var(--ink-850);
}
.msg.card > p {
  padding: 8px 0;
  font-size: 14px;
  color: var(--ink-200);
}
.cr {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) 52px 76px;
  gap: 12px;
  align-items: center;
  padding: 7px 0;
  font-size: 14px;
}
.cr + .cr {
  border-top: 1px solid var(--ink-800);
}
.cr .ident {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--white);
  font-weight: 600;
}
.cr > span:nth-child(3) {
  text-align: right;
  color: var(--white);
}
.cr .q-lbl {
  text-align: right;
}
.msg.say {
  max-width: 92%;
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink-200);
}
.msg.say b {
  color: var(--white);
}
.say .w {
  opacity: 0;
  transition: opacity 0.3s;
}
.say .w.on {
  opacity: 1;
}

/* a bar from the middle to one side: right of it is bullish, left of it bearish */
.dvb,
.mtb {
  position: relative;
  height: 6px;
  border-radius: 999px;
  background: var(--ink-700);
}
.dvb::before {
  content: '';
  position: absolute;
  left: 50%;
  top: -3px;
  bottom: -3px;
  width: 1px;
  background: var(--ink-600);
}
.dvb i,
.mtb i {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: var(--w);
  border-radius: 999px;
  background: var(--green-300);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.7s var(--ease);
}
.dvb i.neg {
  left: auto;
  right: 50%;
  background: var(--red-300);
  transform-origin: right;
}
.mtb i {
  left: 0;
  background: linear-gradient(90deg, var(--blue), var(--blue-300));
}
.on .dvb i,
.on .mtb i,
.with .mtb i,
.with .dvb i {
  transform: none;
}

/* ---------- stage: a portfolio app with the mood beside the price ---------- */
.app {
  position: relative;
  flex: 1;
  padding: 20px 252px 0 20px;
  overflow: hidden;
}
.app-main {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding-bottom: 20px;
}
.app-sum {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
}
.app-sum small {
  display: block;
  white-space: nowrap;
  font: 12px/1.4 var(--mono);
  color: var(--ink-400);
}
.app-sum b {
  display: block;
  font-size: 30px;
  line-height: 1.15;
  letter-spacing: -0.035em;
  color: var(--white);
}
.app-mood {
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: right;
}
.app-mood b {
  font-size: 18px;
  white-space: nowrap;
}
.mood-dial {
  display: block;
  width: 76px;
  height: 42px;
  overflow: visible;
}
.mood-dial path {
  fill: none;
  stroke: var(--ink-700);
  stroke-width: 9;
  stroke-linecap: round;
}
.mood-dial .dial-v {
  stroke: var(--c, var(--blue-300));
  stroke-dasharray: 0 100;
  transition:
    stroke-dasharray 0.9s var(--ease),
    stroke 0.4s;
}
.with .mood-dial .dial-v {
  stroke-dasharray: var(--v) 100;
}
.app-rows {
  position: relative;
  display: flex;
  flex-direction: column;
}
.app-h,
.app-row {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) 56px minmax(0, 1fr) 34px;
  gap: 12px;
  align-items: center;
  padding: 0 10px;
}
.app-h {
  padding-bottom: 8px;
  border-bottom: 1px solid var(--ink-800);
  font: 12px/1.4 var(--mono);
  color: var(--ink-400);
}
.app-h span:nth-child(2),
.app-h span:nth-child(4),
.app-row > span:nth-child(2),
.app-row > span:nth-child(4) {
  text-align: right;
}
.app-row {
  position: relative;
  height: 54px;
  border: 0;
  border-bottom: 1px solid var(--ink-850);
  background: none;
  text-align: left;
  font-size: 14px;
}
.app-row .ident {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.app-row .ident b {
  display: block;
  color: var(--white);
  font-weight: 600;
}
.app-row .ident small {
  display: block;
  overflow: hidden;
  font-size: 12px;
  color: var(--ink-400);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.app-row .mood {
  display: grid;
  gap: 6px;
  padding: 0;
  background: none;
}
.app-row .mood small {
  font: 11px/1 var(--mono);
  color: var(--ink-300);
}
/* the band behind the chosen row; it slides, so the eye follows the choice to the phone */
.app-hl {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 54px;
  border-radius: var(--r-md);
  background: var(--ink-850);
  box-shadow: 0 0 0 1px var(--ink-700) inset;
  translate: 0 var(--y, 0);
  transition: translate 0.5s var(--ease);
}
/* what the API adds stays out until the view is switched on */
.ours {
  opacity: 0;
  transition: opacity 0.5s var(--ease);
  transition-delay: calc(var(--i, 0) * 70ms);
}
.with .ours {
  opacity: 1;
}
.app-row .mtb i,
.app-row .dvb i {
  transition-delay: calc(var(--i, 0) * 70ms + 0.1s);
}
.handset {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 212px;
  height: 540px;
  padding: 10px 10px 0;
  border: 1px solid var(--ink-600);
  border-bottom: 0;
  border-radius: 32px 32px 0 0;
  background: var(--black);
  box-shadow:
    0 1px 0 #ffffff1f inset,
    -24px 24px 48px -24px #000;
}
.handset::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 18px;
  z-index: 1;
  width: 58px;
  height: 16px;
  border-radius: 999px;
  background: var(--black);
  translate: -50% 0;
}
.ph {
  display: flex;
  flex-direction: column;
  gap: 14px;
  height: 100%;
  padding: 44px 14px 0;
  border-radius: 23px 23px 0 0;
  background: var(--ink-900);
  transition:
    opacity 0.2s,
    translate 0.3s var(--ease);
}
.ph.swap {
  opacity: 0;
  translate: 0 8px;
}
.ph-top {
  display: flex;
  align-items: center;
  gap: 10px;
}
.ph-top b {
  display: block;
  color: var(--white);
}
.ph-top small {
  display: block;
  font-size: 12px;
  color: var(--ink-400);
}
.ph-price {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}
.ph-price b {
  font-size: 24px;
  letter-spacing: -0.03em;
  color: var(--white);
}
.ph-price span {
  font: 13px/1 var(--mono);
}
.ph-spark {
  display: block;
  width: 100%;
  height: 44px;
}
.ph-spark path {
  fill: none;
  stroke: var(--ink-300);
  stroke-width: 1.5;
  vector-effect: non-scaling-stroke;
}
.ph-mood {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px solid var(--ink-800);
}
.ph-mood b {
  display: block;
  font-size: 22px;
  line-height: 1.1;
  color: var(--white);
}
.ph-mood small,
.ph-why small {
  font: 11px/1.4 var(--mono);
  color: var(--ink-400);
}
.ph-why p {
  margin-top: 4px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--ink-200);
}
.ph-src {
  display: grid;
  gap: 8px;
}
.ph-src div {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) 32px;
  gap: 8px;
  align-items: center;
  font: 11px/1 var(--mono);
  color: var(--ink-300);
}
.ph-src .src {
  width: 20px;
  height: 20px;
  border-radius: 6px;
}
.ph-src span:last-child {
  text-align: right;
}

/* ---------- stage: a rule, the checks, and the alert that leaves ---------- */
.al {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px 20px 20px;
}
.al-rule {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-height: 68px;
  font-size: 14px;
  color: var(--ink-300);
}
.al-rule .chip {
  padding: 6px 8px;
  color: var(--white);
}
.al-rule .chip.v {
  border-color: var(--blue-300);
  color: var(--blue-300);
}
.al-chart {
  position: relative;
  flex: 1;
  min-height: 150px;
  border: 1px solid var(--ink-800);
  border-radius: var(--r-md);
  background: var(--ink-950);
}
.al-chart svg {
  position: absolute;
  inset: 16px 16px 28px 44px;
  width: calc(100% - 60px);
  height: calc(100% - 44px);
  overflow: visible;
}
.al-chart path {
  fill: none;
  stroke: var(--blue-300);
  stroke-width: 2;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}
.al-plot {
  position: absolute;
  inset: 16px 16px 28px 44px;
}
.al-y {
  position: absolute;
  left: -36px;
  font: 11px/1 var(--mono);
  color: var(--ink-400);
  translate: 0 -50%;
}
.al-level {
  position: absolute;
  left: 0;
  right: 0;
  border-top: 1px dashed var(--orange);
  opacity: 0.8;
}
.al-level span {
  position: absolute;
  right: 0;
  bottom: 4px;
  font: 11px/1 var(--mono);
  color: var(--orange);
}
/* a check of the rule: a tick on the time axis that lights up when the line reaches it */
.al-check {
  position: absolute;
  top: 0;
  bottom: -8px;
  width: 1px;
  background: var(--ink-800);
}
.al-check::after {
  content: '';
  position: absolute;
  left: -3px;
  bottom: -3px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ink-600);
  transition:
    background 0.3s,
    scale 0.3s var(--ease);
}
.al-check.on::after {
  background: var(--ink-200);
  scale: 1.25;
}
.al-check.hit {
  background: var(--orange);
}
.al-check.hit::after {
  background: var(--orange);
}
.al-check small {
  position: absolute;
  left: 50%;
  bottom: -22px;
  font: 10px/1 var(--mono);
  color: var(--ink-400);
  white-space: nowrap;
  translate: -50% 0;
}
.al-now {
  position: absolute;
  width: 10px;
  height: 10px;
  margin: -5px 0 0 -5px;
  border: 2px solid var(--blue-300);
  border-radius: 50%;
  background: var(--white);
}
.al-ping {
  position: absolute;
  width: 14px;
  height: 14px;
  margin: -7px 0 0 -7px;
  border: 2px solid var(--orange);
  border-radius: 50%;
  opacity: 0;
}
.al-ping.on {
  animation: uc-ping 1.1s var(--ease) 2;
}
.al-move {
  position: absolute;
  padding: 5px 8px;
  border-radius: 6px;
  background: var(--orange);
  color: var(--black);
  font: 600 12px/1 var(--mono);
  white-space: nowrap;
  opacity: 0;
  translate: -100% -150%;
  scale: 0.9;
  transform-origin: right bottom;
  transition:
    opacity 0.3s,
    scale 0.4s var(--ease);
}
.al-move.on {
  opacity: 1;
  scale: 1;
}
.al-out {
  min-height: 74px;
}
.al-card {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  gap: 4px 14px;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid var(--ink-700);
  border-radius: var(--r-md);
  background: var(--ink-850);
  opacity: 0;
  translate: 0 -16px;
  transition:
    opacity 0.4s var(--ease),
    translate 0.5s var(--ease);
}
.al-card.on {
  opacity: 1;
  translate: none;
}
.al-ic {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--blue);
  color: var(--white);
}
.al-ic svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.al-card b {
  display: block;
  color: var(--white);
}
.al-card small {
  display: block;
  font-size: 13px;
  color: var(--ink-300);
}
.al-card pre {
  grid-column: 1 / -1;
  margin-top: 6px;
  padding: 10px 12px;
  border-radius: var(--r-sm);
  background: var(--ink-950);
  font-size: 12px;
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

/* ---------- stage: the daily series and a rule tested on it ---------- */
.qt {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 176px;
  gap: 16px;
  padding: 16px 20px 20px;
}
.qt-charts {
  position: relative;
  display: grid;
  grid-template-rows: 8fr 4fr 7fr;
  gap: 10px;
  min-height: 0;
}
.qt-c {
  position: relative;
  border: 1px solid var(--ink-800);
  border-radius: var(--r-md);
  background: var(--ink-950);
  overflow: hidden;
}
.qt-c > small {
  position: absolute;
  left: 10px;
  top: 8px;
  z-index: 1;
  font: 11px/1.3 var(--mono);
  color: var(--ink-400);
}
.qt-c > small b {
  font-weight: 500;
}
.qt-c svg {
  position: absolute;
  inset: 26px 0 8px;
  width: 100%;
  height: calc(100% - 34px);
  overflow: visible;
}
.qt-c path {
  fill: none;
  stroke-width: 1.6;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}
.qt-price {
  stroke: var(--ink-200);
}
.qt-rule {
  stroke: var(--blue-300);
  stroke-width: 2 !important;
}
.qt-hold {
  stroke: var(--ink-400);
}
.qt-span {
  fill: #6b7bff24;
}
.qt-bar {
  fill: var(--ink-600);
}
.qt-bar.hot {
  fill: var(--blue-300);
}
.qt-line {
  stroke: var(--orange);
  stroke-dasharray: 3 3;
  stroke-width: 1 !important;
}
.qt-draw {
  clip-path: inset(0 calc(100% - var(--p, 100%)) 0 0);
}
.qt-play {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--p, 100%);
  width: 1px;
  background: var(--blue-300);
}
.qt-side {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}
.qt-csv {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  border: 1px solid var(--ink-800);
  border-radius: var(--r-md);
  background: var(--ink-950);
  font: 11px/1.9 var(--mono);
  overflow: hidden;
}
.qt-csv b {
  flex: none;
  padding: 6px 10px;
  font-size: 10px;
  border-bottom: 1px solid var(--ink-800);
  color: var(--ink-400);
  font-weight: 400;
  white-space: nowrap;
}
.qt-csv ol {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 0;
  margin: 0;
  padding: 0 10px 6px;
  overflow: hidden;
  list-style: none;
  color: var(--ink-300);
}
.qt-csv li {
  white-space: nowrap;
}
.qt-csv li.hot {
  color: var(--blue-300);
}
.qt-csv li:last-child {
  color: var(--white);
}
.qt-stats {
  display: grid;
  gap: 8px;
  margin: 0;
}
.qt-stats div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--ink-800);
}
.qt-stats dt {
  font: 11px/1.3 var(--mono);
  color: var(--ink-400);
}
.qt-stats dd {
  margin: 0;
  color: var(--white);
  font-weight: 600;
}
.qt-stats .rule dd {
  color: var(--blue-300);
}

/* ---------- below the hero ---------- */
/* three facts in one ruled row: text columns, no cards */
.facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 40px;
}
.facts > div {
  padding-top: 20px;
  border-top: 1px solid var(--ink-600);
}
.facts h3 {
  font-size: 20px;
}
.facts p {
  margin-top: 10px;
  color: var(--ink-300);
  text-wrap: pretty;
}
.facts code,
.build code {
  color: var(--white);
}
/* the steps on the left, the call on the right */
.build {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 56px;
  align-items: start;
}
.build ol {
  display: grid;
  gap: 28px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}
.build li {
  position: relative;
  padding-left: 52px;
  counter-increment: step;
}
.build li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: -2px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--ink-600);
  border-radius: 50%;
  font: 500 13px/1 var(--mono);
  color: var(--white);
}
.build li b {
  display: block;
  color: var(--white);
  font-size: 18px;
}
.build li p {
  margin-top: 6px;
  color: var(--ink-300);
}
.callp pre {
  min-height: 268px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.callp .box-head > span {
  color: var(--ink-200);
}
/* the other use cases: a ruled list of links, each with its line */
.next {
  display: grid;
  border-top: 1px solid var(--ink-700);
}
.next a {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr) auto;
  gap: 24px;
  align-items: baseline;
  padding: 22px 4px;
  border-bottom: 1px solid var(--ink-700);
  color: var(--ink-300);
  transition:
    background var(--dur),
    padding var(--dur) var(--ease);
}
.next a b {
  font-size: 22px;
  letter-spacing: -0.02em;
  color: var(--white);
}
.next a i {
  font-style: normal;
  color: var(--blue-300);
  transition: translate var(--dur) var(--ease);
}
.next a:hover {
  padding-inline: 16px;
  background: var(--ink-900);
}
.next a:hover i {
  translate: 4px 0;
}

/* ---------- the overview: one panel per use case, each with its stage in small ---------- */
.ucx {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}
.ucx-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  color: var(--ink-300);
  transition: border-color var(--dur);
}
.ucx-card:hover {
  border-color: var(--ink-600);
}
.ucx-copy {
  padding: 28px 28px 24px;
}
.ucx-copy small {
  font: 12px/1.4 var(--mono);
  color: var(--blue-300);
}
.ucx-copy h2 {
  margin-top: 8px;
  font-size: 28px;
  letter-spacing: -0.03em;
}
.ucx-copy p {
  margin-top: 10px;
  max-width: 46ch;
}
.ucx-copy .textlink {
  display: inline-block;
  margin-top: 18px;
  color: var(--white);
}
/* the stage in a panel: no bars above or below, no shadow, a fixed height */
.ucx .stage {
  flex: none;
  height: 348px;
  border: 0;
  border-top: 1px solid var(--ink-800);
  border-radius: 0;
  background: var(--ink-950);
  box-shadow: none;
  pointer-events: none;
}
.ucx .stage .box-head,
.ucx .stage .box-foot,
.ucx .handset,
.ucx .al-rule,
.ucx .qt-side,
.ucx .app-sum {
  display: none;
}
.ucx .convo {
  flex: 1;
  height: auto;
  min-height: 0;
}
.ucx .app-row:last-child {
  display: none;
}
.ucx .app {
  padding: 20px;
}
.ucx .qt {
  grid-template-columns: minmax(0, 1fr);
  padding-bottom: 20px;
}
.ucx .al-out {
  min-height: 72px;
}

@keyframes uc-blink {
  to {
    opacity: 0.25;
  }
}
@keyframes uc-ping {
  from {
    opacity: 0.9;
    scale: 1;
  }
  to {
    opacity: 0;
    scale: 4.5;
  }
}

/* ---------- narrow screens ---------- */
/* beside the text the stage is narrow from here on: the list keeps the figures and drops the words */
@media (max-width: 1180px) {
  .app-mood .mood-dial,
  .app-row .mood small span {
    display: none;
  }
}
@media (max-width: 1000px) {
  .uch,
  .build {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
  }
  .uch .lead {
    max-width: 60ch;
  }
  .facts {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }
  .ucx {
    grid-template-columns: minmax(0, 1fr);
  }
  .next a {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .next a span {
    grid-column: 1;
    grid-row: 2;
  }
}
@media (max-width: 640px) {
  .uc-hero {
    padding-bottom: 64px;
  }
  .stage {
    height: auto;
  }
  .convo {
    flex: none;
    height: 460px;
    padding: 14px;
  }
  .al-chart {
    flex: none;
    height: 200px;
  }
  .al-out {
    min-height: 190px;
  }
  .qt-charts {
    grid-template-rows: 150px 76px 130px;
  }
  .cr {
    grid-template-columns: 84px minmax(0, 1fr) 46px;
  }
  .cr .q-lbl {
    display: none;
  }
  /* the phone moves below the list and shows its upper half */
  .app {
    padding: 16px 12px 0;
  }
  .handset {
    position: relative;
    top: 0;
    right: 0;
    width: 232px;
    height: 372px;
    margin: 4px auto 0;
  }
  .app-h,
  .app-row {
    grid-template-columns: minmax(0, 1.1fr) 52px minmax(0, 0.9fr) 30px;
    gap: 8px;
    padding: 0 6px;
  }
  .app-sum b {
    font-size: 24px;
  }
  .app-mood b {
    font-size: 15px;
  }
  /* six times of day do not fit under the chart: only the check that fired names its time */
  .al-check small {
    display: none;
  }
  .al-check.hit small {
    display: block;
  }
  .uc-hero {
    padding-top: 48px;
  }
  .al {
    padding: 14px 12px 16px;
  }
  .al-card {
    grid-template-columns: 40px minmax(0, 1fr);
  }
  .al-card .tag {
    grid-column: 2;
    justify-self: start;
  }
  .qt {
    grid-template-columns: minmax(0, 1fr);
    padding: 12px;
  }
  .qt-csv {
    display: none;
  }
  .qt-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .qt-stats div {
    display: block;
    border: 0;
    padding: 0;
  }
  .ucx-copy {
    padding: 22px 20px 20px;
  }
}

/* without motion every stage shows its last state at once: nothing is left hidden */
@media (prefers-reduced-motion: reduce) {
  .msg,
  .say .w,
  .ours,
  .al-card,
  .al-move {
    opacity: 1;
    translate: none;
    scale: 1;
  }
  .al-move {
    translate: -100% -150%;
  }
  .grow {
    grid-template-rows: 1fr;
  }
  .dvb i,
  .mtb i {
    transform: none;
  }
  .al-ping {
    display: none;
  }
}

/* the whole panel of the overview is the link of its heading */
.ucx-card {
  position: relative;
}
.ucx-copy h2 a::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
}
.ucx + .note {
  text-align: center;
}
.uc-hero .eyebrow a,
.ucx-copy h2 a {
  color: inherit;
}
.uc-hero .eyebrow a:hover {
  color: var(--blue-300);
}
