/* The chat: the floating button and the panel (a modal <dialog>, a full-height sheet on phones).
   Built by site/assets/js/chat.js and chat/panel.js. Uses the tokens of site.css: paper, navy ink,
   gold; borders drawn a little crooked. No text here is smaller than the body text (1rem = 18px),
   except the handwritten labels, which are larger. */

/* ---------- the floating button
   Only on a phone's width (below 48rem): from there the header shows its own chat button all the time,
   beside the Menu button up to 79.99rem and in the full menu from 80rem (site.css, .top__quick). Bottom right, clear of phone browser bars; chat.js lifts
   it above review mode's bottom bar. The home drawing's Day/Sunset chips sit top left of the
   drawing at these widths (drawing.css), so the button never covers them. */
.chat-fab { display: none; }
@media (max-width: 47.99rem) {
  .chat-fab {
    display: inline-flex; position: fixed; z-index: 30;
    right: calc(1rem + env(safe-area-inset-right, 0px));
    bottom: calc(1.5rem + env(safe-area-inset-bottom, 0px));
    gap: 0.4rem; padding: 0.6rem 1rem; min-height: 3rem;
    /* never wider than the screen, whatever the text size, and never more than a modest pill (audit 6) */
    max-width: min(14rem, 40vw, calc(100vw - 2rem)); box-sizing: border-box; white-space: nowrap;
  }
}
.chat-fab__icon { width: 1.4em; height: 1.4em; stroke-width: 1.8; flex: none; }
/* while the reader scrolls down (chat.js): slid below the screen's edge; back on scrolling up, on
   stopping, and whenever it has focus (it stays in the page for screen readers and Tab) */
.chat-fab { transition: transform 0.2s ease, opacity 0.2s ease; }
.chat-fab.chat-fab--tucked:not(:focus) { transform: translateY(calc(100% + 3rem)); opacity: 0; pointer-events: none; }
@media (prefers-reduced-motion: reduce) {
  .chat-fab { transition: none; }
}
.chat-fab__label { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
/* phones: a round icon button of about 48 px in the corner, so it covers far less of a line; its
   accessible name stays in full (aria-label) and its word shows when it has keyboard focus */
@media (max-width: 40rem) {
  .chat-fab {
    width: clamp(48px, 3rem, 60px); height: clamp(48px, 3rem, 60px); min-height: 0; padding: 0;
    justify-content: center; gap: 0; border-radius: 50%;
    right: calc(0.75rem + env(safe-area-inset-right, 0px));
    bottom: calc(0.75rem + env(safe-area-inset-bottom, 0px));
  }
  .chat-fab .chat-fab__icon { width: 1.5rem; height: 1.5rem; }
  .chat-fab .chat-fab__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .chat-fab:focus-visible { width: auto; padding: 0.6rem 1rem; gap: 0.4rem; border-radius: 999px; }
  .chat-fab:focus-visible .chat-fab__label { position: static; width: auto; height: auto; overflow: visible; clip-path: none; }
}
/* while another chat button is on screen the floating one steps aside (chat.js); and the page ends
   with room under its last line, so the floating button never covers text there */
.chat-fab.chat-fab--away { display: none; }
/* at rest over one of the page's controls (chat.js): out of sight, sound and the Tab order until a scroll */
.chat-fab.chat-fab--rest:not(:focus) { visibility: hidden; pointer-events: none; }
@media (max-width: 47.99rem) {
  body:has(> .chat-fab) { padding-bottom: 5.5rem; }
  /* a page with the footer: the room goes inside its dark band, not below it in the page colour */
  body:has(> .chat-fab):has(.foot) { padding-bottom: 0; }
  body:has(> .chat-fab) .foot__maker { padding-bottom: calc(2.4rem + 5.5rem); }
}
.chat-is-open .chat-fab { display: none; }
/* the folded menu, open, holds the chat button itself: the floating one never sits on its rows */
body:has(.nav.is-open) .chat-fab { display: none; }
.chat-is-open { overflow: hidden; } /* the page behind does not scroll while the panel is open */

/* ---------- the panel */
.chat {
  --chat-wobble: 26px 12px 22px 14px / 14px 24px 12px 26px;
  --chat-bubble: 18px 10px 16px 12px / 12px 16px 10px 18px;
  box-sizing: border-box;
  width: min(32rem, calc(100vw - 2rem));
  height: min(48rem, calc(100dvh - 2rem));
  max-width: none; max-height: none;
  margin: auto max(1.5rem, env(safe-area-inset-right)) max(1.5rem, env(safe-area-inset-bottom)) auto;
  padding: 0;
  color: var(--ink);
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: var(--chat-wobble);
  box-shadow: 6px 8px 0 var(--gold);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.5;
  overflow: hidden;
}
.chat[open] { display: flex; flex-direction: column; }
.chat::backdrop { background: color-mix(in srgb, var(--navy-deep) 38%, transparent); }

.chat__head {
  display: flex; align-items: center; gap: 0.6rem 0.8rem; flex-wrap: wrap;
  padding: 0.8rem 0.9rem 0.75rem 1rem;
  border-bottom: 1.5px dashed var(--rule);
  background: color-mix(in srgb, var(--paper-deep) 55%, var(--paper));
}
.chat__brand { display: flex; align-items: center; gap: 0.65rem; min-width: 0; margin-right: auto; }
.chat__mark { width: 2.4rem; height: 2.4rem; }
.chat__names { display: grid; line-height: 1.15; min-width: 0; }
.chat__title { font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; }
.chat__sub { font-family: var(--font-hand); font-size: 1.4rem; line-height: 1.05; color: var(--gold-deep); }
.chat__langs { display: flex; align-items: center; gap: 0.35rem; }
.chat__langs-label { font-size: 0.85rem; color: var(--ink-soft); white-space: nowrap; }
.chat__lang { font-size: 1rem; padding: 0.35rem 0.75rem; min-height: 2.5rem; }
.chat__close {
  display: grid; place-items: center; flex: none; width: 2.75rem; height: 2.75rem; cursor: pointer;
  color: var(--ink); background: var(--card); border: 2px solid var(--ink); border-radius: var(--chat-bubble);
}
.chat__close .icon { width: 1.3rem; height: 1.3rem; stroke-width: 2.4; }
.chat__close:hover { background: var(--gold-light); }

/* the demonstration band: on the whole time the demonstration transport is in use, so the
   prototype's chat can never be mistaken for the real thing */
.chat__demo {
  flex: none; padding: 0.5rem 1rem 0.55rem;
  color: var(--ink);
  background: repeating-linear-gradient(-45deg, color-mix(in srgb, var(--sun) 32%, var(--paper)) 0 14px, color-mix(in srgb, var(--sun) 18%, var(--paper)) 14px 28px);
  border-bottom: 2px dashed var(--coral-deep);
}
.chat__demo[hidden] { display: none; }
.chat__demo-band { font-weight: 700; }
.chat__demo-note { color: var(--ink); }

/* the privacy line: first in the email, code and thread screens, scrolling with them. The
   demonstration band sits above the scrolling area, outside it, so it can never cover this line */
.chat__lock {
  display: flex; align-items: flex-start; gap: 0.5rem; margin: 0; flex: none;
  padding: 0.55rem 0.8rem; font-size: 1rem; line-height: 1.4; color: var(--ink);
  background: color-mix(in srgb, var(--sea) 9%, var(--paper));
  border: 1.5px dashed var(--sea-deep); border-radius: var(--chat-bubble);
}
.chat__lock-icon { width: 1.3rem; height: 1.3rem; margin-top: 0.1rem; flex: none; color: var(--sea-deep); stroke-width: 2; }
.chat__lock-words { display: flex; flex-wrap: wrap; align-items: center; gap: 0 0.7rem; }
.chat__lock-more[open] { flex-basis: 100%; }
.chat__lock-short { margin: 0; font-weight: 650; }
/* the opening line is short: a little less room around it, so the suggested questions start in view */
.chat__lock:has(.chat__lock-more:not([open])) { padding-block: 0.25rem; }
/* the whole privacy line, folded: the opening screen keeps its topic and suggested questions in view */
.chat__lock-more { margin: 0; }
.chat__lock-summary { display: inline-flex; align-items: center; min-height: 2.75rem; cursor: pointer; font-weight: 650; color: var(--sea-deep); text-decoration: underline; text-decoration-color: var(--sea); text-underline-offset: 0.2em; }
.chat__lock-more[open] .chat__lock-summary { margin-bottom: 0.2rem; }
.chat__lock-full { margin: 0; }
.chat__privacy {
  /* a full tap target, like every other control in the panel */
  justify-self: start; display: inline-flex; align-items: center; min-height: 2.75rem; padding: 0.35rem 0;
  font-weight: 650; color: var(--sea-deep);
  text-decoration-color: var(--sea); text-decoration-thickness: 2px; text-underline-offset: 0.2em;
}
/* visitor and firm text keeps its own direction, isolated from what is around it (dir="auto") */
.chat [dir="auto"] { unicode-bidi: isolate; }
/* a bubble or heading the script focuses (tabindex -1) cannot be tabbed to: no focus ring for it */
.chat [tabindex="-1"]:focus, .chat [tabindex="-1"]:focus-visible { outline: none; }
.chat__privacy:hover { color: var(--ink); }
.chat__sub[hidden] { display: none; }
.chat__translated-note { font-size: 1rem; }
.chat__msg--alert { border-color: var(--coral-deep); box-shadow: 2px 3px 0 var(--coral); }

.chat__log {
  flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain;
  display: flex; flex-direction: column; gap: 0.75rem;
  padding: 1rem 1rem 1.25rem;
}
.chat__foot:empty { display: none; }
.chat__foot { padding: 0.75rem 1rem 0.9rem; border-top: 1.5px dashed var(--rule); background: color-mix(in srgb, var(--paper-deep) 40%, var(--paper)); }

/* bubbles */
.chat__msg {
  align-self: flex-start; max-width: 92%;
  padding: 0.7rem 0.95rem;
  background: var(--card);
  border: 1.5px solid var(--ink);
  border-radius: var(--chat-bubble);
  box-shadow: 2px 3px 0 var(--rule);
}
.chat__msg > * + * { margin-top: 0.35rem; }
.chat__text { white-space: pre-wrap; overflow-wrap: anywhere; }
.chat__hint { color: var(--ink-soft); }
.chat__msg--notice { border-style: dashed; }
.chat__note { color: var(--ink-soft); padding: 0 0.2rem; }

.chat__you { display: flex; flex-direction: column; align-items: flex-end; gap: 0.2rem; }
.chat__msg--you {
  align-self: flex-end; color: var(--paper); background: var(--ink); border-color: var(--ink);
  box-shadow: -2px 3px 0 var(--gold);
}

/* small text-like buttons */
.chat__link, .chat__toggle, .chat__back {
  font: inherit; font-size: 1rem; font-weight: 600; color: var(--ink); cursor: pointer;
  background: none; border: 0; padding: 0.55rem 0.35rem; min-height: 2.75rem;
  text-decoration: underline; text-decoration-color: var(--gold); text-decoration-thickness: 2px; text-underline-offset: 0.2em;
}
.chat__link:hover, .chat__toggle:hover, .chat__back:hover { color: var(--gold-deep); }
.chat__msg--you .chat__toggle { color: var(--paper); text-decoration-color: var(--gold-light); }
.chat__back { text-decoration-style: dashed; }
.chat__link--danger { color: var(--coral-deep); text-decoration-color: var(--coral); }
.chat__link--danger:hover { color: var(--coral-deep); }
.chat button:disabled, .chat input:disabled { cursor: default; opacity: 0.6; }
.chat .btn:disabled:hover { transform: none; }

/* the current step */
.chat__now { display: grid; gap: 0.6rem; }
.chat__opt {
  font: inherit; font-size: 1.05rem; font-weight: 600; line-height: 1.3; text-align: left; color: var(--ink); cursor: pointer;
  min-height: 3.2rem; padding: 0.75rem 1rem;
  background: var(--card); border: 2px solid var(--ink); border-radius: var(--chat-bubble);
  box-shadow: 2px 3px 0 var(--ink);
  transition: transform 0.12s ease, box-shadow 0.12s ease, background-color 0.12s ease;
}
.chat__opt:hover { background: var(--gold-light); transform: translate(-1px, -1px); box-shadow: 3px 4px 0 var(--ink); }
.chat__row { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.chat__grow { flex: 1 1 auto; }
.chat__next, .chat__send { padding: 0.75rem 1.3rem; min-height: 3rem; }

.chat__form { display: grid; gap: 0.5rem; }
.chat__label { font-weight: 650; }
.chat__input {
  font: inherit; font-size: 1.05rem; color: var(--ink); width: 100%;
  padding: 0.7rem 0.85rem; min-height: 3rem;
  background: var(--card); border: 2px solid var(--ink); border-radius: 10px 6px 12px 5px / 5px 12px 6px 10px;
}
.chat__input:focus-visible { outline: 3px solid var(--sea); outline-offset: 2px; }
.chat__input[aria-invalid] { border-color: var(--coral-deep); }
.chat__input--code { font-size: 1.5rem; letter-spacing: 0.3em; max-width: 12rem; font-variant-numeric: tabular-nums; }
.chat__input--msg { resize: vertical; min-height: 5.5rem; max-height: 40vh; }
.chat__error { color: var(--coral-deep); font-weight: 600; }
.chat__outage { margin: 0; }
.chat__status:empty { display: none; }
.chat__status { color: var(--sea-deep); font-weight: 600; }
.chat__count { color: var(--ink-soft); }

.chat__end { display: grid; gap: 0.1rem; margin-top: 0.5rem; padding-top: 0.6rem; border-top: 1.5px dashed var(--rule); }
.chat__end-text { color: var(--ink-soft); }
.chat__wa-link { justify-self: start; display: inline-flex; align-items: center; padding-left: 0; color: var(--ink-soft); }

/* the thread */
.chat__thread { display: flex; flex-direction: column; gap: 0.8rem; }
.chat__item { display: flex; flex-direction: column; }
.chat__item--you { align-items: flex-end; }
.chat__meta { display: flex; flex-wrap: wrap; gap: 0.15rem 0.6rem; align-items: baseline; }
.chat__who { font-family: var(--font-hand); font-size: 1.35rem; line-height: 1; color: var(--gold-deep); }
.chat__msg--you .chat__who { color: var(--gold-light); }
.chat__time, .chat__state { font-size: 1rem; color: var(--ink-soft); }
.chat__msg--you .chat__time, .chat__msg--you .chat__state { color: color-mix(in srgb, var(--paper) 82%, var(--ink)); }
.chat__translated { color: var(--ink-soft); }
.chat__msg--you .chat__translated { color: color-mix(in srgb, var(--paper) 82%, var(--ink)); }
.chat__translated .chat__toggle { padding-block: 0.3rem; min-height: 2.5rem; }
.chat__msg--you.is-sending { opacity: 0.85; border-style: dashed; }
.chat__msg--you.is-failed { color: var(--ink); background: color-mix(in srgb, var(--coral) 10%, var(--card)); border-color: var(--coral-deep); box-shadow: -2px 3px 0 var(--coral); }
.chat__msg--you.is-failed .chat__who { color: var(--coral-deep); }
.chat__msg--you.is-failed .chat__state, .chat__fail { color: var(--coral-deep); font-weight: 600; }
.chat__msg--you.is-failed .chat__toggle { color: var(--ink); text-decoration-color: var(--coral); }

/* a translation whose numbers, links or addresses differ from the original: warned, original shown with it */
.chat__differs {
  margin-top: 0.4rem; padding: 0.45rem 0.65rem; font-weight: 600; color: var(--ink);
  background: color-mix(in srgb, var(--sun) 25%, var(--card)); border: 1.5px solid var(--gold-deep); border-radius: var(--chat-bubble);
}
.chat__original { margin-top: 0.4rem; padding-top: 0.4rem; border-top: 1.5px dashed var(--rule); }
.chat__original-label { font-size: 1rem; color: var(--ink-soft); }
.chat__msg--you .chat__differs { color: var(--ink); }
.chat__msg--you .chat__original-label { color: color-mix(in srgb, var(--paper) 82%, var(--ink)); }
/* a message the server could not open */
.chat__msg.is-unreadable { border-style: dashed; box-shadow: none; }
.chat__unreadable { color: var(--ink-soft); font-weight: 600; }
.chat__msg--you .chat__unreadable { color: color-mix(in srgb, var(--paper) 82%, var(--ink)); }
.chat__tabnote { font-size: 1rem; }

/* the bot check in the sign-in step (captcha.js) */
.chat__captcha { display: grid; gap: 0.35rem; margin-block: 0.3rem; }
.chat__captcha[hidden] { display: none; }
.chat__captcha-slot:empty { display: none; }
.chat__captcha-slot { max-width: 100%; min-height: 65px; }
.chat__captcha-status { color: var(--ink-soft); }
.chat__captcha-status:empty { display: none; }
.chat__captcha-status.is-problem { color: var(--coral-deep); font-weight: 600; }
.chat__captcha .chat__link { justify-self: start; }
.chat__captcha .chat__link[hidden] { display: none; }

.chat__composer { display: grid; gap: 0.4rem; }
.chat__offline {
  margin-bottom: 0.6rem; padding: 0.5rem 0.75rem; font-weight: 600; color: var(--ink);
  background: color-mix(in srgb, var(--sun) 25%, var(--paper)); border: 1.5px dashed var(--gold-deep); border-radius: var(--chat-bubble);
}
.chat__actions { margin-top: 0.15rem; }
/* below the conversation, folded: sign out, delete, and (once answered) the testimonial invitation */
.chat__options { margin-top: 0.4rem; padding-top: 0.4rem; border-top: 1.5px dashed var(--rule); }
.chat__options-summary {
  cursor: pointer; justify-self: start; width: fit-content; min-height: 2.75rem; padding-block: 0.55rem;
  color: var(--ink-soft); font-weight: 600; text-decoration: underline; text-decoration-color: var(--rule); text-underline-offset: 0.2em;
}
.chat__options-summary:hover { color: var(--ink); }
.chat__options[open] > .chat__options-summary { margin-bottom: 0.2rem; }
.chat__share-row[hidden] { display: none; }
/* a message from the firm whose translation did not happen: the original, said so */
.chat__untranslated { margin-top: 0.3rem; font-size: 1rem; }
.chat__confirm {
  display: grid; gap: 0.5rem; padding: 0.8rem 0.9rem;
  background: var(--card); border: 2px solid var(--coral-deep); border-radius: var(--chat-bubble); box-shadow: 3px 4px 0 var(--coral);
}
.chat__confirm-q { font-family: var(--font-display); font-weight: 600; font-size: 1.2rem; }
.chat__danger { background: var(--coral-deep); color: var(--card); border-color: var(--coral-deep); box-shadow: 3px 4px 0 var(--ink); }
.chat__danger:hover { color: var(--card); }

/* words for screen readers only */
.chat__sr {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}

/* new parts arrive gently */
@media (prefers-reduced-motion: no-preference) {
  .chat__now, .chat__item:last-child, .chat__confirm { animation: chat-in 0.22s ease-out; }
  @keyframes chat-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
}
@media (prefers-reduced-motion: reduce) {
  .chat__opt { transition: none; }
  .chat__opt:hover { transform: none; }
}

/* ---------- the opening: the visitor writes first */
.chat__topic {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 0.35rem; max-width: 100%;
  padding: 0.15rem 0.2rem 0.15rem 0.75rem; font-weight: 650;
  background: color-mix(in srgb, var(--gold) 22%, var(--paper)); border: 1.5px solid var(--gold-deep); border-radius: 999px;
}
.chat__topic-words { min-width: 0; overflow-wrap: anywhere; }
.chat__topic-remove {
  display: grid; place-items: center; flex: none; width: 2.75rem; height: 2.75rem; cursor: pointer;
  font: inherit; font-size: 1.3rem; line-height: 1; color: var(--ink); background: none; border: 0; border-radius: 999px;
}
.chat__topic-remove:hover { background: var(--gold-light); }
.chat__suggest { display: grid; gap: 0.45rem; }
.chat__suggest-label { color: var(--ink-soft); font-weight: 600; }
.chat__chip {
  font: inherit; font-size: 1rem; line-height: 1.35; text-align: left; color: var(--ink); cursor: pointer;
  min-height: 2.75rem; padding: 0.55rem 0.85rem;
  background: var(--card); border: 1.5px solid var(--ink); border-radius: var(--chat-bubble); box-shadow: 2px 2px 0 var(--rule);
}
.chat__chip:hover { background: var(--gold-light); }
.chat__compose-note { font-size: 1rem; }
.chat__field { display: grid; gap: 0.3rem; }
.chat__msg--quiet { border-style: dashed; box-shadow: none; color: var(--ink-soft); }
.chat__notes { display: grid; gap: 0.4rem; }
.chat__aftersend { margin-top: 0.2rem; }
.chat__have-code { justify-self: start; }

/* the demonstration band: above the conversation on wide screens; inside it (scrolling away) on
   phones and short screens. The language buttons: full names on wide screens, two letters there */
.chat__demo--log { display: none; }
.chat__lang-short { display: none; }

/* ---------- phones (and short screens): the most room for the conversation
   Head on one row, the band scrolls away with the conversation (Sign out and Delete stay folded
   under it, in "Conversation options"), the foot keeps only the typing box and its Send.
   Short screens are those up to 860 px tall (until 2026-11-22, 600 px): a desktop window about 750 px tall
   showed only the first suggested question, the head on two rows and a five-line typing box taking the rest */
@media (max-width: 40rem), (max-height: 860px) {
  .chat__demo--fixed { display: none !important; }
  .chat__demo--log { display: block; flex: none; border: 2px dashed var(--coral-deep); border-radius: var(--chat-bubble); }
  .chat__head { flex-wrap: nowrap; gap: 0.45rem; padding: max(0.45rem, env(safe-area-inset-top)) 0.6rem 0.45rem 0.75rem; }
  .chat__brand { flex: 1 1 auto; min-width: 0; gap: 0.45rem; }
  .chat__mark { width: 2rem; height: 2rem; flex: none; }
  .chat__names { min-width: 0; }
  .chat__title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 1.05rem; }
  .chat__sub { display: none; }
  .chat__langs { flex: none; gap: 0.25rem; }
  .chat__langs-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .chat__lang { min-height: 2.75rem; min-width: 2.75rem; padding: 0.2rem 0.45rem; }
  /* one button: the other language, in its own word ("Español" / "English"); the title keeps its room */
  .chat__lang.is-on { display: none; }
  .chat__close { width: 2.75rem; height: 2.75rem; }
  .chat__input--msg { min-height: 3rem; height: 3rem; }
  .chat__foot .chat__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .chat__log { padding: 0.6rem 0.75rem 0.9rem; gap: 0.6rem; }
  .chat__foot { padding: 0.5rem 0.75rem max(0.55rem, env(safe-area-inset-bottom)); }
  /* the typing box and Send side by side, on one row; the characters-left count is read out
     (aria-describedby) but not shown */
  .chat__composer { grid-template-columns: minmax(0, 1fr) auto; gap: 0.3rem 0.45rem; align-items: end; }
  .chat__composer > .chat__input--msg { grid-column: 1; grid-row: 1; }
  .chat__composer > .chat__error { grid-column: 1 / -1; grid-row: 2; }
  .chat__composer > .chat__row { display: contents; }
  .chat__composer .chat__grow { display: none; }
  .chat__composer .chat__count { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .chat__composer .chat__send { grid-column: 2; grid-row: 1; min-height: 3rem; padding: 0.4rem 0.9rem; }
  .chat__msg { max-width: 96%; }
}
/* a head narrow for its text (a 390 px phone at 24 px text is 16rem): the logo goes, the other
   language shows as two letters (its full name stays its accessible name), and the title may take
   two lines rather than be cut (newcomer test 3) */
@media (max-width: 23rem) {
  .chat__mark { display: none; }
  .chat__lang .chat__lang-full { display: none; }
  .chat__lang .chat__lang-short { display: inline; }
  .chat__title { white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere; hyphens: manual; line-height: 1.1; }
}
/* phones: a full-height sheet */
@media (max-width: 40rem) {
  .chat {
    width: 100%; height: 100%; height: 100dvh; margin: 0;
    border: 0; border-radius: 0; box-shadow: none;
  }
}
/* short screens (a phone on its side, a laptop at 150%): the band is one line, a tighter head and foot */
@media (max-height: 600px) {
  .chat__demo-note { display: none; }
  .chat__head { padding-block: max(0.3rem, env(safe-area-inset-top)) 0.3rem; }
  .chat__mark { width: 1.7rem; height: 1.7rem; }
  .chat__lang { min-height: 2.5rem; min-width: 2.5rem; }
  .chat__close { width: 2.5rem; height: 2.5rem; }
  .chat__foot { padding-block: 0.4rem max(0.4rem, env(safe-area-inset-bottom)); }
}
/* a short window wider than a phone has room on the head's one row for the line under the name */
@media (max-height: 860px) and (min-width: 40.0625rem) {
  .chat__sub:not([hidden]) { display: block; }
}
/* a short screen wider than a phone: the panel fills the height (a phone keeps its full sheet) */
@media (max-height: 600px) and (min-width: 40.0625rem) {
  .chat { height: calc(100dvh - 1rem); margin-block: 0.5rem; }
}
