/* /book/ on the new design system: loaded on top of site.css (build.mjs, newDesign). Markup and styles only: the booking
   widget's behaviour, ids, names and data attributes belong to app.js and the booking functions. The calendar and form
   sit in the main column, with who you'll talk to above them; what to expect sits in the margin. */
.bk-founder { display: flex; align-items: center; gap: 12px; margin-top: var(--s3); }
.bk-founder img { flex: none; width: 48px; height: 60px; object-fit: cover; border-radius: 2px; }
.bk-founder p { line-height: 1.4; }
.bk-founder b { font-weight: 600; }
.bk-founder span { display: block; font-size: var(--t-small); color: var(--muted); }
.book-alt { margin-top: var(--s2); }
/* The header's "Book a call" leads here: on this page it has nothing to do. */
.header-book { display: none; }
.book-alt a { font-weight: 600; text-underline-offset: 4px; }
.book-layout { margin-top: var(--s4); }
.book-aside { grid-row: 1; align-self: start; }
/* The email block (no JavaScript, or until times load) and the calendar share one box, tall enough for the calendar's
   longest four weeks with nothing picked yet, so the margin and the footer never move when times arrive. */
.has-js .book-main { min-height: 696px; }
.book-fallback > * + * { margin-top: var(--s2); }
.book-fallback h2 { font-size: var(--t-h3); font-weight: 600; line-height: 1.2; }
.booker[hidden], .book-fallback[hidden], .bk-form[hidden], .bk-result[hidden], .bk-next[hidden], .bk-zone-pick[hidden], .bk-meet[hidden], .bk-alts[hidden], .bk-chosen:empty { display: none; }
.ba-call { margin-top: var(--s4); }
.ba-call h2, .bk-next h3 { font-size: var(--t-body); font-weight: 600; line-height: 1.5; }
/* What happens on the call: a real sequence of three steps */
.call-steps { margin-top: var(--s1); display: grid; gap: var(--s1); counter-reset: step; }
.call-steps li { counter-increment: step; display: grid; grid-template-columns: 1.6em minmax(0, 1fr); }
.call-steps li::before { content: counter(step); font-weight: 600; }
/* Once booked, the steps follow the confirmation instead of sitting in the margin */
.book-layout:has(#bk-next:not([hidden])) .ba-call, .bk-next:not([hidden]) ~ .bk-email-alt { display: none; }
.bk-next { margin-top: var(--s4); }
.bk-next .text-link { margin-top: var(--s2); font-weight: 600; }

/* Time zone line */
.bk-zone { color: var(--muted); }
.bk-zone b { color: var(--ink); }
.bk-link { min-height: 44px; padding: 0 4px; border: 0; background: none; color: var(--ink); font-weight: 600; text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }
.bk-zone-pick { margin-top: var(--s1); display: grid; gap: 6px; max-width: 360px; }
.bk-zone-pick select { min-height: 44px; padding: 8px 12px; border: 1px solid var(--muted); border-radius: 6px; background: var(--paper); font: inherit; color: var(--ink); }

/* The three numbered steps (a real sequence) */
.booker fieldset { margin: var(--s3) 0 0; padding: 0; border: 0; min-width: 0; }
.booker fieldset + fieldset { margin-top: var(--s4); }
.bk-step { display: flex; align-items: center; gap: var(--s1); padding: 0; margin-bottom: var(--s2); font-size: var(--t-lead); font-weight: 600; }
.bk-step span { display: inline-grid; place-items: center; width: 28px; height: 28px; border: 1px solid var(--ink); border-radius: 50%; font-size: var(--t-small); }
.bk-hint { color: var(--muted); }

/* Days: a Monday-first calendar of three weeks */
.bk-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: var(--s1); }
.bk-days.bk-days-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.bk-days input, .bk-times input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.bk-pad { display: block; }
.bk-day { display: flex; flex-direction: column; align-items: center; gap: 1px; min-height: 64px; padding: 8px 4px; border: 1px solid var(--control-border); border-radius: 6px; background: var(--paper); cursor: pointer; text-align: center; }
.bk-day span, .bk-day small { font-size: var(--t-small); color: var(--muted); }
.bk-day b { font-size: var(--t-lead); font-weight: 600; line-height: 1.2; }
.bk-day:hover { border-color: var(--ink); }
.bk-day.none { cursor: default; border-style: dashed; border-color: var(--rule); color: var(--muted); }
.bk-day.none:hover { border-color: var(--rule); }
.bk-days input:checked + .bk-day, .bk-times input:checked + .bk-time { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.bk-days input:checked + .bk-day span, .bk-days input:checked + .bk-day small { color: var(--paper); }
.bk-days input:focus-visible + .bk-day, .bk-times input:focus-visible + .bk-time { outline: 2px solid var(--ink); outline-offset: 3px; }

/* Times */
.bk-times { display: flex; flex-wrap: wrap; gap: var(--s1); }
.bk-time { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 96px; padding: 0 16px; border: 1px solid var(--control-border); border-radius: 6px; background: var(--paper); font: inherit; font-weight: 600; color: var(--ink); cursor: pointer; }
.bk-time:hover { border-color: var(--ink); }
.bk-none { margin-top: var(--s2); color: var(--muted); }
.bk-none a { color: var(--ink); font-weight: 600; text-underline-offset: 4px; }

/* Details */
.bk-form { margin-top: var(--s4); max-width: 36em; }
.bk-chosen { margin-bottom: var(--s2); padding-left: 15px; border-left: 1px solid var(--rule); font-weight: 600; }
.bk-form .btn { margin-top: var(--s3); }
.bk-trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
/* Cloudflare Turnstile: a fixed minimum size so the widget never renders into a box with no layout (README) */
.bk-check-field { margin-top: var(--s2); }
.bk-check { min-height: 72px; min-width: 300px; margin-inline: min(0px, calc((100% - 300px) / 2)); }
.bk-check-fallback .bk-check { display: none; min-height: 0; }

/* Result */
.bk-result { margin-top: var(--s3); padding: var(--s3); border: 1px solid var(--rule); border-radius: 2px; }
.bk-result[data-kind="confirmed"] { border-color: var(--ink); }
.bk-result > * + * { margin-top: var(--s1); }
.bk-result-label { display: block; font-size: var(--t-small); color: var(--muted); }
.bk-result h3 { font-size: var(--t-h3); font-weight: 600; line-height: 1.2; }
.bk-meet a, .bk-email-alt a { font-weight: 600; text-underline-offset: 4px; }
.bk-alts, .bk-result-actions { display: flex; flex-wrap: wrap; gap: var(--s1); margin-top: var(--s2); }
.bk-result-actions .small { font-size: var(--t-small); color: var(--muted); }
.bk-email-alt { margin-top: var(--s4); color: var(--muted); }

@media (max-width: 899px) {
  .has-js .book-main { min-height: 680px; }
  .book-aside { grid-row: auto; margin-top: var(--s4); }
  /* Phones: the facts repeat the founder line, so the margin keeps only the call's steps */
  .book-aside .ba-facts { display: none; }
  .ba-call { margin-top: 0; }
  .bk-days { gap: 4px; }
  .bk-day { min-height: 56px; padding: 6px 2px; }
}

/* Seven calendar columns cannot keep 44px targets on narrow phones. Scroll the dates inside the picker. */
@media (max-width: 399px) {
  .bk-days:not(.bk-days-5) { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 60px; max-width: 100%; overflow-x: auto; padding: 5px; scroll-padding-inline: 5px; }
  .bk-days:not(.bk-days-5) .bk-pad { display: none; }
}
