/* The family's appointment page (opened from a reminder email), and every other page a family sees.
 * Colours: the product's (Totonoi, "Strata") below; a clinic's branding overrides the --brand*, --accent* tokens from
 * /brand/family-<hash>.css (src/brand.js), linked after this file. Light only. */
:root {
  --brand: #c2255c; --brand-ink: #ffffff; --brand-hover: #ad004c; --brand-soft: #ffecef; --brand-text: #c2255c; --brand-wash: #f6f3f5;
  --accent: #ff9a5c; --accent-ink: #1e1218;
  --ink: #1e1218; --ink-2: #43363d; --muted: #5d4e56; --line: #d9ced3; --divider: #ece4e8; --off: #9c8f96;
  --shadow: rgb(30 18 24 / 10%);
}
body { margin: 0; min-height: 100vh; display: grid; place-items: center; background: var(--brand-wash); font: 16px/1.5 system-ui, -apple-system, 'Segoe UI', sans-serif; color: var(--ink); padding: 16px; box-sizing: border-box; }
.card { width: min(440px, 100%); background: #fff; border-radius: 18px; padding: 24px; box-shadow: 0 10px 30px var(--shadow); display: grid; gap: 10px; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--brand-text); }
.brand span { width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-size: 11px; }
.brand-icon { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; flex: none; }
.brand-logo img { display: block; height: 40px; width: auto; max-width: 100%; object-fit: contain; object-position: left center; }
/* "Powered by Totonoi": a banner below the card, as wide as it, linking to the product site (src/brand.js poweredBy). */
/* The product's colours, never the clinic's: the same card as in the emails (src/brand.js BANNER, bannerEmail). */
body:has(> .powered) { align-content: center; gap: 14px; }
/* As wide as the card above it: the card is content-box (width + 2 x 24px padding), the banner border-box. */
.powered { width: min(488px, 100%); box-sizing: border-box; display: flex; align-items: center; gap: 10px; margin: 0;
  padding: 12px 16px 12px 14px; border: 1px solid #f3c6d4; border-radius: 14px; background: #fff6f8;
  color: #1e1218; text-decoration: none; font-family: -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif; }
.powered-mark { flex: none; display: block; }
.powered-text { flex: 1; min-width: 0; display: grid; }
.powered-line { font-size: 14px; font-weight: 600; line-height: 1.35; }
.powered-line strong { color: #c2255c; }
.powered-tag { font-size: 13px; line-height: 1.4; color: #5d4e56; }
.powered-go { flex: none; font-size: 13px; font-weight: 700; color: #c2255c; white-space: nowrap; }
a.powered:hover { border-color: #c2255c; }
a.powered:hover .powered-go { text-decoration: underline; }
a.powered:focus-visible { outline: 2px solid #c2255c; outline-offset: 2px; }
.card:has(.day) + .powered { width: min(608px, 100%); }
.card:has(.picker) + .powered { width: min(1020px, 100%); }
/* On a phone the booking page fills the screen; the banner sits under it, inset like the content. */
@media (max-width: 600px) {
  .card:has(.picker) + .powered { width: auto; margin: 0 12px calc(16px + env(safe-area-inset-bottom)); }
}
@media (max-width: 380px) { .powered-go { display: none; } }
/* Phones: the card fills the width with its padding inside, so it never runs past the screen and lines up with the banner. */
@media (max-width: 600px) { .card:not(:has(.picker)) { width: 100%; box-sizing: border-box; } }
h1 { margin: 8px 0 0; font-size: 22px; }
.when { font-size: 18px; font-weight: 600; margin: 0; }
p { margin: 0; }
form { margin: 0; }
button { width: 100%; padding: 14px; border-radius: 10px; border: 1px solid var(--line); background: #fff; font: 600 16px/1 inherit; cursor: pointer; color: var(--ink); }
button.primary, button.button { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
button.primary:hover, button.button:hover { background: var(--brand-hover); border-color: var(--brand-hover); }
.ok { color: var(--brand-text); font-weight: 600; }
.note { color: #8a5a00; font-size: 14px; }

/* Booking page */
.card:has(.day) { width: min(560px, 100%); }
.muted { color: var(--muted); font-size: 14px; }
.day { display: grid; gap: 8px; margin-top: 8px; }
.day h2 { margin: 0; font-size: 15px; color: var(--brand-text); text-transform: capitalize; }
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 6px; }
.slots button { padding: 10px 6px; font-size: 15px; }
.slots button:hover { border-color: var(--brand); background: var(--brand-soft); }

/* Time picker: details | month | times */
.card:has(.picker) { width: min(1020px, 100%); padding: 0; overflow: hidden; }
.card:has(.picker) > .brand { display: none; }
.picker { display: grid; grid-template-columns: 300px minmax(0, 1fr); min-height: 560px; }
.picker:has(.times:not([hidden])) { grid-template-columns: 300px minmax(0, 1fr); }
.info { padding: 28px; border-right: 1px solid var(--divider); display: grid; align-content: start; gap: 12px; }
.info .brand { margin-bottom: 8px; }
.host { color: var(--muted); font-weight: 600; }
.info h1 { margin: 0; font-size: 26px; line-height: 1.2; }
.facts { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 10px; color: var(--ink-2); font-weight: 600; }
.facts li { display: flex; gap: 10px; align-items: center; }
.ico { width: 22px; text-align: center; color: var(--muted); font-size: 18px; }
.intro { color: var(--ink-2); }
.choose { padding: 28px 32px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px 28px; align-content: start; }
.choose:has(.times:not([hidden])) { grid-template-columns: minmax(0, 1fr) 230px; }
.choose > h2 { grid-column: 1 / -1; margin: 0; font-size: 20px; }
.calendar { max-width: 460px; }
.month { display: flex; align-items: center; justify-content: center; gap: 18px; margin-bottom: 14px; }
.month strong { min-width: 160px; text-align: center; font-weight: 500; text-transform: capitalize; }
.nav { width: 38px; height: 38px; padding: 0; border-radius: 50%; border: 0; background: var(--brand-soft); color: var(--brand-text); font-size: 22px; line-height: 1; }
.nav:disabled { background: transparent; color: var(--off); cursor: default; }
.grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; justify-items: center; }
.wd { font-size: 12px; color: var(--muted); text-transform: uppercase; padding-bottom: 6px; }
.dayn { width: 46px; height: 46px; padding: 0; border-radius: 50%; border: 0; background: transparent; font-weight: 500; color: var(--off); }
.dayn.open { background: var(--brand-soft); color: var(--brand-text); font-weight: 700; }
.dayn.open:hover { box-shadow: inset 0 0 0 2px var(--brand); }
.dayn.chosen, .dayn.chosen:hover { background: var(--brand); color: var(--brand-ink); box-shadow: none; }
.dayn:disabled { cursor: default; }
.times h3 { margin: 6px 0 14px; font-size: 15px; font-weight: 500; text-transform: capitalize; }
.list { display: grid; gap: 10px; max-height: 420px; overflow-y: auto; padding-right: 4px; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.time-row { display: grid; grid-template-columns: 1fr; gap: 8px; }
.time-row.picked { grid-template-columns: 1fr 1fr; }
.time { padding: 14px 6px; border: 1px solid var(--brand); color: var(--brand-text); font-weight: 700; }
.time:hover { border-width: 2px; padding: 13px 5px; }
.time-row.picked .time { background: var(--muted); border-color: var(--muted); color: #fff; }
.confirm-form { display: none; }
.time-row.picked .confirm-form { display: block; }
.confirm { padding: 14px 6px; background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.choose .fallback { grid-column: 1 / -1; }
/* Public page: the details step */
.details-form, form.details { display: grid; gap: 14px; max-width: 520px; }
.details-form .field, form.details .field { display: grid; gap: 6px; font-weight: 600; font-size: 14px; }
.details-form input:not([type="checkbox"]), .details-form textarea, form.details input:not([type="checkbox"]), form.details textarea { font: 16px/1.4 inherit; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; width: 100%; box-sizing: border-box; }
.details-form input:focus, .details-form textarea:focus, form.details input:focus, form.details textarea:focus { outline: 2px solid var(--brand); outline-offset: 1px; }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--ink-2); }
.consent input { margin-top: 3px; width: 18px; height: 18px; flex: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.linkish { width: auto; padding: 0; border: 0; background: none; color: var(--brand-text); font-weight: 600; font-size: 15px; }
.card:has(.picker) > .back { padding: 0 28px 24px; }
.card:has(.picker) > .back button { width: auto; padding: 10px 18px; }
@media (max-width: 860px) {
  .picker, .picker:has(.times:not([hidden])) { grid-template-columns: 1fr; min-height: 0; }
  .info { border-right: 0; border-bottom: 1px solid var(--divider); padding: 20px; }
  .choose, .choose:has(.times:not([hidden])) { grid-template-columns: 1fr; padding: 20px 16px; }
  .calendar { max-width: none; }
  .dayn { width: 40px; height: 40px; }
  .list { max-height: none; }
}
/* Phones: full screen like an app, a compact header, big touch targets, no zoom on inputs. */
button, a { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
@media (max-width: 600px) {
  body:has(.picker) { padding: 0; place-items: stretch; background: #fff; }
  .picker, .picker:has(.times:not([hidden])) { grid-template-rows: auto 1fr; align-content: start; }
  .card:has(.picker) { width: 100%; min-height: 100dvh; border-radius: 0; box-shadow: none; padding-bottom: env(safe-area-inset-bottom); }
  .info { padding: 16px 16px 14px; gap: 6px; }
  .info .brand { margin-bottom: 2px; }
  .host { font-size: 14px; }
  .info h1 { font-size: 21px; }
  .facts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
  .facts li { gap: 4px; padding: 5px 10px; border-radius: 999px; background: var(--brand-wash); font-size: 13px; }
  .ico { width: auto; font-size: 14px; }
  .intro, .info .note { font-size: 14px; }
  .choose, .choose:has(.times:not([hidden])) { padding: 16px 12px 24px; gap: 14px; }
  .choose > h2 { font-size: 17px; padding: 0 4px; }
  .month { margin-bottom: 8px; }
  .nav { width: 44px; height: 44px; }
  .grid { gap: 4px; }
  .dayn { width: min(46px, 12vw); height: min(46px, 12vw); font-size: 15px; }
  .times { scroll-margin-top: 12px; }
  .times h3 { margin: 4px 4px 10px; font-size: 16px; font-weight: 600; }
  .list { grid-template-columns: 1fr; gap: 8px; }
  .time, .confirm { padding: 16px 6px; font-size: 17px; border-radius: 12px; }
  .details-form { padding: 16px; max-width: none; }
  .details-form button.primary { position: sticky; bottom: 12px; padding: 16px; font-size: 17px; border-radius: 12px; box-shadow: 0 6px 18px rgb(30 18 24 / 22%); }
  .details-step .info form { margin-top: 2px; }
  .card:has(.picker) > .back { padding: 0 16px 20px; }
}


/* With scripts on, the calendar shows from the first frame and the plain list never flashes. */
html.js .choose .fallback { display: none; }
html.js .choose .calendar[hidden] { display: block; }
.calendar .grid { min-height: 300px; align-content: start; }

/* Stage 8 hosted lead form: a field people never see (bots fill it). */
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.consent { display: flex; gap: 0.5rem; align-items: flex-start; margin: 0.75rem 0; font-size: 0.95rem; }
