/* Athletifyou — client application styles.
 *
 * Layered on top of the marketing site's styles.css, which is served from this
 * same origin and supplies the palette, type scale and button styles. Only what
 * the brochure site has no equivalent for lives here: form controls.
 *
 * Mobile first throughout. The audience fills this in on a phone, often
 * one-handed, often interrupted.
 */

.container--narrow {
  max-width: 46rem;
}

.form-page h1 {
  margin-bottom: 0.6em;
}

/* `.lead` comes from the marketing stylesheet (size and colour). All the app
   adds is the space beneath it. Named `.lede` here until the theme pass
   renamed the templates, at which point this rule quietly stopped matching. */
.form-page .lead {
  margin-bottom: 2.4rem;
}

/* ---------------------------------------------------------------- blocks */

.form-block {
  border: 0;
  padding: 0;
  margin: 0 0 2.6rem;
  min-width: 0; /* fieldset defaults to min-content and will overflow a phone */
}

.form-block__title {
  font-family: var(--font-head);
  font-size: 1.22rem;
  font-weight: 600;
  color: var(--green-900);
  padding: 0 0 0.5rem;
  margin: 0 0 1.4rem;
  border-bottom: 1px solid var(--sand);
  width: 100%;
}

/* ---------------------------------------------------------------- fields */

.form-field {
  margin-bottom: 1.7rem;
}

.form-field__label {
  display: block;
  font-weight: 600;
  font-size: 1rem;
  margin: 0 0 0.35rem;
  color: var(--ink);
}

.form-field__optional {
  font-weight: 400;
  font-size: 0.82rem;
  color: var(--text-soft);
  margin-left: 0.45rem;
}

.form-field__help {
  font-size: 0.9rem;
  color: var(--text-soft);
  margin: 0 0 0.6rem;
}

/* Every text-ish control, not just the three I first thought of. Date, number
   and password were falling through to browser defaults — which meant 13px
   text, and iOS zooming the page whenever she tapped the date of birth. */
.form-field input[type="text"],
.form-field input[type="email"],
.form-field input[type="tel"],
.form-field input[type="url"],
.form-field input[type="password"],
.form-field input[type="search"],
.form-field input[type="number"],
.form-field input[type="date"],
.form-field input[type="time"],
.form-field select,
.form-field textarea {
  width: 100%;
  min-width: 0;
  padding: 0.78rem 0.9rem;
  font: inherit;
  font-size: 1rem; /* never below 16px: iOS zooms the page on focus otherwise */
  color: var(--ink);
  background: #fff;
  border: 1.5px solid var(--sand-200);
  border-radius: var(--radius);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-field textarea {
  resize: vertical;
  min-height: 8rem;
  line-height: 1.6;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--green-500);
  box-shadow: 0 0 0 3px rgba(72, 166, 98, 0.18);
}

/* `input[type]` rather than plain `input`, deliberately. The base rules above
   are type-specific (`input[type="email"]` and friends), which outranks a bare
   `.form-field--error input` — so the error border silently stopped applying
   when those types were added, leaving only the message. The attribute
   selector matches their specificity, and the ring is immune to it either way. */
.form-field--error input[type],
.form-field--error select,
.form-field--error textarea {
  border-color: var(--clay-500);
  box-shadow: 0 0 0 3px rgba(196, 120, 92, 0.14);
}

/* ------------------------------------------------------- radios/checkboxes */

/* Django renders each option in its own <div>. Turn them into tappable cards:
   the whole row is the target, not a 13px dot. */
.form-field__input--choices > div {
  display: block;
}

.form-field__input--choices label {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  padding: 0.72rem 0.9rem;
  margin-bottom: 0.5rem;
  background: #fff;
  border: 1.5px solid var(--sand-200);
  border-radius: var(--radius);
  cursor: pointer;
  line-height: 1.45;
  transition: border-color 0.12s ease, background 0.12s ease;
}

.form-field__input--choices label:hover {
  border-color: var(--green-400);
  background: var(--bone);
}

.form-field__input--choices input[type="radio"],
.form-field__input--choices input[type="checkbox"] {
  flex: 0 0 auto;
  width: 1.15rem;
  height: 1.15rem;
  margin-top: 0.15rem;
  accent-color: var(--green-600);
}

/* :has() lets the selected card highlight without any JavaScript. Browsers
   without it simply show the native control, which is still perfectly usable. */
.form-field__input--choices label:has(input:checked) {
  border-color: var(--green-600);
  background: var(--bone);
  box-shadow: inset 0 0 0 1px var(--green-600);
}

.form-field__input--choices label:focus-within {
  outline: 2px solid var(--green-500);
  outline-offset: 2px;
}

/* ---------------------------------------------------------------- consent */

.form-consent {
  background: var(--sand);
  border-radius: var(--radius);
  padding: 1.3rem 1.4rem;
  margin: 0 0 2rem;
}

.form-check {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
}

.form-check input[type="checkbox"] {
  flex: 0 0 auto;
  width: 1.2rem;
  height: 1.2rem;
  margin-top: 0.2rem;
  accent-color: var(--green-600);
}

.form-check label {
  font-size: 0.95rem;
  line-height: 1.55;
  cursor: pointer;
}

/* ----------------------------------------------------- notes, errors, alerts */

.form-note {
  font-size: 0.9rem;
  color: var(--text-soft);
  line-height: 1.6;
  margin: 0.7rem 0 0;
}

.form-note--after {
  margin-top: 1rem;
}

/* A note that sits between two questions rather than under one, and needs to
   read as belonging to neither. */
.form-note--standalone {
  margin: -0.6rem 0 1.9rem;
  padding-left: 0.9rem;
  border-left: 3px solid var(--green-400);
}

.form-error {
  color: var(--clay-600);
  font-size: 0.9rem;
  font-weight: 600;
  margin: 0.45rem 0 0;
}

.form-alert {
  background: #fdf3ef;
  border-left: 4px solid var(--clay-500);
  border-radius: 6px;
  padding: 1rem 1.2rem;
  margin: 0 0 2rem;
}

.form-alert--calm {
  background: var(--bone);
  border-left-color: var(--green-500);
}

.form-alert p {
  margin: 0 0 0.5rem;
}

.form-alert p:last-child {
  margin-bottom: 0;
}

/* The honeypot. Off-screen rather than display:none — some bots skip anything
   that is not rendered at all, and this one is meant to be found and filled. */
.form-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ---------------------------------------------------------------- thanks */

.rule {
  border: 0;
  border-top: 1px solid var(--sand-200);
  margin: 2.6rem 0 2rem;
}

.steps {
  padding-left: 1.2rem;
  line-height: 1.7;
}

.steps li {
  margin-bottom: 0.7rem;
}

.footer__legal {
  font-size: 0.9rem;
  margin-top: 0.8rem;
}

@media (min-width: 40rem) {
  .form-field__input--choices label {
    padding: 0.8rem 1rem;
  }
}

/* ============================================================ assessment  */

.progress {
  margin-bottom: 2rem;
}

.progress__bar {
  height: 6px;
  background: var(--sand-200);
  border-radius: 999px;
  overflow: hidden;
}

.progress__bar span {
  display: block;
  height: 100%;
  background: var(--green-600);
  border-radius: 999px;
  transition: width 0.3s ease;
}

.progress__text {
  font-size: 0.85rem;
  color: var(--text-soft);
  margin: 0.5rem 0 0;
}

/* "I'd rather not say" is deliberately set apart from the real answers, so it
   reads as a legitimate choice rather than one of the options being scored. */
.choice--skip {
  margin-top: 0.9rem !important;
  border-style: dashed !important;
  color: var(--text-soft);
}

/* Conditional questions are shown by default and hidden by JS. If the script
   never runs, she sees everything — longer, but never a missing question. */
.form-field--conditional[hidden] {
  display: none;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  align-items: center;
  margin-top: 2.2rem;
}

.flag-list {
  line-height: 1.7;
}

.review-list {
  margin: 1.5rem 0 2.5rem;
  border-top: 1px solid var(--sand-200);
}

.review-list__row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--sand-200);
}

/* ------------------------------------------------------- the realm profile */

.realms {
  display: grid;
  gap: 1.1rem;
  margin: 2rem 0;
}

.realm {
  background: #fff;
  border: 1.5px solid var(--sand-200);
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
}

.realm__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 0.6rem;
}

.realm__name {
  font-family: var(--font-head);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--green-900);
}

.realm__score {
  font-size: 1.35rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.realm__bar {
  height: 8px;
  background: var(--sand);
  border-radius: 999px;
  overflow: hidden;
}

.realm__bar span {
  display: block;
  height: 100%;
  border-radius: 999px;
}

.realm__band {
  font-size: 0.85rem;
  color: var(--text-soft);
  margin: 0.55rem 0 0;
}

/* Colour carries meaning here, so the band label repeats it in words -- the
   score is never communicated by hue alone. */
.realm--strong .realm__bar span { background: var(--green-600); }
.realm--mixed .realm__bar span { background: var(--green-400); }
.realm--needs-work .realm__bar span { background: var(--clay-500); }
.realm--needs-work .realm__score { color: var(--clay-600); }

/* ------------------------------------------------------------------ cards */

/* `.card` is the marketing site's — white, --radius, --shadow-sm, --hair,
   flex column. It was being redefined here, which quietly replaced the shadow
   and border with a flatter version of the same idea. Only the additions the
   brochure site has no equivalent for live here. */

.cards {
  display: grid;
  gap: 1.2rem;
  margin: 2rem 0;
}

.card h2 {
  font-size: 1.15rem;
  margin: 0 0 0.6rem;
}

.card > p {
  margin-bottom: 1rem;
}

/* `.card` is a flex column, so a button inside it stretches to full width and
   stops reading as a button. Pin it to its own width and push it to the
   bottom, so buttons line up across a row of uneven cards. */
.card .btn {
  align-self: flex-start;
  margin-top: auto;
}

.card--muted {
  background: var(--bone);
  border-style: dashed;
  box-shadow: none;
}

@media (min-width: 46rem) {
  .realms { grid-template-columns: 1fr 1fr; }
  .cards { grid-template-columns: 1fr 1fr; }
}

/* ================================================================== the hub */

.card__links {
  font-size: 0.92rem;
  margin: 0;
}

/* --------------------------------------------------------------- messaging */

.thread {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  margin: 1.5rem 0 2.2rem;
}

.bubble {
  max-width: 85%;
  padding: 0.8rem 1rem;
  border-radius: var(--radius);
  line-height: 1.55;
}

.bubble p {
  margin: 0 0 0.35rem;
}

.bubble--mine {
  align-self: flex-end;
  background: var(--green-600);
  color: #fff;
}

.bubble--mine a { color: #fff; }

.bubble--theirs {
  align-self: flex-start;
  background: #fff;
  border: 1.5px solid var(--sand-200);
}

.bubble__meta {
  font-size: 0.78rem;
  opacity: 0.75;
  margin: 0;
}

/* ------------------------------------------------------------------ player */

.player {
  position: relative;
  margin: 1.5rem 0;
  background: #000;
  border-radius: var(--radius);
  overflow: hidden;
}

.player video {
  display: block;
  width: 100%;
  max-height: 70vh;
}

/* Pips showing where feedback sits, so she can see at a glance that there are
   three things to look at rather than discovering them by scrubbing. */
.player__marks {
  position: relative;
  height: 6px;
  background: var(--sand-200);
}

.player__mark {
  position: absolute;
  top: 0;
  width: 3px;
  height: 6px;
  margin-left: -1px;
  background: var(--clay-500);
}

.note-form {
  background: var(--bone);
  border: 1.5px solid var(--sand-200);
  border-radius: var(--radius);
  padding: 1.2rem 1.3rem;
  margin-bottom: 2rem;
}

.note-form h2 {
  margin-top: 0;
  font-size: 1.1rem;
}

.notes {
  list-style: none;
  padding: 0;
  margin: 1rem 0 2rem;
}

.note {
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--sand-200);
}

/* The timestamp is the control, so it looks like one. */
.note__stamp {
  flex: 0 0 auto;
  font: inherit;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: var(--green-700);
  background: var(--sand);
  border: 1.5px solid var(--sand-200);
  border-radius: 999px;
  padding: 0.25rem 0.7rem;
  cursor: pointer;
  min-width: 3.6rem;
}

.note__stamp:hover {
  border-color: var(--green-600);
  background: #fff;
}

.note__body { min-width: 0; }
.note__body p { margin: 0 0 0.4rem; }
.note__body audio,
.note__body video { max-width: 100%; }

.note__meta {
  font-size: 0.8rem;
  color: var(--text-soft);
}

/* --------------------------------------------------------------- programme */

.week {
  background: #fff;
  border: 1.5px solid var(--sand-200);
  border-radius: var(--radius);
  padding: 1.3rem 1.4rem;
  margin-bottom: 1.4rem;
}

.week h2 {
  margin-top: 0;
  font-size: 1.15rem;
}

/* Named `.plan-list`, not `.plan`: the marketing site already owns `.plan` for
   its pricing cards, and a programme's exercise list is a different thing that
   happens to share an English word. */
.plan-list {
  padding-left: 1.2rem;
  line-height: 1.65;
  margin: 0;
}

.plan-list li { margin-bottom: 0.8rem; }

.plan__dose {
  display: inline-block;
  margin-left: 0.5rem;
  font-size: 0.88rem;
  color: var(--text-soft);
  background: var(--sand);
  border-radius: 4px;
  padding: 0.1rem 0.45rem;
}

.tag-draft {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #fff;
  background: var(--clay-500);
  border-radius: 3px;
  padding: 0.1rem 0.4rem;
  vertical-align: middle;
}

/* ===================================================== page furniture */

.page-intro {
  margin-bottom: 2rem;
}

.page-intro .lead {
  margin-bottom: 1.8rem;
}

/* --- stepper -------------------------------------------------------------
   Numbers come from a counter, never from markup, so an <ol> falling back to
   its own numbering can't produce "1. 1". */

.stepper {
  list-style: none;
  counter-reset: step;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  gap: .75rem 1rem;
}

.stepper li {
  counter-increment: step;
  position: relative;
  display: flex;
  align-items: center;
  gap: .65rem;
  font-size: .93rem;
  color: var(--text-soft);
  padding: .55rem .85rem;
  background: #fff;
  border: 1px solid var(--sand-200);
  border-radius: 999px;
}

.stepper li::before {
  content: counter(step);
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 999px;
  background: var(--green-100);
  color: var(--green-800);
  font-weight: 800;
  font-size: .78rem;
}

/* Where she is now, so the form reads as step one of three rather than an
   undifferentiated wall. */
.stepper li.is-current {
  color: var(--ink);
  font-weight: 600;
  border-color: var(--green-400);
  background: var(--green-50);
}

.stepper li.is-current::before {
  background: var(--green-600);
  color: #fff;
}

/* --- trust strip ---------------------------------------------------------
   The same credentials the brochure site leads with. This is the page where
   she hands over health information; the reason to trust it belongs here. */

.trust-strip {
  list-style: none;
  padding: 1.1rem 0;
  margin: 0 0 2rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  gap: .9rem 1.5rem;
  border-top: 1px solid var(--sand-200);
  border-bottom: 1px solid var(--sand-200);
}

.trust-strip li {
  display: flex;
  flex-direction: column;
  gap: .1rem;
  line-height: 1.35;
}

.trust-strip strong {
  font-size: .95rem;
  color: var(--green-800);
}

.trust-strip span {
  font-size: .85rem;
  color: var(--text-soft);
}

/* --- the form as an object ----------------------------------------------- */

.form-card {
  background: #fff;
  border: 1px solid var(--sand-200);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 1.6rem 1.4rem;
}

/* Inside a white card the inputs need a tint to read as fields rather than as
   more card. */
.form-card .form-field input,
.form-card .form-field select,
.form-card .form-field textarea {
  background: var(--bone);
}

.form-card .form-field input:focus,
.form-card .form-field select:focus,
.form-card .form-field textarea:focus {
  background: #fff;
}

.form-card .form-block:last-of-type {
  margin-bottom: 1.8rem;
}

.form-submit {
  border-top: 1px solid var(--sand-200);
  padding-top: 1.5rem;
}

.form-submit .form-note {
  text-align: center;
}

@media (min-width: 40rem) {
  .form-card { padding: 2.2rem 2.1rem; }
}

/* A step already behind her. Muted rather than removed, so the sequence still
   reads as three things with one of them finished. */
.stepper li.is-done {
  color: var(--text-soft);
  border-color: var(--green-200);
}

.stepper li.is-done::before {
  content: "\2713";
  background: var(--green-200);
  color: var(--green-800);
}

.booking-card {
  margin-bottom: 2.6rem;
}

.booking-card h2 {
  margin-top: 0;
  font-size: 1.25rem;
}

.booking-card p {
  color: var(--text-soft);
}

.booking-card .btn {
  margin-top: 1.2rem;
}

/* Cards should end where their content ends. Without this the last paragraph's
   own margin adds a band of empty space inside the card. */
.form-card > :last-child,
.booking-card > :last-child {
  margin-bottom: 0;
}

/* --- booking embed -------------------------------------------------------
   The calendar is the point of the thank-you page, so it gets the room. The
   height is reserved on the container so the page does not jump when Calendly
   mounts. */

.booking-embed {
  margin: 0 0 .8rem;
  border: 1px solid var(--sand-200);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.booking-embed .calendly-inline-widget {
  width: 100%;
}

.booking-note {
  margin-bottom: 2.4rem;
}

/* --- booked confirmation ------------------------------------------------- */

.eyebrow--done { color: var(--green-600); }

.booking-confirmed {
  margin-bottom: 2.4rem;
}

.booking-confirmed h2 {
  margin-top: 0;
  font-size: 1.2rem;
}

.confirm-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1.2rem;
  display: grid;
  gap: 1rem;
}

.confirm-list li {
  display: grid;
  gap: .15rem;
  padding-left: 1.6rem;
  position: relative;
  line-height: 1.55;
}

/* A tick per item: this is a page about something being done. */
.confirm-list li::before {
  content: "\2713";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--green-600);
  font-weight: 800;
}

.confirm-list strong { color: var(--ink); }
.confirm-list span { color: var(--text-soft); font-size: .95rem; }
