/* ==========================================================================
   The Art Collective — Register Your Interest (Phase 3A preview)
   A full-screen, one-step-at-a-time form in the Art Collective's creative
   style: cream paper, teal headings, paint accents, large controls.
   ========================================================================== */

/* Card 06 call-to-action (the box that opens the form) */
.ac-card-6 .ac-cta { display: none; }
html.js .ac-card-6 .ac-cta.ac-open {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 56px;
  margin: 6px 0 0;
  padding: 0 26px;
  border: 3px solid var(--ac-gold);
  border-radius: 999px;
  background: var(--ac-gold);
  color: var(--teal-near-black);
  font: 800 1.0625rem var(--ac-font);
  text-align: left;
  cursor: pointer;
  box-shadow: 0 5px 0 rgba(0, 0, 0, 0.35);
  transition: background 200ms, transform 200ms;
}
html.js .ac-card-6.is-interactive:hover .ac-cta { background: #F0C265; border-color: #F0C265; }
.ac-card-6 .ac-form-opens { display: inline-block; max-width: 34rem; margin: 6px 0 4px !important; padding: 12px 18px; border-left: 6px solid var(--ac-gold); border-radius: 0 14px 14px 0; background: var(--ac-tint-yellow); color: #3B2A00; font-size: 1.0625rem; line-height: 1.5; }
.ac-form-opens-label { display: block; margin-bottom: 2px; font-size: 0.8125rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: #6B4A00; }
html.ac-contrast .ac-card-6 .ac-form-opens { background: #fff; color: #000; border: 3px solid #fff; }
html.ac-contrast .ac-form-opens-label { color: #000; }
.ac-form-note[hidden], .ac-card-6 .ac-cta[hidden] { display: none; }
.ac-form-note { margin: 12px 0 0 !important; font-size: 0.875rem !important; color: #D8E6E3; max-width: 36ch; }
html.ac-contrast .ac-card-6 .ac-form-note { color: #fff; }
html.ac-contrast.js .ac-card-6 .ac-cta.ac-open { background: #fff; border-color: #fff; color: #000; }


/* ==========================================================================
   The form: one continuous canvas. A centred sheet of questions sits on a colour
   Each stage has its own colour (a "journey through colour"). Colour only
   decorates: every state is also shown with text, icons and outlines.
   ========================================================================== */
.rf {
  --acc-role: #2DC5B4; --acc-contact: #FFD93D; --acc-person: #53B144; --acc-comms: #6152BC;
  --acc-interests: #F07BA0; --acc-permissions: #3E7CB1; --acc-review: #FF741F;
  --focus: #1B3733;
  --paper: #FFFEFB;
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  background: #F7F5F0;
  color: var(--text-dark);
  font-family: var(--ac-font);
  opacity: 0;
  transition: opacity 260ms ease;
}
.rf[hidden] { display: none !important; }
.rf.is-open { opacity: 1; }

/* Stage themes. --acc: decorative colour. --ink: dark, readable version for text and outlines.
   --tint: soft background. --on: text colour that reads on --acc. --bgA/--bgB: canvas backdrop. */
.t-role        { --fill: var(--acc-role); --acc: var(--acc-role);        --ink: #0F5A52; --tint: #E3F6F3; --on: #1B3733; --bgA: #A9E8DF; --bgB: #5CCDBF; }
.t-contact     { --fill: var(--acc-contact); --acc: var(--acc-contact);     --ink: #6B4A00; --tint: #FFF6CF; --on: #1B3733; --bgA: #FFE98A; --bgB: #FFD13A; }
.t-person      { --fill: var(--acc-person); --acc: var(--acc-person);      --ink: #1E6B18; --tint: #E4F5DF; --on: #1B3733; --bgA: #B9E4AF; --bgB: #7CC96C; }
.t-comms       { --fill: var(--acc-comms); --acc: var(--acc-comms);       --ink: #43358F; --tint: #ECE9FA; --on: #fff;    --bgA: #CBC3F1; --bgB: #9486DB; }
.t-interests   { --fill: var(--acc-interests); --acc: var(--acc-interests);   --ink: #9B1744; --tint: #FDE6EE; --on: #1B3733; --bgA: #FBC1D4; --bgB: #F59BB9; }
.t-permissions { --fill: var(--acc-permissions); --acc: var(--acc-permissions); --ink: #1D4E78; --tint: #E2EEF8; --on: #fff;    --bgA: #B7D3EC; --bgB: #7BAAD3; }
.t-review      { --acc: var(--acc-review);      --ink: #1E5C57; --tint: #F4EEF8; --on: #1B3733; --bgA: #F9D6E3; --bgB: #FFE7A8;
                 --fill: conic-gradient(from 20deg, #F63C5C, #FF741F, #FFD93D, #53B144, #2DC5B4, #6152BC, #CB6BE6, #F63C5C); }

.rf-shell {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  outline: none;
  background-color: var(--bgA);
  transition: background-color 450ms ease;
}

/* ---------- The sheet: the questions, centred in a comfortable reading width ---------- */
.rf { --pad: clamp(18px, 4vw, 48px); }
.rf-sheet {
  position: relative;
  z-index: 3;
  flex: none;
  width: min(840px, calc(100vw - 24px));
  height: calc(100% - 24px);
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: linear-gradient(180deg, var(--tint) 0, var(--paper) 190px);
  border-radius: 30px 46px 28px 50px / 34px 28px 40px 30px;
  box-shadow: 0 22px 60px rgba(27, 55, 51, 0.28), 0 0 0 4px rgba(255, 255, 255, 0.55);
}
.rf-sheet::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 14px;
  background: var(--fill, var(--acc));
  -webkit-mask: url(assets/trail-brush.svg) 0 0 / 100% 100% no-repeat;
  mask: url(assets/trail-brush.svg) 0 0 / 100% 100% no-repeat;
  transition: background-color 450ms;
}
.rf-head, .rf-preview, .rf-trail, .rf-stage, .rf-foot { position: relative; z-index: 1; }

.rf-head { display: flex; align-items: center; gap: 14px; padding: 24px var(--pad) 0; }
.rf-brand { flex: 1; min-width: 0; padding-right: 130px; }
.rf-kicker { margin: 0; font-size: 0.8125rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink); }
.rf-head h2 { margin: 2px 0 0; font-size: clamp(1.5rem, 2.4vw, 2rem); font-weight: 800; line-height: 1.1; color: var(--teal-near-black); }

/* Close sits top-right of the sheet */
.rf-close {
  position: absolute;
  top: 16px;
  right: 18px;
  z-index: 8;
  min-height: 48px;
  background: #fff;
  color: var(--teal-near-black);
  border: 3px solid var(--teal-near-black);
  box-shadow: 0 3px 0 rgba(27, 55, 51, 0.25);
}
.rf-close:hover { background: var(--teal-near-black); color: #fff; }

.rf-preview-short { display: none; }
.rf .rf-preview {
  margin: 10px var(--pad) 0;
  padding: 7px 14px;
  border-radius: 12px;
  background: var(--teal-near-black);
  color: #fff;
  font-size: 0.8125rem;
  line-height: 1.45;
}

/* ---------- Paint-trail progress: one painted brushstroke ---------- */
.rf-trail { padding: 12px var(--pad) 2px; }
.rf-progress-label { margin: 0 0 8px; font-size: 0.9375rem; font-weight: 800; color: #3A5654; }
.rf-trail-wrap { position: relative; }
.rf-trail-track, .rf-trail-fill {
  -webkit-mask: url(assets/trail-brush.svg) 0 0 / 100% 100% no-repeat;
  mask: url(assets/trail-brush.svg) 0 0 / 100% 100% no-repeat;
}
.rf-trail-track {
  position: absolute;
  left: calc(50% / var(--n, 7) - 18px);
  right: calc(50% / var(--n, 7) - 18px);
  top: 4px;
  height: 28px;
  background: rgba(30, 58, 56, 0.2);
}
.rf-trail-fill {
  position: absolute;
  inset: 0;
  clip-path: inset(0 100% 0 0);
  transition: clip-path 450ms cubic-bezier(0.4, 0, 0.2, 1);
}
.rf-trail-list { position: relative; z-index: 1; list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(var(--n, 7), minmax(0, 1fr)); }
.rf-mark { display: flex; justify-content: center; min-width: 0; }
.rf-mark-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  min-width: 44px;
  padding: 0 0 2px;
  border: 0;
  border-radius: 10px;
  background: none;
  font: inherit;
  color: inherit;
  cursor: default;
}
button.rf-mark-btn { cursor: pointer; }
.rf-mark-dot {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  margin-top: 0;
  border-radius: 50%;
  border: 3px solid #5F7573;
  background: #fff;
  color: #3A5654;
  font-size: 0.9375rem;
  font-weight: 800;
  line-height: 1;
  transition: transform 220ms, background-color 300ms;
}
.rf-mark-name { max-width: 100%; font-size: 0.6875rem; font-weight: 700; line-height: 1.2; letter-spacing: -0.01em; text-align: center; color: #3A5654; overflow-wrap: break-word; }
.rf-mark.is-done .rf-mark-dot { background: var(--fill, var(--acc)); border-color: var(--ink); color: var(--on); font-size: 1.0625rem; }
.rf-mark.is-done .rf-mark-name { color: var(--teal-near-black); text-decoration: underline; text-underline-offset: 3px; }
.rf-mark.is-current .rf-mark-dot { width: 40px; height: 40px; margin: -2px 0; border: 4px solid var(--ink); color: var(--ink); box-shadow: 0 0 0 5px var(--acc); }
.rf-mark.is-current .rf-mark-name { font-weight: 800; color: var(--teal-near-black); }
.rf-mark.is-pop .rf-mark-dot { animation: rf-pop 400ms cubic-bezier(0.3, 1.5, 0.5, 1); }
button.rf-mark-btn:hover .rf-mark-dot { transform: scale(1.1); }
button.rf-mark-btn:focus-visible { outline: 4px solid var(--focus); outline-offset: 3px; }
@keyframes rf-pop { 0% { transform: scale(0.6); } 100% { transform: scale(1); } }

/* ---------- Main: one stage at a time ---------- */
.rf-stage { flex: 1; min-height: 0; overflow: hidden; }
.rf-main { position: absolute; inset: 0; overflow-y: auto; overscroll-behavior: contain; padding: 14px var(--pad) 18px; }
.rf-form { max-width: none; margin: 0; }
.rf-pair { display: grid; gap: 0 18px; grid-template-columns: 1fr; }
.rf-step { padding: 2px 0 8px; }
.rf-step[hidden] { display: none; }

.rf h3 { margin: 4px 0 6px; font-size: clamp(1.625rem, 1.2rem + 1.1vw, 2.375rem); font-weight: 800; line-height: 1.15; color: var(--ink); }
.rf h3::after { content: ""; display: block; width: 96px; height: 8px; margin: 10px 0 4px; border-radius: 7px 3px 8px 4px / 4px 8px 3px 7px; background: var(--fill, var(--acc)); }
.rf h3:focus { outline: none; }
.rf h4 { margin: 0 0 6px; font-size: 1.125rem; font-weight: 800; color: var(--ink); }
.rf p { margin: 0 0 12px; line-height: 1.6; }
.rf a { color: var(--ink); font-weight: 700; }
.rf .rf-intro { font-size: 1.0625rem; }
.rf-trap { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }

/* Fields */
.rf-field { margin: 0 0 20px; padding: 0; border: 0; min-width: 0; }
.rf-field legend, .rf-field > label { display: block; padding: 0; margin: 0 0 8px; font-size: 1.1875rem; font-weight: 800; line-height: 1.35; color: var(--text-dark); }
.rf-opt, .rf-req { font-size: 0.875rem; font-weight: 600; color: #3A5654; }
.rf-hint { margin: 0 0 10px !important; font-size: 0.9375rem; color: #3A5654; }
.rf input[type="text"], .rf input[type="email"], .rf input[type="tel"], .rf textarea {
  display: block;
  width: 100%;
  min-height: 58px;
  padding: 12px 16px;
  border: 3px solid #4F6F6C;
  border-radius: 16px;
  background: #fff;
  color: var(--text-dark);
  font: 500 1.0625rem var(--ac-font);
}
.rf textarea { min-height: 96px; resize: vertical; line-height: 1.5; }
.rf input[type="text"]:focus, .rf input[type="email"]:focus, .rf input[type="tel"]:focus, .rf textarea:focus {
  outline: 4px solid var(--focus);
  outline-offset: 2px;
  border-color: var(--ink);
}
.rf-field.has-error input, .rf-field.has-error textarea { border-color: #B3261E; }
.rf-field.has-error .rf-choice-box { border-color: #B3261E; }

/* ---------- Answer tiles (real radios and checkboxes, restyled) ---------- */
.rf-choices { display: grid; gap: 10px; grid-template-columns: 1fr; }
.rf-choices-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.rf-choices-compact { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.rf-choices-one { grid-template-columns: 1fr !important; }
.rf-choice { position: relative; display: block; cursor: pointer; }
.rf-choice[hidden] { display: none; }
.rf-choice input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 1; }
.rf-choice-box {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100%;
  min-height: 68px;
  padding: 12px 18px 12px 66px;
  border: 3px solid #4F6F6C;
  border-radius: 18px;
  background: #fff;
  box-shadow: inset 9px 0 0 var(--acc);
  transition: background-color 160ms, border-color 160ms, transform 160ms, box-shadow 160ms;
}
.rf-choice-box::before {
  content: "";
  position: absolute;
  left: 24px; top: 50%;
  width: 28px; height: 28px;
  margin-top: -14px;
  border: 3px solid #4F6F6C;
  background: #fff;
  border-radius: 50%;
}
.rf-choice input[type="checkbox"] + .rf-choice-box::before { border-radius: 9px; }
.rf-choice-title { font-size: 1.0625rem; font-weight: 700; line-height: 1.3; }
.rf-choice-sub { margin-top: 3px; font-size: 0.875rem; line-height: 1.4; color: #3A5654; }
.rf-choice:hover .rf-choice-box { background: var(--tint); transform: translateY(-1px); }
.rf-choice input:checked + .rf-choice-box { background: var(--tint); border-color: var(--ink); box-shadow: inset 9px 0 0 var(--ink), inset 0 0 0 2px var(--ink); }
.rf-choice input:checked + .rf-choice-box .rf-choice-title { font-weight: 800; color: var(--teal-near-black); }
.rf-choice input:checked + .rf-choice-box::before { background: var(--ink); border-color: var(--ink); }
.rf-choice input:checked + .rf-choice-box::after {
  content: "";
  position: absolute;
  left: 33px; top: 50%;
  width: 8px; height: 14px;
  margin-top: -10px;
  border: solid #fff;
  border-width: 0 3px 3px 0;
  transform: rotate(45deg);
}
.rf-choice input[type="radio"]:checked + .rf-choice-box::after { width: 12px; height: 12px; left: 32px; margin-top: -6px; border: 0; border-radius: 50%; background: #fff; transform: none; }
.rf-choice input:focus-visible + .rf-choice-box { outline: 4px solid var(--focus); outline-offset: 3px; }
.rf-choice.is-disabled { cursor: not-allowed; }
.rf-choice.is-disabled .rf-choice-box { opacity: 0.72; background: #F1EFE9; box-shadow: inset 9px 0 0 #C9CFCE; }
.rf-choice.is-disabled:hover .rf-choice-box { background: #F1EFE9; transform: none; }
.rf-choice.is-disabled input { cursor: not-allowed; }

/* Big tiles for questions with only a few answers */
.rf-choices-big .rf-choice-box { min-height: clamp(96px, 15vh, 132px); padding-left: 72px; }
.rf-choices-big .rf-choice-box::before { left: 26px; width: 32px; height: 32px; margin-top: -16px; }
.rf-choices-big .rf-choice input:checked + .rf-choice-box::after { left: 36px; margin-top: -11px; }
.rf-choices-big .rf-choice input[type="radio"]:checked + .rf-choice-box::after { left: 35px; width: 14px; height: 14px; margin-top: -7px; }
.rf-choices-big .rf-choice-title { font-size: 1.25rem; }
.rf-choices-big .rf-choice-sub { font-size: 0.9375rem; }

/* Compact tiles (age range, area) */
.rf-choices-compact .rf-choice-box { min-height: 58px; padding: 8px 12px 8px 54px; }
.rf-choices-compact .rf-choice-box::before { left: 18px; width: 24px; height: 24px; margin-top: -12px; }
.rf-choices-compact .rf-choice input:checked + .rf-choice-box::after { left: 26px; margin-top: -9px; width: 7px; height: 12px; }
.rf-choices-compact .rf-choice input[type="radio"]:checked + .rf-choice-box::after { left: 26px; margin-top: -5px; width: 10px; height: 10px; }
.rf-choices-compact .rf-choice-title { font-size: 1rem; }

/* ---------- Messages ---------- */
.rf-error { margin: 8px 0 0 !important; padding: 8px 12px; border-left: 6px solid #B3261E; border-radius: 0 10px 10px 0; background: #FDECEA; color: #7A1712; font-weight: 700; font-size: 0.9375rem; }
.rf-error::before { content: "Problem: "; font-weight: 800; }
.rf-error[hidden] { display: none; }
.rf-note { margin: 10px 0 0 !important; padding: 10px 14px; border-radius: 12px; background: var(--tint); border: 2px solid var(--ink); color: var(--teal-near-black); font-size: 0.9375rem; font-weight: 600; }
.rf-note-warn { background: #FFF4D6; border-color: #6B4A00; }
.rf-note[hidden] { display: none; }
.rf-errors { margin: 0 0 18px; padding: 14px 18px; border: 3px solid #B3261E; border-radius: 16px; background: #FDECEA; }
.rf-errors[hidden] { display: none; }
.rf-errors:focus { outline: 4px solid var(--focus); outline-offset: 3px; }
.rf-errors h3 { margin: 0 0 6px; font-size: 1.25rem; color: #7A1712; }
.rf-errors h3::after { display: none; }
.rf-errors ul { margin: 0; padding-left: 22px; }
.rf-errors a { color: #7A1712; }

.rf-callout { margin: 6px 0 16px; padding: 14px 18px; border-radius: 18px; background: #fff; border: 3px solid var(--ink); }
.rf-callout p:last-child { margin-bottom: 0; }
.rf-callout-title { margin-bottom: 6px !important; font-weight: 800; color: var(--ink); font-size: 1.0625rem; }
.rf-callout-final { border-color: #8A1236; background: #FFF4F6; }
.rf-card { margin: 0 0 14px; padding: 14px 18px 6px; border-radius: 18px; background: #fff; box-shadow: 0 6px 16px rgba(30, 58, 56, 0.1); border-top: 6px solid var(--fill, var(--acc)); }
.rf-list { margin: 0 0 12px; padding-left: 22px; }
.rf-list li { margin-bottom: 6px; line-height: 1.5; }

/* Permissions: three clearly separate parts */
.rf-info { margin-bottom: 18px; }
.rf-role-help { margin: 12px 0 0 !important; }
.rf-optbox { margin-bottom: 12px; padding: 4px 12px 12px; border: 3px dashed #7D918F; border-radius: 20px; background: rgba(255, 255, 255, 0.7); }
.rf-optbox legend { float: none; width: auto; padding: 0 8px; margin: 0 0 0 -4px; font-size: 1.0625rem; color: var(--ink); }
.rf-optbox .rf-choices { margin-top: 4px; }

/* Review summary */
.rf-summary { display: grid; gap: 12px; margin: 0 0 16px; grid-template-columns: 1fr; }
.rf-sum-group { padding: 12px 16px 6px; border-radius: 18px; background: #fff; box-shadow: 0 6px 16px rgba(30, 58, 56, 0.1); border-top: 6px solid var(--fill, var(--acc)); }
.rf-sum-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.rf-sum-head h4 { margin: 0; }
.rf-sum-group dl { margin: 6px 0 8px; }
.rf-sum-row { display: grid; grid-template-columns: 1fr; gap: 1px; padding: 6px 0; border-top: 2px solid #E4EDEB; }
.rf-sum-row dt { font-size: 0.875rem; font-weight: 700; color: #3A5654; }
.rf-sum-row dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.rf-sum-row dd.is-empty { color: #4A5B59; font-weight: 500; font-style: italic; }
.rf-sum-row ul { margin: 0; padding-left: 20px; }

/* ---------- Buttons ---------- */
.rf-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 58px;
  padding: 0 28px;
  border: 3px solid var(--ink);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font: 800 1.0625rem var(--ac-font);
  cursor: pointer;
  transition: background-color 200ms, border-color 200ms;
}
.rf-btn:hover:not(:disabled) { background: var(--tint); color: var(--teal-near-black); }
.rf-btn-primary { background: var(--ink); color: #fff; box-shadow: 0 4px 0 rgba(27, 55, 51, 0.3); }
.rf-btn-primary:hover:not(:disabled) { background: var(--teal-near-black); border-color: var(--teal-near-black); color: #fff; }
.rf-btn.is-send { background: var(--ac-gold); border-color: var(--teal-near-black); color: var(--teal-near-black); font-size: 1.0625rem; white-space: nowrap; padding: 0 22px; }
.rf-btn.is-send:hover:not(:disabled) { background: #F0C265; color: var(--teal-near-black); }
.rf-btn:disabled { opacity: 0.6; cursor: wait; }
.rf-btn:focus-visible, .rf-link:focus-visible, .rf-close:focus-visible { outline: 4px solid var(--focus); outline-offset: 3px; }
.rf-link { display: inline-flex; align-items: center; min-height: 44px; padding: 0 6px; border: 0; background: none; color: var(--ink); font: 800 1rem var(--ac-font); text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }
.rf-link[hidden] { display: none; }

/* Footer: Back, Save and Next/Send always sit in the same places */
.rf-foot {
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-areas: "back save next" "note note note" "del del del";
  align-items: center;
  gap: 8px 14px;
  padding: 12px var(--pad) 14px;
  border-top: 3px solid rgba(30, 58, 56, 0.12);
  background: rgba(255, 254, 251, 0.95);
}
.rf-back { grid-area: back; min-width: 132px; }
.rf-save { grid-area: save; justify-self: center; }
.rf-next { grid-area: next; min-width: 132px; }
/* On the first step Back keeps its space (so nothing jumps) but is invisible and unreachable */
.rf-back[hidden] { display: inline-flex !important; visibility: hidden; }
.rf-draft-note { grid-area: note; margin: 0 !important; font-size: 0.8125rem; line-height: 1.4; color: #3A5654; text-align: center; }
.rf-draft-note.is-alert { color: #7A1712; font-weight: 700; }
.rf-delete { grid-area: del; justify-self: center; }

/* ---------- Small artwork inside the sheet ---------- */
.rf-step { position: relative; }
.rf-orn { position: absolute; top: -2px; right: 0; width: 84px; height: auto; pointer-events: none; transform: rotate(6deg); filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.14)); }
.rf-step > h3 { padding-right: 96px; }
.rf-divider {
  height: 14px;
  width: 150px;
  margin: 2px 0 12px;
  background: var(--fill, var(--acc));
  -webkit-mask: url(assets/trail-brush.svg) 0 0 / 100% 100% no-repeat;
  mask: url(assets/trail-brush.svg) 0 0 / 100% 100% no-repeat;
  opacity: 0.9;
}

/* ---------- The brush wipe between stages (visual only; the new stage is already in place) ---------- */
.rf-wipe { display: none; }
.rf-stage.is-wiping .rf-main { animation: rf-reveal 450ms cubic-bezier(0.5, 0.05, 0.25, 1) both; }
.rf-stage.is-wiping .rf-wipe {
  display: block;
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0) calc(100% - 300px), var(--bgA) calc(100% - 150px), var(--acc) calc(100% - 34px), var(--acc) 100%);
  -webkit-mask: url(assets/wipe-edge.svg) 0 0 / 100% 100% no-repeat;
  mask: url(assets/wipe-edge.svg) 0 0 / 100% 100% no-repeat;
  animation: rf-sweep 450ms cubic-bezier(0.5, 0.05, 0.25, 1) both;
}
@keyframes rf-reveal { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes rf-sweep { from { transform: translateX(-100%); opacity: 1; } 85% { opacity: 1; } to { transform: translateX(0); opacity: 0; } }

/* ---------- Cally's hello inside the sheet (tablets and phones) ---------- */

/* ---------- The canvas: colour and artwork behind the sheet ---------- */
.rf-canvas { position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; background-image: radial-gradient(circle at 15% 12%, rgba(255, 255, 255, 0.5), transparent 38%), radial-gradient(circle at 88% 90%, var(--bgB), transparent 55%), radial-gradient(circle at 8% 92%, var(--bgB), transparent 40%); }
.rf-scene { position: absolute; inset: 0; opacity: 0; transition: opacity 450ms ease; }
.rf-scene.is-on { opacity: 1; }
.rf-art, .rf-cally-wrap { display: none; }

@media (min-width: 900px) {
  .rf-art { display: block; position: absolute; height: auto; user-select: none; -webkit-user-drag: none; }
  .rf-art-l  { z-index: 1; width: 30vw; left: -9vw; top: 12%; transform: rotate(-6deg); }
  .rf-art-r  { z-index: 1; width: 30vw; right: -9vw; top: 7%; transform: rotate(5deg) scaleX(-1); }
  .rf-art-r.rf-art-plain { width: 24vw; right: -4vw; top: 4%; transform: none; }
  .rf-art-lb { z-index: 1; width: 26vw; left: -8vw; bottom: 12%; transform: rotate(5deg); }
  .rf-art-rb { z-index: 2; width: auto; height: 36vh; right: -3vw; bottom: 5%; filter: drop-shadow(0 12px 18px rgba(0, 0, 0, 0.18)); }
  .rf-art-rb.is-scene { height: 28vh; right: -4vw; }

  .rf-scene.is-on .rf-art-l, .rf-scene.is-on .rf-art-lb { animation: rf-in-left 450ms ease-out both; }
  .rf-scene.is-on .rf-art-r { animation: rf-in-right 450ms 60ms ease-out both; }
  .rf-scene.is-on .rf-art-rb { animation: rf-rise 450ms 120ms cubic-bezier(0.22, 0.8, 0.26, 1) both; }
  @keyframes rf-in-left { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
  @keyframes rf-in-right { from { clip-path: inset(0 0 0 100%); } to { clip-path: inset(0 0 0 0); } }
  @keyframes rf-rise { from { opacity: 0; margin-bottom: -24px; } to { opacity: 1; margin-bottom: 0; } }
}

/* Cally stands beside the sheet when there is room; otherwise she is a small tip inside it */
.rf-tip { display: none; }
.rf-tip img { flex: none; width: 52px; height: auto; }
.rf-tip p { margin: 0 !important; padding: 8px 12px; border: 3px solid var(--ink); border-radius: 16px 16px 16px 4px; background: #fff; font-size: 0.875rem; font-weight: 700; line-height: 1.35; }
@media (min-width: 1100px) {
  .rf-cally-wrap { position: absolute; z-index: 4; right: calc(50% + 420px + 4px); bottom: 12px; display: flex; flex-direction: column; align-items: flex-end; width: 215px; }
  .rf-cally-wrap[hidden] { display: none; }
  .rf-cally { display: block; height: min(28vh, 250px); width: auto; transform-origin: 50% 100%; }
  .rf-cally-wrap:not([hidden]) .rf-cally { animation: rf-cally-in 450ms cubic-bezier(0.3, 1.4, 0.5, 1) both; }
  .rf-cally-say {
    position: relative;
    width: 190px;
    margin: 0 8px 10px 0 !important;
    padding: 10px 14px;
    border: 3px solid var(--ink);
    border-radius: 20px 20px 4px 20px;
    background: #fff;
    color: var(--text-dark);
    font-size: 0.875rem;
    font-weight: 700;
    line-height: 1.4;
  }
  .rf-cally-wrap:not([hidden]) .rf-cally-say { animation: rf-bubble 350ms 250ms cubic-bezier(0.3, 1.5, 0.5, 1) both; }
  @keyframes rf-cally-in { from { opacity: 0; transform: translateY(50px) scale(0.92); } to { opacity: 1; transform: none; } }
  @keyframes rf-bubble { from { opacity: 0; transform: scale(0.6); } to { opacity: 1; transform: none; } }
}

/* ---------- Questions that need an answer ---------- */
.rf-modal { position: absolute; inset: 0; z-index: 20; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(27, 55, 51, 0.6); }
.rf-modal[hidden] { display: none; }
.rf-modal-card { width: min(520px, 100%); padding: 24px; border-radius: 22px; background: #fff; border: 4px solid var(--ac-gold); box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35); outline: none; }
.rf-modal-card h3 { margin-top: 0; color: var(--teal-deep); }
.rf-modal-card h3::after { display: none; }
.rf-modal-actions { display: grid; gap: 10px; margin-top: 14px; }

/* ---------- Confirmation ---------- */
.rf-done { position: absolute; inset: 0; z-index: 15; display: flex; align-items: center; justify-content: center; padding: 20px; background: #F7F5F0; overflow-y: auto; }
.rf-done[hidden] { display: none; }
.rf-done-paint { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.rf-done-paint span { position: absolute; left: var(--x); top: var(--y); width: 46vmin; height: 46vmin; margin: -23vmin 0 0 -23vmin; border-radius: 52% 48% 55% 45% / 48% 54% 46% 52%; background: var(--c); opacity: 0.28; }
.rf-done-card { position: relative; width: min(640px, 100%); padding: 28px 28px 26px; border-radius: 28px 60px 28px 60px; background: #fff; box-shadow: 0 20px 60px rgba(30, 58, 56, 0.25); text-align: center; }
.rf-done-cally { display: block; width: clamp(110px, 22vh, 170px); height: auto; margin: -70px auto 6px; }
.rf-done h2 { margin: 0 0 12px; font-size: clamp(1.75rem, 4.2vw, 2.5rem); font-weight: 800; line-height: 1.15; color: var(--teal-deep); }
.rf-done h2:focus { outline: none; }
.rf-done p { font-size: 1.125rem; }
.rf-done-remember { font-weight: 800; color: #8A1236; }
.rf-done-preview { padding: 10px 14px; border-radius: 12px; background: var(--teal-near-black); color: #fff; font-size: 0.9375rem !important; }
.rf-done .rf-btn { margin-top: 6px; }

.rf-done.is-playing .rf-done-paint span { animation: rf-blob 900ms cubic-bezier(0.3, 1.3, 0.5, 1) both; }
.rf-done.is-playing .rf-done-paint span:nth-child(2) { animation-delay: 80ms; }
.rf-done.is-playing .rf-done-paint span:nth-child(3) { animation-delay: 160ms; }
.rf-done.is-playing .rf-done-paint span:nth-child(4) { animation-delay: 240ms; }
.rf-done.is-playing .rf-done-paint span:nth-child(5) { animation-delay: 320ms; }
.rf-done.is-playing .rf-done-paint span:nth-child(6) { animation-delay: 400ms; }
.rf-done.is-playing .rf-done-card { animation: rf-card 600ms 250ms cubic-bezier(0.22, 0.8, 0.26, 1) both; }
.rf-done.is-playing .rf-done-cally { animation: rf-cally 700ms 600ms cubic-bezier(0.3, 1.5, 0.5, 1) both; }
@keyframes rf-blob { from { transform: scale(0); opacity: 0; } to { transform: scale(1); opacity: 0.28; } }
@keyframes rf-card { from { opacity: 0; transform: translateY(30px) scale(0.96); } to { opacity: 1; transform: none; } }
@keyframes rf-cally { from { opacity: 0; transform: translateY(40px) scale(0.6) rotate(8deg); } to { opacity: 1; transform: none; } }

/* The accessibility settings button stays reachable above the form */
html.rf-open .ac-a11y { z-index: 130; top: 16px; bottom: auto; left: auto; right: 148px; }
html.ac-text-lg.rf-open .ac-a11y { right: 168px; }
html.ac-text-xl.rf-open .ac-a11y { right: 206px; }
html.rf-open .ac-a11y-btn { min-height: 48px; padding: 0 16px 0 12px; }
html.rf-open .ac-a11y-panel { position: fixed; top: 74px; right: 14px; left: auto; bottom: auto; width: min(350px, calc(100vw - 28px)); }
html.rf-open.rf-done .ac-a11y { top: auto; bottom: 14px; right: 14px; }
html.rf-open.rf-done .ac-a11y-panel { top: auto; bottom: 66px; }

/* ---------- Desktop: two columns of tiles; the accessibility button waits beside the sheet ---------- */
@media (min-width: 900px) {
  html.rf-open .ac-a11y, html.ac-text-lg.rf-open .ac-a11y, html.ac-text-xl.rf-open .ac-a11y { right: 16px; }
  .rf-pair { grid-template-columns: 1fr 1fr; }
  .rf-choices { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .rf-choices-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rf-choices-compact { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
  .rf-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
  .rf-info p { font-size: 0.9375rem; line-height: 1.5; }
  .rf-save { white-space: nowrap; }
  .rf-foot:has(.is-send) .rf-save { padding: 0 18px; font-size: 0.9375rem; }
}
@media (min-width: 900px) and (max-width: 1299px) {
  html.rf-open .ac-a11y-btn span { display: none; }
  html.rf-open .ac-a11y-btn { width: 48px; padding: 0; justify-content: center; }
}
@media (min-width: 900px) and (max-width: 1099px) {
  .rf-sheet { width: min(840px, calc(100vw - 150px)); }
}
html.ac-text-lg.rf-open .ac-a11y-btn span, html.ac-text-xl.rf-open .ac-a11y-btn span { }
@media (min-width: 900px) {
  html.ac-text-lg.rf-open .ac-a11y-btn span, html.ac-text-xl.rf-open .ac-a11y-btn span { display: none; }
  html.ac-text-lg.rf-open .ac-a11y-btn, html.ac-text-xl.rf-open .ac-a11y-btn { width: 48px; padding: 0; justify-content: center; }
}
@media (min-width: 900px) and (max-height: 860px) {
  .rf-head { padding-top: 20px; }
  .rf .rf-preview { margin-top: 6px; padding: 4px 12px; font-size: 0.75rem; }
  .rf-trail { padding-top: 8px; }
  .rf-progress-label { margin-bottom: 6px; font-size: 0.875rem; }
  .rf-main { padding-top: 8px; padding-bottom: 8px; }
  .rf h3 { margin: 2px 0 4px; font-size: 1.875rem; }
  .rf h3::after { height: 7px; margin: 6px 0 2px; }
  .rf .rf-intro { margin-bottom: 8px; font-size: 1rem; }
  .rf-field { margin-bottom: 12px; }
  .rf-field legend, .rf-field > label { margin-bottom: 6px; font-size: 1.125rem; }
  .rf input[type="text"], .rf input[type="email"], .rf input[type="tel"] { min-height: 52px; padding: 8px 14px; }
  .rf textarea { min-height: 72px; padding: 8px 14px; }
  .rf-choices { gap: 8px; }
  .rf-choice-box { min-height: 58px; padding-top: 8px; padding-bottom: 8px; }
  .rf-choices-big .rf-choice-box { min-height: clamp(92px, 15vh, 132px); }
  .rf-field:has(input[type="text"], input[type="email"], input[type="tel"]) { margin-bottom: 18px; }
  .rf input[type="text"], .rf input[type="email"], .rf input[type="tel"] { min-height: 58px; }
  .rf-choice-title { font-size: 1rem; }
  .rf-hint { margin-bottom: 6px !important; font-size: 0.875rem; }
  .rf-callout { padding: 8px 14px; margin-top: 2px; margin-bottom: 8px; font-size: 0.9375rem; }
  .rf-callout p { margin-bottom: 6px; line-height: 1.5; }
  .rf-callout-title { font-size: 1rem; }
  .rf-card { padding: 10px 16px 2px; margin-bottom: 10px; }
  .rf-divider { height: 11px; margin: 0 0 8px; }
  .rf-foot { padding-top: 8px; padding-bottom: 8px; gap: 2px 14px; }
  .rf-foot .rf-btn { min-height: 52px; }
  .rf-draft-note { font-size: 0.75rem; }
  .rf-mark-dot { width: 32px; height: 32px; }
  .rf-mark.is-current .rf-mark-dot { width: 36px; height: 36px; }
  .rf-trail-track { top: 2px; height: 26px; }
  .rf-orn { width: 70px; }
  .rf-step > h3 { padding-right: 82px; }
}

/* ---------- Tablets and phones: Cally becomes a small tip inside the sheet ---------- */
@media (max-width: 1099px) {
  .rf-tip:not([hidden]) { display: flex; align-items: flex-end; gap: 10px; margin: 0 0 8px; }
  .rf-tip[hidden] { display: none; }
}

/* ---------- Phones: the sheet fills the screen ---------- */
@media (max-width: 640px) {
  .rf { --pad: 16px; }
  .rf-sheet { width: 100%; height: 100%; border-radius: 0; box-shadow: none; }
  .rf-head { padding: 14px 12px 0 16px; gap: 8px; }
  .rf-kicker { display: none; }
  .rf-head h2 { font-size: 1.0625rem; }
  .rf-brand { padding-right: 168px; }
  .rf-close { top: 8px; right: 12px; min-height: 46px; padding: 0 14px 0 10px; }
  html.rf-open .ac-a11y { top: 8px; right: 124px; }
  html.ac-text-lg.rf-open .ac-a11y { right: 142px; }
  html.ac-text-xl.rf-open .ac-a11y { right: 168px; }
  html.rf-open .ac-a11y-btn { width: 46px; height: 46px; min-height: 46px; padding: 0; justify-content: center; }
  .rf .rf-preview { margin: 6px 12px 0; padding: 4px 10px; font-size: 0.6875rem; line-height: 1.35; }
  .rf-preview-long { display: none; }
  .rf-preview-short { display: inline; }
  .rf-trail { padding: 8px 16px 0; }
  .rf-progress-label { margin: 0 0 6px; font-size: 0.8125rem; }
  .rf-mark-name { display: none; }
  .rf-mark-btn { min-width: 40px; }
  .rf-mark-dot { width: 30px; height: 30px; font-size: 0.8125rem; border-width: 2px; }
  .rf-mark.is-current .rf-mark-dot { width: 34px; height: 34px; margin: -2px 0; border-width: 3px; box-shadow: 0 0 0 4px var(--acc); }
  .rf-mark.is-done .rf-mark-dot { font-size: 0.9375rem; }
  .rf-trail-track { top: 2px; height: 26px; left: calc(50% / var(--n, 7) - 14px); right: calc(50% / var(--n, 7) - 14px); }
  .rf-main { padding: 6px 16px 12px; }
  .rf h3 { font-size: 1.5rem; margin: 2px 0 4px; }
  .rf h3::after { width: 72px; height: 6px; margin: 6px 0 2px; }
  .rf-orn { width: 48px; top: 0; }
  .rf-step > h3 { padding-right: 56px; }
  .rf-divider { width: 110px; height: 10px; margin: 0 0 10px; }
  .rf-field { margin-bottom: 14px; }
  .rf-field legend, .rf-field > label { font-size: 1.0625rem; }
  .rf-choices-row { grid-template-columns: 1fr 1fr; }
  .rf-choices-compact { grid-template-columns: 1fr; }
  .rf-choice-box { min-height: 62px; padding: 10px 14px 10px 58px; }
  .rf-choice-box::before { left: 20px; }
  .rf-choice input:checked + .rf-choice-box::after { left: 29px; }
  .rf-choice input[type="radio"]:checked + .rf-choice-box::after { left: 28px; }
  .rf-choices-compact .rf-choice-box { padding-left: 54px; min-height: 54px; }
  .rf-choices-compact .rf-choice-box::before { left: 18px; }
  .rf-choices-compact .rf-choice input:checked + .rf-choice-box::after { left: 26px; }
  .rf-choices-compact .rf-choice input[type="radio"]:checked + .rf-choice-box::after { left: 26px; }
  .rf-choices-big .rf-choice-box { min-height: 76px; padding-left: 62px; }
  .rf-choices-big .rf-choice-box::before { left: 20px; }
  .rf-choices-big .rf-choice input:checked + .rf-choice-box::after { left: 30px; }
  .rf-choices-big .rf-choice input[type="radio"]:checked + .rf-choice-box::after { left: 29px; }
  .rf-optbox { padding: 8px 10px; }
  .rf-foot { grid-template-columns: 1fr 1fr; grid-template-areas: "back next" "save save" "note note" "del del"; gap: 6px 10px; padding: 8px 16px; }
  .rf-foot:has(.is-send) { grid-template-areas: "next next" "back save" "note note" "del del"; }
  .rf-foot .rf-btn { width: 100%; min-height: 52px; font-size: 1rem; padding: 0 14px; min-width: 0; }
  .rf-foot .rf-save { min-height: 44px; border-width: 2px; font-size: 0.9375rem; }
  .rf-draft-note { font-size: 0.6875rem; line-height: 1.3; }
  .rf-done-card { padding: 20px 18px 18px; }
}

/* Large-text modes: only the current step keeps a name under its marker (the line above and the screen-reader text still name every step) */
html.ac-text-lg .rf-mark:not(.is-current) .rf-mark-name, html.ac-text-xl .rf-mark:not(.is-current) .rf-mark-name { display: none; }
html.ac-text-lg .rf-mark.is-current .rf-mark-name, html.ac-text-xl .rf-mark.is-current .rf-mark-name { white-space: nowrap; overflow-wrap: normal; }

/* Reduced motion straight from the device setting (the page also sets ac-no-motion): everything is instant */
@media (prefers-reduced-motion: reduce) {
  .rf, .rf * { transition: none !important; animation: none !important; }
  .rf-wipe { display: none !important; }
}

/* Animations off (visitor setting or device preference) */
html.ac-no-motion .rf, html.ac-no-motion .rf * { transition: none !important; animation: none !important; }
html.ac-no-motion .rf-done-paint span, html.ac-no-motion .rf-done-card, html.ac-no-motion .rf-done-cally { opacity: 1; }
html.ac-no-motion .rf-done-paint span { opacity: 0.28; }
html.ac-no-motion .rf-trail-fill { transition: none; }
html.ac-no-motion .rf-wipe { display: none !important; }

/* High contrast: plain white, black outlines, no decoration that could get in the way */
html.ac-contrast .rf, html.ac-contrast .rf-shell, html.ac-contrast .rf-sheet { background: #fff; background-image: none; color: #000; }
html.ac-contrast .rf-sheet { box-shadow: 0 0 0 4px #000; }
html.ac-contrast .rf-sheet::before { background: #000; }
html.ac-contrast .rf-canvas { background: #fff; background-image: none; }
html.ac-contrast .rf-art, html.ac-contrast .rf-orn, html.ac-contrast .rf-done-paint, html.ac-contrast .rf-wipe { display: none !important; }
html.ac-contrast .rf-divider { background: #000; }
html.ac-contrast .rf h2, html.ac-contrast .rf h3, html.ac-contrast .rf h4, html.ac-contrast .rf a, html.ac-contrast .rf-kicker,
html.ac-contrast .rf-opt, html.ac-contrast .rf-req, html.ac-contrast .rf-hint, html.ac-contrast .rf-mark-name,
html.ac-contrast .rf-progress-label, html.ac-contrast .rf-choice-sub, html.ac-contrast .rf-draft-note,
html.ac-contrast .rf-sum-row dt, html.ac-contrast .rf-callout-title, html.ac-contrast .rf-done-remember, html.ac-contrast .rf-link,
html.ac-contrast .rf-optbox legend { color: #000; }
html.ac-contrast .rf h3::after { background: #000; }
html.ac-contrast .rf-preview, html.ac-contrast .rf-done-preview { background: #000; color: #fff; }
html.ac-contrast .rf-choice-box, html.ac-contrast .rf input[type="text"], html.ac-contrast .rf input[type="email"],
html.ac-contrast .rf input[type="tel"], html.ac-contrast .rf textarea, html.ac-contrast .rf-card, html.ac-contrast .rf-callout, html.ac-contrast .rf-sum-group { border: 3px solid #000; box-shadow: none; background: #fff; }
html.ac-contrast .rf-optbox { border-color: #000; background: #fff; }
html.ac-contrast .rf-choice input:checked + .rf-choice-box { background: #fff; box-shadow: inset 0 0 0 4px #000; }
html.ac-contrast .rf-choice input:checked + .rf-choice-box::before { background: #000; border-color: #000; }
html.ac-contrast .rf-btn, html.ac-contrast .rf-close { background: #fff; color: #000; border-color: #000; }
html.ac-contrast .rf-btn-primary, html.ac-contrast .rf-btn.is-send { background: #000; color: #fff; border-color: #000; }
html.ac-contrast .rf-trail-track { background: #8A8A8A; }
html.ac-contrast .rf-trail-fill { background: #000 !important; }
html.ac-contrast .rf-mark-dot { border-color: #000; color: #000; background: #fff; box-shadow: none; }
html.ac-contrast .rf-mark.is-done .rf-mark-dot { background: #000; color: #fff; }
html.ac-contrast .rf-mark.is-done .rf-mark-dot, html.ac-contrast .rf-mark.is-current .rf-mark-dot { border-color: #000; }
html.ac-contrast .rf-mark.is-current .rf-mark-dot { color: #000; box-shadow: 0 0 0 4px #000; }
html.ac-contrast .rf-mark.is-done .rf-mark-name, html.ac-contrast .rf-mark.is-current .rf-mark-name { color: #000; }
html.ac-contrast .rf-field legend, html.ac-contrast .rf-field > label, html.ac-contrast .rf-choice-title, html.ac-contrast .rf-choice input:checked + .rf-choice-box .rf-choice-title { color: #000; }
html.ac-contrast .rf-sum-group, html.ac-contrast .rf-card { border-top-color: #000; }
html.ac-contrast .rf-note, html.ac-contrast .rf-note-warn { background: #fff; border: 3px solid #000; color: #000; }
html.ac-contrast .rf-foot { background: #fff; border-top-color: #000; }
html.ac-contrast .rf-done-card { box-shadow: none; border: 4px solid #000; }
html.ac-contrast .rf-cally-say, html.ac-contrast .rf-tip p { border-color: #000; }
html.ac-contrast .rf :focus-visible { outline: 4px solid #000 !important; box-shadow: 0 0 0 7px #fff; }
html.ac-contrast .rf h3:focus, html.ac-contrast .rf h2:focus { outline: none !important; box-shadow: none !important; }
