/* Contact chat widget, on every page. It stays put across page loads: the open view and
   conversation are restored from sessionStorage, and the dock keeps its place in view transitions. */
.pe-dock, .pe-dock *, .pe-dock *::before, .pe-dock *::after { box-sizing: border-box; }
.pe-dock { view-transition-name: pe-dock; font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
/* Page-level element styles (site.css) must not leak into the widget. */
.pe-dock p, .pe-dock h2 { margin: 0; color: inherit; font-family: inherit; }
.pe-dock em { color: inherit; }
.pe-dock {
  position: fixed; right: 24px; bottom: 24px; z-index: 30; width: min(400px, calc(100% - 32px));
  display: flex; flex-direction: column; align-items: flex-end; font-family: var(--pe-sans); color: var(--pe-forest); text-align: left;
  pointer-events: none;
}
.pe-dock > * { pointer-events: auto; }
.pe-launch {
  display: flex; align-items: center; gap: 12px; height: 52px; padding: 0 22px 0 14px;
  font: inherit; font-size: 15px; font-weight: 500; background: var(--pe-cream); color: var(--pe-forest);
  border: 1px solid var(--pe-forest); border-radius: 26px; cursor: pointer; box-shadow: 0 10px 30px rgba(8, 24, 17, 0.35);
}
.pe-launch img { display: block; }
.pe-launch[hidden] { display: none; }
.pe-cw {
  width: 100%; height: 580px; max-height: calc(100vh - 48px); max-height: calc(100dvh - 48px);
  display: flex; flex-direction: column; background: var(--pe-paper); border: 6px solid #FFFFFF; border-radius: 10px; overflow: hidden;
  box-shadow: 0 0 0 1px rgba(18, 53, 38, 0.3), 0 24px 60px rgba(8, 24, 17, 0.42);
  font-size: 15px; line-height: 1.5;
}
.pe-cw[hidden], .pe-cw-view[hidden], .pe-cw [hidden] { display: none; }
.pe-cw :focus-visible { outline: 2px solid var(--pe-forest); outline-offset: 2px; }
.pe-cw p, .pe-cw h2, .pe-cw dl, .pe-cw dd { margin: 0; }
.pe-cw button { font: inherit; }
.pe-cw-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 8px 8px 14px; background: var(--pe-forest); color: var(--pe-cream); }
.pe-cw-head :focus-visible { outline-color: var(--pe-cream); }
.pe-cw-brand { display: flex; align-items: center; gap: 12px; }
.pe-cw-brand img { display: block; }
.pe-cw-name { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.3; }
.pe-cw-sub { font-family: var(--pe-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--pe-label-dark); line-height: 1.3; }
.pe-cw-close { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; background: transparent; color: var(--pe-cream); border: 0; cursor: pointer; }
.pe-cw-view { flex: 1 1 0; min-height: 0; display: flex; flex-direction: column; }
.pe-cw-body { flex: 1 1 0; min-height: 0; overflow-y: auto; padding: 24px; display: flex; flex-direction: column; gap: 20px; }
.pe-cw-intro { display: flex; flex-direction: column; gap: 10px; }
.pe-cw-label, .pe-cw-rows dt, .pe-cw-msg-who {
  font-family: var(--pe-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--pe-label);
}
.pe-cw-review-intro { font-size: 20px; line-height: 1.3; font-weight: 500; letter-spacing: -0.01em; }

.pe-cw-log { flex: 1 1 0; min-height: 0; overflow-y: auto; padding: 20px 20px 16px; display: flex; flex-direction: column; gap: 18px; }
.pe-cw-msg { display: flex; flex-direction: column; gap: 4px; max-width: 88%; white-space: pre-line; overflow-wrap: anywhere; }
.pe-cw-msg.is-you { align-self: flex-end; max-width: 82%; padding: 10px 14px; background: var(--pe-forest); color: var(--pe-cream); border-radius: 2px; }
.pe-cw-foot { padding: 12px 16px 14px; border-top: 1px solid rgba(18, 53, 38, 0.22); display: flex; flex-direction: column; gap: 10px; }
.pe-cw-compose { display: flex; gap: 8px; margin: 0; }
.pe-cw-compose input {
  flex: 1 1 0; min-width: 0; height: 46px; padding: 0 12px; font: inherit; font-size: 16px;
  background: #FFFFFF; color: var(--pe-forest); border: 1px solid var(--pe-forest); border-radius: 2px;
}
.pe-cw-compose button {
  width: 46px; height: 46px; flex: 0 0 46px; display: flex; align-items: center; justify-content: center;
  background: var(--pe-forest); color: var(--pe-cream); border: 1px solid var(--pe-forest); border-radius: 2px; cursor: pointer;
}
.pe-cw-fine { font-size: 12px; line-height: 1.4; color: var(--pe-label); }
.pe-cw-primary {
  height: 46px; font-size: 15px; font-weight: 600; background: var(--pe-forest); color: var(--pe-cream);
  border: 1px solid var(--pe-forest); border-radius: 2px; cursor: pointer;
}
.pe-cw-primary:disabled { opacity: 0.7; cursor: progress; }
.pe-cw-secondary { display: flex; gap: 8px; }
.pe-cw-secondary button, .pe-cw-outline {
  flex: 1 1 0; height: 44px; font-size: 14px; font-weight: 500; background: transparent; color: var(--pe-forest);
  border: 1px solid rgba(18, 53, 38, 0.5); border-radius: 2px; cursor: pointer;
}
.pe-cw-error { font-size: 14px; line-height: 1.4; color: #8A2B14; }

.pe-cw-check { display: flex; gap: 12px; align-items: flex-start; min-height: 44px; }
.pe-cw-check input { width: 20px; height: 20px; margin: 2px 0 0; flex: 0 0 20px; accent-color: var(--pe-forest); }
.pe-cw-check label { font-size: 14px; line-height: 1.45; color: var(--pe-ink-soft); }
.pe-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.pe-cw-rows > div { display: flex; gap: 16px; padding: 12px 0; border-top: 1px solid rgba(18, 53, 38, 0.22); }
.pe-cw-rows dt { flex: 0 0 76px; padding-top: 3px; }
.pe-cw-rows dd { flex: 1 1 0; min-width: 0; font-size: 15px; line-height: 1.5; white-space: pre-line; overflow-wrap: anywhere; }
.pe-cw-privacy { font-size: 13px; line-height: 1.5; color: var(--pe-label); }
.pe-cw-privacy a { color: var(--pe-forest); }
.pe-cw-sent .pe-cw-body { padding: 32px 24px 24px; justify-content: center; }
.pe-cw-sent img { display: block; }
.pe-cw-sent h2 { font-size: 30px; line-height: 1.1; font-weight: 500; letter-spacing: -0.02em; }
.pe-cw-sent h2:focus { outline: none; }
.pe-cw-sent p { font-size: 16px; line-height: 1.5; color: var(--pe-ink-soft); }
.pe-cw-outline { flex: 0 0 auto; height: 46px; margin-top: 12px; font-size: 15px; font-weight: 600; border-color: var(--pe-forest); }

@media (max-width: 760px) {
  .pe-dock { right: 12px; bottom: 12px; width: calc(100% - 24px); }
  .pe-cw { max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); }
  /* The cookie card spans the phone's bottom edge until it is answered. */
  body:has(#pe-cc:not([hidden])) .pe-launch { display: none; }
}
