/* The booking pages (cards #1502, #1595). One stylesheet for the three faces; each host's /assets/face.css sets the brand.
   THE LOOK IS CAL.DIY'S booker (tasks/r99/booking-look/reference/, measured off the live instances 2026-11-17): Inter
   on a grey page, a white card with a hairline border, event | month | times at 280 | 480 | 280 px, 59 px day cells
   on a 4 px gap, brand-filled selected day, outlined time buttons. Differences on purpose: every tap target is at least
   44 px (Cal.diy's time buttons and inputs were 32-36), and at iPad widths the card shrinks to fit instead of running off
   the screen as Cal.diy's did at 1024 (UI-1: vertical scroll only). */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("/assets/inter.woff2") format("woff2"); }
@font-face { font-family: "Cal Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url("/assets/calsans-semibold.woff2") format("woff2"); }
:root {
  --bk-brand: #1F5FD6;
  --bk-brand-ink: #1F5FD6;
  --bk-on-brand: #ffffff;
  --bk-page: #eeeff2;
  --bk-card: #ffffff;
  --bk-line: #e5e7eb;
  --bk-line-strong: #d1d5db;
  --bk-ink: #3c3e44;
  --bk-emph: #070a0d;
  --bk-soft: #6b7280;
  --bk-faint: #9ca3af;
  --bk-day: #e5e7eb;
  --bk-day-hover: #d1d5db;
  --bk-chip: #f3f4f6;
  --bk-ok-bg: #dcfce7;
  --bk-ok: #15803d;
  --bk-bad-bg: #fde2e2;
  --bk-bad: #dc2626;
  --bk-danger: #b42318;
  --bk-focus: #1f2937;
  --bk-host-bg: #dbeafe;
  --bk-host-ink: #1e3a8a;
  color-scheme: light;
}
/* Cal.diy's dark theme: near-black page, #191919 card. T&B's Cal user was always dark (data-theme, pages.js); the others
   follow the visitor. Inside a brand site's frame the page stays light (the R99 critique). */
@media (prefers-color-scheme: dark) {
  :root:not([data-embed]) { --bk-page: #101010; --bk-card: #191919; --bk-line: #2b2b2b; --bk-line-strong: #3d3d3d; --bk-ink: #d6d6d6; --bk-emph: #ffffff; --bk-soft: #a3a3a3; --bk-faint: #737373; --bk-day: #3a3a3a; --bk-day-hover: #4a4a4a; --bk-chip: #262626; --bk-ok-bg: #14532d; --bk-ok: #86efac; --bk-bad-bg: #4c1d1d; --bk-bad: #fca5a5; --bk-focus: #e5e7eb; --bk-host-bg: #1e3a8a; --bk-host-ink: #dbeafe; --bk-brand-ink: var(--bk-brand); color-scheme: dark; }
}
:root[data-theme="dark"] { --bk-page: #101010; --bk-card: #191919; --bk-line: #2b2b2b; --bk-line-strong: #3d3d3d; --bk-ink: #d6d6d6; --bk-emph: #ffffff; --bk-soft: #a3a3a3; --bk-faint: #737373; --bk-day: #3a3a3a; --bk-day-hover: #4a4a4a; --bk-chip: #262626; --bk-ok-bg: #14532d; --bk-ok: #86efac; --bk-bad-bg: #4c1d1d; --bk-bad: #fca5a5; --bk-focus: #e5e7eb; --bk-host-bg: #1e3a8a; --bk-host-ink: #dbeafe; --bk-brand-ink: var(--bk-brand); color-scheme: dark; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 400 16px/24px Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; color: var(--bk-ink); background: var(--bk-page); overflow-x: hidden; -webkit-font-smoothing: antialiased; }
html[data-embed] body { background: transparent; }
a { color: var(--bk-brand-ink); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--bk-focus); outline-offset: 2px; }
[hidden] { display: none !important; }
.bk-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.bk-ico { flex: none; }

/* The page: the card centred on the grey, as Cal.diy's <main class="min-h-[100dvh] items-center">. */
.bk-main { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 32px 16px; padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
/* In a frame the parent sizes the frame to the page (booker.js): a height tied to the frame would grow with it forever. */
html[data-embed] .bk-main { min-height: 0; padding: 0; }

/* ---- the booker: event | month | times ----------------------------------------------------------------------------- */
.bk-booker { width: 100%; max-width: 1040px; display: grid; grid-template-columns: minmax(0, 280px) minmax(0, 480px) minmax(0, 280px); background: var(--bk-card); border: 1px solid var(--bk-line); border-radius: 12px; min-height: 490px; }
.bk-event { padding: 24px; border-right: 1px solid var(--bk-line); min-width: 0; }
.bk-month { padding: 20px; min-width: 0; }
.bk-slots { padding: 20px; border-left: 1px solid var(--bk-line); min-width: 0; }
.bk-booker[data-step="form"] { max-width: 760px; grid-template-columns: minmax(0, 340px) minmax(0, 420px); }
.bk-booker[data-step="form"] .bk-month, .bk-booker[data-step="form"] .bk-slots { display: none; }
.bk-booker[data-step="form"] .bk-tz-pick select, .bk-booker[data-step="form"] .bk-tz-pick .bk-ico { display: none; }

.bk-avatar { width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--bk-line-strong); background: var(--bk-day); object-fit: cover; display: block; }
.bk-profile-head .bk-avatar { margin: 0 auto; }
.bk-initials { display: flex; align-items: center; justify-content: center; font-size: 9px; font-weight: 700; color: var(--bk-on-brand); background: var(--bk-brand); }
.bk-owner { margin: 8px 0 0; font-size: 14px; line-height: 20px; font-weight: 600; color: var(--bk-soft); overflow-wrap: anywhere; }
.bk-title { margin: 8px 0; font-size: 20px; line-height: 28px; font-weight: 600; color: var(--bk-ink); overflow-wrap: anywhere; }
.bk-facts-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.bk-facts-list li { display: flex; align-items: flex-start; gap: 8px; font-size: 14px; line-height: 20px; font-weight: 500; color: var(--bk-ink); min-width: 0; }
.bk-facts-list li > span { min-width: 0; overflow-wrap: anywhere; }
.bk-facts-list .bk-ico { margin-top: 2px; }
.bk-former s { display: block; color: var(--bk-soft); white-space: pre-line; }
.bk-former-label { display: block; font-weight: 600; }
.bk-chosen-line span { white-space: pre-line; }
.bk-tz-line { align-items: center !important; }
/* The zone reads as Cal.diy's "America/Moncton ⌄"; the real <select> lies over it, invisible, so the tap opens the
   system list and the text is only ever as wide as the zone name. */
.bk-tz-pick { position: relative; display: inline-flex; align-items: center; gap: 4px; min-height: 44px; margin: -12px 0; max-width: 100%; font-size: 14px; font-weight: 400; color: var(--bk-emph); border-radius: 6px; }
.bk-tz-pick:focus-within { outline: 2px solid var(--bk-focus); outline-offset: 2px; }
.bk-tz-shown { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bk-tz-pick select { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; font-size: 16px; cursor: pointer; border: 0; }
.bk-tz-pick select option { color: #000; background: #fff; }

/* The 44 px arrows overhang the 20 px padding so the title sits where Cal.diy's did (16 px under the card's top padding,
   weekday row 45 px below it): measured off reference/ypl-times-1440.png. */
.bk-month-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: -12px 0 14px; }
.bk-month-label { margin: 0; font-size: 16px; line-height: 24px; font-weight: 400; color: var(--bk-soft); }
.bk-month-label strong { font-weight: 600; color: var(--bk-emph); }
.bk-month-nav { display: flex; }
.bk-nav { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid transparent; border-radius: 10px; background: transparent; color: var(--bk-soft); cursor: pointer; }
.bk-nav:hover:not([disabled]) { background: var(--bk-chip); }
.bk-nav[disabled] { opacity: .4; cursor: default; }
.bk-weekdays, .bk-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; text-align: center; }
.bk-weekdays { margin-bottom: 14px; }
.bk-weekdays span { font-size: 12px; line-height: 20px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--bk-emph); }
.bk-cell { position: relative; aspect-ratio: 1 / 1; min-height: 44px; }
.bk-day { position: absolute; inset: 0; width: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; border: 2px solid transparent; border-radius: 8px; background: transparent; font-size: 14px; line-height: 20px; font-weight: 300; color: var(--bk-ink); padding: 0; cursor: default; }
.bk-day.is-open { background: var(--bk-day); font-weight: 500; color: var(--bk-emph); cursor: pointer; }
.bk-day.is-open:hover { border-color: var(--bk-brand); }
.bk-day.is-on { background: var(--bk-brand); color: var(--bk-on-brand); }
/* "DEC" in the 1st's top-left corner, where Cal.diy marked a month change inside the five weeks; the number stays
   centred. The smallest cell (44 px, a phone) still leaves the 10 px label clear of the 20 px number. */
.bk-day-mon { position: absolute; top: 3px; left: 5px; font-size: 10px; line-height: 12px; font-weight: 600; text-transform: uppercase; }
.bk-day.is-today::after { content: ""; position: absolute; left: 50%; bottom: 20%; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: var(--bk-brand); }
.bk-day.is-on.is-today::after { background: var(--bk-on-brand); }
.bk-status { margin: 12px 0 0; font-size: 14px; line-height: 20px; color: var(--bk-soft); min-height: 20px; }
.bk-status:empty { margin: 0; min-height: 0; }

/* Overhangs the padding like the month head, so "Wed 18" lines up with "November 2026" and the first time sits 12 px
   under the pill, as in Cal.diy. */
.bk-slots-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 44px; margin: -14px 0 6px; }
.bk-day-label { margin: 0; font-size: 16px; line-height: 24px; font-weight: 600; color: var(--bk-emph); }
.bk-day-label span { font-weight: 400; color: var(--bk-soft); }
/* Cal.diy's 12h | 24h pill: a 32 px grey pill with a 24 px white one on the pressed half. Each half is still a full
   44 px tap: the pills are drawn inside the buttons (::before), not by their boxes. */
.bk-hfmt { position: relative; display: inline-flex; }
.bk-hfmt::before { content: ""; position: absolute; inset: 6px 0; border-radius: 8px; background: var(--bk-chip); }
.bk-hfmt button { position: relative; isolation: isolate; min-width: 44px; min-height: 44px; padding: 0 8px; border: 0; background: transparent; font-size: 14px; font-weight: 500; color: var(--bk-ink); cursor: pointer; }
.bk-hfmt button[aria-pressed="true"] { color: var(--bk-emph); }
.bk-hfmt button[aria-pressed="true"]::before { content: ""; position: absolute; inset: 10px 4px; z-index: -1; border-radius: 6px; background: var(--bk-card); box-shadow: 0 1px 2px rgba(0, 0, 0, .08); }
/* Cal.diy's booker keeps its height and a long day's times scroll inside their column (vertical only, UI-1); the card
   growing with the list pushed it off centre (a day of 12 times made it 690 px tall). The phone lets the list run. */
.bk-slots { display: flex; flex-direction: column; max-height: 488px; /* the booker's 490 less its two border lines */ }
.bk-times { display: grid; gap: 8px; align-content: start; flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 2px; margin: -2px; }
.bk-time { width: 100%; min-height: 44px; padding: 8px 10px; border: 1px solid var(--bk-line-strong); border-radius: 10px; background: var(--bk-card); font-size: 14px; font-weight: 500; color: var(--bk-ink); cursor: pointer; }
.bk-time:hover { border-color: var(--bk-brand); }
.bk-confirm-move { display: grid; gap: 8px; }
.bk-confirm-move p { margin: 0; font-size: 14px; font-weight: 600; color: var(--bk-emph); }

/* ---- the details step ------------------------------------------------------------------------------------------- */
.bk-form { padding: 24px; display: grid; gap: 16px; align-content: start; min-width: 0; }
.bk-form-top { display: none; }
.bk-field { display: grid; gap: 8px; border: 0; padding: 0; margin: 0; min-width: 0; }
.bk-field > label, .bk-field > legend { font-size: 14px; line-height: 20px; font-weight: 600; color: var(--bk-emph); padding: 0; }
.bk-req { margin-left: 4px; }
.bk-locations { gap: 0; }
.bk-locations legend { margin-bottom: 4px; }
input[type="text"], input[type="email"], input[type="tel"], textarea { width: 100%; max-width: 100%; min-height: 44px; padding: 8px 12px; border: 1px solid var(--bk-line-strong); border-radius: 10px; font-size: 14px; line-height: 20px; color: var(--bk-ink); background: var(--bk-card); }
input:focus, textarea:focus { outline: 2px solid var(--bk-focus); outline-offset: 0; border-color: transparent; }
textarea { resize: vertical; min-height: 80px; }
textarea::placeholder { color: var(--bk-faint); }
.bk-hint { margin: 0; font-size: 12px; line-height: 16px; color: var(--bk-soft); }
.bk-radio { display: flex; align-items: center; gap: 8px; min-height: 44px; margin: -6px 0; position: relative; }
.bk-radio input { width: 16px; height: 16px; margin: 0; accent-color: var(--bk-brand); flex: none; }
.bk-radio label { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; color: var(--bk-ink); min-height: 44px; cursor: pointer; }
.bk-add-guests { justify-self: start; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 10px; border: 0; border-radius: 10px; background: transparent; font-size: 14px; font-weight: 500; color: var(--bk-soft); cursor: pointer; }
.bk-add-guests:hover { background: var(--bk-chip); }
.bk-error { color: var(--bk-danger); margin: 0; font-size: 14px; }
.bk-error:empty { display: none; }
.bk-buttons { display: flex; justify-content: flex-end; align-items: center; gap: 8px; flex-wrap: wrap; }
.bk-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 8px 14px; border: 1px solid var(--bk-brand); border-radius: 10px; background: var(--bk-brand); color: var(--bk-on-brand); font-size: 14px; font-weight: 500; text-decoration: none; cursor: pointer; }
.bk-btn:hover { filter: brightness(.94); }
.bk-btn[disabled] { opacity: .6; cursor: default; }
.bk-btn-quiet { border-color: transparent; background: transparent; color: var(--bk-soft); }
.bk-btn-quiet:hover { background: var(--bk-chip); filter: none; }
.bk-btn-danger { background: var(--bk-danger); border-color: var(--bk-danger); color: #fff; }
.bk-link { display: inline-flex; align-items: center; min-height: 44px; padding: 0; border: 0; background: none; color: var(--bk-emph); font: inherit; font-weight: 500; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.bk-chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 6px; background: var(--bk-chip); font-size: 13px; line-height: 20px; font-weight: 500; color: var(--bk-emph); }

/* ---- the booking card (booked, the attendee's own page, cancelled) ---------------------------------------------- */
.bk-card { width: 100%; max-width: 576px; background: var(--bk-card); border: 1px solid var(--bk-line); border-radius: 12px; padding: 32px; align-self: center; }
.bk-main > .bk-card { margin-bottom: auto; }
.bk-main > .bk-card:first-child { margin-top: 0; }
.bk-done:focus { outline: none; }
.bk-card-head { text-align: center; padding-bottom: 28px; border-bottom: 1px solid var(--bk-line); }
.bk-badge { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 50%; }
.bk-badge-ok { background: var(--bk-ok-bg); color: var(--bk-ok); }
.bk-badge-bad { background: var(--bk-bad-bg); color: var(--bk-bad); }
.bk-badge-quiet { background: var(--bk-chip); color: var(--bk-soft); }
.bk-card-title { margin: 16px 0 0; font-size: 24px; line-height: 32px; font-weight: 600; color: var(--bk-emph); overflow-wrap: anywhere; }
.bk-card-sub { margin: 12px 0 0; font-size: 16px; color: var(--bk-soft); }
.bk-rows { margin: 0; padding: 24px 0 0; display: grid; gap: 24px; }
.bk-row { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 8px 0; }
.bk-row dt { font-weight: 500; color: var(--bk-ink); }
.bk-row dd { margin: 0; color: var(--bk-ink); overflow-wrap: anywhere; }
.bk-row s { color: var(--bk-ink); }
.bk-who { display: block; }
.bk-host { display: inline-block; margin-left: 4px; padding: 0 6px; border-radius: 4px; background: var(--bk-host-bg); color: var(--bk-host-ink); font-size: 12px; line-height: 20px; font-weight: 500; vertical-align: 1px; }
.bk-tz { color: var(--bk-soft); }
.bk-card-line { margin: 16px 0 0; }
.bk-card-foot { margin: 24px 0 0; padding-top: 16px; border-top: 1px solid var(--bk-line); display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 0 6px; color: var(--bk-ink); }
.bk-nowrap { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.bk-cancel { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--bk-line); display: grid; gap: 8px; }
.bk-cancel label { font-size: 14px; font-weight: 600; color: var(--bk-emph); }

/* ---- the profile (a brand with more than one event type) -------------------------------------------------------- */
.bk-profile { width: 100%; max-width: 640px; }
.bk-profile-head { text-align: center; margin-bottom: 24px; }
.bk-profile-head .bk-avatar { width: 64px; height: 64px; }
.bk-profile-name { margin: 8px 0 0; font-family: "Cal Sans", Inter, sans-serif; font-size: 24px; line-height: 32px; font-weight: 600; color: var(--bk-emph); letter-spacing: .01em; }
.bk-types { list-style: none; margin: 0; padding: 0; background: var(--bk-card); border: 1px solid var(--bk-line); border-radius: 12px; overflow: hidden; }
.bk-types li + li { border-top: 1px solid var(--bk-line); }
.bk-type { display: grid; gap: 6px; padding: 20px 24px; text-decoration: none; color: var(--bk-ink); min-height: 44px; }
.bk-type:hover { background: var(--bk-chip); }
.bk-type-title { font-weight: 600; color: var(--bk-emph); }
.bk-type-desc { font-size: 14px; color: var(--bk-soft); }
.bk-type .bk-chip { justify-self: start; }

/* ---- iPad: the three columns narrow instead of running off the screen ------------------------------------------- */
@media (max-width: 1100px) {
  .bk-booker { grid-template-columns: minmax(0, 240px) minmax(0, 1fr) minmax(0, 240px); }
  .bk-event { padding: 20px; }
}
/* ---- iPad portrait, and a phone at Safari's 50% zoom (a 390 px phone lays out at 780): the event sits on top, month and
   times side by side, so the day cells keep their size instead of three columns squeezing them under 44 px. */
@media (min-width: 761px) and (max-width: 900px) {
  .bk-booker { grid-template-columns: minmax(0, 1fr) minmax(0, 250px); }
  .bk-event { grid-column: 1 / -1; border-right: 0; border-bottom: 1px solid var(--bk-line); }
  .bk-booker[data-step="form"] .bk-event { grid-column: auto; border-bottom: 0; border-right: 1px solid var(--bk-line); }
}
/* ---- phone: one column, as Cal.diy's mobile booker: event, month, times; the details step takes the whole card ---- */
@media (max-width: 760px) {
  .bk-main { justify-content: flex-start; padding: 32px 0 0; padding-bottom: env(safe-area-inset-bottom); }
  .bk-booker, .bk-booker[data-step="form"] { grid-template-columns: minmax(0, 1fr); border-radius: 0; border-left: 0; border-right: 0; min-height: 0; }
  .bk-event { border-right: 0; padding: 20px 20px 8px; }
  /* Spacing measured off reference/ypl-times-390.png: zone line to month 66 px, month to weekdays 46, weekdays to the
     first week 58, last week to the times' day 113. */
  .bk-month { padding: 38px 20px 20px; }
  .bk-month-head { padding-bottom: 12px; border-bottom: 1px solid var(--bk-line); margin-bottom: 2px; }
  .bk-weekdays { padding-bottom: 12px; border-bottom: 1px solid var(--bk-line); margin-bottom: 11px; }
  .bk-slots { border-left: 0; padding: 62px 20px 20px; max-height: none; }
  /* A phone's 47 px cell has no room for "DEC" over a centred number (the critique saw it sitting on the "1"): the
     number centres in the space under the label instead. */
  .bk-day.has-mon { padding-top: 12px; }
  .bk-booker[data-step="form"] .bk-event { display: none; }
  .bk-form { padding: 24px 20px; }
  .bk-form-top { display: block; }
  .bk-form-top h2 { margin: 0 0 12px; font-family: "Cal Sans", Inter, sans-serif; font-size: 20px; line-height: 28px; font-weight: 600; color: var(--bk-emph); letter-spacing: .01em; }
  .bk-form-top .bk-chips { display: flex; flex-wrap: wrap; gap: 8px; }
  /* Cal.diy's rounded chips; 14 px, not a full pill, so a long September date that wraps to two lines still reads as one chip. */
  .bk-form-top .bk-chip { border-radius: 14px; font-size: 12px; }
  /* Cal.diy's phone details step is a sheet: a 16 px-rounded card held 10 px off the screen's sides (reference/
     ypl-form-390.png). It floated over the dimmed month; here the month is not behind it, so the page stays its grey. */
  html:not([data-embed]) .bk-booker[data-step="form"] { width: auto; margin: 0 10px; border: 1px solid var(--bk-line); border-radius: 16px; overflow: clip; /* clip, not hidden: hidden would make the card a scroller and unstick the buttons */ }
  .bk-form .bk-buttons { position: sticky; bottom: 0; background: var(--bk-card); margin: 0 -20px; padding: 12px 20px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--bk-line); }
  .bk-card { max-width: none; border-radius: 12px; margin: 0 16px; width: auto; align-self: stretch; padding: 32px 24px; }
  .bk-row { grid-template-columns: minmax(0, 104px) minmax(0, 1fr); }
  .bk-profile { padding: 0 16px; }
  html[data-embed] .bk-booker { border: 0; }
}
