/* =========================================================
   Mira — consultation form (consultation.html)
   Standalone page: loads fonts.css + base.css and then this. Everything the
   form itself needs (.field, .grid2, .check, .field__msg, .btn, --btn-*)
   already lives in base.css and is used as-is; this sheet is the page shell,
   the answer controls the booking form does not have (radio pills, checkbox
   rows), and the states either side of the form.
   ========================================================= */

.cf-body{ background:var(--bg); color:var(--ink) }

/* Half the controls on this page are display:flex from an author sheet, which
   outranks the user agent's [hidden]{display:none}. Everything here is shown
   and hidden by the hidden property, so settle it once. */
[hidden]{ display:none !important }

/* ---------- top bar ----------
   Wordmark and a phone number, nothing else. Every link in a site header is a
   chance to leave a form half-filled. */
.cf__top{
  display:flex; align-items:center; justify-content:space-between; gap:20px;
  padding:18px var(--gut); max-width:var(--wrap); margin:0 auto;
}
.cf__brand{ display:block; line-height:0 }
.cf__brand svg{ display:block }
.cf__help{
  font-family:var(--ui); font-size:13.5px; font-weight:500; color:var(--muted);
  text-decoration:none; white-space:nowrap;
  transition:color .2s var(--ease);
}
.cf__help:hover{ color:var(--accent) }

/* ---------- page ---------- */
.cf{ padding:clamp(10px,2vw,26px) var(--gut) 0 }
.cf__wrap{ width:min(720px, 100%); margin:0 auto }

.cf__head{ margin-bottom:clamp(24px,3.4vw,34px) }
.cf__title{
  font-family:var(--serif); font-weight:400; color:var(--ink);
  font-size:clamp(34px,5.6vw,52px); line-height:1.1; margin:0;
}
.cf__lead{
  font-family:var(--sans); color:var(--muted);
  font-size:16px; line-height:1.65; margin:14px 0 0; max-width:52ch;
}
.cf__lead strong{ color:var(--ink); font-weight:600 }

/* ---------- a section ----------
   A plain panel: hairline border, no coloured stripe on any edge. The serif
   heading and the space above it carry the hierarchy. */
.cf__sec{
  background:var(--card); border:1px solid var(--line-soft); border-radius:var(--r-lg);
  padding:clamp(22px,3.2vw,32px);
  display:flex; flex-direction:column; gap:22px;
}
.cf__sec + .cf__sec{ margin-top:16px }
.cf__h2{
  font-family:var(--serif); font-weight:400; color:var(--ink);
  font-size:clamp(22px,2.6vw,27px); line-height:1.2; margin:0;
}
.cf__q{
  font-family:var(--ui); font-size:14.5px; line-height:1.45; font-weight:500;
  color:var(--muted); margin:0; padding:0; border:0;
}
/* Not a flex column: a <legend> does not participate in its fieldset's flex
   layout, so a gap here never reached it and the pills sat flush against the
   question. A plain block and an explicit margin is predictable instead. */
.cf__group{ border:0; padding:0; margin:0 }
.cf__group > legend{ display:block; padding:0; margin:0 0 16px }

/* the health list is a direct child of the section, so it inherits the 22px
   section rhythm; a question and its controls are one unit and sit closer */
.cf__q + .cf__checks{ margin-top:-6px }

/* ---------- who you are ----------
   The appointment strip is the thread back to the email: they clicked from a
   confirmation, so the confirmation is the first thing they see again. */
.cf__appt{
  font-family:var(--ui); font-size:14px; font-weight:500; line-height:1.5;
  color:var(--accent); margin:-4px 0 0;
}
.cf__known{
  display:flex; align-items:center; justify-content:space-between; gap:16px;
  background:var(--sand); border-radius:var(--r); padding:16px 18px;
}
.cf__known-who{ min-width:0 }
.cf__known-name{
  font-family:var(--serif); font-size:20px; line-height:1.25; color:var(--ink); margin:0;
}
.cf__known-meta{
  font-family:var(--sans); font-size:13.5px; line-height:1.5; color:var(--muted);
  margin:3px 0 0; overflow-wrap:anywhere;
}
.cf__edit{
  flex:none; cursor:pointer;
  font-family:var(--ui); font-size:13px; font-weight:500; color:var(--accent);
  background:transparent; border:0; padding:6px 2px; text-decoration:underline;
  text-underline-offset:3px; text-decoration-color:rgba(168,91,102,.4);
  transition:color .2s var(--ease);
}
.cf__edit:hover{ color:var(--accent-deep) }

/* ---------- radio pills ----------
   Six skin types and four yes/no pairs. As a <select> each one costs a tap, a
   sheet and a scroll; as pills the whole answer set is readable at a glance
   and one tap wide. */
.cf__opts{ display:flex; flex-wrap:wrap; gap:9px }
.cf__opts--yn .pill{ min-width:92px; justify-content:center }

.pill{ position:relative; display:inline-flex }
.pill input{ position:absolute; opacity:0; width:0; height:0 }
.pill span{
  display:inline-flex; align-items:center; justify-content:center;
  padding:11px 20px; border-radius:99px; cursor:pointer;
  background:var(--bg); box-shadow:inset 0 0 0 1px var(--line);
  font-family:var(--ui); font-size:14.5px; font-weight:500; line-height:1.2;
  color:var(--ink);
  transition:background .22s var(--ease), box-shadow .22s var(--ease), color .22s var(--ease);
}
.pill span:hover{ box-shadow:inset 0 0 0 1px rgba(168,91,102,.45) }
.pill input:checked + span{
  background-color:var(--ink); color:#fff; box-shadow:inset 0 0 0 1px var(--ink);
}
.pill input:focus-visible + span{ outline:2px solid var(--accent); outline-offset:2px }

/* ---------- checkbox rows ----------
   Eleven conditions. One per row, full-width hit area: on a phone a two-up
   grid puts "Recent cosmetic procedures, fillers or Botox" on three lines and
   the tick target next to something else's text. */
.cf__checks{ display:flex; flex-direction:column; gap:2px }
.opt{
  display:flex; align-items:center; gap:12px; cursor:pointer;
  padding:11px 14px; border-radius:var(--r-sm);
  font-family:var(--ui); font-size:15px; font-weight:500; line-height:1.4;
  color:var(--ink);
  transition:background .2s var(--ease);
}
.opt:hover{ background:var(--bg) }
.opt input{ position:absolute; opacity:0; width:0; height:0 }
.opt__box{
  width:20px; height:20px; border-radius:5px; flex:none;
  border:1px solid rgba(168,91,102,.5); background:var(--bg);
  display:grid; place-items:center;
  transition:background .25s var(--ease), border-color .25s var(--ease);
}
/* same tick geometry as the booking form's consent box */
.opt__box::after{
  content:""; width:100%; height:100%; background:#fff; opacity:0;
  transition:opacity .25s var(--ease-out);
  -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16'%3E%3Cpath d='M 4 8 L 6.5 10.5 L 11.5 5.5' fill='transparent' stroke-width='2' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/contain no-repeat;
          mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16'%3E%3Cpath d='M 4 8 L 6.5 10.5 L 11.5 5.5' fill='transparent' stroke-width='2' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/contain no-repeat;
}
.opt input:checked + .opt__box{ background:var(--ink); border-color:var(--ink) }
.opt input:checked + .opt__box::after{ opacity:1 }
.opt input:focus-visible + .opt__box{ outline:2px solid var(--accent); outline-offset:2px }
.opt__txt{ flex:1 1 auto }

/* "None of these apply to me" is the answer most people need, so it sits
   first and is set apart by a rule, not by a colour or a badge. */
.opt--none{ margin-bottom:6px; padding-bottom:15px; border-bottom:1px solid var(--line-soft); border-radius:var(--r-sm) var(--r-sm) 0 0 }
.opt--none .opt__txt{ color:var(--muted) }
.opt--none input:checked ~ .opt__txt{ color:var(--ink) }

/* the health list greys out once "none of these" is on, so the two states
   cannot look equally live */
.cf__checks.is-none .opt:not(.opt--none){ opacity:.4 }

/* ---------- conditional "please specify" ----------
   Never on screen next to an unanswered question. */
.cf__spec[hidden]{ display:none }
.cf__yn{ display:flex; flex-direction:column; gap:16px }
.cf__yn + .cf__yn{ padding-top:22px; border-top:1px solid var(--line-soft) }

/* ---------- consent ---------- */
.cf__consent{
  background:var(--bg); border-radius:var(--r); padding:18px 20px;
  display:flex; flex-direction:column; gap:11px;
}
.cf__consent p{
  font-family:var(--sans); font-size:14px; line-height:1.65; color:var(--muted); margin:0;
}
.cf__stamp{
  margin:0; display:flex; align-items:center; height:50px; padding:0 12px;
  border-radius:10px; background:var(--bg);
  font-family:var(--ui); font-size:16px; font-weight:500; color:var(--muted);
}

/* ---------- send ----------
   Sticky, because the form runs past 2000px on a phone and a button at the
   bottom of that is a button nobody knows is there. The progress line is the
   other half: it answers "how much more of this is there" without making them
   scroll to find out. */
.cf__foot{
  position:sticky; bottom:0; z-index:5;
  margin:16px calc(var(--gut) * -1) 0;
  padding:0 var(--gut);
  background:rgba(253,246,241,.92);
  -webkit-backdrop-filter:blur(10px); backdrop-filter:blur(10px);
  border-top:1px solid var(--line-soft);
}
.cf__foot .form-note{ padding:12px 0 0 }
.cf__send{
  display:flex; align-items:center; justify-content:space-between; gap:18px;
  padding:14px 0;
}
.cf__prog{ display:flex; flex-direction:column; gap:7px; min-width:0; flex:1 1 auto }
.cf__prog-txt{
  font-family:var(--ui); font-size:13px; font-weight:500; color:var(--muted);
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
.cf__prog-track{
  display:block; height:3px; border-radius:99px; background:var(--sand-deep);
  max-width:200px; overflow:hidden;
}
.cf__prog-fill{
  display:block; height:100%; width:0; border-radius:99px; background:var(--accent);
  transition:width .45s var(--ease-out);
}
.cf__go{
  --bt-face:var(--btn-face-d); --bt-rim:var(--btn-rim-d); --bt-press:var(--btn-press-d);
  flex:none; border:0; cursor:pointer;
  background-color:var(--accent); color:#fff;
  padding:14px 26px; border-radius:99px;
  font-family:var(--ui); font-size:15px; font-weight:500; line-height:1.2;
  /* base.css .btn is inline-flex with no justify-content, so on a phone, where
     this goes full width, the label would sit against the left edge */
  justify-content:center; text-align:center;
}
.cf__go:hover{ background-color:var(--accent-deep) }
.cf__go[disabled]{ opacity:.55; cursor:default; transform:none }

/* ---------- the states either side of the form ---------- */
.cf__state{
  background:var(--card); border:1px solid var(--line-soft); border-radius:var(--r-lg);
  padding:clamp(28px,4vw,44px);
  font-family:var(--sans); font-size:15.5px; line-height:1.7; color:var(--muted);
  margin-bottom:40px;
}
.cf__state p{ margin:0 0 12px; max-width:52ch }
.cf__state p:last-of-type{ margin-bottom:0 }
/* inline links only. Unscoped, this (0,1,1) outranks .btn--solid (0,1,0) and
   paints the button label rose on brown, which measures 1.99:1. */
.cf__state p a{ color:var(--accent) }
.cf__state strong{ color:var(--ink); font-weight:600 }
.cf__state-title{
  font-family:var(--serif); font-weight:400; color:var(--ink);
  font-size:clamp(26px,3.8vw,36px); line-height:1.15; margin:0 0 14px;
}
/* Every state on this page has exactly one button, so there is no hierarchy to
   protect and it takes the brand rose, matching Send my form. (thanks.html
   keeps its ink one, because there it sits beside a rose primary.) */
.cf__state-btn{
  --bt-face:var(--btn-face-d); --bt-rim:var(--btn-rim-d); --bt-press:var(--btn-press-d);
  margin-top:24px; justify-content:center; text-align:center;
  background-color:var(--accent); color:#fff; border-color:transparent;
  padding:14px 30px; font-size:15px;
}
.cf__state-btn:hover{ background-color:var(--accent-deep); color:#fff }

/* the plain "getting your details" line is not a card — a spinner in a panel
   makes an empty page feel heavier than it is */
#cf-loading{
  background:none; border:0; padding:34px 0; margin:0;
  font-family:var(--ui); font-size:15px; font-weight:500; color:var(--muted);
}

.cf__state--sent{ text-align:center; margin-top:clamp(20px,6vh,60px) }
.cf__state--sent p{ margin-left:auto; margin-right:auto }
.cf__sent-mark{
  display:block; color:var(--accent); margin:0 auto 18px;
  animation:cf-bloom .8s cubic-bezier(.34,1.56,.64,1) .1s both;
}
.cf__sent-mark svg{ display:block; margin:0 auto }
@keyframes cf-bloom{ from{ opacity:0; transform:scale(.4) rotate(-14deg) } to{ opacity:1; transform:none } }
.cf__sent-next{
  border-top:1px solid var(--line-soft); margin-top:20px; padding-top:20px;
  font-size:14.5px;
}

/* ---------- phone ---------- */
@media (max-width:620px){
  .cf__top{ padding:14px var(--gut) }
  .cf__help{ font-size:12.5px }
  .cf__sec{ gap:20px }
  .cf__known{ flex-direction:column; align-items:flex-start; gap:10px }
  .cf__edit{ padding:0 }
  .cf__opts--yn{ display:grid; grid-template-columns:1fr 1fr }
  .cf__opts--yn .pill, .cf__opts--yn .pill span{ width:100% }
  /* the bar keeps the button; the count moves under it rather than squeezing
     the two onto one 320px line */
  .cf__send{ flex-direction:column; align-items:stretch; gap:12px; padding:13px 0 }
  .cf__prog{ order:2; flex-direction:row; align-items:center; gap:10px }
  .cf__prog-track{ flex:1 1 auto; max-width:none }
  .cf__go{ order:1; width:100% }
  .cf__state-btn{ width:100% }
}

@media (prefers-reduced-motion:reduce){
  .cf__sent-mark{ animation:none }
  .cf__prog-fill{ transition:none }
}
