/* The Baseline Audit — embedded form.
   Brand system from DESIGN.md: black band + orange accent, quiet body.
   Brand faces (same files physicalculture.co serves): Tungsten Bold for
   headings, Neue Haas Display Medium for text, Roman for supporting text. */

@font-face {
  font-family: "Tungsten";
  src: url("/static/fonts/tungsten-bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Neue Haas Display";
  src: url("/static/fonts/neue-haas-display-medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Neue Haas Display";
  src: url("/static/fonts/neue-haas-display-roman.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --brand: #fd700b;             /* overridden per tenant inline */
  --ink: #1f2430;
  --ink-soft: #3d4453;
  --muted: #5c6472;
  --bg: #f4f4f2;
  --surface: #ffffff;
  --line: #e5e5e0;
  --black: #0e0e0e;
  --error: #c22f2f;
  --radius: 10px;
  --form-column: 900px;
  --page-column: 1240px;
  --heading: "Tungsten", "Arial Narrow", "Avenir Next Condensed", sans-serif;
  --body: "Neue Haas Display", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

html { -webkit-text-size-adjust: 100%; }

/* Touch: no gray tap flash (selected states are drawn by the form itself)
   and no double-tap-to-zoom wait on anything tappable. */
button,
a,
.option,
.dd-toggle,
.part-hit { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }

/* After Next (or submit) focus moves to the new step's first label so screen
   readers announce it; the ring belongs on controls, not on headings. */
.q-label:focus,
.section-band h2:focus,
.confirmation:focus { outline: none; }

body {
  font-family: var(--body);
  font-weight: 500;             /* Neue Haas Medium is the text weight */
  color: var(--ink);
  background: var(--bg);
  font-size: 15.5px;
  line-height: 1.5;
}

/* Localhost-only development shortcut; never rendered in production. */
.dev-shortcut {
  position: fixed;
  top: 12px;
  right: 12px;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border: 1px solid #333;
  border-radius: 9px;
  background: var(--black);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.2);
  color: #fff;
}

.dev-shortcut[hidden] { display: none; }

.dev-shortcut button {
  min-height: 38px;
  padding: 8px 13px;
  border: 0;
  border-radius: 6px;
  background: var(--brand);
  font: 700 16px/1 var(--heading);
  letter-spacing: 0.7px;
  text-transform: uppercase;
  color: #fff;
  cursor: pointer;
}

.dev-shortcut button:disabled { opacity: 0.55; cursor: wait; }
.dev-shortcut button:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.dev-shortcut span { padding-right: 4px; font-size: 12px; }

@media (max-width: 620px) {
  .dev-shortcut { top: auto; right: 10px; bottom: 12px; left: 10px; }
  .dev-shortcut button { flex: 1; }
}

/* --- layout ---------------------------------------------------------------- */

.audit {
  max-width: var(--form-column);
  margin: 0 auto;
  padding: 0 20px 48px;
}

.audit-layout { display: block; }

.audit-primary {
  min-width: 0;
}

/* The generic tenant masthead retains the original dark treatment. Physical
   Culture uses a full-bleed white introduction block so the value framing and
   time note read as a distinct preface before the questions begin. */
.masthead {
  background: var(--black);
  color: #fff;
  padding: 72px 0 36px;
}

.form-page-physical-culture .masthead {
  background: var(--surface);
  color: var(--ink);
  padding-top: 84px;
}

.masthead-inner {
  position: relative;
  max-width: var(--page-column);
  margin: 0 auto;
  padding: 0 20px;
  min-height: 200px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  text-align: center;
}

.masthead-logo {
  position: absolute;
  top: -42px;
  /* Pull the mark out of the centered copy column and into the true viewport
     corner while retaining a deliberate edge inset. */
  left: min(20px, calc((100% - 100vw) / 2 + 28px));
  width: 154px;
  height: auto;
  object-fit: contain;
}

.form-page-physical-culture .masthead-logo {
  width: clamp(190px, 18vw, 280px);
  padding: 0;
  border-radius: 0;
  background: transparent;
}

.masthead h1 {
  grid-area: title;
  align-self: end;
  font-family: var(--heading);
  font-weight: 700;
  /* Tungsten runs narrow; sized up vs old DIN scale. Fluid below 483px so
     narrow phones get 3 lines instead of 4 towering ones. */
  font-size: clamp(36px, 12vw, 58px);
  line-height: 1;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--brand);
  text-wrap: balance;
}

.form-page-physical-culture .masthead h1 {
  color: var(--black);
  font-size: clamp(54px, 6vw, 76px);
  line-height: 0.94;
}

.masthead-details {
  width: min(100%, 760px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 216px;
  grid-template-areas:
    "title preview"
    "copy preview"
    "note preview";
  column-gap: clamp(28px, 5vw, 52px);
  row-gap: 12px;
  align-items: center;
  text-align: left;
}

.form-page-physical-culture .masthead-details {
  width: min(100%, 820px);
  grid-template-columns: minmax(0, 1fr) 176px;
  /* floor on the gap below the pinned logo so the mark can breathe */
  margin-top: 26px;
}

.masthead-copy {
  grid-area: copy;
  align-self: end;
}

.masthead-intro {
  font-size: 15.5px;
  font-weight: 400;
  color: #d8d8d4;
  max-width: 70ch;
}

.masthead-credibility {
  margin-top: 10px;
  max-width: 86ch;
  font-size: 13.5px;
  font-weight: 400;
  line-height: 1.5;
  color: #b9b9b4;
  text-wrap: balance;
}

.form-page-physical-culture .masthead-intro { color: var(--ink-soft); }
.form-page-physical-culture .masthead-credibility { color: var(--muted); }

.masthead-note {
  grid-area: note;
  align-self: start;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--brand);
}

/* --- output preview -------------------------------------------------------- */
/* The example sits between the masthead explanation and its time note. */

.preview {
  grid-area: preview;
  margin: 0;
  max-width: 220px;
  text-align: center;
}

.form-page-physical-culture .preview { max-width: 176px; }

.preview-frame {
  margin: 0 auto;
  max-width: 216px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 10px 26px rgba(14, 14, 14, 0.10);
  padding: 8px;
  text-align: left;
}

.form-page-physical-culture .preview-frame {
  max-width: 172px;
  padding: 6px;
}

.preview-band {
  background: var(--black);
  border-radius: 6px;
  padding: 8px 10px;
}

.preview-gym {
  font-family: var(--heading);
  font-weight: 700;
  font-size: 8px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #d8d8d4;
}

.preview-title {
  font-family: var(--heading);
  font-weight: 700;
  font-size: 17px;
  line-height: 1;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--brand);
  margin-top: 3px;
}

.preview-headline {
  margin: 8px 2px 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

/* headline stand-in: bolder bars than the priority lines below, so the
   hierarchy still reads without promising any particular verdict */
.preview-hline {
  display: block;
  height: 6px;
  border-radius: 4px;
  background: color-mix(in srgb, var(--ink) 22%, var(--surface));
}

.preview-hline.short { width: 58%; }

.preview-pillars {
  margin-top: 7px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
}

.preview-pillar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 5px 6px;
  font-family: var(--heading);
  font-weight: 700;
  font-size: 9px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--ink);
}

.pchip {
  font-family: var(--body);
  font-weight: 500;
  font-size: 8.5px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: #fff;
  padding: 2px 7px;
  border-radius: 8px;
  white-space: nowrap;
}

.pchip.blank {
  width: 24px;
  height: 9px;
  padding: 0;
  background: var(--line);
}

.preview-prios { margin-top: 7px; display: flex; flex-direction: column; gap: 4px; }

.preview-prios-header {
  font-family: var(--heading);
  font-weight: 700;
  font-size: 9px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--ink);
}

.preview-prio {
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 5px 6px;
}

.preview-num {
  flex: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-size: 8.5px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
}

.preview-lines { flex: 1; display: flex; flex-direction: column; gap: 3px; }

.preview-lines i {
  display: block;
  height: 4px;
  border-radius: 3px;
  background: var(--line);
}

.preview-lines i:last-child { width: 62%; }

/* --- client reviews --------------------------------------------------------- */

.client-reviews {
  position: relative;
  margin-top: 46px;
  padding-top: 44px;
  padding-bottom: 26px;
}

/* Full-width lower-page field. The content stays on the form column while the
   background bleeds to both viewport edges and continues through confirmation
   and legal copy. */
.form-page-physical-culture .audit { padding-bottom: 0; }

.form-page-physical-culture :is(.client-reviews, .form-footer) {
  background: var(--black);
  box-shadow: 0 0 0 100vmax var(--black);
  clip-path: inset(0 -100vmax);
}

.reviews-heading-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
}

.client-reviews h2 {
  font-family: var(--heading);
  font-size: 23px;
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--ink);
}

.form-page-physical-culture .client-reviews h2 { color: #f4f4f2; }

.reviews-subline {
  margin-top: 5px;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--brand);
}

/* The arrows are centred on the cards: the track wraps the scroller, and
   the list's 2px top / 12px bottom padding is offset so the centre line
   is the cards' own. */
.review-track { position: relative; }

.review-controls {
  position: absolute;
  top: calc(50% - 5px);
  transform: translateY(-50%);
  right: -22px;
  left: -22px;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
}

.review-control {
  width: 44px;
  height: 44px;
  border: 1px solid #d2d2cc;
  border-radius: 50%;
  background: var(--surface);
  color: var(--ink-soft);
  font: 500 20px/1 var(--body);
  cursor: pointer;
  pointer-events: auto;
}

.review-control:hover { border-color: #aaa9a2; color: var(--ink); }
.review-control:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

.form-page-physical-culture .review-control {
  border-color: #e5e5e0;
  background: var(--surface);
  box-shadow: 0 3px 12px rgba(14, 14, 14, 0.16);
  color: var(--ink);
}

.form-page-physical-culture .review-control:hover {
  border-color: var(--brand);
  color: var(--brand);
}

.review-list {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - 32px) / 3);
  gap: 16px;
  margin-top: 16px;
  padding: 2px 2px 12px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: 2px;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
}

.review-list::-webkit-scrollbar { display: none; }

/* No fixed height: the grid row stretches every card to match the tallest,
   so quotes render in full and the cards stay uniform. */
.review {
  display: flex;
  flex-direction: column;
  padding: 18px;
  overflow: hidden;
  border: 0;
  border-radius: 14px;
  background: #f4f4f2;
  box-shadow: 0 4px 13px rgba(14, 14, 14, 0.06);
  scroll-snap-align: start;
}

.review header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}

.review-name {
  min-width: 0;
  overflow: hidden;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.review-rating {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  color: #f4b400;
  font-size: 19px;
  line-height: 1;
  letter-spacing: 0.04em;
}

.google-icon {
  flex: none;
  width: 17px;
  height: 17px;
}

.review-quote {
  position: relative;
  margin-top: 12px;
  padding-left: 17px;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.45;
  color: var(--ink-soft);
}

.review-quote::before {
  content: "“";
  position: absolute;
  top: -7px;
  left: 0;
  color: var(--brand);
  font-family: Georgia, serif;
  font-size: 30px;
  line-height: 1;
}

.review-full {
  flex: 1;
  min-height: 0;
  margin: 10px -5px 0 0;
  padding-right: 7px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #c9c9c2 transparent;
  text-align: left;
}

.review-full[hidden] { display: none; }

.review-full p {
  font-size: 12.5px;
  font-weight: 400;
  line-height: 1.48;
  color: var(--ink-soft);
}

.review-full p + p { margin-top: 9px; }

.review-full strong {
  font-weight: 500;
  color: var(--ink);
}

/* Text link at the foot of the card, with a 44px tap area that reaches up
   into the gap above it instead of pushing the card taller. */
.review-toggle {
  align-self: flex-start;
  display: inline-flex;
  align-items: flex-end;
  flex: none;
  min-height: 44px;
  margin-top: auto;
  padding: 0 0 2px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: 500 12.5px/1.2 var(--body);
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--brand) 70%, transparent);
  text-underline-offset: 0.2em;
  cursor: pointer;
}

.review-toggle:hover { color: var(--brand); }

.review-toggle:focus-visible,
.review-full:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.review.is-expanded .review-quote { display: none; }

.review.is-expanded .review-rating {
  margin-top: 7px;
  font-size: 12px;
}

.review.is-expanded .google-icon {
  width: 13px;
  height: 13px;
}

.reviews-cta {
  margin: 18px 0 8px;
  text-align: center;
}

.reviews-cta a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 11px 22px;
  border: 1px solid var(--brand);
  border-radius: 7px;
  background: var(--brand);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.2;
  text-decoration: none;
}

.reviews-cta a:hover {
  border-color: color-mix(in srgb, var(--brand) 84%, #0e0e0e);
  background: color-mix(in srgb, var(--brand) 84%, #0e0e0e);
}

.reviews-cta a:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
}

.section { margin-top: 8px; }

.section-band {
  background: var(--black);
  border-radius: var(--radius);
  padding: 12px 18px;
  margin: 36px 0 6px;
}

.section-band h2 {
  font-family: var(--heading);
  font-weight: 700;
  font-size: 30px;
  line-height: 1.05;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #fff;
}

.section-intro {
  margin: 10px 2px 0;
  color: var(--ink-soft);
}

/* --- questions ------------------------------------------------------------- */

.question { margin-top: 28px; }

/* Conditional follow-ups (pain note, health-condition note) read as part of the
   question above them: no card of their own — just an indented continuation
   under a brand accent, label kept for screen readers only. */
.question.followup-q {
  margin-top: 12px;
  padding-left: 14px;
  border-left: 3px solid var(--brand);
}

.question.followup-q .q-instruction { margin-top: 0; }

fieldset { border: 0; }

.q-label {
  display: block;
  font-size: 17px;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0.02em;
  color: var(--ink);
  text-transform: uppercase;
}

.q-num { color: var(--brand); }

.q-optional {
  font-size: 14px;
  font-weight: 400;
  letter-spacing: normal;
  text-transform: lowercase;
  color: var(--muted);
}

.q-instruction {
  display: block;
  margin-top: 4px;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--ink-soft);
}

.options { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }

.option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 13px 14px;
  min-height: 48px;
  cursor: pointer;
}

@media (prefers-reduced-motion: no-preference) {
  .option { transition: border-color 120ms ease-out, background-color 120ms ease-out; }
}

.option:hover { border-color: #c9c9c2; }

.option input {
  flex: none;
  width: 20px;
  height: 20px;
  margin-top: 1px;
  accent-color: var(--brand);
  cursor: pointer;
}

.option-text { font-size: 15.5px; color: var(--ink-soft); }

.option:has(input:checked) {
  border-color: var(--brand);
  background: color-mix(in srgb, var(--brand) 6%, var(--surface));
}

.option:has(input:checked) .option-text { color: var(--ink); }

.option:has(input:focus-visible) {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

/* --- pain map --------------------------------------------------------------- */
/* Two croquis figures (front, back) tiled into body parts. Every part is a
   clipped SVG shape carrying its answer; hover tints it, a tap marks it. The
   real checkboxes sit visually hidden underneath for keyboard and screen
   reader users (see _pain_map.html / scripts/build_pain_map.py). */

.pain-map { margin-top: 8px; }

/* The hint is the question's instruction line (form.html); only the verb
   changes between mouse and touch. */
.pain-hint-touch { display: none; }

@media (hover: none) {
  .pain-hint-pointer { display: none; }
  .pain-hint-touch { display: inline; }
}

.pain-view-tabs {
  display: none;
  gap: 6px;
  margin-bottom: 10px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--ink) 3%, var(--surface));
}

.pain-view-tab {
  flex: 1;
  min-height: 44px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}

.pain-view-tab.is-active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(31, 36, 48, 0.12);
}

.pain-view-tab:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.pain-map-figures {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.pain-figure {
  position: relative;
  padding: 14px 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--brand) 2.5%, var(--surface));
}

.pain-figure-title {
  margin: 0 0 6px;
  font-family: var(--heading);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-align: center;
  text-transform: uppercase;
  color: var(--muted);
}

.body-figure {
  display: block;
  width: clamp(170px, 62%, 210px);
  height: auto;
  margin: 0 auto;
  overflow: visible;
  touch-action: manipulation;
}

.body-figure .body-fill {
  fill: color-mix(in srgb, var(--ink) 9%, var(--surface));
  stroke: none;
}

/* Drawn under the fill at double width, so only the outer edge survives and
   the parts merge into one body. */
.body-figure .body-outline {
  fill: none;
  stroke: color-mix(in srgb, var(--ink) 38%, var(--surface));
  stroke-width: 2.4;
  stroke-linejoin: round;
  pointer-events: none;
}

.body-figure .body-detail {
  fill: none;
  stroke: color-mix(in srgb, var(--ink) 20%, var(--surface));
  stroke-linecap: round;
  pointer-events: none;
}

.body-figure .part-visuals { pointer-events: none; }

/* Seams between limbs (chin, wrist, ankle, arm to chest, hip to thigh) are
   generated from the same edges that cut the hover shapes, so a line always
   sits exactly where the highlight changes. */
.body-figure .part-seam {
  fill: none;
  stroke: color-mix(in srgb, var(--ink) 18%, var(--surface));
  stroke-width: 0.7;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}

/* Faint seams between parts tell the lead the body is divided into exact
   spots before they touch it. */
/* Parts stack in hit order, so an unselected part is painted in the body
   colour to occlude whatever sits beneath it (the wrist under the hand). */
.body-figure .part {
  fill: color-mix(in srgb, var(--ink) 9%, var(--surface));
  stroke: color-mix(in srgb, var(--ink) 18%, var(--surface));
  stroke-width: 0.7;
  vector-effect: non-scaling-stroke;
}

.body-figure .part.is-hover {
  fill: color-mix(in srgb, var(--brand) 32%, var(--surface));
  stroke: color-mix(in srgb, var(--brand) 70%, var(--ink));
  stroke-width: 1;
}

.body-figure .part.is-selected {
  fill: color-mix(in srgb, var(--brand) 62%, var(--surface));
  stroke: color-mix(in srgb, var(--brand) 80%, var(--ink));
  stroke-width: 1;
}

.body-figure .part.is-selected.is-hover {
  fill: color-mix(in srgb, var(--brand) 78%, var(--surface));
}

/* Tap targets: the silhouette with a fat invisible stroke, so a thumb landing
   just outside a wrist or an ankle still counts. */
.body-figure .part-hit {
  fill: transparent;
  stroke: transparent;
  stroke-width: 14;
  stroke-linejoin: round;
  pointer-events: all;
  cursor: pointer;
}

@media (prefers-reduced-motion: no-preference) {
  .body-figure .part { transition: fill 100ms ease-out, stroke 100ms ease-out; }
}

.pain-tip {
  position: absolute;
  z-index: 3;
  transform: translate(-50%, -100%);
  padding: 5px 10px;
  border-radius: 6px;
  background: var(--ink);
  color: var(--surface);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
  pointer-events: none;
  box-shadow: 0 2px 8px rgba(31, 36, 48, 0.18);
}

.pain-tip::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  border: 5px solid transparent;
  border-top-color: var(--ink);
  transform: translateX(-50%);
}

.pain-tip.is-selected { background: var(--brand); }
.pain-tip.is-selected::after { border-top-color: var(--brand); }

/* Hidden checkboxes remain focusable; focus is mirrored on the figure. */
.pain-region-inputs { position: relative; }
.pain-region-input { pointer-events: none; }

.pain-selected[hidden] { display: none; }

.pain-selected {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  margin-top: 12px;
}

.pain-selected-label {
  margin: 0;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: var(--muted);
}

.pain-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pain-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 6px 5px 11px;
  border: 1px solid color-mix(in srgb, var(--brand) 55%, var(--surface));
  border-radius: 999px;
  background: color-mix(in srgb, var(--brand) 10%, var(--surface));
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 500;
}

.pain-chip button {
  width: 22px;
  height: 22px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
}

.pain-chip button:hover,
.pain-chip button:focus-visible { background: color-mix(in srgb, var(--brand) 22%, var(--surface)); color: var(--ink); outline: 0; }

.pain-map-other {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.question.invalid .pain-figure { border-color: var(--error); }

@media (max-width: 720px) {
  .pain-view-tabs { display: flex; }
  .pain-map-figures { grid-template-columns: 1fr; }
  .pain-map[data-active-view="front"] .pain-figure[data-view="back"],
  .pain-map[data-active-view="back"] .pain-figure[data-view="front"] { display: none; }
  .body-figure { width: min(100%, 230px); }
}

/* --- text controls ----------------------------------------------------------- */

.control {
  display: block;
  width: 100%;
  margin-top: 10px;
  font-family: var(--body);
  font-size: 16px;             /* ≥16px prevents iOS zoom-on-focus */
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
  min-height: 48px;
}

textarea.control { resize: vertical; min-height: 120px; }

.control:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 1px;
  border-color: var(--brand);
}

/* --- custom dropdown ---------------------------------------------------------- */
/* The native select stays in the DOM (source of truth) but is visually hidden;
   the button + listbox is what people see and use. */

.dd { position: relative; display: block; margin-top: 10px; }

.dd select.dd-native {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  opacity: 0;
  pointer-events: none;
}

.dd .dd-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 0;
  cursor: pointer;
  text-align: left;
}

.dd-toggle.placeholder .dd-label { color: var(--muted); }

.dd-caret { flex: none; color: var(--muted); }

@media (prefers-reduced-motion: no-preference) {
  .dd-caret { transition: transform 150ms ease-out; }
}

.dd.open .dd-caret { transform: rotate(180deg); }

.dd-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  /* tall enough that even the longest option lists show without scrolling */
  max-height: min(70vh, 460px);
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 12px 30px rgba(14, 14, 14, 0.14);
  padding: 6px;
  z-index: 20;
}

.dd-item {
  font-size: 15.5px;
  color: var(--ink);
  border-radius: 7px;
  padding: 11px 12px 11px 34px;
  position: relative;
  cursor: pointer;
  min-height: 44px;
  display: flex;
  align-items: center;
}

.dd-item.active { background: color-mix(in srgb, var(--brand) 6%, var(--surface)); }

.dd-item.selected::before {
  content: "✓";
  position: absolute;
  left: 12px;
  color: var(--brand);
  font-size: 13px;
}

.char-note {
  margin-top: 4px;
  font-size: 12.5px;
  font-weight: 400;
  color: var(--muted);
  text-align: right;
}

/* --- voice notes ------------------------------------------------------------ */

.voice-notes {
  margin-top: 12px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.voice-prompt {
  color: var(--ink);
  font-size: 15px;
  font-weight: 500;
}

.voice-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.voice-record,
.voice-remove {
  min-height: 44px;
  border: 1px solid #c9c9c2;
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  font: 500 15px/1 var(--body);
  cursor: pointer;
}

.voice-record {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 11px 15px;
}

.voice-record:focus-visible,
.voice-remove:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.voice-record:disabled {
  opacity: 0.55;
  cursor: default;
}

.voice-dot {
  width: 11px;
  height: 11px;
  flex: none;
  border-radius: 50%;
  background: var(--error);
}

.voice-notes.recording .voice-record {
  border-color: var(--error);
  background: color-mix(in srgb, var(--error) 7%, var(--surface));
}

@media (prefers-reduced-motion: no-preference) {
  .voice-notes.recording .voice-dot { animation: voice-pulse 1.2s ease-out infinite; }
}

@keyframes voice-pulse {
  50% { transform: scale(0.72); opacity: 0.55; }
}

.voice-help,
.voice-status {
  margin-top: 7px;
  font-size: 13px;
  font-weight: 400;
  color: var(--muted);
}

.voice-status { min-height: 1.3em; }
.voice-status.error { color: var(--error); font-weight: 500; }

.voice-list { margin-top: 4px; }

.voice-item {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
  padding: 10px 10px 10px 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.voice-item-main {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.voice-item-title { color: var(--ink); }
.voice-item-meta { color: var(--muted); font-size: 13px; }
.voice-item audio { width: min(260px, 45%); height: 36px; }

.voice-remove {
  flex: none;
  padding: 9px 12px;
  color: var(--error);
}

/* --- validation --------------------------------------------------------------- */

.q-error {
  margin-top: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--error);
}

.question.invalid .control,
.question.invalid .option { border-color: var(--error); }

/* --- pager --------------------------------------------------------------------- */

.pager {
  margin-top: 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.pager-btn {
  font-family: var(--heading);
  font-weight: 700;
  font-size: 21px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  border-radius: var(--radius);
  padding: 12px 34px;
  min-height: 50px;
  cursor: pointer;
}

.pager-next {
  color: #fff;
  background: var(--brand);
  border: 0;
}

@media (prefers-reduced-motion: no-preference) {
  .pager-next { transition: filter 120ms ease-out; }
}

.pager-next:hover { filter: brightness(0.94); }

.pager-back {
  color: var(--ink-soft);
  background: var(--surface);
  border: 1px solid var(--line);
}

.pager-back:hover { border-color: #c9c9c2; }

.pager-btn:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }

.pager-step {
  font-size: 13px;
  font-weight: 400;
  color: var(--muted);
  white-space: nowrap;
}

/* --- submit -------------------------------------------------------------------- */

.submit-block { margin-top: 40px; text-align: center; }

.submit-btn {
  font-family: var(--heading);
  font-weight: 700;
  font-size: 26px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #fff;
  background: var(--brand);
  border: 0;
  border-radius: var(--radius);
  padding: 16px 44px;
  min-height: 56px;
  cursor: pointer;
}

@media (prefers-reduced-motion: no-preference) {
  .submit-btn { transition: filter 120ms ease-out; }
}

.submit-btn:hover { filter: brightness(0.94); }
.submit-btn:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.submit-btn[disabled] { opacity: 0.6; cursor: default; }

.submit-note {
  margin-top: 12px;
  font-size: 13px;
  font-weight: 400;
  color: var(--muted);
}

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

/* The end screen sits on the light page, above the black review field. */
.confirmation { padding-bottom: 24px; }

/* The completed Physical Culture view keeps only the brand mark from the
   introductory masthead. Its background merges into the page instead of
   leaving a separate white hero block above the confirmation. */
body.confirmation-view.form-page-physical-culture .masthead {
  padding: 28px 0 0;
  background: var(--bg);
}

body.confirmation-view.form-page-physical-culture .masthead-inner {
  min-height: 0;
  justify-content: flex-start;
}

body.confirmation-view.form-page-physical-culture .masthead-logo {
  position: static;
  width: clamp(190px, 24vw, 260px);
}

body.confirmation-view.form-page-physical-culture .masthead-details { display: none; }

body.confirmation-view.form-page-physical-culture .confirmation > p:first-child {
  margin-top: 18px;
}

.confirmation p {
  margin-top: 16px;
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink-soft);
}

.confirmation a { color: var(--ink); text-underline-offset: 0.15em; }

/* Inline links (reply address, site link) get a thumb-sized tap area without
   changing the line they sit in: the padding is cancelled by the margin. */
.confirmation p a,
.confirmation-site-link a {
  display: inline-block;
  padding: 12px 2px;
  margin: -12px 0;
}

.retake-audit {
  display: block;
  min-height: 44px;
  margin: 24px auto 0;
  padding: 10px 12px;
  border: 0;
  background: transparent;
  color: var(--ink-soft);
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 0.15em;
  cursor: pointer;
}

.retake-audit:hover { color: var(--ink); }
.retake-audit:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }

.confirmation-cta {
  margin-top: 28px;
  padding: 24px 22px 26px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-align: center;
}

.confirmation-cta-lead {
  margin: 0 auto;
  max-width: 44ch;
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
}

a.confirmation-btn {
  display: inline-block;
  margin-top: 16px;
  font-family: var(--heading);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #fff;
  background: var(--brand);
  border-radius: var(--radius);
  padding: 13px 36px;
  text-decoration: none;
}

a.confirmation-btn:hover { filter: brightness(0.94); }
a.confirmation-btn:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }

.confirmation-site-link {
  margin-top: 8px;
  font-size: 14px;
  font-weight: 400;
  color: var(--muted);
  text-align: center;
}


/* --- footer disclaimer ------------------------------------------------------------- */

.form-footer {
  margin-top: 44px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
  text-align: center;
}

.form-page-physical-culture .form-footer {
  margin-top: 0;
  padding: 22px 0 48px;
  border-top-color: #353532;
}

.form-page-physical-culture .disclaimer { color: #a9a9a3; }

.disclaimer {
  margin: 0 auto;
  font-size: 11.5px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--muted);
  max-width: 72ch;
}

/* --- honeypot ---------------------------------------------------------------------- */

.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* The carousel retains the pillar flow and simply changes how many review
   snippets peek into view at each content-driven breakpoint. */

@media (max-width: 1100px) and (min-width: 681px) {
  .masthead-logo { top: -48px; width: 110px; }
}

@media (max-width: 760px) {
  .review-list { grid-auto-columns: calc((100% - 14px) / 2); gap: 14px; }
  .review { padding: 16px; }
}

@media (max-width: 680px) {
  .masthead-logo {
    top: -46px;
    width: 120px;
  }

  .masthead-details {
    width: 100%;
    grid-template-columns: 1fr;
    grid-template-areas:
      "title"
      "copy"
      "preview"
      "note";
    justify-items: center;
    row-gap: 0;
    text-align: center;
  }

  .form-page-physical-culture .masthead-details {
    width: 100%;
    grid-template-columns: 1fr;
  }

  .masthead h1 { margin-top: 38px; }
  .form-page-physical-culture .masthead-details { margin-top: 0; }
  .form-page-physical-culture .masthead h1 {
    margin-top: 62px;
    font-size: 38px;
    text-wrap: wrap;
  }
  /* row-gap is 0 on the stacked layout, so the pitch needs its own gap
     under the title */
  .masthead-copy { margin-top: 16px; max-width: 70ch; }
  .masthead-intro { line-height: 1.45; text-wrap: pretty; }
  .masthead-credibility { margin-top: 10px; }
  .preview { margin-top: 18px; }
  .masthead-note { margin-top: 14px; }
}

/* --- small screens ------------------------------------------------------------------ */

@media (max-width: 480px) {
  /* side padding respects the rounded corners of a phone held sideways */
  .audit {
    padding: 0 max(14px, env(safe-area-inset-right)) 40px max(14px, env(safe-area-inset-left));
  }
  .masthead { padding: 48px 0 26px; }
  .form-page-physical-culture .masthead { padding-top: 60px; }
  .masthead-inner {
    padding: 0 max(14px, env(safe-area-inset-right)) 0 max(14px, env(safe-area-inset-left));
    min-height: 150px;
  }
  .masthead-logo { top: -38px; left: 10px; width: 98px; }
  .masthead h1 { margin-top: 28px; }
  /* let the pitch use the full column so it wraps less on narrow phones */
  .masthead-intro { max-width: none; font-size: 15px; }
  .masthead-credibility { max-width: 42ch; }

  .preview { max-width: 184px; }
  .preview-frame { max-width: 180px; }

  .client-reviews { margin-top: 38px; padding-top: 18px; }
  .client-reviews h2 { font-size: 21px; }
  .reviews-heading-row { align-items: center; gap: 10px; }
  /* Smaller arrows, pushed to the viewport edge, so they sit over the card
     padding instead of the quote. */
  .review-control { width: 30px; height: 30px; font-size: 14px; }
  .review-list {
    grid-auto-columns: min(78vw, 286px);
    gap: 12px;
    margin-right: -14px;
    padding-right: 14px;
  }
  .review-controls { right: -14px; left: -14px; }
  .review { padding: 17px; }
  .review-quote { font-size: 12.5px; }
  .section-band h2 { font-size: 26px; }
  .voice-actions { display: grid; grid-template-columns: 1fr; }
  .voice-record { width: 100%; }
  .voice-item { align-items: flex-start; }
  .voice-item-main { flex-wrap: wrap; }
  .voice-item audio { order: 3; width: 100%; }

  .pain-map-other { grid-template-columns: 1fr; }

  /* pager: full-size buttons don't fit three-across at 320px */
  .pager { margin-top: 32px; gap: 10px; }
  .pager-btn { font-size: 19px; padding: 12px 20px; min-height: 48px; }

  /* primary CTAs go full width: one line of Tungsten, easy thumb target */
  .submit-btn {
    display: block;
    width: 100%;
    font-size: 23px;
    padding: 15px 20px;
  }
  a.confirmation-btn {
    display: block;
    width: 100%;
    font-size: 21px;
    padding: 13px 20px;
  }

  /* The introduction block (title, pitch, report preview, time note) stays
     identical on every step; Next lands the page just above the questions,
     so it is never in the way and always there to scroll back to. */
}
