/* ==========================================================================
   Tech 2 Go — Get Help
   --------------------------------------------------------------------------
   Design brief: the person reading this is having a bad day with their
   computer and may not be technical. So: light and calm by default, large
   type, generous targets, one obvious action per screen, and no jargon.

   Brand colours sampled from the client logo:
     navy  #0F2139   blue  #096BCE
   ========================================================================== */

/* --- tokens --------------------------------------------------------------- */
:root {
  --navy:        #0f2139;
  --navy-700:    #1b3355;
  --navy-500:    #33507a;
  --blue:        #096bce;
  --blue-600:    #0a5eb4;
  --blue-100:    #e3f0fd;
  --blue-050:    #f2f8ff;

  /* Two different jobs, so two different tokens:
     --blue       accent for text, borders and icons ON the page background
     --blue-solid fill behind WHITE text (buttons, sent bubbles)
     Dark mode has to lighten the first and darken the second, which is why
     one token cannot do both — at 4.5:1 they pull in opposite directions. */
  --blue-solid:  #096bce;   /* white on this = 5.2:1  */

  --ink:         #14213a;
  --ink-soft:    #4a5b76;
  /* Hints, timestamps and footnotes use this. It has to clear 4.5:1 on white
     at 13px — a lighter grey looked better and failed the people who most need
     to read it. */
  --ink-faint:   #5f7390;

  --bg:          #f4f7fb;
  --surface:     #ffffff;
  --surface-2:   #f8fafd;
  --line:        #dde5f0;
  --line-strong: #c3d1e4;

  /* Status colours are used as text on their own tinted background, so each
     pair is picked to clear 4.5:1 against that tint rather than against white. */
  --ok:          #0a6b3f;
  --ok-bg:       #e7f6ee;
  --warn:        #7a4700;
  --warn-bg:     #fdf1de;
  --danger:      #b3261e;
  --danger-bg:   #fdecea;

  --radius:      14px;
  --radius-lg:   20px;
  --radius-pill: 999px;

  --shadow-sm:   0 1px 2px rgba(15, 33, 57, .06), 0 1px 3px rgba(15, 33, 57, .05);
  --shadow-md:   0 4px 12px rgba(15, 33, 57, .08), 0 2px 4px rgba(15, 33, 57, .04);
  --shadow-lg:   0 18px 48px rgba(15, 33, 57, .12);

  --font: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system,
          "Helvetica Neue", Arial, sans-serif;

  --wrap: 720px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink:         #e8eef8;
    --ink-soft:    #a8b8d0;
    --ink-faint:   #7d8ea9;

    --bg:          #0b1421;
    --surface:     #131f31;
    --surface-2:   #182740;
    --line:        #26364f;
    --line-strong: #3a4d6b;

    --blue:        #4a9bf0;
    --blue-600:    #6fb2f6;
    --blue-100:    #17304f;
    --blue-050:    #14263d;
    --blue-solid:  #1565c0;   /* white on this = 5.7:1 */

    --ok:          #4cc98a;
    --ok-bg:       #10301f;
    --warn:        #e2a54a;
    --warn-bg:     #33260f;
    --danger:      #ff8a80;
    --danger-bg:   #3a1714;

    --shadow-sm:   0 1px 2px rgba(0, 0, 0, .4);
    --shadow-md:   0 4px 12px rgba(0, 0, 0, .45);
    --shadow-lg:   0 18px 48px rgba(0, 0, 0, .55);
  }
}

/* --- base ----------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body.app {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { margin: 0; line-height: 1.2; letter-spacing: -.015em; }
p { margin: 0; }

a { color: var(--blue); text-decoration-thickness: 1.5px; text-underline-offset: 2px; }
a:hover { color: var(--blue-600); }

:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 2px;
  border-radius: 6px;
}

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--navy); color: #fff; padding: .7rem 1.1rem;
  border-radius: 0 0 var(--radius) 0;
}
.skip:focus { left: 0; }

/* Honeypot — off-screen rather than display:none, which some bots skip. */
.hp {
  position: absolute; left: -10000px; top: auto;
  width: 1px; height: 1px; overflow: hidden;
}

/* --- top bar -------------------------------------------------------------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .85rem clamp(1rem, 4vw, 1.75rem);
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 20;
}

.topbar__logo {
  display: block;
  width: auto;
  height: 34px;
}
@media (prefers-color-scheme: dark) {
  /* The wordmark is navy on transparent; lift it so it reads on a dark bar. */
  .topbar__logo { filter: brightness(1.9) saturate(1.15); }
}

.topbar__status {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: .875rem; font-weight: 600; white-space: nowrap;
  padding: .38rem .8rem;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
}
.topbar__status .dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: currentColor; flex: none;
}
.topbar__status.is-open   { color: var(--ok);   background: var(--ok-bg);   border-color: color-mix(in srgb, var(--ok) 25%, transparent); }
.topbar__status.is-closed { color: var(--warn); background: var(--warn-bg); border-color: color-mix(in srgb, var(--warn) 25%, transparent); }
.topbar__status.is-open .dot { animation: pulse 2.4s ease-in-out infinite; }

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--ok) 55%, transparent); }
  50%      { box-shadow: 0 0 0 6px color-mix(in srgb, var(--ok) 0%, transparent); }
}

/* --- install bar (PWA) ---------------------------------------------------- */
.installbar {
  display: flex;
  align-items: center;
  gap: .75rem;
  max-width: var(--wrap);
  margin: .9rem auto 0;
  padding: .7rem .9rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.installbar[hidden] { display: none; }

.installbar__icon img { display: block; border-radius: 7px; }
.installbar__text { flex: 1; min-width: 0; font-size: .9rem; color: var(--ink-soft); }
.installbar__text strong { color: var(--ink); }

.installbar__actions { display: flex; align-items: center; gap: .3rem; flex: none; }

.installbar__dismiss {
  font: inherit; font-size: .8125rem; font-weight: 600;
  background: none; border: 0; cursor: pointer;
  color: var(--ink-faint);
  padding: .45rem .6rem; border-radius: 8px;
}
.installbar__dismiss:hover { color: var(--ink); background: var(--surface-2); }

@media (max-width: 560px) {
  .installbar { flex-wrap: wrap; }
  .installbar__text { flex-basis: 100%; }
  .installbar__actions { margin-left: auto; }
}

/* --- layout --------------------------------------------------------------- */
.wrap {
  flex: 1;
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: clamp(1.25rem, 4vw, 2.25rem) clamp(1rem, 4vw, 1.75rem) 2.5rem;
}

.panel[hidden] { display: none; }

.foot {
  display: flex; flex-wrap: wrap; gap: .35rem 1rem;
  justify-content: space-between;
  padding: 1rem clamp(1rem, 4vw, 1.75rem);
  font-size: .8125rem;
  color: var(--ink-faint);
  border-top: 1px solid var(--line);
  background: var(--surface);
}

/* --- hero ----------------------------------------------------------------- */
.hero__title {
  font-size: clamp(1.75rem, 5.5vw, 2.35rem);
  font-weight: 700;
  color: var(--navy);
  margin-bottom: .5rem;
}
@media (prefers-color-scheme: dark) { .hero__title { color: var(--ink); } }

.hero__sub {
  font-size: 1.0625rem;
  color: var(--ink-soft);
  margin-bottom: 1.75rem;
  max-width: 52ch;
}

.notice {
  display: flex; flex-direction: column; gap: .2rem;
  padding: .95rem 1.1rem;
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
  font-size: .95rem;
  border: 1px solid transparent;
}
.notice--closed {
  background: var(--warn-bg);
  border-color: color-mix(in srgb, var(--warn) 30%, transparent);
  color: var(--warn);
}
.notice--closed strong { color: inherit; }
.notice--closed span { color: color-mix(in srgb, var(--warn) 85%, var(--ink)); }

/* --- form ----------------------------------------------------------------- */
.form { display: flex; flex-direction: column; gap: 1.6rem; }

.field { border: 0; padding: 0; margin: 0; min-width: 0; }

.field__label {
  display: block;
  font-size: .9375rem;
  font-weight: 650;
  color: var(--ink);
  margin-bottom: .55rem;
  padding: 0;
}

.field__hint  { font-size: .8125rem; color: var(--ink-faint); margin-top: .4rem; }
.field__error { font-size: .8125rem; color: var(--danger); margin-top: .4rem; font-weight: 600; }
.field__error[hidden] { display: none; }

.grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.6rem;
}
@media (max-width: 560px) { .grid2 { grid-template-columns: 1fr; } }

input[type="text"], input[type="tel"], input[type="email"], textarea {
  width: 100%;
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: var(--surface);
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius);
  padding: .8rem .95rem;
  transition: border-color .15s, box-shadow .15s;
}
textarea { resize: vertical; min-height: 6.5rem; line-height: 1.5; }

input::placeholder, textarea::placeholder { color: var(--ink-faint); }

input:focus, textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--blue) 18%, transparent);
}

.is-invalid input, .is-invalid textarea,
input.is-invalid, textarea.is-invalid {
  border-color: var(--danger);
}

/* --- category chips ------------------------------------------------------- */
.chips {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(155px, 1fr));
  gap: .6rem;
}

.chip { position: relative; display: block; }
.chip input {
  position: absolute; inset: 0;
  opacity: 0; margin: 0; cursor: pointer; width: 100%; height: 100%;
}

.chip__box {
  display: flex; align-items: center; gap: .6rem;
  min-height: 56px;
  padding: .7rem .85rem;
  background: var(--surface);
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius);
  font-size: .9375rem;
  font-weight: 550;
  color: var(--ink);
  transition: border-color .15s, background .15s, transform .1s;
}

.chip:hover .chip__box { border-color: var(--blue); background: var(--blue-050); }
.chip input:focus-visible + .chip__box {
  outline: 3px solid var(--blue);
  outline-offset: 2px;
}
.chip input:checked + .chip__box {
  border-color: var(--blue);
  background: var(--blue-100);
  color: var(--blue-600);
  box-shadow: inset 0 0 0 1px var(--blue);
}
.chip input:active + .chip__box { transform: scale(.985); }

.chip__icon {
  flex: none;
  width: 22px; height: 22px;
  background-color: currentColor;
  opacity: .75;
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-position: center;  mask-position: center;
  -webkit-mask-size: contain;     mask-size: contain;
}
.chip input:checked + .chip__box .chip__icon { opacity: 1; }
.chip__text { min-width: 0; }

/* Icons as masks so they inherit the chip's colour in every state. */
.i-power   { -webkit-mask-image: var(--i-power);   mask-image: var(--i-power); }
.i-gauge   { -webkit-mask-image: var(--i-gauge);   mask-image: var(--i-gauge); }
.i-wifi    { -webkit-mask-image: var(--i-wifi);    mask-image: var(--i-wifi); }
.i-mail    { -webkit-mask-image: var(--i-mail);    mask-image: var(--i-mail); }
.i-shield  { -webkit-mask-image: var(--i-shield);  mask-image: var(--i-shield); }
.i-printer { -webkit-mask-image: var(--i-printer); mask-image: var(--i-printer); }
.i-key     { -webkit-mask-image: var(--i-key);     mask-image: var(--i-key); }
.i-dots    { -webkit-mask-image: var(--i-dots);    mask-image: var(--i-dots); }

:root {
  --i-power:   url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M12 3v9'/%3E%3Cpath d='M7.5 6.7a7.5 7.5 0 1 0 9 0'/%3E%3C/svg%3E");
  --i-gauge:   url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M3.5 18a9 9 0 1 1 17 0'/%3E%3Cpath d='M12 18l4.2-5'/%3E%3C/svg%3E");
  --i-wifi:    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M2.5 9a15 15 0 0 1 19 0'/%3E%3Cpath d='M5.8 12.6a10 10 0 0 1 12.4 0'/%3E%3Cpath d='M9 16.1a5 5 0 0 1 6 0'/%3E%3Ccircle cx='12' cy='19.5' r='1.2' fill='%23000' stroke='none'/%3E%3C/svg%3E");
  --i-mail:    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linejoin='round'%3E%3Crect x='2.5' y='5' width='19' height='14' rx='2.5'/%3E%3Cpath d='M3 7l9 6 9-6'/%3E%3C/svg%3E");
  --i-shield:  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linejoin='round'%3E%3Cpath d='M12 2.8l7.5 3v5.9c0 4.6-3.1 7.9-7.5 9.5-4.4-1.6-7.5-4.9-7.5-9.5V5.8z'/%3E%3Cpath d='M12 9v3.5' stroke-linecap='round'/%3E%3Ccircle cx='12' cy='15.6' r='1.1' fill='%23000' stroke='none'/%3E%3C/svg%3E");
  --i-printer: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linejoin='round'%3E%3Cpath d='M7 8V3.5h10V8'/%3E%3Crect x='3' y='8' width='18' height='8' rx='2'/%3E%3Crect x='7' y='14' width='10' height='6.5' rx='1'/%3E%3C/svg%3E");
  --i-key:     url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='8' cy='8.5' r='4.5'/%3E%3Cpath d='M11.4 11.6L20 20.2'/%3E%3Cpath d='M17.2 17.4l2.2-2.2'/%3E%3C/svg%3E");
  --i-dots:    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23000'%3E%3Ccircle cx='5.5' cy='12' r='1.9'/%3E%3Ccircle cx='12' cy='12' r='1.9'/%3E%3Ccircle cx='18.5' cy='12' r='1.9'/%3E%3C/svg%3E");
}

/* --- urgency -------------------------------------------------------------- */
.urgency { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; }
@media (max-width: 460px) { .urgency { grid-template-columns: 1fr; } }

.urg { position: relative; display: block; }
.urg input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; width: 100%; height: 100%; }

.urg__box {
  display: flex; flex-direction: column; gap: .1rem;
  padding: .7rem .85rem;
  background: var(--surface);
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius);
  transition: border-color .15s, background .15s;
}
.urg__box strong { font-size: .9375rem; font-weight: 650; }
.urg__box span   { font-size: .8125rem; color: var(--ink-faint); }

.urg:hover .urg__box { border-color: var(--blue); }
.urg input:focus-visible + .urg__box { outline: 3px solid var(--blue); outline-offset: 2px; }
.urg input:checked + .urg__box {
  border-color: var(--blue);
  background: var(--blue-100);
  box-shadow: inset 0 0 0 1px var(--blue);
}
.urg input:checked + .urg__box strong { color: var(--blue-600); }

/* An "I can't work" selection should look like one. */
.urg input[value="emergency"]:checked + .urg__box {
  border-color: var(--danger);
  background: var(--danger-bg);
  box-shadow: inset 0 0 0 1px var(--danger);
}
.urg input[value="emergency"]:checked + .urg__box strong { color: var(--danger); }

/* --- buttons -------------------------------------------------------------- */
.btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font: inherit; font-weight: 650;
  border: 1.5px solid transparent;
  border-radius: var(--radius);
  padding: .7rem 1.25rem;
  cursor: pointer;
  transition: background .15s, border-color .15s, transform .08s, box-shadow .15s;
}
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .6; cursor: not-allowed; transform: none; }

.btn--primary {
  background: var(--blue-solid);
  color: #fff;
  box-shadow: var(--shadow-md);
}
.btn--primary:hover:not([disabled]) { filter: brightness(1.12); }

.btn--big { font-size: 1.0625rem; padding: 1rem 1.5rem; width: 100%; }

.btn--ghost {
  background: transparent;
  color: var(--ink-soft);
  border-color: var(--line-strong);
}
.btn--ghost:hover { background: var(--surface-2); color: var(--ink); border-color: var(--ink-faint); }

.btn--small { font-size: .875rem; padding: .45rem .85rem; }

.btn__spinner {
  display: none;
  width: 18px; height: 18px;
  border: 2.5px solid rgba(255, 255, 255, .35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
.btn.is-busy .btn__spinner { display: block; }
.btn.is-busy .btn__label   { opacity: .75; }

@keyframes spin { to { transform: rotate(360deg); } }

.form__error {
  padding: .75rem 1rem;
  border-radius: var(--radius);
  background: var(--danger-bg);
  color: var(--danger);
  font-size: .9375rem; font-weight: 600;
  border: 1px solid color-mix(in srgb, var(--danger) 30%, transparent);
}
.form__error[hidden] { display: none; }

.form__foot { text-align: center; font-size: .9375rem; color: var(--ink-soft); }

/* --- chat ----------------------------------------------------------------- */
.chat {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  height: min(72vh, 620px);
}

.chat__head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem;
  padding: 1rem 1.15rem;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}
.chat__title { font-size: 1.0625rem; font-weight: 700; color: var(--navy); }
@media (prefers-color-scheme: dark) { .chat__title { color: var(--ink); } }

.chat__meta { font-size: .8125rem; color: var(--ink-faint); margin-top: .15rem; }
.chat__meta strong { color: var(--ink-soft); font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.chat__sep { margin: 0 .35rem; }

.chat__log {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 1.15rem;
  display: flex; flex-direction: column; gap: .7rem;
  scroll-behavior: smooth;
}

.msg { max-width: 78%; display: flex; flex-direction: column; gap: .2rem; }
.msg__bubble {
  padding: .65rem .9rem;
  border-radius: 16px;
  font-size: .9688rem;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.msg__meta { font-size: .6875rem; color: var(--ink-faint); padding: 0 .3rem; }

.msg--client { align-self: flex-end; align-items: flex-end; }
.msg--client .msg__bubble {
  background: var(--blue-solid);
  color: #fff;
  border-bottom-right-radius: 5px;
}

.msg--agent { align-self: flex-start; align-items: flex-start; }
.msg--agent .msg__bubble {
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--ink);
  border-bottom-left-radius: 5px;
}

.msg--system { align-self: center; max-width: 92%; }
.msg--system .msg__bubble {
  background: transparent;
  color: var(--ink-faint);
  font-size: .8438rem;
  text-align: center;
  padding: .3rem .6rem;
}

/* Replies that arrived as a text message get a quiet marker, so the customer
   understands why the tone is short — they're being answered from a phone. */
.msg__via {
  display: inline-flex; align-items: center; gap: .25rem;
  font-size: .6875rem; color: var(--ink-faint);
}
.msg__via::before {
  content: ""; width: 11px; height: 11px;
  background-color: currentColor;
  -webkit-mask: var(--i-sms) center / contain no-repeat;
          mask: var(--i-sms) center / contain no-repeat;
}
:root {
  --i-sms: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linejoin='round'%3E%3Crect x='6' y='2.5' width='12' height='19' rx='2.5'/%3E%3Cpath d='M10.5 18.5h3' stroke-linecap='round'/%3E%3C/svg%3E");
}

.msg--enter { animation: rise .22s ease-out; }
@keyframes rise {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}

.chat__typing {
  display: flex; align-items: center; gap: .5rem;
  padding: 0 1.15rem .6rem;
  font-size: .8125rem; color: var(--ink-faint);
}
.chat__typing[hidden] { display: none; }
.typing__dots { display: inline-flex; gap: 3px; }
.typing__dots i {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--ink-faint);
  animation: bounce 1.25s ease-in-out infinite;
}
.typing__dots i:nth-child(2) { animation-delay: .16s; }
.typing__dots i:nth-child(3) { animation-delay: .32s; }
@keyframes bounce {
  0%, 60%, 100% { transform: none; opacity: .45; }
  30%           { transform: translateY(-4px); opacity: 1; }
}

.composer {
  display: flex; align-items: flex-end; gap: .6rem;
  padding: .8rem 1.15rem 1rem;
  border-top: 1px solid var(--line);
  background: var(--surface);
}
.composer textarea {
  flex: 1;
  min-height: 46px;
  max-height: 150px;
  resize: none;
  border-radius: var(--radius-pill);
  padding: .65rem 1.05rem;
  line-height: 1.45;
}

.btn--send {
  flex: none;
  width: 46px; height: 46px;
  padding: 0;
  border-radius: 50%;
  background: var(--blue-solid);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.btn--send:hover:not([disabled]) { filter: brightness(1.12); }

.chat__offline {
  padding: .6rem 1.15rem;
  background: var(--warn-bg);
  color: var(--warn);
  font-size: .8438rem; font-weight: 600;
  text-align: center;
  border-top: 1px solid color-mix(in srgb, var(--warn) 30%, transparent);
}
.chat__offline[hidden] { display: none; }

/* --- done panel ----------------------------------------------------------- */
.done {
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: clamp(2rem, 7vw, 3rem) clamp(1.25rem, 5vw, 2.5rem);
  display: flex; flex-direction: column; align-items: center; gap: .85rem;
}
.done__mark  { color: var(--ok); }
.done__title { font-size: clamp(1.4rem, 4.5vw, 1.75rem); font-weight: 700; }
.done__body  { color: var(--ink-soft); max-width: 42ch; }
.done__ref {
  font-size: .875rem; color: var(--ink-faint);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  padding: .35rem .9rem;
}
.done__ref strong { color: var(--ink); font-variant-numeric: tabular-nums; letter-spacing: .04em; }
.done .btn { margin-top: .5rem; }

/* --- motion preference ---------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}

/* --- app-window mode ------------------------------------------------------
   The desktop shortcut opens Edge with --app=, which gives a small chromeless
   window. Trim the vertical padding so the form still fits without scrolling.
   -------------------------------------------------------------------------- */
@media (max-height: 720px) {
  .hero__sub { margin-bottom: 1.25rem; }
  .form      { gap: 1.25rem; }
  .chat      { height: calc(100vh - 190px); }
}
