/* «Помощь с Claude» /claude (step 138): a separate product page with its order card. Built on ds.css tokens (--ca-*),
   dark only; shell — tools/shell.py. Desktop: text column on the left, the order card sticks on the right.
   Narrow: intro → card → details, so the price and the form are on the first screen. */

[hidden] {
  display: none !important;
}
*,
*::before,
*::after {
  box-sizing: border-box;
}
body.claude-page {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: #232321;
  color: var(--ca-text);
  font: 400 16px/1.6 var(--ca-font-sans);
}
.cl :is(h1, h2, p, ul, ol) {
  margin: 0;
}
.cl a {
  color: var(--ca-accent-text);
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--ca-accent-text) 45%, transparent);
  text-underline-offset: 3px;
}
.cl a:hover {
  text-decoration-color: currentColor;
}
.cl a.button {
  text-decoration: none;
}
/* step 143.2: «Уточнить детали» and «Открыть чат» are links (Telegram until the chat is on the page) dressed as the
   primary button — the link colour of .cl a must not win over the button's text colour (it gave 1.46:1). */
.cl a.button.primary,
.cl a.button.primary:hover {
  color: var(--ca-on-accent);
}

/* Same column as / and /ip: one left edge for every side-shell page. */
.cl {
  flex: 1;
  width: min(var(--ca-page), 100% - 2 * var(--ca-gutter)); /* 137.9.5: the page grid of ds.css */
  margin: 0 auto;
  padding: 40px 0 72px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 380px);
  grid-template-areas:
    "intro card"
    "more card";
  align-items: start;
  column-gap: 56px;
  row-gap: 32px;
}
.cl-intro {
  grid-area: intro;
  display: grid;
  gap: var(--ca-space-4);
}
.cl-intro h1 {
  font: 400 48px/1.1 var(--ca-font-serif);
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.cl-lead {
  max-width: 62ch;
  color: var(--ca-text-2);
  font-size: 18px;
  line-height: 1.55;
  text-wrap: pretty;
}
.cl-lead b {
  color: var(--ca-text);
  font-weight: 600;
}

/* ---------- the order card ---------- */
.cl-card {
  grid-area: card;
  position: sticky;
  top: calc(var(--ca-top-h) + 16px); /* 137.9.1: under the sticky top bar; claude.js refines it for tall cards */
  display: grid;
  gap: var(--ca-space-4);
  padding: var(--ca-space-6);
  border: 1px solid var(--ca-line);
  border-radius: var(--ca-radius-lg);
  background: var(--ca-raised);
  /* 137.9.5: a card of the world «Стандарт категории» — a thin border, no drop shadow */
}
.cl-sum {
  font: 500 40px/1.05 var(--ca-font-serif);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.cl-sumnote {
  margin-top: calc(-1 * var(--ca-space-3)) !important;
  color: var(--ca-text-3);
  font-size: 14px;
}
.cl-refund {
  display: flex;
  gap: var(--ca-space-3);
  align-items: flex-start;
  padding: var(--ca-space-3) var(--ca-space-4);
  border-radius: var(--ca-radius-md);
  background: color-mix(in srgb, var(--ca-success) 10%, var(--ca-raised));
  color: var(--ca-text-2);
  font-size: 14px;
  line-height: 1.5;
}
.cl-refund .ca-icon {
  margin-top: 1px;
  color: var(--ca-success);
}
.cl-refund b {
  color: var(--ca-text);
  font-weight: 600;
}

/* form */
.cl-form {
  display: grid;
  gap: var(--ca-space-3);
}
.cl-field {
  display: grid;
  gap: 6px;
}
.cl-field label {
  color: var(--ca-text-2);
  font-size: 14px;
}
.cl-field input {
  width: 100%;
  min-width: 0;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid var(--ca-line-strong);
  border-radius: var(--ca-radius-md);
  background: var(--ca-bg);
  color: var(--ca-text);
  font: 400 16px/1.4 var(--ca-font-sans);
  transition: border-color var(--ca-dur-2) var(--ca-ease);
}
.cl-field input::placeholder {
  color: var(--ca-text-3);
  opacity: 0.8;
}
.cl-field input:hover {
  border-color: var(--ca-text-2);
}
.cl-field input:focus-visible {
  outline: 2px solid var(--ca-focus);
  outline-offset: 1px;
  border-color: var(--ca-focus);
}
.cl-field input[aria-invalid="true"] {
  border-color: var(--ca-danger);
}
.cl-error {
  color: var(--ca-danger);
  font-size: 13px;
  line-height: 1.4;
}
.cl-check {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-height: 40px;
  padding-top: var(--ca-space-1);
  font-size: 14px;
  line-height: 1.5;
  cursor: pointer;
}
/* the real checkbox, drawn in the palette (Space, label click and forms work natively) — as on /pay */
.cl-check input {
  appearance: none;
  -webkit-appearance: none;
  flex: none;
  width: 22px;
  height: 22px;
  margin: 0;
  border: 1.5px solid var(--ca-line-strong);
  border-radius: var(--ca-radius-sm);
  background: var(--ca-bg) center / 16px no-repeat;
  cursor: inherit;
  transition: background-color var(--ca-dur-1) var(--ca-ease), border-color var(--ca-dur-1) var(--ca-ease);
}
.cl-check:hover input:not(:checked) {
  border-color: var(--ca-text-2);
}
.cl-check input:checked {
  border-color: var(--ca-accent);
  background-color: var(--ca-accent);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231f1410' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6.5 12.5 10.3 16.3 17.5 8.2'/%3E%3C/svg%3E");
}
.cl-check input[aria-invalid="true"] {
  border-color: var(--ca-danger);
}
.cl-check input:focus-visible {
  outline: 2px solid var(--ca-focus);
  outline-offset: 3px;
}
.cl-check + .cl-error {
  margin-top: calc(-1 * var(--ca-space-2));
  padding-left: 34px;
}
.cl-pay {
  width: 100%;
  min-height: 50px;
  margin-top: var(--ca-space-1);
  font-size: 16px;
}
/* focused by the script for screen readers after a payment; not a control, so no focus ring */
.cl-order-title:focus,
.cl-order-title:focus-visible {
  outline: none;
}
.cl-again {
  justify-self: start;
  min-height: 40px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ca-accent-text);
  font: 500 14px/1.4 var(--ca-font-sans);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.cl-again:focus-visible {
  outline: 2px solid var(--ca-focus);
  outline-offset: 2px;
}
.cl-status {
  padding: var(--ca-space-3) var(--ca-space-4);
  /* 137.9.5: the state is a tint of the whole box (border and ground), not a bar down the left side */
  --tone: var(--ca-text-3);
  border: 1px solid color-mix(in srgb, var(--tone) 45%, var(--ca-line));
  border-radius: var(--ca-radius-md);
  background: color-mix(in srgb, var(--tone) 7%, var(--ca-bg));
  color: var(--ca-text);
  font-size: 14px;
  line-height: 1.5;
}
.cl-status[data-kind="ok"] {
  --tone: var(--ca-success);
}
.cl-status[data-kind="warn"] {
  --tone: var(--ca-warning);
}
.cl-status[data-kind="error"] {
  --tone: var(--ca-danger);
}
.cl-pay:disabled {
  cursor: progress;
}
.cl-safe {
  display: flex;
  align-items: center;
  gap: var(--ca-space-2);
  color: var(--ca-text-3);
  font-size: 13px;
}
.cl-safe .ca-icon {
  width: 16px;
  height: 16px;
}

/* ---------- step 143.2: «Уточнить детали», the two stages, the total ---------- */
.cl-ask {
  position: relative;
  width: 100%;
  min-height: 54px;
  gap: 10px;
  font-size: 16.5px;
  box-shadow: 0 10px 26px -14px rgb(217 119 87 / 0.9);
}
.cl-ask .ca-icon {
  width: 21px;
  height: 21px;
  stroke-width: 1.8;
}
.cl-badge {
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 11px;
  background: var(--ca-text);
  color: var(--ca-bg);
  font-size: 12.5px;
  font-weight: 700;
  line-height: 22px;
}
.cl-stages {
  display: grid;
  gap: var(--ca-space-2);
}
.cl-stage {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  width: 100%;
  min-height: 64px;
  padding: 12px 14px;
  border: 1.5px solid var(--ca-accent);
  border-radius: var(--ca-radius-md);
  background: transparent;
  color: var(--ca-text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background-color var(--ca-dur-2) var(--ca-ease), border-color var(--ca-dur-2) var(--ca-ease);
}
.cl-stage:hover {
  background: var(--ca-accent-soft);
}
.cl-stage:focus-visible,
.cl-pw-tab:focus-visible {
  outline: 2px solid var(--ca-focus);
  outline-offset: 2px;
}
.cl-stage-mark {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--ca-accent);
  color: var(--ca-on-accent);
  font-size: 14px;
  font-weight: 700;
}
.cl-stage-text {
  display: grid;
  gap: 2px;
  line-height: 1.35;
}
.cl-stage-title {
  color: var(--ca-text);
  font-size: 15.5px;
  font-weight: 600;
}
.cl-stage-sub,
.cl-stage-lock {
  color: var(--ca-text-2);
  font-size: 13px;
}
.cl-stage-lock,
.cl-lock {
  display: none;
}
.cl-stage-lock {
  font-weight: 600;
}
.cl-stage[data-state="locked"] {
  border-style: dashed;
  border-color: var(--ca-line-strong);
}
.cl-stage[data-state="locked"]:hover {
  background: var(--ca-hover);
}
.cl-stage[data-state="locked"] .cl-stage-mark {
  border: 1px solid var(--ca-line-strong);
  background: transparent;
  color: var(--ca-text-2);
}
.cl-stage[data-state="locked"] .cl-lock,
.cl-stage[data-state="locked"] .cl-stage-lock {
  display: block;
}
.cl-stage[data-state="locked"] .cl-two {
  display: none;
}
.cl-stage[data-state="locked"] .cl-stage-title {
  color: var(--ca-text-2);
}
.cl-stage[data-state="pending"] {
  border-color: var(--ca-warning);
}
.cl-stage[data-state="pending"] .cl-stage-mark {
  background: var(--ca-warning);
  color: #231705;
}
.cl-stage[data-state="paid"] {
  border-color: color-mix(in srgb, var(--ca-success) 60%, transparent);
  background: color-mix(in srgb, var(--ca-success) 8%, var(--ca-raised));
}
.cl-stage[data-state="paid"] .cl-stage-mark {
  background: var(--ca-success);
  color: #14200f;
  font-size: 0;
}
.cl-stage[data-state="paid"] .cl-stage-mark::before {
  content: "✓";
  font-size: 16px;
}
.cl-stage[data-state="paid"] .cl-lock {
  display: none;
}
.cl-done {
  display: grid;
  gap: var(--ca-space-2);
  padding: var(--ca-space-4);
  border: 1px solid color-mix(in srgb, var(--ca-success) 55%, transparent);
  border-radius: var(--ca-radius-md);
  background: color-mix(in srgb, var(--ca-success) 10%, var(--ca-raised));
}
.cl-done-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 700;
}
.cl-done-title .ca-icon {
  width: 22px;
  height: 22px;
  color: var(--ca-success);
}
.cl-done-title:focus,
.cl-done-title:focus-visible {
  outline: none;
}
.cl-done-note {
  color: var(--ca-text-2);
  font-size: 14px;
  line-height: 1.5;
}

/* ---------- step 143.2 (second word): three stages in the card ---------- */
.cl-flow {
  display: grid;
  gap: 0;
  padding: 0;
  list-style: none;
}
.cl-flow-step {
  position: relative;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 12px;
  padding-bottom: var(--ca-space-4);
}
.cl-flow-step:last-child {
  padding-bottom: 0;
}
/* the line that joins the stage numbers */
.cl-flow-step:not(:last-child)::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 32px;
  bottom: 2px;
  width: 2px;
  border-radius: 1px;
  background: var(--ca-line);
}
.cl-flow-num {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1.5px solid var(--ca-accent);
  border-radius: 50%;
  color: var(--ca-accent-text);
  font-size: 14px;
  font-weight: 700;
}
.cl-flow-body {
  display: grid;
  gap: 4px;
  min-width: 0;
}
.cl-flow-title {
  color: var(--ca-text);
  font-size: 15.5px;
  font-weight: 700;
  line-height: 1.35;
  padding-top: 4px;
}
.cl-flow-text {
  color: var(--ca-text-2);
  font-size: 13.5px;
  line-height: 1.45;
}
.cl-flow-body .cl-ask,
.cl-flow-body .cl-stages {
  margin-top: 8px;
}
.cl-flow-body .cl-stage {
  min-height: 56px;
  padding: 10px 12px;
}
.cl-card.is-done .cl-flow-step:last-child .cl-flow-num {
  border-color: var(--ca-success);
  background: var(--ca-success);
  color: #14200f;
}

/* ---------- step 143.2: the payment window ---------- */
.store-dialog.cl-paywin {
  width: min(460px, calc(100% - 24px));
  padding: 28px 28px 22px;
  overflow: auto;
  overscroll-behavior: contain;
}
.cl-paywin h2 {
  margin: 0 44px 6px 0;
  font-size: 26px;
}
.cl-paywin h2:focus,
.cl-paywin h2:focus-visible {
  outline: none;
}
/* 157.6f: «Стоимость и оплата» — the full price first, then the two payments (tabs), the terms, the form */
.cl-pw-total {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
  margin: 2px 0 14px;
  color: var(--ca-text-2);
  font-size: 14px;
  line-height: 1.5;
}
.cl-pw-full {
  color: var(--ca-text);
  font: 500 30px/1.1 var(--ca-font-serif);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.cl-pw-off {
  flex-basis: 100%;
  color: var(--ca-success);
  font-size: 13px;
}
.cl-pw-terms {
  display: grid;
  gap: 6px;
  margin-bottom: 16px;
  color: var(--ca-text-2);
  font-size: 13.5px;
  line-height: 1.5;
}
.cl-pw-terms p {
  margin: 0;
}
.cl-pw-terms a {
  color: var(--ca-accent-text);
  text-underline-offset: 3px;
}
.cl-pw-seller {
  color: var(--ca-text-3);
  font-size: 12.5px;
}
.cl-price-more {
  gap: 8px;
}
/* 157.6f: what each payment pays for, under the stage title of the card */
.cl-why {
  display: grid;
  gap: 6px;
  margin: 2px 0 0;
  padding: 0;
  list-style: none;
  color: var(--ca-text-2);
  font-size: 13.5px;
  line-height: 1.45;
}
.cl-why b {
  color: var(--ca-text);
  font-weight: 600;
}
.cl-pw-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 16px;
}
.cl-pw-tab {
  display: grid;
  align-content: center;
  gap: 2px;
  min-height: 58px;
  padding: 8px 12px;
  border: 1.5px solid var(--ca-line);
  border-radius: var(--ca-radius-md);
  background: transparent;
  color: var(--ca-text);
  font: 600 14.5px/1.3 var(--ca-font-sans);
  text-align: left;
  cursor: pointer;
  transition: background-color var(--ca-dur-2) var(--ca-ease), border-color var(--ca-dur-2) var(--ca-ease);
}
.cl-pw-tab:hover {
  background: var(--ca-hover);
}
.cl-pw-tab[aria-pressed="true"] {
  border-color: var(--ca-accent);
  background: var(--ca-accent-soft);
}
.cl-pw-tab-state {
  color: var(--ca-text-2);
  font-size: 12.5px;
  font-weight: 500;
}
.cl-pw-tab-state:empty {
  display: none;
}
.cl-pw-tab[data-state="paid"] .cl-pw-tab-state {
  color: var(--ca-success);
}
.cl-pw-tab[data-state="pending"] .cl-pw-tab-state {
  color: var(--ca-warning);
}
.cl-pw-tab[data-state="locked"] {
  border-style: dashed;
}
.cl-form-lead {
  color: var(--ca-text-2);
  font-size: 14px;
}
.cl-qr {
  display: grid;
  justify-items: center;
  gap: 12px;
}
.cl-qr-code {
  width: min(240px, 66vw);
  aspect-ratio: 1;
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
}
.cl-qr-code svg {
  display: block;
  width: 100%;
  height: 100%;
}
.cl-qr-code.is-broken {
  display: grid;
  place-items: center;
  padding: 16px;
  background: var(--ca-bg);
  color: var(--ca-text);
  font-size: 14px;
  text-align: center;
}
.cl-qr-hint {
  max-width: 36ch;
  color: var(--ca-text-2);
  font-size: 14px;
  line-height: 1.5;
  text-align: center;
}
.cl-paywin .cl-qr-open {
  min-height: 48px;
}
/* A computer: the QR is the main way, the link is secondary. A phone: «Открыть оплату» first, the QR below it. */
@media (pointer: fine) and (min-width: 651px) {
  .cl-paywin .cl-qr-open {
    border-color: var(--ca-line);
    background: transparent;
    color: var(--ca-text);
  }
  .cl-paywin .cl-qr-open:hover {
    background: var(--ca-hover);
  }
}
.cl-hint-phone {
  display: none;
}
@media (pointer: coarse), (max-width: 650px) {
  .cl-paywin .cl-qr-open {
    order: -1;
  }
  .cl-hint-pc {
    display: none;
  }
  .cl-hint-phone {
    display: inline;
  }
  .cl-qr-code {
    width: min(190px, 56vw);
  }
}
.cl-pw-note {
  display: grid;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--ca-line);
  border-radius: var(--ca-radius-md);
  background: var(--ca-bg);
  color: var(--ca-text-2);
  font-size: 14.5px;
  line-height: 1.5;
}
/* step 156.6c: «Списать с баланса N ₽» — the referral balance pays part of the payment (signed-in buyers) */
.cl-bal {
  display: grid;
  gap: 4px;
  margin-bottom: 12px;
  padding: 10px 16px 12px;
  border: 1px solid var(--ca-accent);
  border-radius: var(--ca-radius-md);
  background: var(--ca-bg);
}
.cl-bal-row {
  align-items: center;
  min-height: 36px;
  padding-top: 0;
  color: var(--ca-text);
  font-size: 15.5px;
  font-weight: 600;
}
.cl-bal-hint {
  margin: 0;
  padding-left: 34px;
  color: var(--ca-text-3);
  font-size: 13px;
  line-height: 1.45;
}
.cl-qr-bal {
  max-width: 36ch;
  color: var(--ca-text-2);
  font-size: 14px;
  line-height: 1.5;
  text-align: center;
}
.cl-paywin .cl-status {
  margin-top: 12px;
}
.cl-paywin .cl-safe {
  justify-content: center;
  margin-top: 14px;
}

/* ---------- step 143.2: the chat (claude-chat.js) ---------- */
.chat-fab {
  position: fixed;
  right: 20px;
  bottom: calc(20px + env(safe-area-inset-bottom));
  z-index: 40;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 50px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  background: var(--ca-accent);
  color: var(--ca-on-accent);
  font: 600 15px/1 var(--ca-font-sans);
  box-shadow: 0 12px 30px -12px rgb(0 0 0 / 0.8);
  cursor: pointer;
}
.chat-fab:hover {
  background: var(--ca-accent-hover);
}
.chat-fab:focus-visible {
  outline: 2px solid var(--ca-focus);
  outline-offset: 3px;
}
.chat-fab .ca-icon {
  width: 22px;
  height: 22px;
  stroke-width: 1.8;
}
.chat-fab-dot {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 11px;
  background: var(--ca-text);
  color: var(--ca-bg);
  font-size: 12.5px;
  font-weight: 700;
  line-height: 22px;
  text-align: center;
}
.chat {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 50;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto auto;
  width: min(410px, calc(100vw - 32px));
  height: min(660px, calc(100dvh - 40px));
  border: 1px solid var(--ca-line);
  border-radius: var(--ca-radius-xl);
  background: var(--ca-raised);
  color: var(--ca-text);
  box-shadow: var(--ca-shadow-pop);
  overflow: hidden;
}
/* Step 147.9.6: every part keeps its own row. With the pay bar hidden (display: none) the feed fell into the second,
   «auto» row and grew with the conversation — the input row slid out of the panel and focusing it scrolled the head away. */
.chat > .chat-head {
  grid-row: 1;
}
.chat > .chat-paybar {
  grid-row: 2;
}
.chat > .chat-log {
  grid-row: 3;
}
.chat > .chat-rv {
  grid-row: 4;
}
.chat > .chat-form {
  grid-row: 5;
}
.chat-channel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 12px;
  font-size: .875rem;
}
.chat-channel .button {
  min-height: 44px;
}
.chat.is-full {
  top: var(--chat-top, 0px);
  right: 0;
  bottom: auto;
  left: 0;
  width: 100%;
  height: var(--chat-h, 100dvh);
  border: 0;
  border-radius: 0;
}
/* the full screen keeps a readable column on a wide monitor */
.chat.is-full > * {
  padding-inline: max(16px, calc((100% - 880px) / 2));
}
.chat-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: max(10px, env(safe-area-inset-top)) 10px 10px 16px;
  border-bottom: 1px solid var(--ca-line);
  background: var(--ca-sidebar);
}
.chat-face {
  display: grid;
  flex: none;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--ca-line);
  border-radius: 50%;
  background: var(--ca-bg);
}
.chat-who {
  display: grid;
  flex: 1;
  min-width: 0;
  line-height: 1.3;
}
.chat-who b {
  font-size: 15.5px;
  font-weight: 700;
}
.chat-sub {
  color: var(--ca-text-2);
  font-size: 12.5px;
}
.chat-icon {
  display: grid;
  flex: none;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: var(--ca-radius-md);
  background: transparent;
  color: var(--ca-text-2);
  cursor: pointer;
}
.chat-icon:hover:not(:disabled) {
  background: var(--ca-hover);
  color: var(--ca-text);
}
.chat-icon:focus-visible,
.chat-send:focus-visible,
.chat-remove:focus-visible {
  outline: 2px solid var(--ca-focus);
  outline-offset: 1px;
}
.chat-icon .ca-icon {
  width: 21px;
  height: 21px;
}
.chat-paybar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px 8px 16px;
  border-bottom: 1px solid var(--ca-line);
  background: var(--ca-accent-soft);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
}
.chat-paybar .chat-pay {
  flex: none;
  width: auto;
  min-height: 42px;
  padding: 8px 14px;
  gap: 8px;
}
.chat-paybar.is-done {
  background: color-mix(in srgb, var(--ca-success) 12%, var(--ca-raised));
}
.chat-paybar.is-done .chat-paytext::before {
  content: "✓ ";
  color: var(--ca-success);
}
.chat-log {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-block: 16px;
  padding-inline: 14px;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--ca-bg);
}
.chat-line {
  display: flex;
}
.chat-line.is-me {
  justify-content: flex-end;
}
.chat-msg {
  max-width: 84%;
  padding: 9px 12px 6px;
  border-radius: 16px;
  font-size: 15px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.is-them .chat-msg {
  border: 1px solid var(--ca-line);
  border-bottom-left-radius: 5px;
  background: var(--ca-raised);
}
.is-me .chat-msg {
  border-bottom-right-radius: 5px;
  background: var(--ca-accent);
  color: var(--ca-on-accent);
}
.chat-text-body {
  margin: 0;
  white-space: pre-wrap;
}
.is-them .chat-msg a {
  color: var(--ca-accent-text);
  text-underline-offset: 2px;
}
.chat-time {
  display: block;
  margin-top: 2px;
  color: var(--ca-text-3);
  font-size: 12px;
  text-align: right;
}
.is-me .chat-time {
  color: #3a1d12;
}
.chat-time:empty {
  display: none;
}
.chat-pic img,
.chat-pic-local {
  display: block;
  width: 220px;
  max-width: 100%;
  max-height: 220px;
  margin: 2px 0 4px;
  border-radius: 10px;
  background: #fff;
  object-fit: contain;
}
.chat-info {
  align-self: center;
  max-width: 92%;
  margin: 4px 0;
  padding: 8px 12px;
  border: 1px dashed var(--ca-line-strong);
  border-radius: 10px;
  background: var(--ca-raised);
  color: var(--ca-text-2);
  font-size: 13.5px;
  line-height: 1.45;
  text-align: center;
}
.chat-info.is-ok {
  border-style: solid;
  border-color: color-mix(in srgb, var(--ca-success) 55%, transparent);
  color: var(--ca-text);
}
.chat-off {
  margin: 4px 0 0;
  color: var(--ca-text-2);
  font-size: 14px;
}
.chat-off a {
  color: var(--ca-accent-text);
}
.chat-form {
  display: grid;
  gap: 8px;
  padding-block: 10px calc(12px + env(safe-area-inset-bottom));
  padding-inline: 12px;
  border-top: 1px solid var(--ca-line);
  background: var(--ca-raised);
}
.chat-contact {
  display: grid;
  gap: 6px;
}
.chat-contact label {
  color: var(--ca-text-2);
  font-size: 13px;
  line-height: 1.4;
}
.chat-input {
  width: 100%;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--ca-line-strong);
  border-radius: var(--ca-radius-md);
  background: var(--ca-bg);
  color: var(--ca-text);
  font: 400 16px/1.4 var(--ca-font-sans);
}
.chat-input::placeholder {
  color: var(--ca-text-3);
  opacity: 0.85;
}
.chat-input:focus-visible {
  outline: 2px solid var(--ca-focus);
  outline-offset: 1px;
  border-color: var(--ca-focus);
}
.chat-input[aria-invalid="true"] {
  border-color: var(--ca-danger);
}
.chat-error {
  margin: 0;
  color: var(--ca-danger);
  font-size: 13px;
}
.chat-draft {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px;
  border: 1px solid var(--ca-line);
  border-radius: var(--ca-radius-md);
  background: var(--ca-bg);
}
.chat-draft-img {
  flex: none;
  width: 56px;
  height: 56px;
  border-radius: 6px;
  background: #fff;
  object-fit: cover;
}
.chat-draft-name {
  flex: 1;
  min-width: 0;
  color: var(--ca-text-2);
  font-size: 13.5px;
}
.chat-remove {
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--ca-line-strong);
  border-radius: var(--ca-radius-md);
  background: transparent;
  color: var(--ca-text);
  font: 600 13.5px/1 var(--ca-font-sans);
  cursor: pointer;
}
.chat-row {
  display: flex;
  align-items: flex-end;
  gap: 6px;
}
.chat-text {
  flex: 1;
  min-height: 44px;
  max-height: 140px;
  resize: none;
}
.chat-send {
  display: grid;
  flex: none;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: var(--ca-accent);
  color: var(--ca-on-accent);
  cursor: pointer;
}
.chat-send:hover:not(:disabled) {
  background: var(--ca-accent-hover);
}
.chat-send .ca-icon {
  width: 20px;
  height: 20px;
  stroke-width: 1.8;
}
.chat-send:disabled,
.chat-icon:disabled,
.chat-remove:disabled {
  cursor: progress;
  opacity: 0.7;
}
.chat-note {
  margin: 0;
  color: var(--ca-text-3);
  font-size: 12.5px;
  line-height: 1.45;
}
.chat-note a {
  color: inherit;
}
.chat-note.is-bad {
  color: var(--ca-danger);
  font-weight: 600;
}
.chat-trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}
html.chat-full-open {
  overflow: hidden;
}
@media (max-width: 650px) {
  .chat-fab {
    right: 16px;
    bottom: calc(16px + env(safe-area-inset-bottom));
    width: 56px;
    height: 56px;
    padding: 0;
    justify-content: center;
  }
  .chat-fab-text {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
  /* a phone: the chat is the whole visible area (the keyboard shrinks it — claude-chat.js fit()) */
  .chat,
  .chat.is-full {
    top: var(--chat-top, 0px);
    right: 0;
    bottom: auto;
    left: 0;
    width: 100%;
    height: var(--chat-h, 100dvh);
    border: 0;
    border-radius: 0;
  }
  .chat-full {
    display: none;
  }
  html:has(.chat:not([hidden])) {
    overflow: hidden;
  }
}
@media (forced-colors: active) {
  .cl-stage,
  .cl-pw-tab,
  .chat {
    border: 1px solid CanvasText;
  }
}

/* ---------- details ---------- */
.cl-more {
  grid-area: more;
  max-width: 66ch;
}
.cl-more h2 {
  margin: var(--ca-space-10) 0 var(--ca-space-4);
  font: 400 28px/1.25 var(--ca-font-serif);
  letter-spacing: -0.012em;
  scroll-margin-top: var(--ca-space-6);
}
.cl-more h2:first-child {
  margin-top: 0;
}
.cl-more p {
  color: var(--ca-text-2);
  text-wrap: pretty;
}
.cl-more p + p {
  margin-top: var(--ca-space-3);
}
.cl-list,
.cl-path {
  display: grid;
  gap: var(--ca-space-3);
  padding: 0;
  list-style: none;
  color: var(--ca-text-2);
}
.cl-list li {
  position: relative;
  padding-left: 26px;
}
.cl-list li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 0.62em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ca-accent);
}
.cl-path {
  counter-reset: step;
}
.cl-path li {
  position: relative;
  counter-increment: step;
  padding-left: 40px;
  min-height: 28px;
}
.cl-path li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--ca-line-strong);
  border-radius: 50%;
  color: var(--ca-text-2);
  font-size: 13px;
  font-weight: 600;
}
.cl-more b {
  color: var(--ca-text);
  font-weight: 600;
}
.cl-quiet {
  margin-top: var(--ca-space-4) !important;
  color: var(--ca-text-3) !important;
  font-size: 14px;
}
.cl-back {
  display: grid;
  gap: var(--ca-space-3);
  padding: var(--ca-space-5);
  /* 137.9.5: the refund promise — a green-tinted box with a full thin border (as the card's refund note) */
  border: 1px solid color-mix(in srgb, var(--ca-success) 28%, var(--ca-line));
  border-radius: var(--ca-radius-lg);
  background: color-mix(in srgb, var(--ca-success) 6%, var(--ca-bg));
}
.cl-back p + p {
  margin-top: 0;
}

/* ---------- widths ---------- */
@media (max-width: 1100px) {
  .cl {
    column-gap: 40px;
  }
  .cl-intro h1 {
    font-size: 40px;
  }
}
@media (max-width: 900px) {
  .cl {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "intro"
      "card"
      "more";
    padding-top: 32px;
  }
  .cl-card {
    position: static;
    max-width: 560px;
  }
}
@media (max-width: 650px) {
  .cl {
    padding: 24px 0 56px;
    row-gap: 24px;
  }
  .cl-intro h1 {
    font-size: 32px;
  }
  .cl-lead {
    font-size: 16px;
  }
  .cl-card {
    padding: var(--ca-space-5) var(--ca-space-4);
  }
  .cl-sum {
    font-size: 34px;
  }
  .cl-more h2 {
    font-size: 24px;
    margin-top: var(--ca-space-8);
  }
}
@media (prefers-reduced-motion: reduce) {
  .cl-field input,
  .cl-check input {
    transition: none;
  }
}
@media (forced-colors: active) {
  .cl-check input {
    appearance: auto;
    -webkit-appearance: auto;
  }
}

/* Page transitions with the other top-bar pages (/, /ip, 404; handlers in vt.js, loaded in <head>). */
@media (prefers-reduced-motion: no-preference) {
  @view-transition {
    navigation: auto;
  }
  ::view-transition-old(root),
  ::view-transition-new(root) {
    animation-duration: 200ms;
    animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
  }
}

/* ---------- step 147.9.6: the review of a finished order in the chat ---------- */
.chat-rv {
  display: grid;
  gap: 8px;
  padding-block: 10px 12px;
  padding-inline: 14px;
  border-top: 1px solid var(--ca-line);
  background: color-mix(in srgb, var(--ca-accent) 7%, var(--ca-raised));
}
.chat-rv[aria-busy="true"] {
  opacity: 0.75;
}
.chat-rv-stars {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px;
}
.chat-rv-label {
  margin-right: 6px;
  color: var(--ca-text-2);
  font-size: 13.5px;
}
.chat-rv-stars .chat-rv-btn {
  display: inline-grid;
  place-items: center;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: none;
  color: var(--ca-line-strong);
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
}
.chat-rv-stars.is-small .chat-rv-btn {
  min-width: 34px;
  min-height: 34px;
  font-size: 20px;
}
.chat-rv-stars .chat-rv-btn.is-on {
  color: var(--ca-warning);
}
/* the hover preview — only while the pointer is on a star (not on the label) */
@media (hover: hover) {
  .chat-rv-stars:has(.chat-rv-btn:hover) .chat-rv-btn:not(:disabled) {
    color: var(--ca-warning);
  }
  .chat-rv-stars .chat-rv-btn:hover ~ .chat-rv-btn:not(:disabled) {
    color: var(--ca-line-strong);
  }
}
.chat-rv-hint {
  margin: 0;
  color: var(--ca-text-2);
  font-size: 13.5px;
  line-height: 1.4;
}
.chat-rv-acts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chat-rv-acts .chat-rv-btn {
  min-height: 40px;
  padding: 8px 14px;
  border: 1px solid var(--ca-line-strong);
  border-radius: 999px;
  background: var(--ca-bg);
  color: var(--ca-text);
  font: 600 14px/1.25 var(--ca-font-sans);
  text-align: center;
  overflow-wrap: anywhere;
  cursor: pointer;
}
.chat-rv-acts .chat-rv-btn.is-main {
  border-color: transparent;
  background: var(--ca-accent);
  color: var(--ca-on-accent);
}
.chat-rv-btn:focus-visible {
  outline: 2px solid var(--ca-accent);
  outline-offset: 2px;
}
.chat-rv-btn:disabled {
  cursor: default;
}
@media (forced-colors: active) {
  .chat-rv-stars .chat-rv-btn.is-on,
  .chat-rv-stars .chat-rv-btn[aria-pressed="true"] {
    color: Highlight;
  }
  .chat-rv-acts .chat-rv-btn {
    border-color: ButtonText;
  }
}
