/*
 * qwp1-q15: the "It calls for you too" section and its result card. Plain CSS under short names
 * (not utility strings): every class string is sent twice, in the HTML and in the RSC payload,
 * and the home's HTML budget is tight. Colours are the site tokens (--ds-*), so the card reads
 * the same on the home ("Night shift") and on a /for page.
 */
@layer components {
  .cfy-grid {
    display: grid;
    align-items: center;
    gap: 40px;
  }
  @media (min-width: 1024px) {
    .cfy-grid {
      grid-template-columns: 1fr 1fr;
      gap: 64px;
    }
    .cfy-grid > .cfy-side {
      justify-self: end;
    }
  }
  .cfy-words {
    display: flex;
    flex-direction: column;
    gap: 20px;
  }
  .cfy-words p {
    margin: 0;
    max-width: calc(42 * var(--ch));
    font-size: clamp(18px, 1.45vw, 21px);
    line-height: 1.5;
    text-wrap: pretty;
    color: var(--ds-text-muted);
  }
  .cfy-words .cfy-lead {
    color: var(--ds-text);
  }
  .cfy-words .cfy-where {
    font-size: 15px;
  }
  /* qwp2-q16: the free first call, the line a visitor reads right under the heading. */
  .cfy-words .cfy-free {
    font-weight: 600;
    color: var(--ds-signal);
  }
  .cfy-side {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    max-width: 440px;
  }
  .cfy-plus {
    margin: 0;
    font-size: 14px;
    line-height: 1.45;
    color: var(--ds-text-muted);
  }
  /* qwp8-q13: the link to the Calls for you page, a 44 px tap target under the Plus line. */
  .cfy-more {
    margin: 0;
    font-size: 15px;
    line-height: 1.45;
  }
  .cfy-more a {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    font-weight: 600;
    color: var(--ds-text);
    text-decoration: underline;
    text-underline-offset: 2px;
  }
  .cfy-card {
    margin: 0;
    width: 100%;
    max-width: 440px;
    padding: 20px;
    border: 1px solid var(--ds-border-strong);
    border-radius: 22px;
    background: var(--ds-surface);
    box-shadow: var(--ds-elev-2);
  }
  @media (min-width: 640px) {
    .cfy-card {
      padding: 24px;
    }
  }
  .cfy-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: 13px;
  }
  .cfy-done {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: var(--ds-text);
  }
  /* The check, drawn in CSS (two borders of a turned box): costs the HTML nothing. */
  .cfy-done::before {
    content: "";
    width: 5px;
    height: 10px;
    margin: -3px 3px 0 4px;
    border: solid var(--ds-signal);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
  }
  .cfy-tag {
    padding: 2px 10px;
    border: 1px solid var(--ds-border);
    border-radius: 999px;
    font-size: 12px;
    color: var(--ds-text-muted);
  }
  .cfy-card > p {
    margin: 16px 0 0;
    font-size: 17px;
    font-weight: 600;
    color: var(--ds-text);
  }
  .cfy-card > p + p {
    margin-top: 4px;
    font-size: 15px;
    font-weight: 400;
    line-height: 1.45;
    color: var(--ds-text-muted);
  }
  .cfy-card dl {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: baseline;
    gap: 12px 24px;
    margin: 20px 0 0;
    padding-top: 20px;
    border-top: 1px solid var(--ds-border);
  }
  .cfy-card dt {
    font-size: 14px;
    color: var(--ds-text-muted);
  }
  .cfy-card dd {
    margin: 0;
    font-size: 15px;
    font-weight: 500;
    color: var(--ds-text);
  }
  .cfy-card .cfy-mono {
    font-family: var(--f-mono);
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.04em;
  }

  /*
   * qwp6-q11: the real recorded call (CallsForYouPlayer). One pill button and the clock, the words
   * in a box of one height (newest line at the bottom, older ones fading out at the top), then the
   * card the call brought back. Colour changes only, and only without reduced motion.
   */
  .cfy-real .cfy-head {
    justify-content: flex-start;
  }
  .cfy-real .cfy-done::before {
    width: 8px;
    height: 8px;
    margin: 0 2px 0 0;
    border: 0;
    border-radius: 999px;
    background: var(--ds-signal);
    transform: none;
  }
  .cfy-player {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 16px;
  }
  .cfy-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 16px;
  }
  .cfy-play {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 0 20px 0 16px;
    border: 1px solid var(--ds-border-strong);
    border-radius: 999px;
    background: var(--ds-surface-raised);
    font: inherit;
    font-size: 15px;
    font-weight: 600;
    color: var(--ds-text);
    cursor: pointer;
  }
  .cfy-play:hover {
    background: var(--ds-surface-tint);
  }
  .cfy-play:focus-visible {
    outline: 2px solid var(--ds-focus);
    outline-offset: 2px;
  }
  .cfy-play:disabled {
    cursor: progress;
    color: var(--ds-text-muted);
  }
  /* A play triangle, or two pause bars while playing: borders, no image. */
  .cfy-icon {
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 6px 0 6px 10px;
    border-color: transparent transparent transparent currentColor;
  }
  .cfy-icon[data-pause="true"] {
    width: 10px;
    height: 12px;
    border-width: 0 3px;
    border-color: currentColor;
  }
  .cfy-clock {
    font-size: 14px;
    font-variant-numeric: tabular-nums;
    color: var(--ds-text-muted);
  }
  .cfy-lines {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 8px;
    height: 9.5em;
    margin: 0;
    padding: 0;
    overflow: hidden;
    list-style: none;
    font-size: 15px;
    line-height: 1.45;
    -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 2.2em);
    mask-image: linear-gradient(to bottom, transparent 0, #000 2.2em);
  }
  .cfy-lines-all {
    height: auto;
    max-height: none;
    -webkit-mask-image: none;
    mask-image: none;
  }
  .cfy-lines li {
    flex: none;
    color: var(--ds-text-muted);
  }
  .cfy-lines li[data-now],
  .cfy-lines-all li {
    color: var(--ds-text);
  }
  .cfy-lines b {
    font-weight: 600;
    color: var(--ds-text);
  }
  .cfy-lines .cfy-vicem {
    color: var(--ds-signal);
  }
  .cfy-note {
    margin: 0;
    font-size: 14px;
    color: var(--ds-text-muted);
  }
  .cfy-card .cfy-rhead {
    margin: 0;
    font-size: 14px;
    color: var(--ds-text-muted);
  }
  .cfy-result dl {
    margin-top: 12px;
  }
  /*
   * qwr2-q12: "Or ask for 3 quotes", the strip under the call card, and its example comparison
   * (QuoteRoundCard): a real table, the lowest price marked in words; under 400 px each row
   * stacks with its column names (data-c), so nothing scrolls sideways on a small phone.
   */
  .cfy-qline {
    margin: 8px 0 0;
    font-size: 16px;
    line-height: 1.5;
    text-wrap: pretty;
    color: var(--ds-text);
  }
  .cfy-qcta {
    display: inline-flex;
    align-self: flex-start;
    min-height: 44px;
    align-items: center;
    padding: 0 20px;
    border: 1px solid var(--ds-border-strong);
    border-radius: 999px;
    font-size: 15px;
    font-weight: 600;
    color: var(--ds-text);
    text-decoration: none;
  }
  .cfy-qcta:hover {
    background: var(--ds-surface-tint);
  }
  .cfy-qcta:focus-visible {
    outline: 2px solid var(--ds-focus);
    outline-offset: 2px;
  }
  .cfy-qt {
    width: 100%;
    margin: 16px 0 0;
    border-collapse: collapse;
    font-size: 14px;
    line-height: 1.4;
    font-variant-numeric: tabular-nums;
  }
  .cfy-qt caption {
    margin-bottom: 12px;
    text-align: start;
    font-size: 15px;
    color: var(--ds-text-muted);
  }
  .cfy-qt th,
  .cfy-qt td {
    padding: 10px 6px;
    border-top: 1px solid var(--ds-border);
    text-align: start;
    vertical-align: top;
  }
  .cfy-qt th:first-child,
  .cfy-qt td:first-child {
    padding-inline-start: 0;
  }
  .cfy-qt thead th {
    padding-top: 0;
    border-top: 0;
    font-size: 12px;
    font-weight: 500;
    color: var(--ds-text-muted);
  }
  .cfy-qt tbody th {
    font-weight: 600;
    color: var(--ds-text);
  }
  .cfy-qt td {
    color: var(--ds-text-muted);
  }
  .cfy-qt td[data-c]:nth-of-type(1) {
    font-weight: 600;
    color: var(--ds-text);
    white-space: nowrap;
  }
  .cfy-low {
    display: block;
    margin-top: 2px;
    font-size: 12px;
    font-weight: 600;
    white-space: normal;
    color: var(--ds-signal);
  }
  .cfy-quote .cfy-qbook {
    margin: 12px 0 0;
    font-size: 14px;
    font-weight: 400;
    color: var(--ds-text-muted);
  }
  @media (max-width: 399px) {
    .cfy-qt thead {
      position: absolute;
      width: 1px;
      height: 1px;
      overflow: hidden;
      clip-path: inset(50%);
    }
    .cfy-qt tr,
    .cfy-qt th,
    .cfy-qt td {
      display: block;
    }
    .cfy-qt tbody tr {
      padding: 12px 0;
      border-top: 1px solid var(--ds-border);
    }
    .cfy-qt tbody th,
    .cfy-qt tbody td {
      padding: 2px 0;
      border: 0;
    }
    .cfy-qt td[data-c] {
      display: flex;
      gap: 12px;
    }
    .cfy-qt td[data-c]::before {
      content: attr(data-c);
      flex: 0 0 38%;
      font-weight: 400;
      color: var(--ds-text-muted);
    }
    .cfy-low {
      display: inline;
      margin: 0;
    }
  }
  @media (prefers-reduced-motion: no-preference) {
    .cfy-qcta,
    .cfy-play,
    .cfy-lines li {
      transition:
        color 160ms ease,
        background-color 160ms ease;
    }
  }
}
