/* WorkWeaver · "Book a call" brief modal. Scoped to .wwbc; reads site tokens with fallbacks so it also works alone. */

html.wwbc-lock { overflow: hidden; }
html.wwbc-lock body { overflow: hidden; padding-right: var(--wwbc-sbw, 0px); }

.wwbc {
  --wwbc-ink: var(--ink-900, #0b1220);
  --wwbc-ink2: var(--ink-700, #243553);
  --wwbc-muted: var(--ink-500, #526684);
  --wwbc-faint: var(--ink-400, #66758f);
  --wwbc-line: var(--line-strong, rgba(18, 28, 48, .14));
  --wwbc-soft: var(--ink-50, #f5f6f9);
  --wwbc-track: var(--ink-100, #e2e6ee);
  --wwbc-accent: var(--accent, #e8852a);
  --wwbc-accent-ink: var(--accent-ink, #b8651a);
  --wwbc-link: #9c5414; /* saffron dark enough for 4.5:1 text on white (site accent-ink is 4.27:1) */
  --wwbc-accent-soft: var(--accent-soft, rgba(232, 133, 42, .12));
  --wwbc-err: var(--miss, #a83b37);
  --wwbc-ease: var(--ease-out, cubic-bezier(.23, 1, .32, 1));
  box-sizing: border-box;
  width: min(680px, calc(100vw - 48px));
  max-width: none;
  height: min(780px, calc(100dvh - 48px));
  max-height: none;
  margin: auto;
  padding: 0;
  border: 0;
  border-radius: var(--r-lg, 20px);
  background: #fff;
  color: var(--wwbc-ink2);
  font: 400 17px/1.5 var(--font, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif);
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  box-shadow: 0 2px 6px rgba(11, 18, 32, .06), 0 32px 80px rgba(11, 18, 32, .22);
  overflow: hidden;
}
.wwbc *, .wwbc *::before, .wwbc *::after { box-sizing: border-box; }
.wwbc:not([open]) { display: none; }
.wwbc.wwbc-is-booking { width: min(920px, calc(100vw - 48px)); height: min(900px, calc(100dvh - 48px)); }
@media (min-width: 641px) { .wwbc.wwbc-is-booking:has([data-state=fallback]) { height: fit-content; max-height: calc(100dvh - 48px); } }
.wwbc::backdrop { background: rgba(11, 18, 32, .48); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }

.wwbc-panel { display: flex; flex-direction: column; height: 100%; margin: 0; }

/* top: step label, close, progress */
.wwbc-top { position: relative; flex: none; display: grid; grid-template-columns: 1fr auto; align-items: center; padding: 18px 20px 0 28px; }
.wwbc-step { margin: 0; font-size: 14px; font-weight: 600; color: var(--wwbc-muted); font-variant-numeric: tabular-nums; letter-spacing: .01em; }
.wwbc-x { width: 44px; height: 44px; margin-right: -6px; display: grid; place-items: center; border: 0; border-radius: 999px; background: transparent; color: var(--wwbc-ink2); cursor: pointer; }
.wwbc-x:hover { background: var(--wwbc-soft); color: var(--wwbc-ink); }
.wwbc-bar { grid-column: 1 / -1; height: 4px; margin: 12px 8px 0 0; border-radius: 999px; background: var(--wwbc-track); overflow: hidden; }
.wwbc-bar span { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--wwbc-accent-ink); transition: width .35s var(--wwbc-ease); }

/* body */
.wwbc-body:focus-visible { outline: 3px solid var(--wwbc-accent); outline-offset: -3px; }
.wwbc-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 28px 28px 24px; }
.wwbc-h { margin: 0; color: var(--wwbc-ink); font-size: clamp(26px, 4.4vw, 34px); line-height: 1.12; font-weight: 600; letter-spacing: -.024em; text-wrap: balance; outline: none; }
/* the heading takes focus only so screen readers announce each step; it is not a control, so no ring */
.wwbc-h:focus, .wwbc-h:focus-visible { outline: none; }
.wwbc-sub { margin: 10px 0 0; color: var(--wwbc-muted); font-size: 18px; line-height: 1.45; text-wrap: pretty; }
.wwbc-stepwrap > .wwbc-group:first-of-type, .wwbc-stepwrap > .wwbc-field:first-of-type, .wwbc-stepwrap > .wwbc-grid { margin-top: 24px; }

/* option cards (radio groups) */
.wwbc-group { margin: 22px 0 0; padding: 0; border: 0; min-width: 0; }
.wwbc-legend { display: block; padding: 0; margin: 0 0 10px; font-size: 15px; font-weight: 600; color: var(--wwbc-ink); }
.wwbc-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.wwbc-compact .wwbc-cards { grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 8px; }
.wwbc-card { position: relative; display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 14px 16px; border: 1px solid var(--wwbc-line); border-radius: 14px; background: #fff; color: var(--wwbc-ink); font-size: 16px; font-weight: 500; line-height: 1.3; cursor: pointer; transition: border-color .15s, background-color .15s, box-shadow .15s; }
.wwbc-compact .wwbc-card { min-height: 48px; padding: 10px 14px; font-size: 15px; gap: 10px; }
.wwbc-card:hover { border-color: var(--wwbc-faint); background: var(--wwbc-soft); }
.wwbc-card input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
.wwbc-tick { flex: none; width: 20px; height: 20px; border-radius: 999px; border: 1.5px solid var(--wwbc-faint); background: #fff; display: grid; place-items: center; transition: border-color .15s, background-color .15s; }
.wwbc-tick::after { content: ""; width: 8px; height: 8px; border-radius: 999px; background: #fff; transform: scale(0); transition: transform .15s var(--wwbc-ease); }
.wwbc-card:has(input:checked) { border-color: var(--wwbc-ink); background: var(--wwbc-accent-soft); box-shadow: inset 0 0 0 1px var(--wwbc-ink); }
.wwbc-card input:checked + .wwbc-tick { border-color: var(--wwbc-ink); background: var(--wwbc-ink); }
.wwbc-card input:checked + .wwbc-tick::after { transform: scale(1); }
.wwbc-card:has(input:focus-visible) { outline: 3px solid var(--wwbc-accent); outline-offset: 2px; }
.wwbc-invalid .wwbc-card { border-color: rgba(168, 59, 55, .45); }

/* fields */
.wwbc-field { margin: 18px 0 0; }
.wwbc-field > label { display: block; margin: 0 0 6px; font-size: 15px; font-weight: 600; color: var(--wwbc-ink); }
.wwbc-opt { font-weight: 400; color: var(--wwbc-muted); }
.wwbc input[type=text], .wwbc input[type=email], .wwbc input[type=tel], .wwbc textarea, .wwbc select {
  display: block; width: 100%; margin: 0; padding: 13px 14px; border: 1px solid var(--wwbc-line); border-radius: 12px; background: #fff; color: var(--wwbc-ink);
  font: inherit; font-size: 17px; line-height: 1.4; transition: border-color .15s, box-shadow .15s; -webkit-appearance: none; appearance: none;
}
.wwbc textarea { resize: vertical; min-height: 168px; }
.wwbc input:hover, .wwbc textarea:hover, .wwbc select:hover { border-color: var(--wwbc-faint); }
.wwbc input:focus, .wwbc textarea:focus, .wwbc select:focus { outline: none; border-color: var(--wwbc-ink); box-shadow: 0 0 0 3px var(--wwbc-accent-soft), 0 0 0 1px var(--wwbc-ink); }
.wwbc input:focus-visible, .wwbc textarea:focus-visible, .wwbc select:focus-visible { outline: 3px solid var(--wwbc-accent); outline-offset: 1px; }
.wwbc [aria-invalid=true] { border-color: var(--wwbc-err); }
.wwbc-select { position: relative; }
.wwbc-select::after { content: ""; position: absolute; right: 18px; top: 50%; width: 8px; height: 8px; margin-top: -6px; border-right: 1.5px solid var(--wwbc-ink2); border-bottom: 1.5px solid var(--wwbc-ink2); transform: rotate(45deg); pointer-events: none; }
.wwbc select { padding-right: 44px; cursor: pointer; }
.wwbc-row { display: flex; justify-content: space-between; gap: 16px; align-items: baseline; margin-top: 8px; }
.wwbc-hint { margin: 0; font-size: 14px; color: var(--wwbc-muted); }
.wwbc-count { margin: 0; flex: none; font-size: 13px; color: var(--wwbc-muted); font-variant-numeric: tabular-nums; }
.wwbc-err { margin: 6px 0 0; font-size: 14px; font-weight: 500; color: var(--wwbc-err); }
.wwbc-err:empty { display: none; }
.wwbc-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; }
.wwbc-grid .wwbc-field { margin-top: 14px; }

/* review + consent */
.wwbc-review { margin: 22px 0 0; border-top: 1px solid var(--wwbc-track); padding-top: 14px; }
.wwbc-review summary { display: inline-flex; align-items: center; gap: 8px; min-height: 32px; cursor: pointer; font-size: 15px; font-weight: 600; color: var(--wwbc-link); list-style: none; border-radius: 6px; }
.wwbc-review summary::-webkit-details-marker { display: none; }
.wwbc-review summary::after { content: "+"; font-size: 18px; font-weight: 500; line-height: 1; }
.wwbc-review[open] summary::after { content: "−"; }
.wwbc-review summary:focus-visible { outline: 3px solid var(--wwbc-accent); outline-offset: 3px; }
.wwbc-review dl { margin: 10px 0 0; font-size: 15px; }
.wwbc-rv-row { display: grid; grid-template-columns: 130px 1fr auto; gap: 4px 14px; padding: 9px 0; border-bottom: 1px solid var(--wwbc-track); }
.wwbc-rv-row dt { color: var(--wwbc-muted); }
.wwbc-rv-row dd { margin: 0; color: var(--wwbc-ink); overflow-wrap: anywhere; white-space: pre-line; }
.wwbc-rv-row dd:nth-of-type(1) { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.wwbc-link { border: 0; background: none; padding: 2px 4px; color: var(--wwbc-link); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; border-radius: 6px; }
.wwbc-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.wwbc-consent { margin: 18px 0 0; font-size: 14px; color: var(--wwbc-muted); }

/* footer */
.wwbc-foot { flex: none; display: flex; justify-content: space-between; gap: 12px; padding: 16px 28px calc(16px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--wwbc-track); background: #fff; }
.wwbc-foot[hidden] { display: none; }
.wwbc-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 12px 24px; border-radius: 999px; font: inherit; font-size: 16px; font-weight: 500; cursor: pointer; border: 0; transition: background-color .2s, transform .2s var(--wwbc-ease), opacity .2s; }
.wwbc-btn[hidden] { display: none; }
.wwbc-primary { margin-left: auto; background: var(--wwbc-ink); color: #fff; }
.wwbc-primary:hover { background: var(--ink-800, #121c30); }
.wwbc-primary.wwbc-off { background: var(--wwbc-ink); color: #fff; cursor: pointer; }
.wwbc-primary[aria-disabled="true"] { opacity: .75; cursor: progress; }
.wwbc-ghost { background: #fff; color: var(--wwbc-ink); border: 1px solid var(--wwbc-line); }
.wwbc-ghost:hover { background: var(--wwbc-soft); }
.wwbc-btn:focus-visible, .wwbc-x:focus-visible, .wwbc-link:focus-visible { outline: 3px solid var(--wwbc-accent); outline-offset: 3px; }

/* booking screen */
.wwbc-book { position: relative; margin-top: 22px; min-height: 640px; border: 1px solid var(--wwbc-track); border-radius: 16px; overflow: hidden; background: #fff; }
.wwbc-frame { display: block; width: 100%; height: 640px; min-height: 640px; border: 0; background: #fff; }
.wwbc-book:not([data-state=ready]) .wwbc-frame { position: absolute; inset: 0; opacity: 0; }
.wwbc-book[data-state=ready] .wwbc-skel { display: none; }
.wwbc-skel { position: absolute; inset: 0; padding: 28px; display: grid; grid-template-rows: auto auto auto 1fr; gap: 14px; }
.wwbc-skel span { display: block; height: 16px; border-radius: 8px; background: var(--wwbc-soft); }
.wwbc-skel span:nth-child(1) { width: 40%; height: 22px; }
.wwbc-skel span:nth-child(2) { width: 70%; }
.wwbc-skel span:nth-child(3) { width: 55%; }
.wwbc-skel .wwbc-skel-grid { height: auto; min-height: 320px; border-radius: 12px; }
.wwbc-book[data-state=fallback] { min-height: 0; border-style: dashed; border-color: var(--wwbc-line); }
.wwbc-fallback { padding: 28px; text-align: center; }
.wwbc-fallback p { margin: 0; color: var(--wwbc-ink); font-size: 17px; }
.wwbc-fallback p + p { margin-top: 10px; }
.wwbc-fallback a { color: var(--wwbc-link); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.wwbc-same { margin: 14px 0 0; font-size: 15px; color: var(--wwbc-muted); overflow-wrap: anywhere; }
.wwbc-same strong { color: var(--wwbc-ink); font-weight: 600; }

.wwbc-sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; /* allow text-bleed: visually hidden screen-reader text */ border: 0; }

/* motion: only when the visitor allows it */
@media (prefers-reduced-motion: no-preference) {
  .wwbc[open] { animation: wwbc-in .28s var(--wwbc-ease); }
  .wwbc[open]::backdrop { animation: wwbc-fade .28s ease; }
  .wwbc-body.wwbc-enter > * { animation: wwbc-step .3s var(--wwbc-ease); }
  .wwbc-skel span { animation: wwbc-pulse 1.4s ease-in-out infinite; }
}
@media (prefers-reduced-motion: reduce) {
  .wwbc *, .wwbc *::before, .wwbc *::after { transition: none !important; animation: none !important; }
}
@keyframes wwbc-in { from { opacity: 0; transform: translateY(12px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes wwbc-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes wwbc-step { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: none; } }
@keyframes wwbc-pulse { 50% { opacity: .55; } }

/* phone: full screen */
@media (max-width: 640px) {
  .wwbc, .wwbc.wwbc-is-booking { width: 100vw; height: 100vh; height: 100dvh; max-width: 100vw; max-height: 100dvh; margin: 0; border-radius: 0; }
  .wwbc-top { padding: 10px 12px 0 20px; }
  .wwbc-body { padding: 22px 20px 20px; }
  .wwbc-foot { padding: 12px 20px calc(12px + env(safe-area-inset-bottom, 0px)); }
  .wwbc-cards { grid-template-columns: 1fr; gap: 8px; }
  .wwbc-compact .wwbc-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wwbc-card { min-height: 56px; }
  .wwbc-grid { grid-template-columns: 1fr; }
  .wwbc-rv-row { grid-template-columns: 1fr auto; }
  .wwbc-rv-row dt { grid-column: 1 / -1; font-size: 13px; }
  .wwbc-sub { font-size: 17px; }
  .wwbc-btn { flex: 1 1 auto; min-width: 0; }
  .wwbc-ghost { flex: 0 0 auto; }
  .wwbc-is-booking .wwbc-body { padding: 18px 12px 16px; }
  .wwbc-is-booking .wwbc-h, .wwbc-is-booking .wwbc-sub, .wwbc-is-booking .wwbc-same { padding: 0 8px; }
  .wwbc-book { margin-top: 16px; min-height: calc(100dvh - 200px); border-radius: 12px; }
  .wwbc-frame { height: calc(100dvh - 200px); min-height: 560px; }
  @media (prefers-reduced-motion: no-preference) { .wwbc[open] { animation: wwbc-up .3s var(--wwbc-ease); } }
}
@keyframes wwbc-up { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
.wwbc-unsaved { margin: 6px 0 0; font-size: 14px; line-height: 1.45; color: #6b4a12; background: #fdf3e4; border-radius: 10px; padding: 8px 12px; }

/* v28 booking: founder card + our own slot picker */
.wwbc-founder { display: flex; align-items: center; gap: 12px; margin-top: 14px; }
.wwbc-avatar { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: #fdf0e3; color: #9a5414; font-weight: 700; font-size: 15px; flex: none; }
.wwbc-fname { margin: 0; font-weight: 650; color: var(--wwbc-ink); font-size: 16px; }
.wwbc-frole { margin: 2px 0 0; font-size: 14px; color: var(--wwbc-muted); }
.wwbc-frole a { color: #0a66c2; font-weight: 600; }
.wwbc-preview { margin: 14px 0 0; font-size: 13.5px; color: #6b4a12; background: #fdf3e4; border-radius: 10px; padding: 8px 12px; }
.wwbc-slots { margin-top: 20px; }
.wwbc-days { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.wwbc-day { flex: none; border: 1px solid var(--wwbc-line); background: #fff; border-radius: 12px; padding: 10px 14px; font-size: 14.5px; font-weight: 600; color: var(--wwbc-ink); cursor: pointer; }
.wwbc-day.is-on { background: var(--wwbc-ink); color: #fff; border-color: var(--wwbc-ink); }
.wwbc-times { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
@media (max-width: 520px) { .wwbc-times { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.wwbc-slot { border: 1px solid var(--wwbc-line); background: #fff; border-radius: 12px; padding: 12px 8px; font-size: 15.5px; font-weight: 600; color: var(--wwbc-ink); cursor: pointer; font-variant-numeric: tabular-nums; }
.wwbc-slot:hover { border-color: #e8852a; }
.wwbc-slot.is-on { background: #e8852a; border-color: #e8852a; color: #0b1220; }
.wwbc-tz { margin: 16px 0 0; font-size: 13.5px; color: var(--wwbc-muted); }
.wwbc-done { text-align: center; padding: 24px 0 8px; }
.wwbc-done .wwbc-founder { justify-content: center; margin-top: 22px; }
.wwbc-done-tick { width: 56px; height: 56px; border-radius: 50%; background: #e8852a; color: #fff; display: inline-grid; place-items: center; margin-bottom: 14px; }
.wwbc-when { margin: 10px 0 0; font-size: 20px; font-weight: 650; color: var(--wwbc-ink); }
.wwbc-primary[disabled] { opacity: .45; cursor: not-allowed; }
.wwbc.wwbc-is-booking:not(:has(.wwbc-book)) { height: fit-content; max-height: calc(100dvh - 48px); }
.wwbc-unsaved p { margin: 0; }
.wwbc-unsaved p + p { margin-top: 6px; }
.wwbc-unsaved a { color: inherit; text-decoration: underline; }
