@import url('https://fonts.googleapis.com/css2?family=Rubik:wght@500;600;700;800&family=Heebo:wght@400;500;600;700&display=swap');

:root {
  --teal: #13524a;
  --teal-2: #1c6b60;
  --gold: #c9a24b;
  --gold-2: #d9b463;
  --ink: #1a2421;
  --bg: #f4f1ea;
  --muted: #5c6b66;
  --line: #e3ded2;
  --err: #c0392b;
  --font-title: 'Rubik', 'Heebo', system-ui, sans-serif;
  --font-body: 'Heebo', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
}

/* ── page ── */
/* self-contained sizing: the form renders standalone, in iframes, and inside Puck pages —
   width:100% + padding must include the border/padding regardless of the host's CSS */
.fm-page, .fm-page * { box-sizing: border-box; }
.fm-page {
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 16px;
  background-color: var(--bg);
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  font-family: var(--font-body);
  color: var(--ink);
}

/* ── embedded (Puck "Form" block on a CMS page) — card only, in the page flow ── */
.fm-embed {
  min-height: 0;
  padding: 24px 16px;
  background: none;
  background-attachment: initial;
}

/* Outer section of the Puck "Form" block. Padding lives here (not inline on the
   element) so phones can reclaim it — the block, .fm-embed and .fm-card each add
   side padding, and stacked they used to eat a third of a narrow screen. */
.fm-block { padding: 32px 20px; }

/* ── card ── */
.fm-card {
  width: 100%;
  /* the block's "רוחב הטופס" slider sets --fm-max; standalone pages keep 620px */
  max-width: var(--fm-max, 620px);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 32px 32px 28px;
  box-shadow: 0 12px 40px rgba(19, 82, 74, 0.12);
}
@media (max-width: 560px) {
  .fm-page { padding: 16px 8px; }
  .fm-embed { padding: 12px 4px; }
  .fm-block { padding: 12px 4px; }
  .fm-card { padding: 20px 14px; border-radius: 14px; }
}

/* ── header ── */
.fm-head { margin-bottom: 22px; }
.fm-title {
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 26px;
  color: var(--teal);
  margin: 0 0 8px;
  line-height: 1.25;
}
.fm-desc { color: var(--muted); font-size: 15px; line-height: 1.6; margin: 0; }
.fm-header-html { margin-bottom: 22px; line-height: 1.6; color: var(--ink); }
.fm-header-html h1, .fm-header-html h2, .fm-header-html h3 {
  font-family: var(--font-title); color: var(--teal); margin: 0 0 8px;
}
.fm-header-html h1 { font-size: 26px; font-weight: 800; }
.fm-header-html h2 { font-size: 21px; font-weight: 700; }
.fm-header-html h3 { font-size: 18px; font-weight: 700; }
.fm-header-html p { margin: 0 0 8px; }
.fm-header-html img { max-width: 100%; border-radius: 10px; display: block; margin: 10px 0; }
.fm-header-html a { color: var(--gold); }
.fm-header-html strong { font-weight: 700; }

/* ── stepper ── */
.fm-steps {
  display: flex; flex-wrap: wrap; gap: 8px 18px;
  margin: 0 0 24px; padding-bottom: 18px; border-bottom: 1px solid var(--line);
}
.fm-step { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; }
.fm-step-num {
  width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: #eee9df; color: var(--muted); font-weight: 700; font-size: 13px;
  border: 1px solid var(--line);
}
.fm-step.active .fm-step-num { background: var(--teal); color: #fff; border-color: var(--teal); }
.fm-step.done .fm-step-num { background: var(--gold); color: #3a2c07; border-color: var(--gold); }
.fm-step.active .fm-step-label { color: var(--teal); font-weight: 700; }

/* ── fields grid ── */
.fm-fields { display: flex; flex-wrap: wrap; gap: 20px; }
.fm-field { width: 100%; min-width: 0; }
.fm-field.half { width: calc(50% - 10px); }
@media (max-width: 560px) { .fm-field.half { width: 100%; } }

.fm-label {
  display: block; font-family: var(--font-title); font-weight: 600;
  font-size: 14.5px; color: var(--ink); margin-bottom: 7px;
}
.fm-req { color: var(--err); margin-inline-start: 3px; }
.fm-help { font-size: 12.5px; color: var(--muted); margin-top: 5px; }

/* ── inputs ── */
/* The height is stated, not inherited from font metrics. With `line-height: normal` an input is
   as tall as whatever font actually rendered it, so a field next to another could come out a few
   pixels taller (Heebo vs a fallback, or a browser's own default for a given input type) and the
   two halves of a row stopped lining up. box-sizing + line-height + min-height pin it: every
   .fm-input is 46px, whatever font is in play. */
.fm-input {
  width: 100%; box-sizing: border-box; font-family: inherit; font-size: 15px; color: var(--ink);
  line-height: 1.5; min-height: 46px;
  background: #fdfcfa; border: 1px solid var(--line); border-radius: 10px;
  padding: 11px 13px; transition: border-color .15s, box-shadow .15s;
}
.fm-input::placeholder { color: #a7b0ab; }
.fm-input:focus {
  outline: none; border-color: var(--teal-2);
  box-shadow: 0 0 0 3px rgba(28, 107, 96, 0.12);
}
.fm-textarea { resize: vertical; line-height: 1.6; min-height: 100px; }
/* the two halves of a name row are one control — they must read as a single box, always */
.fm-name-row { align-items: stretch; }
.fm-select { appearance: none; cursor: pointer; background-image: none; }
.fm-input.fm-invalid { border-color: var(--err); box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.1); }

/* phone box (src/components/phone/PhoneInput.tsx, self-styled): only the country button is
   dressed here, to sit beside .fm-input as its twin. */
.fm-phone-cc {
  min-height: 46px; padding: 0 12px; gap: 7px;
  background: #fdfcfa; border: 1px solid var(--line); border-radius: 10px;
  font-size: 15px; color: var(--ink);
}
.fm-phone-cc:focus-visible, .fm-phone-cc.phx-open { outline: none; border-color: var(--teal-2); box-shadow: 0 0 0 3px rgba(28, 107, 96, 0.12); }
.fm-phone-cc.fm-locked { background: #f1efea; color: #5d6762; cursor: not-allowed; opacity: 1; }

/* A field whose value comes from the signed-in account: readable, copyable, not editable. */
.fm-input.fm-locked {
  background: #f1efea; color: #5d6762; cursor: not-allowed;
}
.fm-input.fm-locked:focus { border-color: var(--line); box-shadow: none; }
.fm-account-note { margin: 10px 0 0; font-size: 12.5px; color: var(--muted); }

.fm-name-row { display: flex; gap: 12px; }
.fm-name-row .fm-input { flex: 1; }
@media (max-width: 420px) { .fm-name-row { flex-direction: column; } }

/* ── radio / checkbox groups ── */
.fm-choices { display: flex; flex-direction: column; gap: 9px; }
.fm-choice {
  display: flex; align-items: center; gap: 9px; cursor: pointer;
  font-size: 15px; color: var(--ink); padding: 7px 11px;
  border: 1px solid var(--line); border-radius: 10px; background: #fdfcfa;
  transition: border-color .12s, background .12s;
}
.fm-choice:hover { border-color: var(--gold); }
.fm-choice input { accent-color: var(--teal); width: 17px; height: 17px; flex-shrink: 0; }
.fm-choice-line { display: flex; align-items: center; gap: 9px; }

/* picture cards -- a choice group where the options carry images (option.image).
   The whole card is the label, so clicking the picture selects the option. */
.fm-choices.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}
.fm-choice-card {
  flex-direction: column; align-items: center; justify-content: flex-start;
  gap: 12px; padding: 16px 12px 14px; text-align: center; background: #fff;
  border-radius: 14px; height: 100%;
}
.fm-choice-card.on { border-color: var(--teal); box-shadow: 0 0 0 2px rgba(19, 82, 74, .18); }
.fm-choice-card .fm-choice-line { justify-content: center; align-items: flex-start; text-align: start; }
.fm-choice-card .fm-choice-line input { margin-top: 2px; }
.fm-choice-img {
  width: 100%; max-width: 110px; height: 88px;
  object-fit: contain; display: block;
}
.fm-choice-img-empty { background: repeating-linear-gradient(135deg, #f7f5ef 0 8px, #fdfcfa 8px 16px); border-radius: 8px; }
@media (max-width: 420px) {
  .fm-choices.cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .fm-choice-img { height: 66px; }
}

/* ── consent ── */
.fm-consent {
  display: flex; align-items: flex-start; gap: 10px; cursor: pointer;
  font-size: 14.5px; color: var(--ink); line-height: 1.5;
}
.fm-consent input { accent-color: var(--teal); width: 18px; height: 18px; margin-top: 2px; flex-shrink: 0; }
.fm-consent.fm-invalid { color: var(--err); }

/* ── rating ── */
.fm-rating { display: inline-flex; gap: 4px; direction: ltr; }
.fm-star {
  background: none; border: 0; cursor: pointer; font-size: 30px; line-height: 1;
  color: #ddd6c6; padding: 0; transition: color .12s, transform .1s;
}
.fm-star:hover { transform: scale(1.12); }
.fm-star.on { color: var(--gold); }
.fm-rating-label { margin-top: 6px; font-size: 14px; color: var(--muted); font-style: italic; }

/* ── description ── */
.fm-description { font-size: 15px; color: var(--muted); line-height: 1.7; }
.fm-description p { margin: 0 0 8px; }
.fm-description ul { padding-inline-start: 20px; margin: 0 0 8px; list-style: disc; }
.fm-description ol { padding-inline-start: 20px; margin: 0 0 8px; list-style: decimal; }
.fm-description li { display: list-item; }
.fm-description strong { font-weight: 700; color: var(--ink); }
.fm-description a { color: var(--teal-2); }

/* ── file upload ── */
.fm-upload {
  border: 2px dashed var(--line); border-radius: 12px; padding: 24px 16px;
  text-align: center; cursor: pointer; background: #fbfaf6;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  transition: border-color .15s, background .15s;
}
.fm-upload:hover { border-color: var(--teal-2); background: #f6f8f7; }
.fm-upload.fm-invalid { border-color: var(--err); }
.fm-upload-icon { font-size: 26px; color: var(--teal-2); }
.fm-upload-hint { font-size: 14px; color: var(--ink); font-weight: 600; }
.fm-upload-sub { font-size: 12px; color: var(--muted); }
.fm-file {
  display: flex; align-items: center; gap: 9px; margin-top: 9px;
  padding: 9px 12px; background: #f0f5f3; border: 1px solid #d5e5e0; border-radius: 9px;
}
.fm-file-ic { flex-shrink: 0; }
.fm-file-name { flex: 1; min-width: 0; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fm-file-size { font-size: 12px; color: var(--muted); white-space: nowrap; }
.fm-file-del {
  flex-shrink: 0; background: none; border: 0; cursor: pointer; color: var(--muted);
  font-size: 14px; line-height: 1; padding: 3px 5px; border-radius: 6px;
}
.fm-file-del:hover { color: var(--err); background: #fff; }

/* ── errors ── */
.fm-err { color: var(--err); font-size: 12.5px; margin-top: 5px; }
.fm-err-global {
  padding: 11px 14px; background: #fdecea; border: 1px solid #f5c6c0;
  border-radius: 10px; margin-bottom: 18px; font-size: 14px;
}

/* ── nav / buttons ── */
.fm-nav { display: flex; align-items: center; gap: 12px; margin-top: 30px; }
.fm-nav-spacer { flex: 1; }
.fm-btn {
  font-family: var(--font-title); font-weight: 700; font-size: 15px; cursor: pointer;
  border: 0; border-radius: 12px; padding: 12px 28px; transition: background .15s, opacity .15s;
}
/* --fm-btn/--fm-btn-hover/--fm-btn-text are set inline on .fm-page by FormRenderer when the
   form picked a submit-button color in the builder; unset, the buttons stay brand teal. */
.fm-btn-primary { background: var(--fm-btn, var(--teal)); color: var(--fm-btn-text, #fff); }
.fm-btn-primary:hover { background: var(--fm-btn-hover, var(--teal-2)); }
.fm-btn-primary:disabled { opacity: .6; cursor: default; }
.fm-btn-ghost { background: transparent; color: var(--teal); border: 1px solid var(--line); }
.fm-btn-ghost:hover { background: #f2f6f5; border-color: var(--teal-2); }

/* ── thank-you ── */
.fm-thanks { text-align: center; padding: 44px 32px; }
.fm-thanks-check {
  width: 66px; height: 66px; margin: 0 auto 18px; border-radius: 50%;
  background: #e6f4ef; color: var(--teal); display: flex; align-items: center;
  justify-content: center; font-size: 34px; font-weight: 700;
}
.fm-thanks h1 { font-family: var(--font-title); font-weight: 800; font-size: 24px; color: var(--teal); margin: 0 0 10px; }
.fm-thanks p { color: var(--muted); font-size: 16px; line-height: 1.6; margin: 0; }
.fm-redirect { margin-top: 14px !important; font-size: 13px !important; }

/* ── not found ── */
.fm-nf-card { text-align: center; padding: 48px 32px; }
.fm-nf-emoji { font-size: 44px; margin-bottom: 12px; }
.fm-nf-card h1 { font-family: var(--font-title); font-weight: 800; font-size: 26px; color: var(--teal); margin: 0 0 10px; }
.fm-nf-card p { color: var(--muted); font-size: 15px; margin: 0 0 22px; }
.fm-nf-home { display: inline-block; text-decoration: none; }

/* consent policy links (terms / privacy) */
.fm-consent a { color: var(--teal); text-decoration: underline; font-weight: 500; }
.fm-consent a:hover { opacity: 0.8; }

/* ── signature pad ── */
.fm-sig-wrap { display: flex; flex-direction: column; }
.fm-signature {
  width: 100%; height: 170px; display: block; box-sizing: border-box;
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  cursor: crosshair; touch-action: none;
}
.fm-signature.fm-invalid { border-color: var(--err); box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.1); }
.fm-sig-actions { display: flex; justify-content: flex-end; margin-top: 6px; }
.fm-sig-clear {
  background: transparent; border: 1px solid var(--line); border-radius: 100px;
  color: var(--muted); font-size: 13px; padding: 5px 14px; cursor: pointer;
  font-family: inherit; transition: color .15s, border-color .15s;
}
.fm-sig-clear:hover { color: var(--teal); border-color: var(--teal-2); }

/* ── accordion inside description blocks (participation agreements etc.) ── */
.fm-description details.fm-acc { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; margin-bottom: 8px; }
.fm-description details.fm-acc summary {
  list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 13px 16px; background: #f4f0ec; font-size: 16px; font-weight: 700; color: var(--teal);
  cursor: pointer; user-select: none;
}
.fm-description details.fm-acc summary::-webkit-details-marker { display: none; }
.fm-description details.fm-acc summary:hover { background: #ede9e3; }
.fm-description .fm-acc-icon {
  width: 26px; height: 26px; border-radius: 50%; background: var(--teal); color: #fff;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  font-size: 17px; line-height: 1; transition: transform .25s ease;
}
.fm-description details[open] .fm-acc-icon { transform: rotate(45deg); }
.fm-description .fm-acc-body {
  padding: 14px 16px; font-size: 15px; line-height: 1.8; background: #fff; border-top: 1px solid var(--line);
}
.fm-description .fm-acc-body a { color: var(--teal); }
.fm-description .fm-acc-toggle {
  background: var(--teal); color: #fff; border: 0; padding: 8px 20px; border-radius: 100px;
  font-family: inherit; font-size: 14px; font-weight: 700; cursor: pointer; margin-bottom: 12px;
}

/* ── autosave note (multi-step forms) ── */
.fm-draft-note {
  font-size: 12.5px; color: var(--muted); background: #f4f7f6; border: 1px solid #e2ebe8;
  border-radius: 10px; padding: 8px 12px; margin-bottom: 16px; text-align: center;
}

/* ── read-only view: the submitted form, filled in and inert ── */
.fm-readonly { text-align: start; }
.fm-ro-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
  margin: 0 0 22px; padding-bottom: 16px; border-bottom: 1px solid var(--line);
}
.fm-ro-title { font-family: var(--font-title); font-weight: 800; font-size: 22px; color: var(--teal); margin: 0 0 4px; }
.fm-ro-sub { font-size: 13px; color: var(--muted); margin: 0; }
.fm-ro-page + .fm-ro-page { margin-top: 26px; }
.fm-ro-step {
  font-family: var(--font-title); font-size: 15px; font-weight: 700; color: var(--teal);
  margin: 0 0 14px; padding-bottom: 7px; border-bottom: 1px dashed var(--line);
}
.fm-readonly .fm-field { margin-bottom: 16px; }
.fm-readonly .fm-label { margin-bottom: 6px; }
/* looks like the input it replaces, but grows with the text and can't be edited */
.fm-ro-value {
  background: #f7f6f2; border: 1px solid var(--line); border-radius: 10px;
  padding: 11px 13px; font-size: 15px; line-height: 1.65; color: var(--ink);
  white-space: pre-wrap; word-break: break-word; min-height: 44px;
}
.fm-ro-empty { color: #a7b0ab; }
.fm-ro-sig { max-width: 240px; max-height: 100px; display: block; }
.fm-ro-desc { margin-bottom: 16px; }
.fm-ro-open { margin-top: 18px; }

/* ── helpers ── */
/* visually hidden, still read by screen readers (hideLabel, live announcements) */
.fm-sr {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.fm-page-head { margin: 0 0 20px; }
.fm-q { font-family: var(--font-title); font-weight: 700; font-size: 21px; line-height: 1.35; color: var(--ink); margin: 0; }
.fm-q-lg { font-size: 26px; }
.fm-q-sub { font-size: 14.5px; line-height: 1.6; color: var(--muted); margin: 6px 0 0; }
.fm-signoff { display: flex; flex-direction: column; gap: 2px; font-size: 14.5px; color: var(--ink); }
.fm-signoff strong { font-weight: 700; }
.fm-rule { border: 0; border-top: 1px solid var(--line); margin: 26px 0 18px; }
.fm-booking-cta { margin-top: 22px; }

/* choice layouts (field.layout) */
.fm-choices.layout-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.fm-choices.layout-pills { flex-direction: row; flex-wrap: wrap; gap: 8px; }
.fm-choices.layout-pills .fm-choice { border-radius: 100px; padding: 8px 18px; justify-content: center; flex: 1 1 auto; position: relative; }
.fm-choices.layout-pills .fm-choice input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.fm-choices.layout-pills .fm-choice:has(input:focus-visible) { outline: 2px solid var(--teal-2); outline-offset: 2px; }
.fm-choices.layout-pills .fm-choice.on { background: var(--teal); border-color: var(--teal); color: #fff; }
@media (max-width: 560px) {
  .fm-choices.layout-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* four short pills do not fit one phone row; a 2x2 grid beats a 3 + 1 wrap */
  .fm-choices.layout-pills { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ── ranking ── */
.fm-rank { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.fm-rank-item {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px;
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  cursor: grab; touch-action: none; user-select: none; transition: box-shadow .12s, border-color .12s;
}
.fm-rank-item.dragging { cursor: grabbing; border-color: var(--teal-2); box-shadow: 0 8px 22px rgba(16, 36, 46, .16); position: relative; z-index: 1; }
.fm-rank-grip { color: #b9aea4; font-size: 16px; line-height: 1; }
.fm-rank-num {
  width: 24px; height: 24px; border-radius: 50%; flex-shrink: 0; background: var(--teal); color: #fff;
  display: inline-flex; align-items: center; justify-content: center; font-size: 12.5px; font-weight: 700;
}
.fm-rank-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.fm-rank-label { font-weight: 700; font-size: 14.5px; color: var(--ink); }
.fm-rank-desc { font-size: 13px; color: var(--muted); }
.fm-rank-arrows { display: flex; gap: 6px; flex-shrink: 0; }
.fm-rank-btn {
  width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line); background: #f6f0ea;
  color: var(--ink); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0;
}
.fm-rank-btn:hover:not(:disabled) { border-color: var(--teal-2); }
.fm-rank-btn:disabled { opacity: .35; cursor: default; }

/* ══ theme: studio (the Psychotherapy Studio) ══════════════════════════════
   settings.theme = studio. Cream card on warm sand, navy ink, terracotta accents,
   logo + step count + a thin progress bar on top, pill buttons. */
.fm-theme-studio {
  --teal: #16303f; --teal-2: #24495d; --ink: #10242e; --muted: #3d4f58;
  --line: #d9cabe; --bg: #e4dcd3; --accent: #a5533a; --accent-2: #8f4630;
  --font-title: 'Heebo', system-ui, sans-serif;
  background-color: var(--bg);
}
.fm-theme-studio .fm-card {
  background: #f7f2ee; border: 0; border-radius: 14px; padding: 30px 40px 36px;
  max-width: var(--fm-max, 560px); box-shadow: 0 18px 50px rgba(60, 40, 25, .14);
}
@media (max-width: 560px) { .fm-theme-studio .fm-card { padding: 22px 18px 26px; } }

/* logo (the form's header HTML): .fm-brand = bold name / light subtitle / accent rule / doctor */
.fm-theme-studio .fm-brand { display: inline-flex; flex-direction: column; align-items: flex-start; line-height: 1.1; color: var(--ink); }
.fm-theme-studio .fm-brand b { font-weight: 800; font-size: 22px; }
.fm-theme-studio .fm-brand span { font-weight: 300; font-size: 22px; }
.fm-theme-studio .fm-brand i { display: block; width: 26px; height: 2px; background: var(--accent); margin: 7px 0 6px; }
.fm-theme-studio .fm-brand small { font-weight: 700; font-size: 11px; }
.fm-theme-studio .fm-brand-lg { margin: 18px 0 22px; }
.fm-theme-studio .fm-brand-sm .fm-brand b, .fm-theme-studio .fm-brand-sm .fm-brand span { font-size: 13px; }
.fm-theme-studio .fm-brand-sm .fm-brand i { width: 18px; margin: 3px 0; }
.fm-theme-studio .fm-brand-sm .fm-brand small { font-size: 7.5px; }

/* top row: small logo at the start, progress text at the end, thin bar underneath */
.fm-theme-studio .fm-topbar { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 8px; margin: 0 0 28px; }
.fm-theme-studio .fm-progress-text { font-size: 11.5px; color: var(--teal-2); }
.fm-theme-studio .fm-progress { flex-basis: 100%; height: 3px; background: #e3d9cf; border-radius: 3px; overflow: hidden; margin-top: 6px; }
.fm-theme-studio .fm-progress span { display: block; height: 100%; background: var(--teal); border-radius: 3px; transition: width .35s ease; }

/* page heading: accent eyebrow, bold question, guidance line */
.fm-theme-studio .fm-eyebrow { font-size: 11.5px; font-weight: 700; color: var(--accent); margin: 0 0 6px; }
.fm-theme-studio .fm-q { font-size: 20px; font-weight: 700; color: var(--ink); }
.fm-theme-studio .fm-q-lg { font-size: 22px; }
.fm-theme-studio .fm-q-sub { font-size: 13.5px; color: var(--ink); margin-top: 6px; }
.fm-theme-studio .fm-role-intro .fm-q-sub + .fm-q-sub { margin-top: 10px; }

.fm-theme-studio .fm-fields { gap: 18px 14px; }
.fm-theme-studio .fm-field.half { width: calc(50% - 7px); }
@media (max-width: 560px) { .fm-theme-studio .fm-field.half { width: 100%; } }
.fm-theme-studio .fm-label { font-size: 12.5px; font-weight: 600; margin-bottom: 7px; }
.fm-theme-studio .fm-input { background: #fff; border-color: var(--line); border-radius: 8px; font-size: 14px; }
.fm-theme-studio .fm-input:focus { border-color: var(--teal-2); box-shadow: 0 0 0 3px rgba(22, 48, 63, .10); }
.fm-theme-studio .fm-textarea { min-height: 128px; }
.fm-name-labeled { gap: 14px; }

/* builder live preview: a field that appears only for a certain answer */
.fm-preview-cond { outline: 1.5px dashed #b9a89a; outline-offset: 6px; border-radius: 4px; opacity: .72; }
.fm-name-part { flex: 1; min-width: 0; display: flex; flex-direction: column; }

/* choices: white boxes with a navy radio */
.fm-theme-studio .fm-choice { background: #fff; border-color: var(--line); border-radius: 8px; padding: 12px 14px; font-size: 13.5px; min-height: 46px; }
.fm-theme-studio .fm-choice:hover { border-color: var(--teal-2); }
.fm-theme-studio .fm-choice.on { border-color: var(--teal); box-shadow: 0 0 0 1px var(--teal); }
.fm-theme-studio .fm-choices.layout-pills .fm-choice { border-radius: 100px; padding: 8px 16px; min-height: 0; font-size: 12.5px; }
.fm-theme-studio .fm-choices.layout-pills .fm-choice.on { background: var(--teal); color: #fff; box-shadow: none; }

/* nav: a rule above, pill primary + a quiet text back link */
.fm-theme-studio .fm-nav { margin-top: 26px; gap: 16px; }
.fm-theme-studio .fm-nav-ruled { border-top: 1px solid #e0d6cc; padding-top: 20px; }
.fm-theme-studio .fm-btn { border-radius: 100px; font-size: 13.5px; padding: 10px 26px; }
.fm-theme-studio .fm-btn-primary { background: var(--fm-btn, var(--accent)); color: var(--fm-btn-text, #fff); }
.fm-theme-studio .fm-btn-primary:hover { background: var(--fm-btn-hover, var(--accent-2)); }
.fm-theme-studio .fm-btn-dim { opacity: .45; }
.fm-theme-studio .fm-btn-dim:hover { background: var(--fm-btn, var(--accent)); }
.fm-theme-studio .fm-btn-back {
  background: none; border: 0; padding: 4px 2px; cursor: pointer; font-family: var(--font-body);
  font-size: 12.5px; color: var(--ink); display: inline-flex; align-items: center; gap: 6px;
}
.fm-theme-studio .fm-btn-back:hover { text-decoration: underline; }
.fm-theme-studio .fm-nav-note { font-size: 11.5px; color: var(--teal-2); }

/* description blocks (e.g. the not-right-now letter) */
.fm-theme-studio .fm-description { color: var(--ink); font-size: 13.5px; line-height: 1.75; }
.fm-theme-studio .fm-description p { margin: 0 0 12px; }

/* endings: logo, heading, text, the call button, a rule, the sign-off, all start-aligned */
.fm-theme-studio .fm-thanks { text-align: start; padding: 30px 40px 36px; }
.fm-theme-studio .fm-thanks h1 { font-size: 22px; font-weight: 700; color: var(--ink); margin: 0 0 12px; }
.fm-theme-studio .fm-thanks p { color: var(--ink); font-size: 13.5px; line-height: 1.75; margin: 0 0 10px; }
.fm-theme-studio .fm-rule { border-top-color: #e0d6cc; }
.fm-theme-studio .fm-signoff { font-size: 12.5px; }
.fm-theme-studio .fm-thanks .fm-booking { text-align: start; }

/* the booking calendar at the end: same palette as the questionnaire (navy choice, terracotta pill).
   BookingPicker/BookingStep ship their own green defaults inline; these outrank them by one class. */
.fm-theme-studio .fm-booking { border-top-color: #e0d6cc; font-size: 14px; }
.fm-theme-studio .fm-booking-title { font-size: 20px; font-weight: 700; color: var(--ink); }
.fm-theme-studio .fm-booking-intro,
.fm-theme-studio .fm-booking-host,
.fm-theme-studio .fm-booking-note,
.fm-theme-studio .fm-booking-cal { color: var(--muted); font-size: 13.5px; }
.fm-theme-studio .fm-booking-when { color: var(--teal); }
.fm-theme-studio .fm-booking-cal a { color: var(--accent); }
.fm-theme-studio .fm-booking-manage { color: var(--accent); border-color: var(--accent); border-radius: 100px; font-size: 13.5px; }
.fm-theme-studio .fm-booking-manage:hover { background: var(--accent); color: #fff; }
.fm-theme-studio .bk-day,
.fm-theme-studio .bk-time { border-color: var(--line); border-radius: 8px; color: var(--ink); }
.fm-theme-studio .bk-day:hover,
.fm-theme-studio .bk-time:hover { border-color: var(--teal-2); }
.fm-theme-studio .bk-day.is-on,
.fm-theme-studio .bk-time.is-on { background: var(--teal); border-color: var(--teal); color: #fff; }
.fm-theme-studio .bk-time { font-size: 14px; }
.fm-theme-studio .bk-tz { color: var(--muted); font-size: 12.5px; }
.fm-theme-studio .bk-note { border-color: var(--line); border-radius: 8px; font-size: 14px; background: #fff; color: var(--ink); }
.fm-theme-studio .bk-note:focus { outline: 0; border-color: var(--teal-2); box-shadow: 0 0 0 3px rgba(22, 48, 63, .10); }
.fm-theme-studio .bk-submit { background: var(--fm-btn, var(--accent)); color: var(--fm-btn-text, #fff); border-radius: 100px; font-size: 14px; }
.fm-theme-studio .bk-submit:hover:not(:disabled) { background: var(--fm-btn-hover, var(--accent-2)); }
@media (max-width: 560px) { .fm-theme-studio .fm-thanks { padding: 24px 18px 28px; } }
