/* =========================================================================
   Chairday marketing pages (chairday.io) - additions to the Daylight kit.
   Loaded by templates/layouts/marketing.php on every apex page.
   Tokens only (no literal colours except where the kit itself fixes them),
   so light and dark themes both work. Prefix cd-mk-.
   ========================================================================= */

/* ---------- Header and mobile menu ---------- */
.cd-mk-header .cd-header__nav { gap: 2px; }
@media (min-width: 1024px) and (max-width: 1199.98px) {
  .cd-mk-header .cd-navlink { padding: 0 9px; }
}
/* Decision 043: "Start free" stays in the header at every width; on a phone "Sign in" moves into the menu */
@media (max-width: 479.98px) { .cd-mk-hide-narrow { display: none !important; } }
.cd-mk-menu__only-narrow { display: none; }
@media (max-width: 479.98px) { .cd-mk-menu__only-narrow { display: block; } }
.cd-mk-menu { position: relative; }
.cd-mk-menu > summary { list-style: none; }
.cd-mk-menu > summary::-webkit-details-marker { display: none; }
.cd-mk-menu__panel {
  position: absolute; right: 0; top: calc(100% + 10px); z-index: var(--cd-z-bar);
  width: min(300px, calc(100vw - 32px)); padding: 8px;
  background: var(--cd-surface); border: 1px solid var(--cd-border); border-radius: var(--cd-radius-lg); box-shadow: var(--cd-shadow-3);
}
.cd-mk-menu__panel .cd-navlink { display: flex; width: 100%; min-height: 44px; }

/* ---------- Footer ---------- */
.cd-mk-footer__grid { display: grid; gap: 28px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) { .cd-mk-footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .cd-mk-footer__grid { grid-template-columns: 1.3fr repeat(4, minmax(0, 1fr)); } }
.cd-mk-footer__title { font: 700 0.75rem/1.3 var(--cd-font-ui); letter-spacing: 0.12em; text-transform: uppercase; color: var(--cd-text-muted); margin-bottom: 10px; }
.cd-mk-footer__links { display: flex; flex-direction: column; gap: 8px; }
.cd-mk-footer__links a { display: inline-block; padding: 2px 0; }
.cd-mk-theme { align-self: flex-start; }

/* ---------- Hero ---------- */
.cd-mk-hero__grid { display: grid; gap: 32px; grid-template-columns: minmax(0, 1fr); align-items: center; }
@media (min-width: 1024px) { .cd-mk-hero__grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 56px; } }

/* Illustration of the booking screen */
.cd-mk-shot { margin: 0; display: flex; flex-direction: column; gap: 10px; }
.cd-mk-shot__screen {
  display: flex; flex-direction: column; gap: 10px; padding: 18px; max-width: 400px; width: 100%; margin-inline: auto;
  background: var(--cd-surface); border: 1px solid var(--cd-border); border-radius: var(--cd-radius-xl); box-shadow: var(--cd-shadow-3);
}
.cd-mk-shot__bar { display: flex; align-items: center; gap: 10px; padding-bottom: 10px; border-bottom: 1px solid var(--cd-border); }
.cd-mk-shot__bar b { display: block; font: 700 0.9375rem/1.2 var(--cd-font-display); }
.cd-mk-shot__bar small { display: block; font-size: 0.75rem; color: var(--cd-text-muted); }
.cd-mk-shot__label { display: flex; align-items: center; gap: 6px; font: 700 0.6875rem/1 var(--cd-font-ui); letter-spacing: 0.1em; text-transform: uppercase; color: var(--cd-text-muted); }
.cd-mk-shot__people { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.cd-mk-person { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 4px; border: 1.5px solid var(--cd-border-strong); border-radius: var(--cd-radius-md); font: 600 0.8125rem/1 var(--cd-font-ui); }
.cd-mk-person--on { border-color: var(--cd-primary); box-shadow: inset 0 0 0 1px var(--cd-primary); background: var(--cd-surface-2); }
.cd-mk-chips { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.cd-mk-chip { display: grid; place-items: center; min-height: 40px; border: 1.5px solid var(--cd-border-strong); border-radius: 12px; font: 600 0.875rem/1 var(--cd-font-ui); font-variant-numeric: tabular-nums; }
.cd-mk-chip--on { background: var(--cd-primary); border-color: var(--cd-primary); color: var(--cd-on-primary); }
/* Taken slots in the illustration: dashed and struck through, text kept at the muted
   token so it still reads at 4.5:1 in both themes (WCAG 1.4.3) */
.cd-mk-chip--off { border-style: dashed; color: var(--cd-text-muted); text-decoration: line-through; }
.cd-mk-shot__note { display: flex; align-items: center; gap: 6px; font-size: 0.8125rem; color: var(--cd-success); font-weight: 600; }
.cd-mk-shot__cta {
  display: flex; align-items: center; justify-content: space-between; min-height: 48px; padding: 0 8px 0 22px; border-radius: var(--cd-radius-pill);
  background: var(--cd-primary); color: var(--cd-on-primary); font: 700 1rem/1 var(--cd-font-ui);
}
/* The caption is the text alternative for the aria-hidden illustration and sits on the
   screen's soft shadow, where muted text drops to about 4.1:1; full text colour keeps it
   above 4.5:1 in both themes (WCAG 1.4.3) */
.cd-mk-shot__caption { max-width: 400px; margin-inline: auto; font-size: 0.8125rem; color: var(--cd-text); text-align: center; }

/* ---------- Product previews (decision 043) ----------
   Each preview is the kit's own component with example data, so it looks as the product does
   and follows both themes: the day diary (.cd-cal), the queue card (.cd-queue), stats cards
   and heatmap (.cd-stat, .cd-heatmap) and the QR poster (.cd-qrcard). All are decorative
   (aria-hidden) with a caption beside them. */
.cd-mk-hero__grid--wide { align-items: center; }
@media (min-width: 1024px) { .cd-mk-hero__grid--wide { grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr); gap: 48px; } }
.cd-mk-shot--wide .cd-mk-shot__caption { max-width: 560px; }
.cd-mk-frame { display: flex; flex-direction: column; min-width: 0; background: var(--cd-surface); border: 1px solid var(--cd-border); border-radius: var(--cd-radius-xl); box-shadow: var(--cd-shadow-3); overflow: hidden; }
.cd-mk-frame__bar { display: flex; align-items: center; justify-content: space-between; gap: 8px 12px; flex-wrap: wrap; padding: 14px 16px; border-bottom: 1px solid var(--cd-border); }
.cd-mk-frame__bar b { display: block; font: 700 1rem/1.2 var(--cd-font-display); }
.cd-mk-frame__bar small { display: block; font-size: 0.75rem; color: var(--cd-text-muted); }
.cd-mk-frame__keys { display: flex; flex-wrap: wrap; gap: 6px; }
/* The diary inside the frame: four hours of 5-minute rows, columns that shrink to fit, no scrolling */
.cd-mk-cal { --cd-cal-rows: 48; --cd-cal-slot: 7px; --cd-cal-colw: 0px; min-height: 0; max-height: none; overflow: hidden; border: 0; border-radius: 0; }
.cd-mk-cal .cd-cal__corner, .cd-mk-cal .cd-cal__colhead, .cd-mk-cal .cd-cal__times { position: static; }
.cd-mk-cal .cd-cal__colhead { padding: 8px 10px; }
/* On a tinted booking the kit's muted time and service text measures 4.35 to 4.43:1 in the dark
   theme; in this illustration they take the full text colour so every word clears 4.5:1 */
.cd-mk-cal .cd-event--checkedin .cd-event__time, .cd-mk-cal .cd-event--checkedin .cd-event__meta,
.cd-mk-cal .cd-event--pending .cd-event__time, .cd-mk-cal .cd-event--pending .cd-event__meta,
.cd-mk-cal .cd-event--walkin .cd-event__time, .cd-mk-cal .cd-event--walkin .cd-event__meta { color: var(--cd-text); }
@media (max-width: 559.98px) {
  .cd-mk-cal { --cd-cal-cols: 2; }
  .cd-mk-cal__extra { display: none; }
}
.cd-mk-queue { max-width: 400px; width: 100%; margin-inline: auto; box-shadow: var(--cd-shadow-3); }
.cd-mk-queue .cd-queue__num { font-size: 4.5rem; }
.cd-mk-statshot { display: grid; gap: 12px; max-width: 400px; width: 100%; margin-inline: auto; padding: 14px; background: var(--cd-surface-2); border: 1px solid var(--cd-border); border-radius: var(--cd-radius-xl); box-shadow: var(--cd-shadow-3); }
.cd-mk-statshot__cards { display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cd-mk-statshot .cd-stat { padding: 12px 12px 8px; gap: 6px; }
.cd-mk-statshot .cd-stat__label { font-size: 0.75rem; }
.cd-mk-statshot .cd-stat__value { font-size: 1.5rem; }
.cd-mk-statshot .cd-stat__delta { font-size: 0.6875rem; }
.cd-mk-statshot .cd-stat__spark { min-height: 0; }
.cd-mk-statshot__heat { display: grid; gap: 8px; padding: 12px; border-radius: 18px; background: var(--cd-surface); border: 1px solid var(--cd-border); }
.cd-mk-statshot .cd-heat { height: 20px; }
.cd-mk-statshot .cd-heatmap thead th:first-child, .cd-mk-statshot .cd-heatmap tbody th { width: 32px; }
.cd-mk-qrcard { margin-inline: auto; }
.cd-mk-trio { gap: 32px 28px; align-items: start; }
.cd-mk-trio__item { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.cd-mk-trio__item > .cd-h4 { text-align: center; }
/* A feature with its preview beside the points (features page) */
.cd-mk-feature__shot { margin-top: 8px; }
.cd-mk-client { background: var(--cd-surface-2); border-block: 1px solid var(--cd-border); }

/* ---------- Sign-up form (decision 043): the choices as compact chips ---------- */
.cd-mk-choices { display: grid; gap: 8px; }
.cd-mk-choices .cd-option { position: relative; padding: 10px 12px; gap: 10px; min-height: 52px; align-items: center; }
.cd-mk-choices .cd-option__icon { width: 32px; height: 32px; border-radius: 10px; }
.cd-mk-choices .cd-option__icon .cd-icon { width: 18px; height: 18px; }
/* The kind of business: five small tiles, icon over name, the radio in the corner */
.cd-mk-choices--kinds { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cd-mk-choices--kinds .cd-option { flex-direction: column; justify-content: center; gap: 6px; padding: 12px 6px 10px; text-align: center; }
.cd-mk-choices--kinds .cd-option__body { flex: none; }
.cd-mk-choices--kinds .cd-option__title { font-size: 0.875rem; }
/* In these tiles the whole tile is the choice: the chosen one has the kit's dark border and tint,
   and the focus ring. The radio itself stays in the page for keyboards and screen readers, unseen. */
.cd-mk-choices--kinds .cd-option__input, .cd-mk-choices--plans .cd-option__input { position: absolute; top: 8px; right: 8px; opacity: 0; }
.cd-mk-choices--plans { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cd-mk-choices--plans .cd-option { flex-direction: column; align-items: stretch; justify-content: center; padding: 10px 10px; text-align: center; }
.cd-mk-choices--plans .cd-option__desc { font-size: 0.75rem; }
.cd-mk-choices .cd-option:has(.cd-option__input:checked) .cd-option__title::after { content: ""; display: inline-block; width: 0.5em; height: 0.5em; margin-left: 6px; border-radius: 50%; background: var(--cd-accent); vertical-align: middle; }
@media (min-width: 640px) {
  .cd-mk-choices--kinds { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
/* A phone needs the form, not the paragraph above it: the line over the heading already says the offer */
@media (max-width: 639.98px) { .cd-mk-signup-lead { display: none; } }
.cd-mk-inline-disclosure > summary { min-height: 32px; padding-block: 2px; font-size: 0.875rem; }
.cd-mk-center { text-align: center; }

/* ---------- Guides: long-form text (decision 044) ---------- */
.cd-mk-prose { max-width: 720px; }
.cd-mk-prose > * + * { margin-top: 16px; }
.cd-mk-prose h2 { font: 800 1.5rem/1.2 var(--cd-font-display); letter-spacing: -0.01em; margin-top: 40px; scroll-margin-top: 96px; }
.cd-mk-prose ul, .cd-mk-prose ol { padding-left: 1.3em; display: grid; gap: 8px; }
.cd-mk-prose li { line-height: 1.55; }
.cd-mk-prose .cd-table-wrap { margin-top: 20px; }

/* ---------- Two-answer comparison tables (decision 044) ----------
   A row name and two answers. On a wide screen an ordinary table. On a phone a sideways table
   would hide the second answer, which is the point of the page, so each row stacks: its name,
   then the two answers side by side, each under the name of its column (data-label). */
.cd-mk-vs tbody th { font-weight: 600; max-width: 18em; }
.cd-mk-vs td { vertical-align: top; }
@media (max-width: 719.98px) {
  .cd-mk-vs, .cd-mk-vs tbody { display: block; }
  .cd-mk-vs thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .cd-mk-vs tbody tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; padding: 14px 16px; }
  .cd-mk-vs tbody tr + tr { border-top: 1px solid var(--cd-border); }
  .cd-mk-vs tbody th, .cd-mk-vs tbody td, .cd-mk-vs tbody tr + tr th, .cd-mk-vs tbody tr + tr td { display: block; padding: 0; border: 0; max-width: none; }
  .cd-mk-vs tbody th { grid-column: 1 / -1; margin-bottom: 8px; }
  .cd-mk-vs td::before { content: attr(data-label); display: block; margin-bottom: 2px; font: 700 0.6875rem/1.3 var(--cd-font-ui); letter-spacing: 0.1em; text-transform: uppercase; color: var(--cd-text-muted); }
}

/* ---------- Blocks ---------- */
.cd-mk-band { background: var(--cd-surface-2); border-block: 1px solid var(--cd-border); }
.cd-mk-split { align-items: center; }
.cd-mk-tile { display: flex; flex-direction: column; gap: 8px; color: inherit; text-decoration: none; font-weight: 400; }
.cd-mk-tile:hover { text-decoration: none; }
.cd-mk-tile b { font: 700 1.125rem/1.25 var(--cd-font-display); }
.cd-mk-tile .cd-icon { color: var(--cd-attention); }
.cd-mk-tile:focus-visible { outline: 2px solid var(--cd-focus); outline-offset: 2px; }

.cd-mk-icon { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: var(--cd-accent-soft); color: var(--cd-text); flex: none; }
.cd-mk-icon .cd-icon { width: 22px; height: 22px; }
.cd-mk-icon--lg { width: 56px; height: 56px; border-radius: 18px; }
.cd-mk-icon--lg .cd-icon { width: 28px; height: 28px; }

.cd-mk-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr); counter-reset: none; }
@media (min-width: 768px) { .cd-mk-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .cd-mk-steps--5 { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.cd-mk-steps li { display: flex; flex-direction: column; gap: 8px; padding: 20px; background: var(--cd-surface); border: 1px solid var(--cd-border); border-radius: var(--cd-radius-lg); }
.cd-mk-steps__num { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--cd-primary); color: var(--cd-on-primary); font: 800 1rem/1 var(--cd-font-display); }

.cd-mk-checks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.cd-mk-checks li { display: flex; align-items: flex-start; gap: 10px; }
.cd-mk-checks li > .cd-icon { width: 20px; height: 20px; margin-top: 2px; color: var(--cd-success); stroke-width: 2.2; }
.cd-mk-checks--muted li > .cd-icon { color: var(--cd-text-muted); }
@media (min-width: 768px) { .cd-mk-checks--cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 32px; } }
@media (min-width: 1024px) { .cd-mk-checks--cols { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.cd-mk-numbered { margin: 0; padding-left: 1.4em; display: flex; flex-direction: column; gap: 8px; }

.cd-mk-pain { border-left: 4px solid var(--cd-accent); }
.cd-mk-answer { display: flex; align-items: flex-start; gap: 8px; font-weight: 600; }
.cd-mk-answer .cd-icon { width: 20px; height: 20px; flex: none; margin-top: 2px; color: var(--cd-success); }

.cd-mk-compare .cd-barlist__row { grid-template-columns: minmax(0, 8em) minmax(0, 1fr) 4em; font-size: 0.9375rem; }
.cd-mk-compare .cd-bar { height: 10px; }

.cd-mk-stat { justify-content: center; }
.cd-mk-stat__num { font: 800 clamp(2.75rem, 2rem + 3vw, 4rem)/1 var(--cd-font-display); letter-spacing: -0.03em; }

.cd-mk-plans { align-items: stretch; }
.cd-mk-plans .cd-plan { height: 100%; }
.cd-mk-plans .cd-plan > .cd-btn { margin-top: auto; }

.cd-mk-jump { display: flex; flex-wrap: wrap; gap: 8px; }
.cd-mk-feature--rule { border-top: 1px solid var(--cd-border); }

.cd-mk-compare-wrap { overflow-x: auto; }
.cd-mk-compare-table { min-width: 640px; }
.cd-mk-compare-table tbody th { font-weight: 600; max-width: 18em; }
.cd-mk-compare-table td { vertical-align: top; }
/* Decision 042, phones: the row names stay put while the plans slide sideways, and a line says so.
   Before, only the first plan showed, with nothing to say the table scrolled. */
.cd-mk-compare-table tbody th, .cd-mk-compare-table thead th:first-child { position: sticky; left: 0; z-index: 1; background: var(--cd-surface); }
.cd-mk-swipe { display: none; }
@media (max-width: 719.98px) {
  .cd-mk-compare-table { min-width: 600px; }
  .cd-mk-compare-table tbody th { width: 9.5em; max-width: 9.5em; box-shadow: 1px 0 0 var(--cd-border); }
  .cd-mk-compare-table th, .cd-mk-compare-table td { padding: 10px 12px; }
  .cd-mk-swipe { display: flex; align-items: center; gap: 6px; }
}

/* Decision 042: the postcode box was 160px wide, too narrow for its own hint */
@media (min-width: 640px) { .cd-searchbar { grid-template-columns: minmax(0, 1.5fr) minmax(190px, 1fr) auto; } }

.cd-mk-receipt { max-width: 520px; }
.cd-mk-figure { margin: 0; }

.cd-mk-cta { background: var(--cd-dawn); border-top: 1px solid var(--cd-border); }
.cd-mk-cta__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; padding-block: var(--cd-space-9); }

.cd-mk-helpsearch { max-width: 640px; }
@media (min-width: 640px) { .cd-mk-helpsearch { grid-template-columns: minmax(0, 1fr) auto; } }
.cd-mk-help-list .cd-list__title { color: var(--cd-text); }

/* Honeypot: off screen for people, still in the form for bots */
.cd-mk-hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* Footer sits against the CTA band without the kit's top margin */
main:has(> .cd-mk-cta:last-child) + .cd-footer { margin-top: 0; }

@media print {
  .cd-mk-menu, .cd-mk-cta, .cd-mk-theme { display: none !important; }
}

/* Improvement round 2: a client's bookings as date cards (the next one stands out) */
.cd-visits { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.cd-visit {
  display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; align-items: center; gap: 16px; padding: 12px 16px 12px 12px;
  border-radius: 16px; background: var(--cd-surface); border: 1px solid var(--cd-border); color: var(--cd-text); text-decoration: none;
}
.cd-visit:hover { border-color: var(--cd-border-strong); text-decoration: none; box-shadow: var(--cd-shadow-1); }
.cd-visit:focus-visible { outline: 3px solid var(--cd-focus); outline-offset: 2px; }
.cd-visit__date { display: grid; justify-items: center; align-content: center; height: 64px; border-radius: 12px; background: var(--cd-surface-3); line-height: 1.05; }
.cd-visit__date small { font: 700 0.6875rem/1.2 var(--cd-font-ui); text-transform: uppercase; letter-spacing: 0.06em; color: var(--cd-text-muted); }
.cd-visit__date b { font: 800 1.375rem/1.05 var(--cd-font-display); font-variant-numeric: tabular-nums; }
.cd-visit__main { display: grid; gap: 2px; min-width: 0; }
.cd-visit__main b { font: 800 1.0625rem/1.25 var(--cd-font-display); }
.cd-visit__main span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cd-visit__main small { font-size: 0.75rem; color: var(--cd-text-muted); }
.cd-visit--next { background: var(--cd-accent-soft); border-color: color-mix(in srgb, var(--cd-accent) 45%, transparent); }
.cd-visit--next .cd-visit__date { background: var(--cd-accent); }
.cd-visit--next .cd-visit__date small { color: var(--cd-on-accent); }
@media (max-width: 480px) { .cd-visit { grid-template-columns: 52px minmax(0, 1fr); } .cd-visit .cd-status { grid-column: 2; justify-self: start; } }
.cd-visits-more > summary { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; margin-top: 4px; cursor: pointer; font-weight: 700; list-style: none; }
.cd-visits-more > summary::-webkit-details-marker { display: none; }
.cd-visits-more > summary .cd-icon { width: 16px; height: 16px; }
.cd-visits-more[open] > summary .cd-icon { transform: rotate(180deg); }
.cd-status--done { background: var(--cd-surface-sunk); color: var(--cd-text-muted); box-shadow: inset 0 0 0 1px var(--cd-border); }
.cd-visit--next .cd-visit__date, .cd-visit--next .cd-visit__date b { color: var(--cd-on-accent); }

/* Decision 030: /services cards and pages */
@media (min-width: 1024px) { .cd-mk-steps--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.cd-mk-services { align-items: stretch; }
.cd-mk-services .cd-plan { height: 100%; }
.cd-mk-services .cd-plan > .cd-btn { margin-top: auto; }
.cd-mk-service__icon { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: var(--cd-accent-soft); color: var(--cd-text); }
.cd-mk-service__icon .cd-icon { width: 22px; height: 22px; }
.cd-mk-service__price { font-size: 1.75rem; }
.cd-mk-svc-price { font: 800 2rem/1.1 var(--cd-font-display); letter-spacing: -0.02em; margin: 0; }
.cd-mk-svc-aside { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 88px); }
@media (max-width: 1023px) { .cd-mk-svc-aside { position: static; } }
