/* THE WEBSITE CHAT (17 Nov 2026; assets/site-chat.js, SHARE-CLOUD.md 60.16). The website's own look: square corners, the
   site's colour and type tokens (site.css section 2, /_theme.css), every control a thumb's 44px, no beige fill. A button
   at the window's foot opens a panel: on a phone the whole screen, from 800px a 400 by 600 window over the page's corner.
   Under the price calculator and the enquiry, and hidden while either is over the page. */

/* THE ONE CORNER GAP (18 Nov 2026, the operator: "this should be equal bottom right margin"): the button and the panel sit
   --wc-gap from the window's right and its foot alike, never the page's gutter on one side and 16px on the other */
.wc { --wc-gap: 20px; position: fixed; z-index: 2147480000; right: max(var(--wc-gap), env(safe-area-inset-right));
  bottom: calc(max(var(--wc-gap), env(safe-area-inset-bottom)) + var(--wc-lift, 0px));
  font-family: var(--ws-font-text); font-size: var(--ws-t-body, .9375rem); color: var(--ws-c-ink); }
.wc[hidden], .wc [hidden] { display: none !important; }
.wc-edge { display: none; }
html.ws-calc-on .wc, html.ws-enq-on .wc { display: none; }
.wc .wc-g { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.wc button { font: inherit; color: inherit; border-radius: 0; cursor: pointer; -webkit-user-select: none; user-select: none; }
.wc button:focus-visible, .wc .wc-log:focus-visible { outline: 2px solid var(--ws-c-ink); outline-offset: 2px; }
.wc-panel:focus { outline: none; }
.wc-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* the button that opens it: a 44px square, the glyph alone, its name for a screen reader (18 Nov 2026, the operator: "make it
   a square smaller"). `.wc .wc-launch` so `.wc button`'s inherited colour never paints the glyph the fill's own dark. */
.wc .wc-launch { display: inline-flex; align-items: center; justify-content: center; width: 44px; min-height: 44px; height: 44px; padding: 0;
  border: 1px solid var(--ws-c-tertiary); background: var(--ws-c-tertiary); color: var(--ws-c-on-tertiary); }
/* (the site's yellow since 18 Nov 2026, the operator: "make the chat button yellow"; its glyph the ink the yellow buttons' words are) */
@media (hover: hover) { .wc .wc-launch:hover { background: var(--ws-c-tertiary-2); border-color: var(--ws-c-tertiary-2); } }
.wc.wc-on .wc-launch { display: none; }

/* the panel */
.wc-panel { position: fixed; z-index: 1; display: flex; flex-direction: column; background: var(--ws-c-surface); color: var(--ws-c-ink);
  border: 1px solid var(--ws-c-edge, var(--ws-c-line)); border-radius: 0;
  right: max(var(--wc-gap, 20px), env(safe-area-inset-right)); bottom: max(var(--wc-gap, 20px), env(safe-area-inset-bottom));
  width: 400px; height: 600px; max-height: calc(100vh - var(--ws-hdr-h, 80px) - 32px); max-width: calc(100vw - 32px); animation: wc-in .22s ease-out; }
/* (under the site's header on a short window, so its menu stays in reach: the pen test's re-test, 18 Nov 2026) */
/* with a mouse, a 1px ink edge, so the panel never runs into a white section behind it (the site is flat: no shadow) */
@media (min-width: 800px) and (hover: hover) and (pointer: fine) { .wc-panel { border-color: var(--ws-c-ink); } }
/* a tablet's keyboard up: the panel in the part of the screen still in sight (assets/site-chat.js fitKeys) */
@media (min-width: 800px) { .wc-panel.wc-keys { top: calc(var(--wc-vt, 0px) + 16px); bottom: auto; max-height: calc(var(--wc-vh, 100vh) - 32px); } }
@keyframes wc-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@media (max-width: 799.98px) {
  .wc-panel { inset: 0; width: auto; height: auto; max-width: none; max-height: none; border: 0; box-shadow: none;
    padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); }
  /* the part of the screen in sight (assets/site-chat.js fitKeys), so the box sits on the keyboard */
  .wc-panel { top: var(--wc-vt, 0px); bottom: auto; height: var(--wc-vh, 100%); }
  .wc-panel.wc-keys { padding-bottom: 0; }
  /* while iOS slides the page for its keyboard, a screen's height of the head's dark above and the panel's own below, so the
     page behind never shows through between two of its frames (18 Nov 2026, the operator's recording: "why does it flicker") */
  .wc-panel::before, .wc-panel::after { content: ""; position: absolute; left: 0; right: 0; height: 100vh; pointer-events: none; }
  .wc-panel::before { bottom: 100%; background: var(--ws-c-primary); }
  .wc-panel::after { top: 100%; background: var(--ws-c-surface); }
  html.wc-hold, html.wc-hold body { overflow: hidden; }
  /* the open chat on a phone: Safari's top bar, and the iPhone Duo's toolbar down the right edge, take the head's dark */
  .wc.wc-on .wc-edge { display: block; position: fixed; top: 0; left: 0; right: 0; height: 12px; margin: 0; pointer-events: none; z-index: 2;
    background: var(--ws-c-primary); -webkit-background-clip: text; background-clip: text; color: transparent; }
  .wc.wc-on .wc-edge--r { top: 0; bottom: 0; left: auto; right: 0; width: 12px; height: auto; }
}
@media (prefers-reduced-motion: reduce) {
  .wc-panel { animation: wc-fade .16s linear; }
  @keyframes wc-fade { from { opacity: 0; } to { opacity: 1; } }
}

.wc-head { display: flex; align-items: center; gap: 4px; min-height: 56px; padding: 0 6px 0 16px; background: var(--ws-c-primary); color: var(--ws-c-on-primary); }
/* the site's own h2 rule gave the title its ink and a width of its own: on the head's dark it is the head's light, and the
   two buttons sit at the head's right edge whatever the title's width (18 Nov 2026: "it sits unusually to the middle") */
.wc .wc-title { flex: 1 1 auto; min-width: 0; width: auto; max-width: none; margin: 0; color: var(--ws-c-on-primary); font-family: var(--ws-font-head);
  font-weight: 400; font-size: 1.25rem; line-height: 1.2; letter-spacing: 0; text-transform: none; }
.wc .wc-min { margin-left: auto; }
.wc-min, .wc-x { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 0 10px; border: 0; background: transparent; }
/* hover only where there is one: a tap on a phone never leaves the cross lit */
@media (hover: hover) { .wc-min:hover, .wc-x:hover { background: var(--ws-c-hover-dark); color: var(--ws-c-on-primary); } }

/* ending the chat asks first */
.wc-end { position: absolute; inset: 0; z-index: 3; display: flex; align-items: center; justify-content: center; padding: 16px;
  background: rgb(var(--ws-c-primary-rgb, 36 31 25) / .55); }
.wc-endbox { width: 100%; max-width: 320px; padding: 20px; border: 1px solid var(--ws-c-edge); background: var(--ws-c-surface); color: var(--ws-c-ink); }
.wc .wc-endq { margin: 0 0 16px; color: var(--ws-c-ink); font-family: var(--ws-font-head); font-size: 1.25rem; line-height: 1.25; }
.wc .wc-endn { margin: -8px 0 16px; color: var(--ws-c-ink); line-height: 1.4; }
/* two buttons stacked under the question, 50px tall as the calculator's own leave question's are (18 Nov 2026: "make the keep
   chatting and end chat button relatively smaller to the popup box", "still stack", then "make exit chat button a little bit
   taller, in line with calculator exit buttons"), their words small */
.wc-endbtns { display: flex; flex-direction: column; gap: 8px; }
.wc-endbtns button { width: 100%; }
.wc .wc-endkeep, .wc .wc-endgo { min-height: 50px; padding: 0 12px; white-space: nowrap; font-size: .6875rem;
  font-weight: var(--ws-w-cap, 600); letter-spacing: .08em; text-transform: uppercase; }
.wc .wc-endkeep { border: 1px solid var(--ws-c-edge); background: transparent; color: var(--ws-c-ink); }
.wc .wc-endgo { border: 1px solid var(--ws-c-primary); background: var(--ws-c-primary); color: var(--ws-c-on-primary); }

/* an answer that came while minimised: the Studio's yellow count square at the button's corner */
.wc .wc-launch { position: relative; }
.wc-badge { position: absolute; top: -7px; right: -7px; display: inline-flex; align-items: center; justify-content: center; min-width: 20px;
  height: 20px; padding: 0 4px; border: 2px solid var(--ws-c-primary); background: var(--ws-c-tertiary); color: var(--ws-c-on-tertiary);
  font-size: 11px; font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums; box-sizing: border-box; }
.wc-head button:focus-visible { outline-color: var(--ws-c-tertiary); }

/* the conversation */
.wc-log { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
/* the studio's side starts at the left, as wide as its words up to 520px (a tablet's 88% was too wide to read across) */
.wc-msg, .wc-card { max-width: min(88%, 520px); }
.wc-bot, .wc-card, .wc-note { align-self: flex-start; }
.wc-words { margin: 0; padding: 10px 12px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; -webkit-user-select: text; user-select: text; }
.wc-bot .wc-words { background: var(--ws-c-hover); }
.wc-me { align-self: flex-end; }
.wc-me .wc-words { background: var(--ws-c-primary); color: var(--ws-c-on-primary); }
/* a note (what went wrong, the way to reach us): the ink and the body's size, a quiet rule at its left, never small print */
.wc-note .wc-words { padding: 4px 0 4px 12px; border-left: 2px solid var(--ws-c-line); color: var(--ws-c-ink); }
.wc-note .wc-mail { color: inherit; text-decoration: underline; text-underline-offset: 2px; }

.wc-card { border: 1px solid var(--ws-c-line); padding: 12px; }
.wc-cardh { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.wc-chip { display: inline-block; padding: 2px 8px; border: 1px solid var(--ws-c-ink); font-size: var(--ws-t-ui, .75rem); font-weight: var(--ws-w-cap, 600); letter-spacing: .08em; text-transform: uppercase; }
.wc-cardk { color: var(--ws-c-muted); font-size: var(--ws-t-small, .875rem); }
.wc-plist { display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; margin: 0; font-variant-numeric: tabular-nums; }
.wc-ph, .wc-pt { margin: 0; }
.wc-pt { text-align: right; font-weight: var(--ws-w-label, 500); }
.wc-cardn { margin: 8px 0 0; color: var(--ws-c-muted); font-size: var(--ws-t-small, .875rem); }
.wc-date { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; }
.wc-dday { font-weight: var(--ws-w-label, 500); }
.wc-dstate { color: var(--ws-c-muted); }

/* SUGGESTED REPLIES to the latest answer (18 Nov 2026, the operator: "it'll act like how Claude does with answers, it'll
   submit as a chat into the chat box"): square outlined buttons on the visitor's side, over the box (outside the
   conversation's live region, never under the floating Send my enquiry), 36px drawn and a thumb's 44 by their reach, their
   8px gap shared between two reaches, and never narrower than 44px */
/* (one under another on the visitor's side, a step smaller: 18 Nov 2026, the operator, "list downwards, a bit smaller sized";
   32px drawn, a thumb's 44 by a 6px reach each way, the 12px gap between them never shared) */
.wc-opts { display: flex; flex-direction: column; align-items: flex-end; gap: 12px; max-width: 100%; margin: 2px 0 12px; }
.wc .wc-opt { position: relative; min-height: 32px; min-width: 44px; padding: 0 10px; border: 1px solid var(--ws-c-ink); background: var(--ws-c-surface); color: var(--ws-c-ink);
  font-size: .8125rem; line-height: 1.2; text-align: right; }
@media (hover: hover) { .wc .wc-opt:hover { background: var(--ws-c-hover); } }
.wc .wc-opt::after { content: ""; position: absolute; inset: -6px 0; }

/* SEND MY ENQUIRY (18 Nov 2026, the operator: "There can be a floating button in the chat"): over the box, centred, the
   site's dark button, shown only once the enquiry has all it needs; the conversation keeps room under its last line (the
   box's form holds it: `.wc-form` is `position: relative`, below) */
.wc-sendbar { position: absolute; left: 16px; right: 16px; bottom: calc(100% + 12px); display: flex; justify-content: center; pointer-events: none; }
.wc .wc-sendenq { pointer-events: auto; min-height: 44px; padding: 0 20px; border: 1px solid var(--ws-c-primary); background: var(--ws-c-primary); color: var(--ws-c-on-primary);
  font-size: var(--ws-t-ui, .75rem); font-weight: var(--ws-w-cap, 600); letter-spacing: .08em; text-transform: uppercase; }
/* (no ring round it: 20 Nov 2026, the operator, "no white outline on the send enquiry in the chatbot") */
@media (hover: hover) { .wc .wc-sendenq:hover:not(:disabled) { background: var(--ws-c-hover-dark); border-color: var(--ws-c-hover-dark); } }
.wc-sendenq:disabled { cursor: default; opacity: .6; }
.wc-panel.wc-ready .wc-log { padding-bottom: 72px; }
/* THE KEYBOARD UP ON A SHORT SCREEN (the pen test's re-test): the replies side by side, wrapping, and Send my enquiry in
   its place over the box, so the latest answer stays in sight */
.wc-panel.wc-keys .wc-opts { flex-direction: row; flex-wrap: wrap; justify-content: flex-end; }
.wc-panel.wc-keys .wc-sendbar { position: static; margin: 0 0 10px; }
.wc-panel.wc-keys.wc-ready .wc-log { padding-bottom: 16px; }
@media (max-height: 420px) {
  .wc-opts { flex-direction: row; flex-wrap: wrap; justify-content: flex-end; }
  .wc-sendbar { position: static; margin: 0 0 10px; }
  .wc-panel.wc-ready .wc-log { padding-bottom: 16px; }
}

/* typing */
.wc-form { position: relative; border-top: 1px solid var(--ws-c-line); padding: 10px 16px 12px; }
/* the send button centred on the box beside it (18 Nov 2026, the operator: "middle align send button to the input text box") */
.wc-row { display: flex; align-items: center; gap: 8px; }
.wc-in { flex: 1; height: var(--wc-ih, auto); min-height: 44px; max-height: 120px; padding: 10px 12px; border: 1px solid var(--ws-c-edge); border-radius: 0; background: var(--ws-c-surface);
  color: var(--ws-c-ink); font: inherit; font-size: 16px; line-height: 1.35; resize: none; }
.wc-in::placeholder { color: var(--ws-c-muted); opacity: 1; }
/* its focus an ink edge, never a ring round its own edge */
.wc .wc-in:focus-visible { outline: 0; border-color: var(--ws-c-ink); box-shadow: inset 0 0 0 1px var(--ws-c-ink); }
.wc-in:disabled { opacity: .6; }
.wc-go { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; flex: none; border: 0;
  background: var(--ws-c-tertiary); color: var(--ws-c-on-tertiary); }
@media (hover: hover) { .wc-go:hover:not(:disabled) { background: var(--ws-c-tertiary-2); } }
.wc-go:disabled { cursor: default; opacity: .5; }
.wc-spam:empty, .wc-spam .ws-spam-box:empty { display: none; }
.wc-spam .ws-spamfail { margin: 8px 0 0; color: var(--ws-c-bad); font-size: var(--ws-t-small, .875rem); }
.wc-status { margin: 6px 0 0; min-height: 1.2em; color: var(--ws-c-muted); font-size: var(--ws-t-small, .875rem); }
.wc-status:empty { margin: 0; min-height: 0; }
/* (nothing typed and sent: said in the error colour, 20 Nov 2026) */
.wc-status.wc-bad { color: var(--ws-c-bad); }

/* the three bouncing dots while an answer is coming (18 Nov 2026), square as every corner on the website */
.wc-typing .wc-words { display: inline-flex; align-items: center; gap: 5px; min-height: 43px; padding: 0 14px; }
.wc-dot { width: 6px; height: 6px; background: var(--ws-c-muted); animation: wc-bounce 1.1s ease-in-out infinite; }
.wc-dot:nth-child(2) { animation-delay: .15s; }
.wc-dot:nth-child(3) { animation-delay: .3s; }
@keyframes wc-bounce { 0%, 60%, 100% { transform: translateY(0); opacity: .45; } 30% { transform: translateY(-5px); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .wc-dot { animation: none; opacity: .7; } }
