/* Book a demo (module "demos"): the /demo page, the pop-up on every website page and the visitor's booking page.
   Uses the website's tokens from public.css ("Clear Signal"); loaded by the page itself and, for the pop-up, by demo.js
   when the page has finished loading (never render-blocking on other pages). */

/* ---------- Page layout ---------- */
.dm-head { padding-bottom: clamp(40px, 6vw, 80px); }
.dm-layout { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(28px, 4vw, 64px); align-items: start; }
.dm-intro > .dm-points, .dm-intro > h1, .dm-intro > .lede, .dm-intro > .kicker { min-width: 0; }
.dm-intro h1 { font-size: clamp(34px, 4.2vw, 56px); max-width: 16ch; }
.dm-points { list-style: none; padding: 0; margin: 22px 0 28px; display: grid; gap: 10px; color: var(--ink-2); font-size: 15.5px; }
.dm-points li { display: flex; gap: 10px; align-items: center; }
.dm-points .ms { color: var(--brand); font-size: 22px; }
.dm-aside { display: grid; gap: 10px; }
.dm-aside-h { font: 650 15px var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 4px; }
.dm-aside-item { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--r); background: var(--card); border: 1px solid var(--line);
  transition: border-color .3s var(--ease), box-shadow .3s var(--ease), transform .3s var(--ease), opacity .3s; }
.dm-aside-item p { margin: 0; font-size: 14.5px; color: var(--ink-2); line-height: 1.55; }
.dm-aside-item b { color: var(--ink); }
.dm-aside-item > .ms { color: var(--brand-ink); background: var(--mint); border-radius: 10px; padding: 7px; font-size: 20px; width: auto; }
.dm-aside[data-chosen] .dm-aside-item[data-aside-for] { opacity: .55; }
.dm-aside[data-chosen] .dm-aside-item.is-on { opacity: 1; border-color: var(--brand); box-shadow: 0 0 0 3px var(--mint), var(--sh-2); transform: translateX(4px); }
.dm-panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-3); padding: clamp(18px, 3vw, 32px); scroll-margin-top: 90px; }
.dm-who .tile p { flex: 1; }

/* ---------- The form ---------- */
.dm-form { display: grid; gap: 18px; }
/* The hidden attribute wins over the display rules below (the confirmation, the steps bar and the calendar links). */
.dm-form [hidden]:not([data-demo-back]), .dm-dialog [hidden]:not([data-demo-back]) { display: none !important; }
.dm-hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.dm-step { border: 0; margin: 0; padding: 0; min-width: 0; display: grid; gap: 14px; }
.dm-step + .dm-step { padding-top: 18px; border-top: 1px dashed var(--line-2); }
.dm-js .dm-step + .dm-step { padding-top: 0; border-top: 0; }
.dm-q { font: 700 clamp(20px, 2.2vw, 24px)/1.2 var(--display); letter-spacing: -.01em; padding: 0; margin: 0 0 2px; display: flex; align-items: center; gap: 10px; color: var(--ink); }
.dm-num { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--night); color: var(--brand-bright); font: 700 14px var(--sans); }
.dm-hint { margin: 0; color: var(--ink-3); font-size: 14.5px; }
.dm-label { display: block; font-weight: 600; font-size: 14.5px; color: var(--ink); margin-bottom: 6px; }
.dm-label small { font-weight: 400; color: var(--ink-3); }
.dm-input { width: 100%; min-height: 46px; padding: 10px 14px; border: 1.5px solid var(--line-2); border-radius: 12px; background: var(--card); color: var(--ink); font: 16px var(--sans);
  transition: border-color .2s, box-shadow .2s; }
textarea.dm-input { min-height: 88px; resize: vertical; }
.dm-input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--mint); }
.dm-input[aria-invalid="true"] { border-color: var(--coral); }
.dm-field { min-width: 0; }
.dm-row, .dm-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 18px; }
.dm-err { margin: 6px 0 0; color: var(--coral); font-size: 14px; font-weight: 600; }
.dm-err:empty { display: none; }
.dm-alert { display: flex; gap: 10px; padding: 14px 16px; border-radius: 12px; background: var(--coral-soft); color: var(--coral); border: 1px solid rgba(185, 56, 21, .25); }
.dm-alert ul { margin: 6px 0 0; padding-left: 18px; color: var(--ink); font-size: 14.5px; }
.dm-flash { display: inline-flex; gap: 8px; align-items: center; padding: 10px 14px; border-radius: 12px; background: var(--mint-2); border: 1px solid var(--mint); color: var(--brand-ink); font-weight: 600; }

/* Who it is for: big radio cards */
.dm-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.dm-card { position: relative; display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 12px; align-items: center; padding: 16px; border: 1.5px solid var(--line-2);
  border-radius: var(--r); background: var(--card); cursor: pointer; transition: border-color .2s, box-shadow .25s var(--ease), transform .25s var(--ease), background .2s; }
.dm-card:hover { border-color: var(--ink-3); transform: translateY(-2px); box-shadow: var(--sh-2); }
.dm-card > .ms { grid-row: span 2; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--mint); color: var(--brand-ink); font-size: 24px; }
.dm-card b { font: 650 16px var(--display); }
.dm-card small { color: var(--ink-3); font-size: 13.5px; line-height: 1.4; }
.dm-card input, .dm-chip input, .dm-pill input, .dm-time input, .dm-mode-opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.dm-card:has(input:checked) { border-color: var(--brand); background: var(--mint-2); box-shadow: 0 0 0 3px var(--mint); }
.dm-card:has(input:checked) > .ms { background: var(--brand); color: #fff; }
.dm-card:has(input:focus-visible), .dm-chip:has(input:focus-visible), .dm-pill:has(input:focus-visible), .dm-time:has(input:focus-visible), .dm-mode-opt:has(input:focus-visible) { outline: 2.5px solid var(--brand); outline-offset: 2px; }

/* Interests: chips by group */
.dm-chips { display: grid; gap: 12px; max-height: 300px; overflow: auto; padding: 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--bg); }
.dm-chip-group { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.dm-chip-label { flex-basis: 100%; font-size: 12.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.dm-chip, .dm-pill { position: relative; display: inline-flex; }
.dm-chip span, .dm-pill span { display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 6px 14px; border-radius: 99px; border: 1.5px solid var(--line-2); background: var(--card);
  font-size: 14.5px; color: var(--ink-2); cursor: pointer; transition: border-color .2s, background .2s, color .2s; }
.dm-chip span::before { content: "+"; font: 600 16px/1 var(--sans); width: 12px; text-align: center; color: var(--ink-3); }
.dm-chip input:checked + span::before { content: "\2713"; color: var(--brand-ink); }
.dm-chip:hover span, .dm-pill:hover span { border-color: var(--ink-3); }
.dm-chip input:checked + span, .dm-pill input:checked + span { border-color: var(--brand); background: var(--mint-2); color: var(--brand-ink); font-weight: 600; }
.dm-pills { display: flex; flex-wrap: wrap; gap: 8px; }

/* Time zone and mode */
.dm-zone-row { display: flex; gap: 8px; align-items: center; }
.dm-zone-row .dm-input { flex: 1; min-width: 0; }
.dm-js [data-demo-nojs] { display: none; }
.dm-mode { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.dm-mode-opt { position: relative; display: flex; gap: 10px; align-items: center; padding: 12px 14px; border-radius: 12px; border: 1.5px solid var(--line-2); cursor: pointer; font-weight: 600; font-size: 14.5px; color: var(--ink-2); }
.dm-mode-opt .ms { color: var(--ink-3); font-size: 22px; }
.dm-mode-opt:has(input:checked) { border-color: var(--brand); background: var(--mint-2); color: var(--brand-ink); }
.dm-mode-opt:has(input:checked) .ms { color: var(--brand); }
.dm-js .dm-form:not([data-mode="slot"]) [data-mode-part="slot"], .dm-js .dm-form[data-mode="slot"] [data-mode-part="callback"] { display: none; }

/* Slots */
.dm-slots { display: grid; gap: 14px; }
.dm-day { display: grid; gap: 8px; }
.dm-day-label { font-weight: 650; font-size: 14.5px; }
.dm-times { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.dm-time { position: relative; display: block; }
.dm-time span { display: grid; place-items: center; min-height: 44px; border-radius: 12px; border: 1.5px solid var(--line-2); background: var(--card); font: 600 15px var(--mono); color: var(--ink);
  cursor: pointer; transition: border-color .15s, background .15s, color .15s, transform .15s var(--ease); }
.dm-time:hover span { border-color: var(--brand); color: var(--brand-ink); transform: translateY(-1px); }
.dm-time input:checked + span { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: 0 8px 18px -10px rgba(11, 138, 91, .9); }
.dm-loading, .dm-empty { display: flex; gap: 10px; align-items: center; color: var(--ink-3); margin: 0; padding: 16px; border-radius: 12px; background: var(--bg-2); }
.dm-loading .ms { animation: dm-spin 1s linear infinite; }
@keyframes dm-spin { to { transform: rotate(360deg); } }
/* With the script: one day at a time behind a row of day buttons */
.dm-days { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 8px; scroll-snap-type: x proximity; scrollbar-width: thin; }
.dm-dayb { flex: none; scroll-snap-align: start; display: grid; justify-items: center; gap: 2px; min-width: 64px; padding: 8px 10px; border-radius: 14px; border: 1.5px solid var(--line-2); background: var(--card);
  color: var(--ink-2); font: 500 12.5px var(--sans); cursor: pointer; transition: border-color .15s, background .15s, color .15s; }
.dm-dayb b { font: 700 19px var(--display); color: var(--ink); }
.dm-dayb small { font-size: 11.5px; color: var(--ink-3); }
.dm-dayb:hover { border-color: var(--ink-3); }
.dm-dayb[aria-pressed="true"] { border-color: var(--brand); background: var(--night); color: var(--on-night-2); }
.dm-dayb[aria-pressed="true"] b { color: #fff; }
.dm-dayb[aria-pressed="true"] small { color: var(--brand-bright); }
.dm-js .dm-slots[data-built] .dm-day[hidden] { display: none; }
.dm-js .dm-slots[data-built] .dm-day-label { color: var(--ink-3); font-weight: 500; font-size: 13.5px; }

.dm-callback { display: grid; gap: 14px; }
.dm-consent { display: flex; gap: 10px; align-items: flex-start; font-size: 14.5px; color: var(--ink-2); cursor: pointer; }
.dm-consent input { margin-top: 4px; width: 18px; height: 18px; accent-color: var(--brand); flex: none; }
.dm-submit { display: flex; justify-content: flex-end; }
.dm-captcha { min-height: 65px; }

/* Steps (with the script) */
.dm-progress { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; counter-reset: dmp; }
.dm-progress li { display: grid; gap: 6px; font-size: 12.5px; color: var(--ink-3); }
.dm-progress li::before { content: ""; height: 4px; border-radius: 99px; background: var(--line); transition: background .3s var(--ease); }
.dm-progress li.is-done::before, .dm-progress li.is-on::before { background: var(--brand); }
.dm-progress li.is-on { color: var(--ink); font-weight: 600; }
.dm-js .dm-step[data-hidden] { display: none; }
.dm-js .dm-step.is-entering { animation: dm-in .35s var(--ease) both; }
@keyframes dm-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.dm-nav { display: flex; justify-content: space-between; gap: 10px; }
.dm-nav [data-demo-back][hidden] { display: inline-flex; visibility: hidden; }
.dm-js .dm-form[data-step-now="4"] .dm-nav [data-demo-next] { display: none; }
.dm-js .dm-form .dm-submit { display: none; }
.dm-js .dm-form[data-step-now="4"] .dm-submit { display: flex; }
.dm-js .dm-form[data-step-now="4"] .dm-nav { justify-content: flex-start; }
.dm-form[aria-busy="true"] [data-demo-submit] { opacity: .7; pointer-events: none; }

/* Confirmation */
.dm-done { text-align: center; display: grid; gap: 10px; justify-items: center; padding: 10px 0; }
.dm-done:focus { outline: none; }
.dm-done-ico { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: var(--mint); color: var(--brand-ink); animation: dm-pop .5s var(--ease) both; }
.dm-done-ico .ms { font-size: 34px; }
@keyframes dm-pop { from { transform: scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }
.dm-done h3 { font-size: clamp(22px, 2.6vw, 28px); }
.dm-done-when { font-weight: 650; font-size: 17px; margin: 0; }
.dm-done p { margin: 0; color: var(--ink-2); max-width: 52ch; }
.dm-cal { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.dm-manage { display: inline-flex; gap: 4px; align-items: center; font-weight: 600; }
.dm-manage .ms { font-size: 18px; }
.dm-form.is-done > :not(.dm-done):not([type="hidden"]) { display: none !important; }

/* ---------- The pop-up ---------- */
.dm-dialog { width: min(760px, calc(100vw - 24px)); max-height: min(92vh, 900px); padding: 0; border: 0; border-radius: var(--r-lg); background: var(--card); color: var(--ink);
  box-shadow: 0 30px 80px -20px rgba(11, 21, 38, .45); overflow: hidden; }
.dm-dialog[open] { display: flex; flex-direction: column; animation: dm-dialog-in .35s var(--ease) both; }
.dm-dialog::backdrop { background: rgba(11, 21, 38, .55); backdrop-filter: blur(4px); }
@keyframes dm-dialog-in { from { opacity: 0; transform: translateY(16px) scale(.98); } to { opacity: 1; transform: none; } }
.dm-dialog-inner { display: grid; gap: 16px; padding: clamp(18px, 3vw, 28px); overflow: auto; overscroll-behavior: contain; }
.dm-dialog-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.dm-dialog-head h2 { font-size: clamp(22px, 2.6vw, 30px); letter-spacing: -.02em; }
.dm-dialog-kicker { display: inline-flex; gap: 6px; align-items: center; margin: 0 0 6px; font: 600 12.5px var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--brand-ink); }
.dm-dialog-kicker .ms { font-size: 18px; }
.dm-close { flex: none; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: var(--card); color: var(--ink); display: grid; place-items: center; cursor: pointer; }
.dm-close:hover { background: var(--bg-2); }
.dm-dialog-foot { margin: 0; font-size: 13.5px; color: var(--ink-3); text-align: center; }
.dm-dialog .dm-chips { max-height: 220px; }
html.dm-locked { overflow: hidden; }

/* ---------- How it works ---------- */
.dm-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; counter-reset: dms; }
.dm-steps li { position: relative; display: grid; gap: 8px; align-content: start; padding: 22px; border-radius: var(--r); background: var(--card); border: 1px solid var(--line);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease); }
.dm-steps li:hover { transform: translateY(-4px); box-shadow: var(--sh-2); }
.dm-steps .ico { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--night); color: var(--brand-bright); }
.dm-steps b { font: 650 17px var(--display); }
.dm-steps b::before { counter-increment: dms; content: counter(dms) ". "; color: var(--brand); }
.dm-steps li > span:not(.ico) { color: var(--ink-2); font-size: 14.5px; line-height: 1.55; }

/* ---------- The visitor's booking page ---------- */
.dm-manage-head h1 { max-width: none; font-size: clamp(32px, 4vw, 48px); }
.dm-card-box { margin-top: 24px; display: grid; gap: 14px; padding: clamp(18px, 3vw, 28px); border-radius: var(--r-lg); background: var(--card); border: 1px solid var(--line); box-shadow: var(--sh-2); }
.dm-when, .dm-meet { display: flex; gap: 12px; align-items: flex-start; margin: 0; font-size: 17px; }
.dm-when { font-weight: 650; font-size: clamp(18px, 2vw, 21px); }
.dm-when .ms, .dm-meet .ms { color: var(--brand); flex: none; }
.dm-meet a { word-break: break-all; }
.dm-card-box .dm-cal { justify-content: flex-start; }
.dm-note { color: var(--ink-2); margin: 0; }
.dm-section { margin-top: 28px; }
.dm-section h2 { font-size: 22px; margin-bottom: 12px; }
.dm-tz-inline { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 14px; }
.dm-tz-inline .dm-label { margin: 0; }
.dm-tz-inline .dm-input { flex: 1 1 260px; width: auto; }
.dm-move { display: grid; gap: 16px; justify-items: start; }
.dm-move .dm-slots { width: 100%; max-height: 420px; overflow: auto; padding-right: 4px; }
.dm-cancel summary { cursor: pointer; font-weight: 650; color: var(--coral); }
.dm-cancel form { display: grid; gap: 10px; margin-top: 12px; justify-items: start; max-width: 520px; }

/* ---------- Phones ---------- */
@media (max-width: 900px) {
  .dm-layout { grid-template-columns: minmax(0, 1fr); row-gap: 0; }
  .dm-intro h1 { max-width: none; }
  .dm-panel { margin: 18px 0 28px; }
  .dm-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* Phones: the headline, then the form, then what the call covers. */
  .dm-intro { display: contents; }
  .dm-intro > * { order: 0; }
  .dm-panel { order: 1; }
  .dm-aside { order: 2; }
  .dm-points { margin-bottom: 4px; }
}
@media (max-width: 600px) {
  .dm-cards, .dm-row, .dm-grid, .dm-mode, .dm-steps { grid-template-columns: minmax(0, 1fr); }
  .dm-card { padding: 12px 14px; }
  .dm-dialog { width: 100vw; max-width: 100vw; max-height: 100dvh; height: 100dvh; border-radius: 0; margin: 0; }
  .dm-dialog-inner { padding: 16px; }
  .dm-progress span { font-size: 11px; }
  .dm-submit .btn, .dm-nav .btn { flex: 1; }
  .dm-panel { padding: 16px; border-radius: var(--r); }
  .dm-times { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .dm-chips { max-height: none; }
  .dm-dialog .dm-chips { max-height: none; }
}

/* ---------- Less motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .dm-dialog[open], .dm-js .dm-step.is-entering, .dm-done-ico { animation: none; }
  .dm-loading .ms { animation: none; }
  .dm-card, .dm-card:hover, .dm-time span, .dm-time:hover span, .dm-steps li, .dm-steps li:hover, .dm-aside-item { transition: none; transform: none; }
}
