/* Delta Wrought · before / after compare slider ("drag to compare")
   Loaded by styles.css (@import) and linked directly by sample pages.
   Markup and usage: tools/samples/README.md, section "Before / after slider".
   Behaviour: compare.js. Without JS the two panes simply stack: before, then after. */

@font-face { font-family: "MK Bodoni"; src: url("/samples/fonts/bodoni-moda-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "MK Jost"; src: url("/samples/fonts/jost-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "MK Jost"; src: url("/samples/fonts/jost-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "MK Atkinson"; src: url("/samples/fonts/atkinson-hyperlegible-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "MK Atkinson"; src: url("/samples/fonts/atkinson-hyperlegible-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }

/* ---------- the component ---------- */
.cmp {
  --pos: 50%;
  --cmp-ink: #0e1120;
  --cmp-accent: #2f45c8;
  --cmp-paper: #f2f3f6;
  container: cmp / inline-size;
  margin: 0;
  font-family: "Plex", "DW Plex", system-ui, sans-serif;
  color: var(--cmp-ink);
  font-style: normal; text-transform: none; letter-spacing: 0;
}
.cmp-stage { position: relative; display: grid; gap: 20px; }
.cmp-pane {
  position: relative; display: flex; flex-direction: column; min-width: 0;
  background: #fff; border-radius: 12px; overflow: hidden;
  box-shadow: 0 0 0 1px rgba(14, 17, 32, 0.1), 0 1px 2px rgba(14, 17, 32, 0.06), 0 24px 48px -32px rgba(14, 17, 32, 0.35);
}
.cmp-range, .cmp-handle { display: none; }

/* pane names, in the browser bar */
.cmp-tag { flex: none; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; line-height: 1.3; color: #fff; white-space: nowrap; }
.cmp-before .cmp-tag { background: var(--cmp-ink); }
.cmp-after .cmp-tag { background: var(--cmp-accent); order: 2; margin-left: auto; }
.mg-phone-col { min-width: 0; display: flex; flex-direction: column; align-items: center; }
.mg-phone-col .mk-anns { align-self: stretch; align-items: center; margin-top: 16px; }
.mg-phone-col .mk-ann::before { left: 50%; margin-left: -5px; }

/* live mode (compare.js adds .is-live) */
.cmp.is-live .cmp-stage { gap: 0; touch-action: pan-y; cursor: ew-resize; user-select: none; -webkit-user-select: none; }
.cmp.is-live .cmp-pane { grid-area: 1 / 1; z-index: 1; }
.cmp.is-live .cmp-after { z-index: 2; }
.cmp.is-live .cmp-after { clip-path: inset(0 0 0 var(--pos)); box-shadow: none; }
.cmp.is-live .cmp-range {
  display: block; position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0;
  pointer-events: none; z-index: 0;
}
.cmp.is-live .cmp-handle {
  display: block; position: absolute; top: 0; bottom: 0; left: var(--pos); width: 0; z-index: 5; pointer-events: none;
}
.cmp-handle::before {
  content: ""; position: absolute; top: 0; bottom: 0; left: -1.5px; width: 3px; background: #fff;
  box-shadow: 0 0 0 1px rgba(14, 17, 32, 0.18), 0 0 10px rgba(14, 17, 32, 0.18);
}
.cmp-grip {
  position: absolute; top: 50%; left: 0; width: 48px; height: 48px; margin: -24px 0 0 -24px; border-radius: 50%;
  display: grid; place-items: center; background: #fff; color: var(--cmp-ink);
  box-shadow: 0 0 0 1px rgba(14, 17, 32, 0.12), 0 1px 2px rgba(14, 17, 32, 0.16), 0 8px 20px -6px rgba(14, 17, 32, 0.35);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.cmp-grip svg { width: 22px; height: 22px; }
.cmp.is-live .cmp-stage:hover .cmp-grip, .cmp.is-dragging .cmp-grip { transform: scale(1.08); }
.cmp-range:focus-visible ~ .cmp-handle .cmp-grip { outline: 3px solid var(--cmp-accent); outline-offset: 3px; }

/* written labels: a row right under the thing they describe, never on top of it */
.mk-anns { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; margin: 10px 0 4px; position: relative; z-index: 2; }
.mk-anns.r { align-items: flex-end; }
.mk-ann {
  position: relative; display: inline-block; padding: 6px 12px; border-radius: 8px; color: #fff; background: var(--cmp-ink);
  font: 600 13px/1.35 "Plex", "DW Plex", system-ui, sans-serif; letter-spacing: 0; text-transform: none; font-style: normal;
  box-shadow: 0 6px 14px -8px rgba(0, 0, 0, 0.55);
}
.cmp-after .mk-ann { background: var(--cmp-accent); }
.mk-ann::before { content: ""; position: absolute; top: -5px; left: 16px; border: 5px solid transparent; border-top: 0; border-bottom-color: var(--cmp-ink); }
.mk-anns.r .mk-ann::before { left: auto; right: 16px; }
.cmp-after .mk-ann::before { border-bottom-color: var(--cmp-accent); }
.mm-card .mk-anns { margin: 12px 0 0; }

/* text key under the stage: the accessible description, and the labels on small screens */
.cmp-key { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px 32px; margin-top: 18px; font-size: 15.5px; line-height: 1.5; color: var(--cmp-ink); }
.cmp-key > div { padding: 14px 16px; border-radius: 12px; background: #f4f5f8; }
.cmp-key .k-after { background: #eef0fc; }
.cmp-key .k-after b { color: var(--cmp-accent); }
.cmp-key div { min-width: 0; }
.cmp-key b { display: block; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 4px; }
.cmp-key ol { margin: 0; padding: 0; list-style: none; counter-reset: k; }
.cmp-key li { counter-increment: k; display: flex; gap: 8px; padding: 3px 0; }
.cmp-key li::before { content: counter(k); flex: none; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 11.5px; font-weight: 600; margin-top: 1px; background: var(--cmp-ink); color: #fff; }
.cmp-key .k-after li::before { background: var(--cmp-accent); color: #fff; }
@container cmp (max-width: 639px) {
  .cmp-grip { width: 44px; height: 44px; margin: -22px 0 0 -22px; }
}

.cmp-cap { margin-top: 14px; font-size: 14px; line-height: 1.5; color: var(--cmp-muted, #5d6377); }
.cmp-how[hidden] { display: none; }

/* ---------- mock-up shell: a plain browser bar ---------- */
.mk-bar { flex: none; display: flex; align-items: center; gap: 10px; padding: 8px 14px; background: #f2f3f6; border-bottom: 1px solid rgba(14, 17, 32, 0.08); }
.mk-bar svg { width: 16px; height: 16px; color: #5c627a; flex: none; }
.mk-url { flex: 1; min-width: 0; max-width: 380px; margin: 0 auto; height: 26px; display: flex; align-items: center; gap: 6px; padding: 0 12px; border-radius: 999px; background: #fff; font: 400 12.5px/1 "Plex", "DW Plex", system-ui, sans-serif; color: #474d66; white-space: nowrap; overflow: hidden; }
.mk-url svg { width: 12px; height: 12px; }
.mk-page { flex: 1; position: relative; min-width: 0; }
.mk-page img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* ---------- 1. salon homepage (Studio Saffi, salon theme) ---------- */
.mk-salon { background: #f7f6f6; color: #1b1716; font-family: "MK Jost", "Jost", system-ui, sans-serif; padding: 22px 32px 64px; }
.ms-top { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding-bottom: 16px; border-bottom: 1px solid rgba(27, 23, 22, 0.22); }
.ms-logo { font: 500 24px/1 "MK Bodoni", "Bodoni Moda", Didot, Georgia, serif; letter-spacing: -0.02em; }
.ms-logo i { font-style: normal; }
.ms-nav { display: flex; gap: 22px; font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: #54443f; }
.ms-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; padding: 30px 0 28px; align-items: center; }
.ms-h { font: 500 clamp(36px, 5.6cqi, 64px)/0.95 "MK Bodoni", "Bodoni Moda", Didot, Georgia, serif; letter-spacing: -0.03em; margin: 0 0 16px; }
.ms-lede { margin: 0; font-size: 16px; line-height: 1.55; color: #54443f; max-width: 34ch; }
.ms-photo { position: relative; aspect-ratio: 16 / 10; max-height: 300px; isolation: isolate; }
.ms-photo::after { content: ""; position: absolute; inset: 12px -12px -12px 12px; border: 1px solid #1b1716; z-index: -1; }
.ms-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; min-height: 112px; padding: 22px 26px; border: 1px solid #1b1716; }
.ms-call-k { font-size: 12.5px; letter-spacing: 0.1em; text-transform: uppercase; color: #54443f; }
.ms-call-n { font: 500 32px/1.1 "MK Bodoni", "Bodoni Moda", Georgia, serif; letter-spacing: -0.01em; }
.ms-call-h { font-size: 14px; color: #54443f; margin-left: auto; }
.ms-book { background: #fff; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr) auto; align-items: end; gap: 14px 24px; }
.ms-cell { display: grid; gap: 8px; min-width: 0; }
.ms-lab { font-size: 11.5px; letter-spacing: 0.1em; text-transform: uppercase; color: #54443f; }
.ms-row { display: flex; flex-wrap: wrap; gap: 6px; }
.ms-row i { font-style: normal; font-size: 13.5px; padding: 7px 11px; border: 1px solid rgba(27, 23, 22, 0.3); white-space: nowrap; }
.ms-row i em { font-style: normal; color: #54443f; margin-left: 4px; }
.ms-row i.on { background: #efd2cb; border-color: #1b1716; }
.ms-go { display: block; text-align: center; padding: 13px 18px; background: #1b1716; color: #f4dfdb; font-size: 13px; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; white-space: nowrap; }
@container cmp (max-width: 639px) {
  .mk-salon { padding: 16px 16px 52px; }
  .ms-nav { display: none; }
  .ms-hero { grid-template-columns: minmax(0, 1fr); gap: 18px; padding: 18px 0 22px; }
  .ms-photo { order: -1; }
  .ms-photo::after { inset: 8px -8px -8px 8px; }
  .ms-h { font-size: 34px; margin-bottom: 10px; }
  .ms-lede { font-size: 15px; }
  .ms-strip { padding: 18px 16px; gap: 6px; flex-direction: column; align-items: flex-start; }
  .ms-call-h { margin-left: 0; }
  .ms-call-n { font-size: 26px; }
  .ms-book { grid-template-columns: minmax(0, 1fr); align-items: stretch; gap: 14px; }
  .ms-row i { font-size: 12.5px; padding: 6px 9px; }
}

/* ---------- 2. Google result + chat share (Marigold Kitchen). Arial on purpose: imitates those apps. ---------- */
/* impeccable-disable-next-line overused-font -- imitates Google/WhatsApp UI type */
.mk-g { background: #fff; color: #202124; font-family: Arial, Helvetica, sans-serif; padding: 20px 28px 64px; }
.mg-search { display: flex; align-items: center; gap: 10px; max-width: 560px; height: 44px; padding: 0 18px; border-radius: 999px; box-shadow: 0 1px 4px rgba(32, 33, 36, 0.28); font-size: 15px; color: #202124; }
.mg-search svg { width: 18px; height: 18px; color: #5f6368; flex: none; }
.mg-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 36px; padding-top: 26px; align-items: start; }
.mg-res { padding: 4px 0 20px; max-width: 600px; }
.mg-res + .mg-res { padding-top: 14px; border-top: 1px solid #ebebeb; }
.mg-site { display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: #4d5156; }
.mg-site b { display: block; font-weight: 400; font-size: 14px; color: #202124; }
.mg-fav { width: 28px; height: 28px; border-radius: 50%; background: #f1f3f4; display: grid; place-items: center; font-size: 12px; color: #5f6368; flex: none; }
.mg-fav.brand { background: #b63a22; color: #fff8ef; }
.mg-title { display: block; color: #1a0dab; font-size: 20px; line-height: 1.3; margin: 8px 0 4px; }
.mg-desc { display: block; font-size: 14px; line-height: 1.58; color: #4d5156; }
.mg-desc.empty { color: #70757a; }
.mg-phone { background: #efe7de; border-radius: 18px; padding: 0 0 18px; box-shadow: 0 0 0 6px #12162b, 0 16px 30px -14px rgba(0, 0, 0, 0.5); overflow: hidden; max-width: 330px; justify-self: center; width: 100%; }
.mg-chat-top { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: #1f5e4c; color: #fff; font-size: 14px; }
.mg-chat-top i { width: 30px; height: 30px; border-radius: 50%; background: #c7d9d3; color: #1f5e4c; display: grid; place-items: center; font-style: normal; font-weight: 700; font-size: 13px; }
.mg-msgs { display: grid; gap: 10px; padding: 14px 12px 0; }
.mg-in, .mg-out { max-width: 86%; padding: 8px 10px 6px; border-radius: 10px; font-size: 13.5px; line-height: 1.4; box-shadow: 0 1px 1px rgba(0, 0, 0, 0.12); }
.mg-in { background: #fff; justify-self: start; border-top-left-radius: 2px; }
.mg-out { background: #d9fdd3; justify-self: end; border-top-right-radius: 2px; width: 86%; }
.mg-time { display: block; text-align: right; font-size: 10.5px; color: #54656f; margin-top: 2px; }
.mg-card { display: block; margin: 0 0 6px; border-radius: 7px; overflow: hidden; background: rgba(0, 0, 0, 0.05); }
.mg-card.blank .mg-img { aspect-ratio: 1.91 / 1; background: #d6d9dc; }
.mg-card .mg-img { aspect-ratio: 1.91 / 1; position: relative; }
.mg-card .mg-img span { position: absolute; left: 0; bottom: 0; right: 0; padding: 18px 10px 8px; background: linear-gradient(transparent, rgba(42, 26, 18, 0.85)); color: #fbe7b5; font-size: 15px; font-weight: 700; }
.mg-card-t { display: block; padding: 8px 10px 0; font-size: 13px; font-weight: 700; color: #111b21; }
.mg-card-d { display: block; padding: 2px 10px 0; font-size: 12px; color: #54656f; }
.mg-card-u { display: block; padding: 4px 10px 8px; font-size: 11.5px; color: #54656f; }
.mg-lnk { color: #00618f; text-decoration: underline; word-break: break-all; }
@container cmp (max-width: 639px) {
  .mk-g { padding: 14px 14px 52px; }
  .mg-search { height: 40px; font-size: 14px; padding: 0 14px; }
  .mg-grid { grid-template-columns: minmax(0, 1fr); gap: 26px; padding-top: 18px; }
  .mg-title { font-size: 17px; }
  .mg-res.mg-other { display: none; }
  .mg-res.mk-spot { min-height: 212px; } /* same height before and after, so the chat lines up */
  .mg-phone { max-width: 300px; }
}

/* ---------- 3. map listing (before) and one-page site (after): Larkfield Physiotherapy ---------- */
/* impeccable-disable-next-line overused-font -- imitates Google/WhatsApp UI type */
.mk-map { background: #e8f0ee; overflow: hidden; min-height: 460px; font-family: Arial, Helvetica, sans-serif; color: #202124; }
.mm-svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.mm-card { position: absolute; left: 28px; top: 28px; width: min(340px, calc(100% - 56px)); display: grid; gap: 6px; padding: 18px 18px 16px; background: #fff; border-radius: 12px; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2), 0 18px 30px -18px rgba(0, 0, 0, 0.45); }
.mm-card b.mm-name { font-size: 19px; line-height: 1.25; font-weight: 400; }
.mm-cat { font-size: 13.5px; color: #4d5156; }
.mm-acts { display: flex; gap: 8px; padding: 8px 0 6px; }
.mm-acts i { font-style: normal; display: grid; justify-items: center; gap: 4px; width: 64px; font-size: 12px; color: #1a5fb4; }
.mm-acts i::before { content: ""; width: 36px; height: 36px; border-radius: 50%; box-shadow: inset 0 0 0 1px #c6c9cc; background: #fff; }
.mm-acts i.off { color: #6b7075; }
.mm-acts i.off::before { background: #f1f3f4; box-shadow: none; }
.mm-row { display: flex; align-items: center; gap: 10px; padding: 9px 0 0; border-top: 1px solid #ebebeb; font-size: 14px; }
.mm-row svg { width: 16px; height: 16px; flex: none; color: #5f6368; }
.mm-row.off { color: #70757a; font-style: italic; }

.mk-clinic { background: #fff; color: #0f2a2c; font-family: "MK Atkinson", "Atkinson Hyperlegible", system-ui, sans-serif; padding: 18px 30px 64px; }
.mc-top { display: flex; align-items: center; gap: 20px; padding: 4px 0 16px; border-bottom: 1px solid rgba(15, 42, 44, 0.14); }
.mc-top b { font-size: 18px; margin-right: auto; }
.mc-nav { display: flex; gap: 18px; font-size: 14px; color: #42585a; }
.mc-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 18px; border-radius: 12px; background: #0e6b66; color: #fff; font-weight: 700; font-size: 15px; font-style: normal; white-space: nowrap; }
.mc-btn.sm { min-height: 36px; padding: 0 14px; font-size: 14px; border-radius: 10px; }
.mc-btn.line { background: #fff; color: #0e6b66; box-shadow: inset 0 0 0 2px #0e6b66; }
.mc-hero { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 32px; padding: 26px 0 22px; align-items: center; }
.mc-h { font-weight: 700; font-size: clamp(30px, 4.2cqi, 46px); line-height: 1.06; letter-spacing: -0.02em; margin: 0 0 12px; }
.mc-lede { margin: 0 0 20px; font-size: 16px; line-height: 1.5; color: #42585a; }
.mc-ctas { display: flex; flex-wrap: wrap; gap: 10px; }
.mc-photo { aspect-ratio: 4 / 3; border-radius: 16px; overflow: hidden; }
.mc-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.mc-list > span:not(.mk-note) { display: grid; gap: 2px; padding: 14px 16px; border-radius: 14px; background: #eaf4f2; font-size: 13.5px; color: #42585a; }
.mc-list > span:not(.mk-note) b { font-size: 15.5px; color: #0f2a2c; }
.mc-list > span:not(.mk-note) em { font-style: normal; font-weight: 700; font-size: 17px; color: #0e6b66; }
.mc-hours { display: flex; flex-wrap: wrap; gap: 4px 22px; margin-top: 16px; font-size: 14px; color: #42585a; }
.mc-hours b { color: #0f2a2c; }
@container cmp (max-width: 639px) {
  .mk-map { min-height: 520px; }
  .mm-card { left: 14px; top: 22px; width: calc(100% - 28px); padding: 14px; }
  .mm-acts i { width: 56px; }
  .mk-clinic { padding: 14px 16px 52px; }
  .mc-nav { display: none; }
  .mc-top b { font-size: 16px; }
  .mc-hero { grid-template-columns: minmax(0, 1fr); gap: 16px; padding: 16px 0; }
  .mc-photo { order: -1; aspect-ratio: 16 / 9; }
  .mc-h { font-size: 27px; }
  .mc-lede { font-size: 15px; margin-bottom: 14px; }
  .mc-btn { min-height: 42px; font-size: 14px; padding: 0 14px; }
  .mc-list { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .mc-list > span:not(.mk-note) { grid-template-columns: minmax(0, 1fr) auto; align-items: center; padding: 10px 14px; }
  .mc-list > span:not(.mk-note) em { grid-row: 1 / 3; grid-column: 2; }
  .mc-hours { font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  .cmp-grip { transition: none; }
}

/* the words are on the picture now; the key stays for screen readers only */
.cmp-key { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; margin: 0; padding: 0; }

/* under the slider: what we do and what it does for the owner */
.cmp-why { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px 32px; margin-top: 18px; }
.cmp-why p { margin: 0; padding: 16px 18px; border-radius: 12px; background: #f4f5f8; font-size: 15.5px; line-height: 1.55; color: var(--cmp-ink); }
.cmp-why p + p { background: #eef0fc; }
.cmp-why b { display: block; margin-bottom: 4px; font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.cmp-why p + p b { color: var(--cmp-accent); }
@container cmp (max-width: 639px) {
  .cmp-why { grid-template-columns: minmax(0, 1fr); }
  .mk-ann { font-size: 12px; padding: 5px 9px; max-width: 46%; }
  .cmp-before .mk-anns { align-items: flex-start; }
  .cmp-after .mk-anns { align-items: flex-end; }
  .cmp-before .mk-ann::before { left: 14px; right: auto; margin-left: 0; }
  .cmp-after .mk-ann::before { left: auto; right: 14px; margin-left: 0; }
}
