/* Hero proof demo — rewritten 2026-09-19 alongside clinic-landing.css.
   Sits on the dark hero as one raised card: a prompt bar, example chips, and a
   paper answer panel. Tokens come from .clinic-landing in clinic-landing.css. */

.cp-demo {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0;
  text-align: left;
}
.cp-topline {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--cl-s3);
  margin-bottom: var(--cl-s4);
  color: var(--cl-d3);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
}

/* Prompt card, flex.team pattern: a glass panel floating on the hero gradient,
   large radius, the text set as the only strong element, and a quiet return
   glyph in the bottom-right instead of a filled send button. */
/* One row, sized by its text. A tall panel with a single line in the corner read
   as an empty textarea next to flex.team's single-line pill (2026-09-19). */
.cp-prompt {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--cl-s5);
  max-width: 960px;
  /* Centred with the headline above it (2026-09-19 review). */
  margin-inline: auto;
  padding: var(--cl-s5) var(--cl-s6);
  /* No border: flex.team's prompt panel is defined by light and shadow only, and
     a 1px outline made ours read as a text input (2026-09-19 comparison). */
  border: 0;
  border-radius: 28px;
  background: linear-gradient(
    160deg,
    rgba(255, 255, 255, 0.2) 0%,
    rgba(255, 255, 255, 0.09) 38%,
    rgba(16, 20, 28, 0.16) 74%,
    rgba(16, 20, 28, 0.26) 100%
  );
  /* saturate below 1 pulls the blue out of the backdrop so the panel reads as
     neutral glass instead of a blue box (2026-09-19 feedback). */
  backdrop-filter: blur(44px) saturate(0.45) brightness(0.98);
  -webkit-backdrop-filter: blur(44px) saturate(0.45) brightness(0.98);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.34),
    inset 0 -20px 40px rgba(6, 12, 24, 0.22),
    0 40px 90px rgba(3, 7, 15, 0.52),
    0 6px 20px rgba(3, 7, 15, 0.3);
  color: var(--cl-d1);
}
.cp-prompt-symbol {
  display: none;
}
/* The real questions are a full sentence. The type is sized so the longest one
   still fits the row on a desktop; phones reserve the wrapped height below so a
   typed question does not push the panel up and down. */
.cp-prompt p {
  grid-column: 1;
  min-width: 0;
  margin: 0;
  font-size: clamp(18px, 1.5vw, 22px);
  font-weight: 600;
  line-height: 1.45;
  letter-spacing: -0.028em;
  color: var(--cl-d1);
  word-break: keep-all;
  overflow-wrap: anywhere;
}
.cp-send {
  grid-column: 2;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  font-size: 19px;
  line-height: 1;
  color: var(--cl-d3);
}
/* The caret stays on and blinks while typing so the card visibly writes itself,
   the way flex.team's prompt does, instead of text appearing with no signal. */
.cp-cursor {
  display: inline-block;
  height: 1.05em;
  width: 2px;
  margin-left: 4px;
  background: var(--cl-brand-lift);
  vertical-align: -0.12em;
  opacity: 0;
}
.cp-typing .cp-cursor {
  opacity: 1;
  animation: cp-caret 1s steps(1, end) infinite;
}
@keyframes cp-caret {
  0%,
  50% {
    opacity: 1;
  }
  51%,
  100% {
    opacity: 0.1;
  }
}

/* Example row. The card rotates on its own, so this reads as a position
   indicator rather than a set of buttons the visitor has to work through
   (2026-09-19: the pill buttons made the rotation look manual). Each item is
   still a real button for keyboard users and for jumping to one example. */
.cp-choices {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: var(--cl-s4);
  margin: var(--cl-s5) 0 var(--cl-s5);
}
.cp-choices button {
  position: relative;
  min-height: 34px;
  padding: 6px 0 10px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--cl-d3);
  font: 500 13px/1.4 var(--display);
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: color 0.2s ease;
}
.cp-choices button::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 2px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.16);
}
.cp-choices button:hover {
  color: var(--cl-d2);
}
.cp-choices button[aria-pressed="true"] {
  color: var(--cl-d1);
  font-weight: 700;
}
.cp-choices button[aria-pressed="true"]::after {
  background: var(--cl-brand-lift);
}

/* answer panel: what CareLoop puts on screen for the question, shown as the live
   synthetic console rather than described in three text steps (2026-09-19 —
   the point is that the answer is also a dashboard you can read at a glance). */
.cp-response {
  display: grid;
  grid-template-columns: minmax(0, 0.74fr) minmax(0, 1.5fr);
  align-items: center;
  gap: var(--cl-s7);
  padding: var(--cl-s6);
  border: 0;
  border-radius: var(--cl-r-lg);
  background: linear-gradient(180deg, #ffffff 0%, #f7f9fd 100%);
  box-shadow: 0 30px 70px rgba(3, 7, 15, 0.42);
  color: var(--cl-l1);
}
/* Nothing in the panel fades while the question types (2026-09-19 review: any
   dimming read as flicker). The answer swaps when the question is sent; the only
   signal is the return glyph lighting up. */
.cp-sent .cp-send {
  color: var(--cl-brand-lift);
}
.cp-response-copy {
  min-width: 0;
}
.cp-response-heading {
  display: flex;
  justify-content: space-between;
  gap: var(--cl-s4);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--cl-brand);
}
.cp-counter {
  font-family: var(--cl-serif);
  font-variant-numeric: tabular-nums;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--cl-l3);
}
.clinic-page .cp-answer {
  margin: var(--cl-s4) 0 var(--cl-s4);
  max-width: 16ch;
  font-size: clamp(22px, 2vw, 30px);
  font-weight: 700;
  line-height: 1.28;
  letter-spacing: -0.032em;
}
.cp-detail {
  margin: 0;
  max-width: 34ch;
  font-size: 16px;
  line-height: 1.72;
  color: var(--cl-l2);
  word-break: keep-all;
  overflow-wrap: anywhere;
}
/* The human boundary travels with every answer, so no example reads as the
   product deciding on its own. */
.cp-human {
  display: grid;
  gap: 4px;
  margin: var(--cl-s5) 0 0;
  padding-top: var(--cl-s4);
  border-top: 1px solid var(--cl-rule);
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--cl-l2);
  word-break: keep-all;
}
.cp-human > span:first-child {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--cl-brand);
}
/* Live synthetic console (film-ui markup in a shadow root). The frame keeps the
   1440:900 ratio, so the panel height does not jump between examples. */
.cp-stage {
  min-width: 0;
}
.cp-preview {
  margin: 0;
}
.cp-preview[hidden] {
  display: none;
}
.cp-preview .product-preview-console {
  border: 1px solid var(--cl-rule);
  border-radius: var(--cl-r-md);
  box-shadow: 0 18px 44px rgba(12, 28, 60, 0.14);
}
.cp-preview figcaption {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px var(--cl-s4);
  margin-top: var(--cl-s3);
}
.cp-preview figcaption strong {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--cl-l1);
}
.cp-preview .preview-current-menu {
  margin-top: 0;
  font-size: 12px;
  color: var(--cl-brand);
}
.cp-demo .cl-proof-note {
  margin: var(--cl-s4) 0 0;
  color: var(--cl-d3);
  font-size: 12px;
  line-height: 1.8;
}
.cp-demo .cl-proof-note span {
  display: block;
}
.cp-demo :focus-visible {
  outline-color: var(--cl-brand-lift);
}

@media (max-width: 1023px) {
  .cp-response {
    grid-template-columns: 1fr;
    gap: var(--cl-s5);
  }
  .clinic-page .cp-answer,
  .cp-detail {
    max-width: none;
  }
}

@media (max-width: 767px) {
  .cp-demo {
    margin-top: var(--cl-s6);
    padding: 0;
  }
  .cp-topline {
    font-size: 11px;
  }
  .cp-prompt {
    gap: var(--cl-s3);
    padding: var(--cl-s4);
    border-radius: 22px;
  }
  /* Exactly two lines tall (review, 2026-09-19): every question fits in two lines
     down to a 360px phone at this size, so the third reserved line was dead space.
     The height is still reserved so a typing question never moves the panel. */
  .cp-prompt p {
    min-height: 2.9em;
    font-size: 16px;
    letter-spacing: -0.035em;
  }
  .cp-send {
    width: 22px;
    height: 28px;
    font-size: 17px;
  }
  /* Five short labels on ONE row (review, 2026-09-19): a wrapped fifth tab looked
     like a stray item. The labels were shortened for this; on a very narrow phone
     the row scrolls sideways instead of wrapping. */
  .cp-choices {
    flex-wrap: nowrap;
    justify-content: space-between;
    gap: 10px;
    margin-block: var(--cl-s3) var(--cl-s4);
    overflow-x: auto;
    scrollbar-width: none;
  }
  .cp-choices::-webkit-scrollbar {
    display: none;
  }
  .cp-choices button {
    flex: none;
    min-height: 44px;
    padding: 10px 0 12px;
    font-size: 12.5px;
    white-space: nowrap;
  }
  .cp-response {
    padding: var(--cl-s5) var(--cl-s4);
  }
  .cp-detail {
    font-size: 15px;
  }
}

@media (prefers-reduced-motion: reduce) {
  /* The caret stays — the question still types itself under reduced motion —
     but it holds steady instead of blinking. */
  .cp-cursor {
    animation: none;
  }
}
