/* Pattern Systems booking pages (agents: widget, then bookpages, 2026-10-07).
   The page loads the site's own stylesheet first, and the card is drawn with the
   Work With Us card's own markup and classes (BookingFlow.tsx: .bf, .bf-split,
   .bf-times, .bf-summary and its Tailwind utilities), so its look comes from the
   site, light and dark included. This file only adds what the site has no class
   for: the Monday to Friday grid, the page layout, the client tiles, the idle
   nudge, and the rules that keep the site's app to its header, footer and chat. */

/* ── The site's app on these pages ──────────────────────────────────────────
   The site's JS mounts its whole app into #root: header, the 404 page for a
   route it does not know, footer, phone bar, chat. Here the body is a column and
   the app's pieces join it: its live header on top (the static copy painted first
   is swapped for it by widget.js), our page in the middle, its footer at the
   bottom. Its 404 page, phone bar and bottom fade are hidden, and so is its
   "Book a discovery call" button: the visitor is already booking. The site's own
   chat bubble gives way to ours (widget.js). */
body.psb-body { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
#root, #root > div { display: contents; }
#ps-header, #root > div > header { order: -1; }
.psb-page { order: 1; }
#root > div > footer { order: 2; }
#root > div > main,
#root > div > .scrim-bottom,
#root .hide-while-booking,
#root [data-nudge],
#root header a.btn-grad-border[href="/work-with-us"] { display: none !important; }

/* Monday to Friday makes the calendar narrower, so the card is set narrower than on
   Work With Us (Haydn: taller than it is wide). The site puts the day's times beside
   the calendar from a 28rem card; these are the site's same three rules, from 24rem. */
@container bf (min-width: 24rem) {
  .psb .bf-split--when { grid-template-columns: minmax(0, 1fr) 8.5rem; column-gap: 1.25rem; }
  .psb .bf-times-head { height: 2.75rem; flex-direction: column; align-items: flex-start; justify-content: center; gap: 0; line-height: 1.25; }
  .psb .bf-times-list {
    grid-template-columns: minmax(0, 1fr); gap: 0.375rem; max-height: 15rem;
    overflow-y: auto; overscroll-behavior: contain; padding: 2px 8px 2px 2px; margin: -2px;
  }
}

/* Tailwind's grid-cols-5, which the site's build does not carry: the weekday grid. */
.grid-cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
/* The honeypot field: off screen for people, there for bots. */
.psb-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ── Layout ─────────────────────────────────────────────────────────────── */
.psb-section { padding-top: 1.5rem; padding-bottom: 2.5rem; }
.psb-title { line-height: 1.15; }
.psb-strap { text-wrap: balance; }
.psb-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.75rem;
  max-width: 48rem;
  margin: 1.75rem auto 0;
}
@media (min-width: 1024px) {
  .psb-layout { max-width: none; grid-template-columns: 27rem minmax(0, 1fr); gap: 1.5rem; align-items: start; }
}
/* On a phone the page can scroll its last line clear of the chat button. */
@media (max-width: 767px) { .psb-section { padding-bottom: 5.5rem; } }

/* ── The client tiles: a video, and a written review beside or beneath it ──
   Haydn's rule (2026-10-07): stars at the top, the opening lines, a quiet "Read
   more" where it runs over (opens in place), review text a size down from the
   body. Desktop: three up, video above review, every box the same fixed height,
   name and business in every box. Phone: video beside review, the box exactly the
   video's height (widget.js sets it), name and business once under the pair. */
.psb-proof { min-width: 0; }
.psb-proof-h { margin: 0 0 0.75rem; font-size: 0.98rem; letter-spacing: -0.02em; }
.psb-tiles { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.25rem; }
.psb-tile { display: grid; grid-template-columns: 9.5rem minmax(0, 1fr); gap: 0.75rem; align-items: start; min-width: 0; }
.psb-tile figure { margin: 0; min-width: 0; }
.psb-tile-cap { margin-top: 0.5rem; line-height: 1.3; }
.psb-tile-quote { display: flex; flex-direction: column; overflow: hidden; padding: 0.75rem; }
@media (hover: hover) { .psb-tile-quote.ps-card:hover { transform: none; } }
.psb-tile-quote > .text-star { flex: none; }
.psb-quote-text {
  flex: 1 1 auto; min-height: 0; margin: 0.35rem 0 0; overflow: hidden;
  font-size: 0.8rem; line-height: 1.5;
  display: -webkit-box; -webkit-box-orient: vertical;
}
.psb-quote-by { flex: none; margin-top: 0.55rem; line-height: 1.35; }
.psb-tile-by { grid-column: 1 / -1; margin: -0.35rem 0 0; line-height: 1.45; }
.psb-tile-quote.is-open { height: auto; overflow: visible; }
.psb-tile-quote.is-open .psb-quote-text { display: block; overflow: visible; -webkit-line-clamp: unset !important; line-clamp: none !important; }
/* "Read more": a small, quiet text link in the site's muted grey; no chrome, no
   underline until hover. */
.psb-more {
  flex: none; align-self: flex-start;
  margin: 0.3rem 0 0; padding: 0; min-height: 0;
  background: none; border: 0; border-radius: 0; box-shadow: none; cursor: pointer;
  font: inherit; font-size: 0.72rem; font-weight: 500; line-height: 1.4;
  color: rgb(var(--muted)); text-decoration: none;
}
.psb-more:hover { color: rgb(var(--ink)); text-decoration: underline; text-underline-offset: 3px; }
.psb-more:focus-visible { outline: 2px solid rgb(var(--ink)); outline-offset: 2px; border-radius: 2px; }
.psb-more[hidden] { display: none; }

@media (max-width: 1023px) {
  .psb-tile-cap, .psb-quote-by { display: none; }
}
@media (min-width: 1024px) {
  .psb-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.75rem; }
  .psb-tile { grid-template-columns: minmax(0, 1fr); gap: 0.5rem; align-items: start; }
  /* Shorter tiles so the first screen fits 1440x900: the frame is cropped to 3:4
     (faces stay centred); on a phone the videos keep their full 9:16. */
  .psb-tile video { aspect-ratio: 3 / 4; }
  .psb-tile-cap .text-sm { font-size: 0.8rem; }
  .psb-tile-cap .text-xs { font-size: 0.7rem; }
  .psb-tile-quote { height: 19rem; padding: 0.7rem; }
  .psb-quote-by { margin-top: auto; padding-top: 0.5rem; font-size: 0.7rem; }
  .psb-tile-by { display: none; }
}

/* ── The idle nudge, beside or above the chat button ─────────────── */
.psb-nudge {
  position: fixed;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 0.15rem;
  width: max-content;
  max-width: calc(100vw - 2rem);
  padding: 0.25rem 0.25rem 0.25rem 1rem;
  border: 1px solid rgb(var(--line));
  border-radius: 1rem;
  background: rgb(var(--paper));
  color: rgb(var(--ink));
  font-family: "Inter", system-ui, sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  opacity: 0;
  pointer-events: none;
}
.psb-nudge.is-on { opacity: 1; pointer-events: auto; animation: psb-pop 280ms cubic-bezier(0.23, 1, 0.32, 1) both; }
.psb-nudge.is-off { animation: psb-pop-out 240ms cubic-bezier(0.4, 0, 1, 1) forwards; }
.psb-nudge[data-side="left"] { transform-origin: right center; }
.psb-nudge[data-side="top"] { transform-origin: bottom right; }
@keyframes psb-pop { from { opacity: 0; transform: scale(0.9); } to { opacity: 1; transform: none; } }
@keyframes psb-pop-out { from { opacity: 1; } to { opacity: 0; transform: scale(0.92); } }
@media (prefers-reduced-motion: reduce) { .psb-nudge.is-on, .psb-nudge.is-off { animation: none; } }
.psb-nudge button { background: none; border: 0; cursor: pointer; color: inherit; font: inherit; }
.psb-nudge-go { padding: 0.5rem 0; min-height: 2.5rem; }
.psb-nudge-x {
  display: flex; align-items: center; justify-content: center;
  width: 2.25rem; height: 2.25rem; border-radius: 50%;
  font-size: 1rem !important; line-height: 1; color: rgb(var(--muted)) !important;
}
.psb-nudge-x:hover { color: rgb(var(--ink)) !important; }
.psb-nudge :focus-visible { outline: 2px solid rgb(var(--ink)); outline-offset: 2px; border-radius: 0.5rem; }
.psb-nudge-tail {
  position: absolute;
  width: 0.875rem; height: 0.875rem;
  background: rgb(var(--paper));
  border: solid rgb(var(--line));
  border-width: 0 1px 1px 0;
}
.psb-nudge[data-side="top"] .psb-nudge-tail { bottom: -7px; right: 22px; transform: rotate(45deg); }
.psb-nudge[data-side="left"] .psb-nudge-tail { right: -7px; top: calc(50% - 7px); transform: rotate(-45deg); }

/* The core offer above the card (Haydn, 11 Nov 2026). Own styles: the page loads an older site stylesheet. */
.psb-offer { max-width: 30ch; margin-inline: auto; font-size: clamp(1.9rem, 4.4vw, 3.1rem); font-weight: 600; line-height: 1.06; letter-spacing: -0.03em; text-wrap: balance; }
.psb-sub { max-width: 58ch; margin: 0.85rem auto 0; font-size: 1.06rem; }
.psb-guar { max-width: 40rem; margin: 1.5rem auto 0; text-align: left; }
.psb-guar ul { display: grid; gap: 0.75rem; margin: 0; padding: 0; list-style: none; }
.psb-guar li { display: flex; gap: 0.75rem; font-size: 1rem; line-height: 1.35; text-wrap: pretty; }
.psb-tick { flex-shrink: 0; display: flex; align-items: center; justify-content: center; width: 1.25rem; height: 1.25rem; margin-top: 0.1rem; border-radius: 999px; background: rgb(var(--ink)); color: rgb(var(--paper)); }
.psb-note { margin-top: 0.5rem; }
.psb-note summary { display: inline-flex; align-items: center; gap: 0.375rem; min-height: 2.75rem; padding-left: 2rem; cursor: pointer; list-style: none; font-size: 0.875rem; font-weight: 600; color: rgb(var(--muted)); text-decoration: underline; text-decoration-color: rgb(var(--line)); text-underline-offset: 4px; transition: color .15s, text-decoration-color .15s; }
.psb-note summary::-webkit-details-marker { display: none; }
@media (hover: hover) { .psb-note summary:hover { color: rgb(var(--ink)); text-decoration-color: rgb(var(--ink)); } }
.psb-chev { transition: transform .2s cubic-bezier(.23,1,.32,1); }
.psb-note[open] .psb-chev { transform: rotate(180deg); }
.psb-note > div { padding-left: 2rem; margin-top: 0.25rem; font-size: 0.875rem; line-height: 1.6; color: rgb(var(--muted)); text-wrap: pretty; }
.psb-note > div p + p { margin-top: 0.5rem; }
.psb-strap--call { margin-top: 1.75rem; }
.psb-guar--compact { max-width: none; margin: 1.75rem 0 0; padding-top: 1.25rem; border-top: 1px solid rgb(var(--line)); }
.psb-guar--compact li { font-size: 0.88rem; gap: 0.625rem; }
.psb-guar--compact .psb-note summary, .psb-guar--compact .psb-note > div { font-size: 0.82rem; padding-left: 1.875rem; }
