/* =========================================================================
   The call booking's look, shared by /audit (the quiz, after css/audit.css)
   and /thanks (after the contact form, inside a .qz-book box on the site's
   own design system). Drawn by js/book-widget.js: the question, the name /
   phone / email fields, the buttons, the month calendar then the day's
   times, and the "You're booked" card. Moved here from css/audit.css as is,
   so /audit looks exactly as before.
   ========================================================================= */

/* A page without css/audit.css (/thanks) wraps the booking in .qz-book: the
   quiz's tokens and base, scoped to that box so the rest of the page keeps
   its own (the values are css/audit.css's :root: keep the two in step).
   :where() keeps the base rules weaker than any qz-* class. */
.qz-book {
  --bg: #fffdf4;
  --bg-2: #f7f5ec;
  --card: #ffffff;
  --ink: #1a1a1a;
  --ink-2: #5f5f59;
  --muted: #6d6d64;
  --line: rgba(26, 26, 26, 0.13);
  --line-2: rgba(26, 26, 26, 0.26);
  --accent: #d65a3c;
  --accent-hover: #c14a30;
  --accent-soft: rgba(214, 90, 60, 0.09);
  --font-display: 'EB Garamond', 'EB Garamond Fallback', Georgia, 'Times New Roman', serif;
  --font-body: 'Figtree', 'Figtree Fallback', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --gutter: 20px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --t: 160ms ease-out;
  --shadow: 0 1px 2px rgba(26, 26, 26, 0.05), 0 4px 14px rgba(26, 26, 26, 0.05);
  color: var(--ink); font-family: var(--font-body); font-size: 17px; line-height: 1.5;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; -webkit-tap-highlight-color: transparent;
}
:where(.qz-book) *, :where(.qz-book) *::before, :where(.qz-book) *::after { box-sizing: border-box; }
:where(.qz-book) button, :where(.qz-book) input { font: inherit; color: inherit; }
:where(.qz-book) button { cursor: pointer; background: none; border: 0; }
:where(.qz-book) a { color: inherit; }
:where(.qz-book) :focus-visible { outline: 2.5px solid var(--accent); outline-offset: 3px; }
:where(.qz-book) [hidden] { display: none !important; }
/* read by screen readers only (/thanks' status line) */
.qz-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

@keyframes qz-in { from { opacity: 0; transform: translateX(22px); } to { opacity: 1; transform: none; } }

/* ---------------------------------------------------------------- the question */
.qz-who { display: flex; align-items: center; gap: 10px; margin-bottom: 22px; font-size: 14px; color: var(--ink-2); }
.qz-who__me {
  flex: none; width: 40px; height: 40px; border-radius: 50%; overflow: hidden;
  background: var(--bg-2); box-shadow: 0 0 0 2px var(--bg), 0 0 0 3.5px var(--accent);
}
.qz-who__me img { width: 100%; height: auto; transform: translateY(-1px) scale(2.1); transform-origin: 50% 0; }
.qz-who b { color: var(--ink); font-weight: 700; }
@media (min-width: 1024px) { .qz-who { display: none; } }

.qz-kicker {
  display: inline-block; margin-bottom: 12px;
  font-size: 12.5px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent);
}
.qz-q {
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(34px, 9vw, 52px); line-height: 1.04; letter-spacing: -0.022em; text-wrap: balance;
}
.qz-q:focus { outline: none; }
.qz-hint { margin-top: 12px; max-width: 46ch; font-size: 17px; line-height: 1.5; color: var(--ink-2); text-wrap: pretty; }

.qz-body { margin-top: 26px; }

/* ---------------------------------------------------------------- fields */
.qz-fields { display: grid; gap: 14px; }
.qz-label { display: block; margin-bottom: 7px; font-size: 15px; font-weight: 700; }
.qz-label small { font-size: 13.5px; font-weight: 500; color: var(--muted); }
.qz-field {
  display: block; width: 100%; height: 58px; padding: 0 18px;
  border: 1.5px solid var(--line-2); border-radius: 14px; background: var(--card);
  font-size: 18px; font-weight: 500; letter-spacing: -0.005em;
  transition: border-color var(--t), box-shadow var(--t);
  -webkit-appearance: none; appearance: none;
}
.qz-field::placeholder { color: #a9a89e; font-weight: 400; }
.qz-field:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 4px rgba(26, 26, 26, 0.07); }
.qz-field[aria-invalid="true"] { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(214, 90, 60, 0.13); }
.qz-error { min-height: 0; margin-top: 6px; font-size: 14.5px; font-weight: 600; color: var(--accent-hover); }
.qz-error:empty { display: none; }
.qz-fine { margin-top: 14px; font-size: 13.5px; line-height: 1.5; color: var(--muted); }
/* a link in a line of text (the privacy policy, the email address) reads as one on /thanks too, where the site's own
   css resets links to no underline; on /audit this is the browser's own look */
.qz-fine a, .qz-note a { text-decoration: underline; }

/* ---------------------------------------------------------------- buttons */
.qz-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin-top: 22px; }
.qz-next {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; height: 58px; padding: 0 26px; border-radius: 14px;
  background: var(--accent); color: #fff; font-size: 17px; font-weight: 700; text-decoration: none;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.25) inset, 0 6px 16px rgba(214, 90, 60, 0.24);
  transition: background var(--t), transform var(--t), box-shadow var(--t), opacity var(--t);
}
.qz-next:hover { background: var(--accent-hover); }
.qz-next:active { transform: scale(0.985); }
.qz-next[disabled] { opacity: 0.55; cursor: default; transform: none; box-shadow: none; }
.qz-next .arrow { transition: transform var(--t); }
.qz-next:hover .arrow { transform: translateX(3px); }
@media (min-width: 600px) { .qz-next { width: auto; min-width: 200px; } }
.qz-link {
  font-size: 15px; font-weight: 600; color: var(--ink-2);
  text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 4px;
  transition: color var(--t), text-decoration-color var(--t);
}
.qz-link:hover { color: var(--ink); text-decoration-color: var(--accent); }
.qz-spin { width: 18px; height: 18px; border: 2.5px solid rgba(255, 255, 255, 0.45); border-top-color: #fff; border-radius: 50%; animation: qz-spin 0.8s linear infinite; }
@keyframes qz-spin { to { transform: rotate(360deg); } }

/* ---------------------------------------------------------------- the option card (the quiz's answers; "As soon as possible") */
.qz-opt {
  position: relative; display: flex; align-items: center; gap: 12px; min-height: 62px; padding: 14px 16px;
  border: 1.5px solid var(--line); border-radius: 16px; background: var(--card); box-shadow: var(--shadow);
  text-align: left; font-size: 16.5px; font-weight: 600; line-height: 1.25;
  transition: border-color var(--t), background var(--t), transform var(--t), box-shadow var(--t);
}
.qz-opt.is-wide { grid-column: 1 / -1; }
.qz-opt:hover { border-color: var(--line-2); }
.qz-opt:active { transform: scale(0.98); }
.qz-opt[aria-pressed="true"] { border-color: var(--accent); background: #fff8f4; box-shadow: 0 0 0 3px rgba(214, 90, 60, 0.14); }
.qz-opt__tick {
  position: absolute; top: 9px; right: 9px; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%;
  background: var(--accent); color: #fff; transform: scale(0); transition: transform 0.3s var(--ease);
}
.qz-opt[aria-pressed="true"] .qz-opt__tick { transform: scale(1); }
.qz-ico { width: 26px; height: 26px; color: var(--ink); flex: none; }
.qz-opt[aria-pressed="true"] .qz-ico { color: var(--accent); }
.qz-or { display: flex; align-items: center; gap: 12px; margin: 18px 0 12px; font-size: 13px; color: var(--muted); }
.qz-or::before, .qz-or::after { content: ''; flex: 1; height: 1px; background: var(--line); }

/* ---------------------------------------------------------------- the calendar */
/* "As soon as possible" (no time: Noah calls them as soon as he can): under the calendar, after an "or" */
.qz-asap { width: 100%; gap: 14px; min-height: 74px; padding: 14px 44px 14px 16px; }
.qz-asap .qz-ico { color: var(--accent); }
.qz-asap__words { display: grid; gap: 3px; }
.qz-asap__sub { font-size: 14.5px; font-weight: 500; line-height: 1.35; color: var(--ink-2); }
.qz-asap .qz-opt__tick { top: 50%; right: 14px; margin-top: -10px; }
.qz-or + .qz-asap { margin-top: 0; }
.qz-tz { display: flex; align-items: center; gap: 7px; margin-top: 14px; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.qz-tz svg { color: var(--accent); flex: none; }
.qz-month {
  margin-top: 18px; padding: 14px 12px 12px; border: 1.5px solid var(--line); border-radius: 20px;
  background: var(--card); box-shadow: var(--shadow); animation: qz-in 0.35s var(--ease) both;
}
.qz-month__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 4px 12px; }
.qz-month__title { font-size: 18px; font-weight: 800; letter-spacing: -0.01em; }
.qz-month__nav { display: flex; gap: 6px; }
.qz-month__arrow {
  display: grid; place-items: center; width: 40px; height: 40px; border: 1.5px solid var(--line); border-radius: 50%;
  background: var(--card); color: var(--ink); transition: border-color var(--t), transform var(--t), opacity var(--t);
}
.qz-month__arrow:hover:not(:disabled) { border-color: var(--line-2); }
.qz-month__arrow:active:not(:disabled) { transform: scale(0.94); }
.qz-month__arrow:disabled { opacity: 0.3; cursor: default; }
.qz-month__grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.qz-month__wd { padding: 2px 0 8px; text-align: center; font-size: 12.5px; font-weight: 700; color: var(--muted); }
.qz-month__day {
  position: relative; display: grid; place-items: center; min-width: 0; height: 46px; border-radius: 12px;
  font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; color: rgba(26, 26, 26, 0.3);
  transition: background var(--t), color var(--t), transform var(--t);
}
.qz-month__day:disabled { cursor: default; }
.qz-month__day.is-open { background: var(--accent-soft); color: var(--ink); font-weight: 800; }
.qz-month__day.is-open:hover { background: var(--accent); color: #fff; }
.qz-month__day.is-open:active { transform: scale(0.94); }
.qz-month__day.is-today::after { content: ''; position: absolute; bottom: 6px; left: 50%; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: currentColor; }
@media (min-width: 600px) { .qz-month { padding: 18px 16px 16px; } .qz-month__day { height: 52px; } }
.qz-daytimes { margin-top: 14px; animation: qz-in 0.35s var(--ease) both; }
.qz-daytimes__back {
  display: inline-flex; align-items: center; gap: 7px; padding: 8px 0; font-size: 15px; font-weight: 700; color: var(--ink-2);
  transition: color var(--t);
}
.qz-daytimes__back:hover { color: var(--accent); }
.qz-daytimes__h { margin: 6px 0 14px; font-size: 19px; line-height: 1.3; color: var(--ink-2); }
.qz-daytimes__h b { color: var(--ink); font-weight: 800; }
.qz-daytimes__h:focus { outline: none; }
.qz-times { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
@media (min-width: 600px) { .qz-times { grid-template-columns: repeat(4, 1fr); } }
.qz-time {
  height: 50px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--card);
  font-size: 15.5px; font-weight: 700; font-variant-numeric: tabular-nums;
  transition: border-color var(--t), background var(--t), color var(--t), transform var(--t);
}
.qz-time:hover { border-color: var(--accent); color: var(--accent); }
.qz-time:active { transform: scale(0.96); }
.qz-time[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.qz-skel { margin-top: 18px; }
.qz-skel i { display: block; height: 360px; border-radius: 20px; background: linear-gradient(90deg, #f1efe4 25%, #faf8ef 50%, #f1efe4 75%); background-size: 200% 100%; animation: qz-shimmer 1.2s linear infinite; }
@keyframes qz-shimmer { to { background-position: -200% 0; } }
.qz-confirm {
  position: sticky; bottom: 0; z-index: 5; margin: 22px calc(-1 * var(--gutter)) 0;
  padding: 14px var(--gutter) calc(14px + env(safe-area-inset-bottom));
  background: rgba(255, 253, 244, 0.96); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border-top: 1px solid var(--line); animation: qz-up 0.35s var(--ease) both;
}
@keyframes qz-up { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.qz-confirm__when { margin-bottom: 10px; font-size: 15px; color: var(--ink-2); }
.qz-confirm__when b { color: var(--ink); }
@media (min-width: 1024px) { .qz-confirm { position: static; margin: 22px 0 0; padding: 0; background: none; border: 0; backdrop-filter: none; -webkit-backdrop-filter: none; } }
.qz-note { margin-top: 16px; padding: 14px 16px; border-radius: 14px; background: var(--bg-2); font-size: 15px; line-height: 1.5; }
.qz-note .qz-actions { margin-top: 12px; }

/* ---------------------------------------------------------------- done */
.qz-done-mark { display: grid; place-items: center; width: 64px; height: 64px; margin-bottom: 22px; border-radius: 50%; background: var(--accent); color: #fff; animation: qz-pop 0.5s var(--ease) both; }
.qz-done-mark path { stroke-dasharray: 30; stroke-dashoffset: 30; animation: qz-draw 0.45s 0.25s var(--ease) forwards; }
@keyframes qz-pop { from { transform: scale(0.6); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes qz-draw { to { stroke-dashoffset: 0; } }
.qz-card { margin-top: 24px; padding: 18px 20px; border: 1.5px solid var(--line); border-radius: 18px; background: var(--card); box-shadow: var(--shadow); }
.qz-card__row { display: flex; gap: 12px; padding: 8px 0; font-size: 16px; }
.qz-card__row + .qz-card__row { border-top: 1px solid var(--line); }
.qz-card__row svg { flex: none; margin-top: 2px; color: var(--accent); }
.qz-card__row b { font-weight: 700; }
.qz-cal { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.qz-cal a, .qz-cal button {
  display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 16px; border: 1.5px solid var(--line-2); border-radius: 12px;
  background: var(--card); font-size: 15px; font-weight: 700; text-decoration: none; transition: border-color var(--t);
}
.qz-cal a:hover, .qz-cal button:hover { border-color: var(--ink); }

@media (prefers-reduced-motion: reduce) {
  .qz-done-mark path { stroke-dashoffset: 0; }
}
