/* Cali (cali.html). Loaded after site-2026.css; uses its tokens and the v4 page parts (.ph, .v4-short, .v4-sec,
   .v4-head, .v4-cards, .next-band). Written phone first; wider layouts use min-width. */

/* ---------- The sample conversation ---------- */
/* Phone and tablet: the question, the conversation, then where to try it. Laptop: the question and the buttons on
   the left, the conversation on the right, drawn like the chat a visitor opens with "Ask Cali". */
.ca-demo { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "chat" "go"; gap: 24px; }
.ca-demo > * { min-width: 0; }
.ca-demo > .ca-head { grid-area: head; margin-bottom: 0; }
.ca-chat { grid-area: chat; }
.ca-go { grid-area: go; display: flex; flex-wrap: wrap; gap: 12px; }
.ca-go .btn svg { flex: none; }
.ca-go .btn-ghost svg { stroke: var(--sky); }
@media (max-width: 640px) { .ca-go { flex-direction: column; } .ca-go .btn { justify-content: center; } }
@media (min-width: 1000px) {
  .ca-demo { grid-template-columns: minmax(0, 4.2fr) minmax(0, 7.8fr); grid-template-rows: 1fr auto auto 1fr; grid-template-areas: ". chat" "head chat" "go chat" ". chat"; gap: 0 56px; }
  .ca-go { margin-top: 32px; }
  /* Five full sections: a little less air between them keeps the page to five laptop screens. */
  main > .v4-sec { padding-block: 80px; }
}

/* The window: Cali's mark and name, the questions, then the conversation. */
.ca-chat { display: flex; flex-direction: column; border-radius: 24px; background: var(--white); overflow: hidden;
  box-shadow: 0 0 0 1px rgba(156, 203, 235, .9), 0 0 40px 4px rgba(156, 203, 235, .32), 0 34px 70px -26px rgba(10, 28, 46, .45); }
.ca-top { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.ca-me { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--white); box-shadow: 0 0 0 2px var(--sky-light), 0 0 16px 2px rgba(156, 203, 235, .8); }
.ca-me img { width: 24px; height: auto; }
.ca-top p { flex: 1; min-width: 0; }
.ca-top b { display: block; font-size: 19px; line-height: 1.2; font-weight: 700; letter-spacing: -.01em; color: var(--navy); }
.ca-top small { display: block; margin-top: 2px; font-size: 15px; line-height: 1.35; color: var(--ink-3); }
.ca-tag { flex: none; padding: 6px 12px; border-radius: 999px; background: var(--warm); font-size: 14px; line-height: 1.2; font-weight: 500; color: var(--ink-2); }
@media (max-width: 520px) { .ca-tag { display: none; } }

/* The questions: real buttons, shown once the script is running (page-product.js). */
.ca-pick { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px 16px; border-bottom: 1px solid var(--line); background: #FBFAF8; }
.ca-pick[hidden] { display: none; }
.ca-pick button { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 15px; border: 1.5px solid #C8DCED; border-radius: 999px; background: var(--white); color: var(--navy); font: 500 16px/1.25 'Outfit', Arial, sans-serif; text-align: left; cursor: pointer; transition: background-color .2s, color .2s, border-color .2s; }
.ca-pick button svg { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ca-pick button:hover { border-color: var(--sky); background: var(--sky-wash); }
.ca-pick button[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: var(--white); }
.ca-pick button:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

/* One exchange: the question on the right, the answer on the left with its page inside it. */
.ca-talk { display: grid; padding: 18px 16px 20px; }
.ca-turn, .ca-after { display: grid; gap: 12px; align-content: start; }
/* Without the script every exchange shows, one under another, with a rule between them. */
.ca-turn + .ca-turn { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--line); }
.is-live .ca-turn + .ca-turn { margin: 0; padding: 0; border: 0; }
.ca-turn[hidden], .ca-after[hidden] { display: none; }
/* Beside the words on a laptop, the exchanges share one place and the conversation keeps the height of the longest,
   so picking another question changes what is in the window and never moves the page below it. On a phone or a
   tablet each exchange takes only its own height, so the page stays short. */
@media (min-width: 1000px) {
  .is-live .ca-talk > .ca-turn { grid-area: 1 / 1; }
  .is-live .ca-talk > .ca-turn[hidden], .is-live .ca-after[hidden] { display: grid; visibility: hidden; }
}
/* The window's last line, as in Cali's own chat. */
.ca-foot { margin: auto 0 0; padding: 12px 16px 14px; border-top: 1px solid var(--line); font-size: 15px; line-height: 1.45; color: var(--ink-3); }
@media (min-width: 1000px) { .ca-foot { padding-inline: 24px; } }
.ca-me-q, .ca-bot { max-width: 92%; margin: 0; padding: 12px 16px; font-size: 17px; line-height: 1.5; }
.ca-me-q { justify-self: end; border-radius: 18px 18px 5px 18px; background: var(--navy); color: var(--white); }
.ca-bot { justify-self: start; display: grid; gap: 12px; border-radius: 18px 18px 18px 5px; background: var(--sky-wash); color: var(--ink); }
.ca-bot:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.ca-bot b { font-weight: 600; color: var(--navy); }
.ca-file { display: flex; align-items: center; gap: 8px; margin-top: 10px; padding: 8px 12px; border-radius: 12px; background: rgba(255, 255, 255, .12); font-size: 15px; line-height: 1.3; }
.ca-file svg { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
@media (min-width: 1000px) { .ca-talk { padding: 20px 24px 22px; } .ca-me-q, .ca-bot { max-width: 86%; } }

/* The page behind the answer: the lines read, the one that matters marked. */
.ca-page { margin: 0; border: 1px solid rgba(46, 110, 158, .18); border-radius: 12px; background: var(--white); overflow: hidden; }
.ca-page figcaption { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--line); font-size: 15px; line-height: 1.3; font-weight: 600; color: var(--sky); }
.ca-page figcaption svg { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ca-page ul { list-style: none; margin: 0; padding: 6px; display: grid; gap: 2px; }
.ca-page li { display: flex; justify-content: space-between; gap: 12px; padding: 7px 8px; border-radius: 8px; font-size: 16px; line-height: 1.35; color: var(--ink-2); }
.ca-page li span:last-child { text-align: right; color: var(--navy); font-weight: 500; }
.ca-page .is-hit { background: var(--highlight); color: var(--navy); }
.ca-page .is-hit span:last-child { font-weight: 600; }

/* The edit Cali proposes: before, after, and the two buttons. */
.ca-diff { width: 100%; border: 1px solid rgba(46, 110, 158, .18); border-radius: 12px; background: var(--white); font-size: 16px; line-height: 1.35; overflow: hidden; border-spacing: 0; border-collapse: separate; }
.ca-diff th, .ca-diff td { padding: 9px 12px; text-align: right; }
.ca-diff th:first-child { text-align: left; }
.ca-diff thead th { font-size: 14px; font-weight: 500; color: var(--ink-2); border-bottom: 1px solid var(--line); }
.ca-diff tbody th { font-weight: 400; color: var(--ink-2); }
.ca-diff tbody tr + tr > * { border-top: 1px solid var(--line); }
.ca-diff s { color: var(--ink-2); }
.ca-diff td b { color: var(--ok); font-weight: 600; }
.ca-acts { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.ca-acts[hidden] { display: none; }
.ca-acts > * { display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border: 1.5px solid var(--slate); border-radius: 999px; background: var(--white); color: var(--navy); font: 500 16px/1 'Outfit', Arial, sans-serif; }
.ca-acts > .is-go { background: var(--navy); border-color: var(--navy); color: var(--white); }
.ca-acts > button { cursor: pointer; }
.ca-acts > button:hover { border-color: var(--navy); }
.ca-acts > button.is-go:hover { background: var(--navy-soft); }
.ca-acts > button:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

/* ---------- Can and can't, side by side on navy ---------- */
.ca-two { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
@media (min-width: 761px) { .ca-two { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; } }
.ca-can, .ca-cant { padding: 22px 20px 24px; border-radius: 22px; }
@media (min-width: 761px) { .ca-can, .ca-cant { padding: 34px 34px 36px; } }
.ca-can { background: var(--white); }
.ca-cant { border: 1px solid rgba(255, 255, 255, .28); background: rgba(255, 255, 255, .05); }
.ca-two h3 { font-size: clamp(22px, 2.2vw, 28px); line-height: 1.2; letter-spacing: -.015em; }
.v4-sec.is-navy .ca-can h3 { color: var(--navy); }
.ca-two ul { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 14px; }
.ca-two li { position: relative; padding-left: 38px; font-size: 17px; line-height: 1.5; }
.ca-two li b { display: block; font-size: 18px; font-weight: 600; }
.ca-can li { color: var(--ink-2); }
.ca-can li b { color: var(--navy); }
.ca-cant li { color: rgba(255, 255, 255, .86); }
.ca-cant li b { color: var(--white); }
.ca-two li::before { content: ""; position: absolute; left: 0; top: 1px; width: 26px; height: 26px; border-radius: 50%; background-position: center; background-size: 100%; background-repeat: no-repeat; }
.ca-can li::before { background-color: var(--sky-wash); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 26 26'%3E%3Cpath d='M7.6 13.4l3.5 3.5 7.4-7.7' fill='none' stroke='%232E6E9E' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.ca-cant li::before { background-color: rgba(255, 255, 255, .14); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 26 26'%3E%3Cpath d='M8.5 8.5l9 9M17.5 8.5l-9 9' fill='none' stroke='%23FFFFFF' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E"); }

/* ---------- Kept safe: four cards, two by two on a tablet, four in a row on a laptop ---------- */
@media (min-width: 761px) { .ca-safe { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .ca-safe { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* ---------- What it costs: one card, the answer beside its two buttons ---------- */
main > section.ca-cost-sec { padding-block: 64px; }
.ca-cost { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 0 20px; align-items: start; padding: 28px; border: 1px solid var(--line); border-radius: 24px; background: var(--white); }
.ca-cost .v4-card-ic { width: 52px; height: 52px; margin: 0; border-radius: 14px; }
.ca-cost .v4-card-ic svg { width: 26px; height: 26px; }
.ca-cost h2 { font-size: clamp(26px, 2.6vw, 34px); line-height: 1.1; letter-spacing: -.025em; font-weight: 700; color: var(--navy); }
.ca-cost p { margin-top: 10px; max-width: 40em; font-size: 18px; line-height: 1.55; color: var(--ink-2); }
.ca-cost-go { grid-column: 2; display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }
@media (min-width: 1000px) {
  .ca-cost { grid-template-columns: 56px minmax(0, 1fr) auto; align-items: center; gap: 0 32px; padding: 36px 40px; }
  .ca-cost .v4-card-ic { width: 56px; height: 56px; }
  .ca-cost-go { grid-column: 3; flex-direction: column; margin: 0; }
  .ca-cost-go .btn { justify-content: center; }
}
@media (max-width: 640px) {
  .ca-cost { grid-template-columns: minmax(0, 1fr); padding: 22px 20px 24px; }
  .ca-cost .v4-card-ic { margin-bottom: 14px; }
  .ca-cost p { font-size: 17px; }
  .ca-cost-go { grid-column: 1; flex-direction: column; }
  .ca-cost-go .btn { justify-content: center; }
}

/* ---------- Keep exploring: four quick links, two by two, four in a row on a laptop ---------- */
@media (min-width: 760px) and (max-width: 1099px) { .next-list.has-ic { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .next-list.has-ic { grid-template-columns: repeat(4, minmax(0, 1fr)); } .next-list.has-ic a { column-gap: 14px; padding-inline: 16px; } }

/* ---------- The closing band: one line and two buttons ---------- */
.fc-end { background: var(--navy-deep); color: var(--white); padding: 72px 0; text-align: center; }
.fc-end h2 { max-width: 20em; margin-inline: auto; font-size: clamp(28px, 3.6vw, 44px); line-height: 1.1; letter-spacing: -.025em; font-weight: 700; color: var(--white); }
.fc-end-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 28px; }
@media (max-width: 640px) {
  .fc-end { padding: 44px 0; }
  .fc-end-actions { flex-direction: column; }
  .fc-end-actions .btn { justify-content: center; }
}

/* ---------- Windows high contrast (Edge): keep edges and marks visible ---------- */
@media (forced-colors: active) {
  .ca-chat, .ca-me-q, .ca-bot, .ca-page, .ca-can, .ca-cant, .ca-cost, .ca-tag { border: 1px solid CanvasText; }
  .ca-pick button[aria-pressed="true"] { border-width: 3px; }
  .ca-page .is-hit { outline: 2px solid Highlight; outline-offset: -2px; }
  /* The tick and the cross as plain characters in the system's text colour, with a ring round each. */
  .ca-two li::before { background: none; border: 1px solid CanvasText; color: CanvasText; font-size: 15px; line-height: 24px; text-align: center; }
  .ca-can li::before { content: "\2713"; }
  .ca-cant li::before { content: "\2715"; }
}
@media (prefers-reduced-motion: reduce) { .ca-pick button { transition: none; } }

/* The live-chat button stays hidden until Cali can answer here (with Cali off, or without JavaScript, it would do nothing). */
[data-cali-live][hidden] { display: none; }
