
:root {
  /* O’Suan website palette — sampled from the supplied live-site screenshot */
  --ink: #0c2d37;
  --forest: #7ca05b;
  --forest-2: #688c4b;
  --sage: #dfe8d7;
  --sage-light: #f1f5ec;
  --cream: #f3efe7;
  --paper: #ffffff;
  --soft-white: #faf9f5;
  --warm: #e9e4da;
  --line: rgba(12, 45, 55, 0.14);
  --muted: #54666d;
  --danger: #9b3b35;
  --shadow: 0 18px 50px rgba(12, 45, 55, 0.07);
  --radius-lg: 30px;
  --radius-md: 18px;
  --radius-sm: 12px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
html, body { max-width: 100%; overflow-x: hidden; }
body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background: var(--cream);
  font-family: "Nunito Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
button, input, select { font: inherit; }
button, input, select, label { -webkit-tap-highlight-color: transparent; }
button, .choice-card, .comfort-scale label, .chip-grid label, .consent-row { touch-action: manipulation; }
button { cursor: pointer; }

.shell { min-height: 100vh; display: flex; flex-direction: column; padding-left: env(safe-area-inset-left); padding-right: env(safe-area-inset-right); }
.site-header {
  width: min(1440px, calc(100% - 56px));
  margin: 0 auto;
  min-height: 92px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}
.brand { color: var(--forest); text-decoration: none; display: inline-flex; align-items: baseline; gap: 9px; }
.brand-name { font-size: 28px; font-weight: 800; letter-spacing: -1.3px; }
.brand-sub { font-size: 10px; font-weight: 900; letter-spacing: 0.27em; }
.header-note { color: var(--muted); font-size: 13px; letter-spacing: .08em; text-transform: uppercase; font-weight: 800; }

.assessment-wrap {
  width: min(1440px, calc(100% - 56px));
  margin: 42px auto 56px;
  display: grid;
  grid-template-columns: minmax(300px, .76fr) minmax(600px, 1.24fr);
  gap: 34px;
  align-items: stretch;
}
.intro-panel {
  position: sticky;
  top: 24px;
  align-self: start;
  min-height: 620px;
  padding: clamp(36px, 5vw, 68px);
  border-radius: var(--radius-lg);
  color: var(--ink);
  background: transparent;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.intro-panel::after {
  content: "";
  position: absolute;
  width: 320px;
  height: 320px;
  border: 1px solid rgba(28,41,36,.10);
  border-radius: 50%;
  right: -120px;
  bottom: -115px;
  box-shadow: 0 0 0 52px rgba(255,255,255,.16), 0 0 0 104px rgba(255,255,255,.10);
}
.eyebrow, .section-kicker {
  display: inline-block;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.eyebrow { color: var(--forest-2); margin-bottom: 25px; }
.intro-panel h1 { font-size: clamp(42px, 4.8vw, 69px); line-height: .98; letter-spacing: -3.2px; max-width: 650px; margin: 0 0 30px; font-weight: 650; }
.intro-copy { max-width: 520px; font-size: 18px; color: rgba(28,41,36,.76); margin: 0 0 42px; }
.assurance-list { display: grid; gap: 15px; position: relative; z-index: 1; }
.assurance-list > div { display: flex; gap: 12px; align-items: center; font-size: 14px; font-weight: 750; }
.assurance-dot { width: 8px; height: 8px; border-radius: 999px; background: var(--forest-2); box-shadow: 0 0 0 6px rgba(255,255,255,.28); }
.intro-small { position: relative; z-index: 1; max-width: 520px; margin: 46px 0 0; padding-top: 24px; border-top: 1px solid rgba(28,41,36,.13); color: rgba(28,41,36,.62); font-size: 13px; }

.form-panel {
  background: var(--paper);
  border: 1px solid rgba(24,60,54,.08);
  border-radius: var(--radius-lg);
  padding: clamp(28px, 4.8vw, 66px);
  box-shadow: var(--shadow);
  min-height: 720px;
  display: flex;
  flex-direction: column;
}
.progress-shell { margin-bottom: 42px; }
.progress-meta { display: flex; justify-content: space-between; gap: 16px; color: var(--muted); font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 10px; }
.progress-track { height: 3px; background: var(--warm); border-radius: 999px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--forest); width: 0; transition: width .35s ease; }

#assessmentForm { flex: 1; display: flex; flex-direction: column; }
.step { display: none; animation: fade .28s ease; }
.step.active { display: block; }
@keyframes fade { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
.section-kicker { color: var(--forest-2); margin-bottom: 14px; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.step-logo-wrap { margin-bottom: 18px; }
.step-logo { display: block; width: min(220px, 55vw); height: auto; }
.step h2 { margin: 0 0 12px; font-size: clamp(34px, 4vw, 52px); line-height: 1.04; letter-spacing: -2.1px; font-weight: 650; }
.lead { color: var(--muted); max-width: 670px; font-size: 17px; margin: 0 0 36px; }

fieldset { border: 0; padding: 0; margin: 0 0 34px; }
legend, .field label { color: var(--ink); font-weight: 800; font-size: 14px; margin-bottom: 13px; display: block; }
.choice-grid { display: grid; gap: 12px; }
.choice-grid.two-col { grid-template-columns: repeat(2, minmax(0,1fr)); }
.choice-grid.three-col { grid-template-columns: repeat(3, minmax(0,1fr)); }
.choice-grid.four-col { grid-template-columns: repeat(4, minmax(0,1fr)); }
.choice-card { position: relative; display: block; cursor: pointer; height: 100%; }
.choice-card input { position: absolute; opacity: 0; pointer-events: none; }
.choice-content {
  min-height: 76px;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  transition: .2s ease;
}
.large-choice .choice-content { min-height: 160px; justify-content: flex-start; padding: 24px; }
.choice-content strong { font-size: 15px; }
.choice-content small { color: var(--muted); line-height: 1.35; }
.choice-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; background: var(--cream); color: var(--forest); font-size: 11px; font-weight: 900; margin-bottom: 12px; }
@media (hover: hover) and (pointer: fine) {
  .choice-card:hover .choice-content { border-color: rgba(24,60,54,.35); transform: translateY(-1px); }
}
.choice-card input:checked + .choice-content { border-color: var(--forest-2); background: #edf3ef; box-shadow: inset 0 0 0 1px var(--forest-2); }
.choice-card input:focus-visible + .choice-content { outline: 3px solid rgba(24,60,54,.16); outline-offset: 2px; }

.fields-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 20px; }
.field { display: flex; flex-direction: column; }
.field.full { grid-column: 1 / -1; }
.field input, .field select {
  width: 100%;
  height: 58px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  padding: 0 16px;
  color: var(--ink);
  outline: none;
  transition: .2s ease;
}
.field input:focus, .field select:focus { border-color: var(--forest); box-shadow: 0 0 0 3px rgba(24,60,54,.08); }
.select-wrap { position: relative; }
.select-wrap::after {
  content: "";
  position: absolute;
  right: 18px;
  top: 50%;
  width: 9px;
  height: 9px;
  border-right: 2px solid var(--forest);
  border-bottom: 2px solid var(--forest);
  transform: translateY(-68%) rotate(45deg);
  pointer-events: none;
}
.select-wrap select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 48px;
  cursor: pointer;
}
.select-wrap select:invalid { color: var(--muted); }
.input-suffix { position: relative; }
.input-suffix input { padding-right: 64px; }
.input-suffix span { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 13px; font-weight: 800; }
.field-help { margin-top: 8px; color: var(--muted); font-size: 12px; }
.consultant-only { margin-top: 24px; }

.callout, .medical-note, .partner-note {
  border-radius: var(--radius-sm);
  background: var(--cream);
  padding: 18px 20px;
  color: var(--muted);
  font-size: 13px;
}
.callout { display: grid; gap: 4px; margin-top: 24px; }
.callout strong { color: var(--forest); }
.conditional-block { border-left: 3px solid var(--sage); padding-left: 20px; margin-top: 8px; }

.comfort-scale { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 6px; gap: 6px; background: #fff; }
.comfort-scale label { position: relative; cursor: pointer; }
.comfort-scale input { position: absolute; opacity: 0; }
.comfort-scale span { min-height: 100px; display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: 13px; gap: 5px; text-align: center; transition: .2s; }
.comfort-scale small { color: var(--muted); }
.comfort-scale input:checked + span { color: var(--ink); background: var(--forest); }
.comfort-scale input:checked + span small { color: rgba(28,41,36,.68); }

.chip-grid { display: flex; flex-wrap: wrap; gap: 9px; }
.chip-grid label { position: relative; cursor: pointer; }
.chip-grid input { position: absolute; opacity: 0; }
.chip-grid span { display: flex; align-items: center; min-height: 46px; padding: 11px 16px; border-radius: 999px; border: 1px solid var(--line); background: #fff; font-size: 13px; font-weight: 760; line-height: 1.2; transition: .2s; }
.chip-grid input:checked + span { background: var(--forest); color: var(--ink); border-color: var(--forest-2); }

.other-detail-field {
  margin-top: 14px;
  max-width: 560px;
}
.other-detail-field label {
  display: block;
  margin-bottom: 7px;
  font-size: 12px;
  font-weight: 800;
  color: var(--ink);
}
.other-detail-field input {
  min-height: 48px;
}

.consent-row { display: flex; gap: 13px; align-items: flex-start; padding: 18px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: #fff; cursor: pointer; margin: 26px 0; font-size: 13px; color: var(--muted); }
.consent-row input { width: 20px; height: 20px; margin: 1px 0 0; flex: 0 0 auto; accent-color: var(--forest); }
.review-card { border-radius: var(--radius-md); padding: 24px; background: var(--sage-light); color: var(--ink); border: 1px solid var(--line); }
.review-card span { display: block; color: var(--forest-2); font-size: 10px; letter-spacing: .16em; font-weight: 900; margin-bottom: 6px; }
.review-card strong { font-size: 20px; }
.review-card p { color: rgba(255,255,255,.7); margin: 4px 0 0; font-size: 13px; }

.error-box { margin: 24px 0 0; padding: 13px 16px; color: var(--danger); background: #fbefee; border: 1px solid rgba(155,59,53,.15); border-radius: var(--radius-sm); font-size: 13px; font-weight: 700; }
.form-nav { margin-top: auto; padding-top: 38px; display: flex; justify-content: space-between; gap: 12px; }
.button { min-height: 52px; border-radius: 999px; border: 0; padding: 0 24px; font-weight: 850; font-size: 14px; transition: .2s ease; }
.button.primary { margin-left: auto; color: var(--ink); background: var(--forest); box-shadow: 0 9px 24px rgba(79,105,92,.16); }
@media (hover: hover) and (pointer: fine) {
  .button.primary:hover { background: var(--forest-2); transform: translateY(-1px); }
}
.button.secondary { color: var(--forest); background: #fff; border: 1px solid rgba(24,60,54,.24); }
.button.ghost { color: var(--forest); background: transparent; border: 1px solid var(--line); }
.button:disabled { opacity: .55; cursor: wait; transform: none !important; }

.result-step { text-align: center; }
.result-card { max-width: 680px; margin: 0 auto; }
.result-label { margin: 0 0 22px; color: var(--muted); font-size: 15px; font-weight: 750; }
.level-orbit { width: 190px; height: 190px; border-radius: 50%; margin: 0 auto 24px; display: flex; flex-direction: column; align-items: center; justify-content: center; background: var(--forest); color: var(--ink); box-shadow: 0 0 0 12px var(--sage-light), 0 0 0 13px rgba(79,105,92,.12); }
.level-orbit span { font-size: 10px; letter-spacing: .2em; font-weight: 900; color: #d2ddd4; }
.level-orbit strong { font-size: 82px; line-height: .9; letter-spacing: -5px; font-weight: 650; }
.result-step h2 { font-size: 36px; letter-spacing: -1px; margin-bottom: 10px; }
.result-message { color: var(--forest); font-size: 18px; font-weight: 800; margin: 0 auto 24px; }
.consultant-flag { border-radius: var(--radius-sm); background: #f3eee5; color: #665942; padding: 13px 16px; font-size: 13px; margin: 0 auto 22px; }
.result-next { background: var(--cream); border-radius: var(--radius-md); padding: 23px; max-width: 560px; margin: 0 auto; }
.result-next strong { color: var(--forest); }
.result-next p { color: var(--muted); margin: 5px 0 0; font-size: 13px; }
.result-actions { display: flex; justify-content: center; gap: 10px; margin-top: 28px; }
.result-actions .button.primary { margin-left: 0; }

.site-footer { width: min(1440px, calc(100% - 56px)); margin: auto auto 30px; padding-top: 22px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; font-weight: 800; }

/* Tablet: turn the left-hand brand panel into a compact introduction, then remove it
   once the assessment is underway so the questionnaire owns the viewport. */
@media (max-width: 1100px) {
  .site-header, .assessment-wrap, .site-footer {
    width: min(100% - 40px, 980px);
  }
  .assessment-wrap {
    grid-template-columns: 1fr;
    margin-top: 26px;
    gap: 20px;
  }
  .intro-panel {
    position: relative;
    top: auto;
    min-height: auto;
    padding: 34px 38px;
  }
  .intro-panel h1 {
    max-width: 820px;
    margin-bottom: 18px;
    font-size: clamp(36px, 5vw, 50px);
    line-height: 1.02;
    letter-spacing: -2.2px;
  }
  .eyebrow { margin-bottom: 14px; }
  .intro-copy { max-width: 760px; margin-bottom: 24px; }
  .assurance-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px 24px;
  }
  .intro-small { display: none; }
  body.assessment-in-progress .intro-panel { display: none; }
  body.assessment-in-progress .assessment-wrap { margin-top: 20px; }
  .form-panel {
    min-height: min(760px, calc(100dvh - 150px));
    padding: clamp(34px, 5vw, 56px);
  }
  .form-nav {
    position: sticky;
    bottom: 0;
    z-index: 10;
    margin-inline: -10px;
    padding: 34px 10px max(10px, env(safe-area-inset-bottom));
    background: linear-gradient(to bottom, rgba(255,253,249,0), rgba(255,253,249,.96) 28%, var(--paper) 54%);
  }
}

/* Typical iPad/tablet portrait widths. Keep useful multi-column choices while
   avoiding four cramped cards in one row. */
@media (min-width: 721px) and (max-width: 900px) {
  .choice-grid.four-col { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .large-choice .choice-content { min-height: 145px; }
  .step h2 { font-size: clamp(38px, 6vw, 48px); }
  .progress-shell { margin-bottom: 34px; }
}

/* Phone optimisation. */
@media (max-width: 720px) {
  :root {
    --radius-lg: 22px;
    --radius-md: 16px;
    --radius-sm: 12px;
  }
  body { font-size: 16px; }
  .shell { min-height: 100dvh; }
  .site-header, .assessment-wrap, .site-footer {
    width: calc(100% - 24px);
  }
  .site-header {
    min-height: 68px;
    padding-top: env(safe-area-inset-top);
  }
  .brand-name { font-size: 24px; }
  .brand-sub { font-size: 9px; }
  .header-note { display: none; }

  .assessment-wrap {
    margin: 14px auto 28px;
    gap: 12px;
  }
  .intro-panel {
    padding: 24px 20px 25px;
    border-radius: var(--radius-lg);
  }
  .intro-panel::after {
    width: 220px;
    height: 220px;
    right: -105px;
    bottom: -125px;
  }
  .eyebrow { margin-bottom: 10px; font-size: 10px; }
  .intro-panel h1 {
    max-width: 520px;
    margin-bottom: 14px;
    font-size: clamp(32px, 10vw, 40px);
    line-height: 1;
    letter-spacing: -1.8px;
  }
  .intro-copy { margin-bottom: 18px; font-size: 15px; line-height: 1.45; }
  .assurance-list {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .assurance-list > div { font-size: 12px; }
  .assurance-dot { width: 7px; height: 7px; }
  .intro-small { display: none; }

  body.assessment-in-progress .assessment-wrap { margin-top: 10px; }
  .form-panel {
    min-height: calc(100dvh - 106px - env(safe-area-inset-top));
    padding: 25px 18px 18px;
    border-radius: var(--radius-lg);
  }
  .progress-shell { margin-bottom: 28px; }
  .progress-meta { gap: 8px; font-size: 10px; letter-spacing: .06em; }
  #progressTitle { text-align: right; }
  .section-kicker { margin-bottom: 10px; font-size: 10px; }
  .step h2 {
    margin-bottom: 10px;
    font-size: clamp(31px, 9vw, 39px);
    line-height: 1.02;
    letter-spacing: -1.5px;
  }
  .lead { margin-bottom: 28px; font-size: 15px; line-height: 1.48; }

  fieldset { margin-bottom: 28px; }
  legend, .field label { margin-bottom: 10px; font-size: 14px; }
  .choice-grid.two-col,
  .choice-grid.three-col,
  .choice-grid.four-col,
  .fields-grid { grid-template-columns: 1fr; }
  .mode-grid { grid-template-columns: 1fr !important; }
  .choice-grid { gap: 9px; }
  .choice-content {
    min-height: 60px;
    padding: 13px 15px;
  }
  .choice-content strong { font-size: 15px; }
  .choice-content small { font-size: 12px; }
  .large-choice .choice-content {
    min-height: 116px;
    padding: 18px;
  }
  .choice-icon {
    width: 32px;
    height: 32px;
    margin-bottom: 7px;
  }

  .fields-grid { gap: 16px; }
  .field input, .field select {
    height: 56px;
    padding-inline: 15px;
    font-size: 16px; /* prevents Safari zoom-on-focus */
  }
  .input-suffix input { padding-right: 58px; }
  .input-suffix span { right: 15px; }
  .conditional-block { padding-left: 14px; }

  .comfort-scale {
    grid-template-columns: 1fr;
    gap: 5px;
  }
  .comfort-scale span {
    min-height: 64px;
    flex-direction: row;
    justify-content: space-between;
    padding: 0 16px;
    text-align: left;
  }
  .comfort-scale small { text-align: right; }
  .chip-grid { gap: 8px; }
  .chip-grid span {
    min-height: 46px;
    padding: 10px 14px;
    font-size: 13px;
  }
  .callout, .medical-note, .partner-note { padding: 16px; }
  .consent-row {
    min-height: 58px;
    padding: 15px;
    font-size: 12px;
    line-height: 1.45;
  }
  .review-card { padding: 20px; }
  .review-card strong { font-size: 18px; }

  .error-box {
    margin-top: 18px;
    padding: 12px 14px;
  }
  .form-nav {
    margin-inline: -8px;
    gap: 8px;
    padding: 28px 8px max(8px, env(safe-area-inset-bottom));
  }
  .button {
    min-height: 52px;
    padding: 0 20px;
    font-size: 14px;
  }
  .form-nav .button.primary { flex: 1 1 auto; }
  .form-nav .button.ghost { flex: 0 0 auto; }

  .result-card { max-width: 100%; }
  .result-label { margin-bottom: 20px; font-size: 14px; }
  .level-orbit {
    width: 154px;
    height: 154px;
    margin-bottom: 22px;
    box-shadow: 0 0 0 9px var(--sage-light), 0 0 0 10px rgba(24,60,54,.09);
  }
  .level-orbit strong { font-size: 66px; }
  .result-step h2 { font-size: 31px; }
  .result-message { font-size: 16px; line-height: 1.45; }
  .result-next { padding: 19px 17px; }
  .result-actions { flex-direction: column; }
  .result-actions .button { width: 100%; }

  .site-footer {
    margin-bottom: max(20px, env(safe-area-inset-bottom));
    gap: 7px;
    flex-direction: column;
    font-size: 10px;
  }
}

/* Very small phones, including older iPhones and split-screen use. */
@media (max-width: 390px) {
  .site-header, .assessment-wrap, .site-footer { width: calc(100% - 18px); }
  .brand { gap: 7px; }
  .intro-panel { padding-inline: 18px; }
  .form-panel { padding-inline: 15px; }
  .step h2 { font-size: 30px; }
  .button { padding-inline: 17px; }
  .form-nav .button { font-size: 13px; }
  .chip-grid span { padding-inline: 12px; }
}

/* Landscape phones: avoid wasting vertical space while preserving tap targets. */
@media (max-height: 520px) and (orientation: landscape) and (max-width: 950px) {
  .site-header { min-height: 58px; }
  body.assessment-in-progress .site-header { display: none; }
  body.assessment-in-progress .assessment-wrap { margin-top: 8px; }
  .form-panel { min-height: calc(100dvh - 16px); padding-block: 20px 14px; }
  .progress-shell { margin-bottom: 20px; }
  .lead { margin-bottom: 22px; }
  .choice-content { min-height: 54px; }
}

/* Respect reduced-motion accessibility preferences. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

@media print {
  body { background: #fff; }
  .site-header, .intro-panel, .progress-shell, .form-nav, .site-footer, .result-actions { display: none !important; }
  .assessment-wrap { width: 100%; display: block; margin: 0; }
  .form-panel { box-shadow: none; border: 0; padding: 40px; }
  .step { display: none !important; }
  .result-step.active { display: block !important; }
}

/* end-to-end consultation workflow + CRM */
.header-actions { display: flex; align-items: center; gap: 18px; }
.header-link { color: var(--forest); text-decoration: none; font-size: 13px; font-weight: 900; letter-spacing: .07em; text-transform: uppercase; padding: 9px 13px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,.48); }
.field-prominent { max-width: 560px; }
.field-prominent select { font-size: 16px; font-weight: 750; }
.optional { color: var(--muted); font-weight: 600; font-size: 12px; }
textarea { font: inherit; }
.field textarea { width: 100%; resize: vertical; min-height: 96px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; padding: 14px 16px; color: var(--ink); outline: none; transition: .2s ease; }
.field textarea:focus { border-color: var(--forest); box-shadow: 0 0 0 3px rgba(24,60,54,.08); }
.file-input { height: auto !important; min-height: 58px; padding: 10px 12px !important; }
.file-input::file-selector-button { border: 0; border-radius: 999px; background: var(--cream); color: var(--forest); font-weight: 850; padding: 9px 13px; margin-right: 10px; cursor: pointer; }
.button-link { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }

.journey-strip { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 6px; margin: -8px 0 34px; padding: 6px; border-radius: 16px; background: var(--cream); }
.journey-strip span { min-height: 42px; display: flex; align-items: center; justify-content: center; text-align: center; border-radius: 11px; color: var(--muted); font-size: 10px; font-weight: 850; letter-spacing: .04em; line-height: 1.15; padding: 8px; }
.journey-strip span.active { background: var(--forest); color: var(--ink); }
.journey-strip span.done { color: var(--forest); background: #e6ede7; }

.mini-recommendation { display: flex; align-items: center; justify-content: space-between; gap: 18px; background: var(--sage-light); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 18px 20px; margin-bottom: 26px; }
.mini-recommendation span { color: rgba(255,255,255,.68); font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.mini-recommendation strong { font-size: 18px; }
.scan-form-card, .review-panel, .report-paper { border: 1px solid var(--line); border-radius: var(--radius-md); background: #fff; }
.scan-form-card { padding: 24px; margin-bottom: 30px; }
.scan-form-card .button { margin-top: 18px; }
.image-preview-wrap { margin-top: 18px; padding: 12px; border: 1px dashed var(--line); border-radius: var(--radius-sm); background: var(--cream); }
.image-preview-wrap img { display: block; max-width: 100%; max-height: 300px; object-fit: contain; margin: 0 auto; border-radius: 8px; }
.saved-scans-section { margin-top: 8px; }
.section-row { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.section-row .section-kicker { margin-bottom: 4px; }
.section-row h3 { margin: 0; font-size: 24px; letter-spacing: -.7px; }
.count-badge { padding: 6px 10px; background: var(--cream); border-radius: 999px; color: var(--muted); font-size: 11px; font-weight: 850; }
.scan-list { display: grid; gap: 12px; }
.scan-card { display: grid; grid-template-columns: 145px 1fr; gap: 16px; align-items: center; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; }
.scan-card.no-image { grid-template-columns: 1fr; }
.scan-card img { width: 145px; height: 105px; object-fit: contain; border-radius: 8px; background: #f3f3ef; }
.scan-card > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.scan-card span { color: var(--forest); font-size: 10px; font-weight: 900; letter-spacing: .12em; }
.scan-card strong { font-size: 15px; }
.scan-card small { color: var(--muted); }
.scan-card p { color: var(--muted); margin: 5px 0 0; font-size: 12px; }
.empty-state { padding: 26px; text-align: center; color: var(--muted); background: var(--cream); border-radius: var(--radius-sm); font-size: 13px; }
.stage-actions { display: flex; justify-content: space-between; gap: 10px; margin-top: 28px; }
.stage-actions .button.primary { margin-left: auto; }

.review-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 14px; margin-bottom: 26px; }
.review-panel { padding: 22px; }
.review-panel.full { grid-column: 1 / -1; }
.summary-list { display: grid; gap: 0; }
.summary-list > div { display: grid; grid-template-columns: minmax(120px,.8fr) minmax(0,1.2fr); gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.summary-list > div:last-child { border-bottom: 0; }
.summary-list span { color: var(--muted); font-size: 12px; }
.summary-list strong { font-size: 13px; font-weight: 800; text-align: right; }
.recommendation-panel { background: var(--sage-light); color: var(--ink); border-color: var(--line); }
.recommendation-panel .section-kicker { color: var(--forest-2); }
.review-level { display: flex; flex-direction: column; justify-content: center; min-height: 130px; }
.review-level b { font-size: 44px; line-height: 1; letter-spacing: -2px; }
.review-level span { color: rgba(255,255,255,.76); font-weight: 800; margin-top: 7px; }
.small-note { font-size: 12px; color: var(--muted); }
.review-scan-list { display: grid; gap: 12px; }
.review-scan { display: grid; grid-template-columns: 130px 1fr; gap: 14px; align-items: center; }
.review-scan.no-image { grid-template-columns: 1fr; }
.review-scan + .review-scan { padding-top: 12px; border-top: 1px solid var(--line); }
.review-scan img { width: 130px; height: 95px; object-fit: contain; background: var(--cream); border-radius: 8px; }
.review-scan > div { display: flex; flex-direction: column; }
.review-scan span, .review-scan p { color: var(--muted); font-size: 12px; }
.review-scan p { margin: 4px 0 0; }

.report-step { max-width: 900px; margin: 0 auto; }
.report-paper { overflow: hidden; box-shadow: 0 16px 40px rgba(24,43,38,.07); }
.report-head { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 25px 28px; border-bottom: 1px solid var(--line); }
.report-head > div { display: flex; align-items: baseline; gap: 8px; color: var(--forest); }
.report-head > span { color: var(--muted); font-size: 10px; font-weight: 900; letter-spacing: .14em; }
.report-hero { padding: 34px 28px; background: var(--sage-light); color: var(--ink); border: 1px solid var(--line); }
.report-hero > span { display: block; color: var(--forest-2); font-size: 10px; font-weight: 900; letter-spacing: .13em; margin-bottom: 12px; }
.report-level { display: flex; align-items: center; gap: 20px; }
.report-level > b { width: 88px; height: 88px; flex: 0 0 auto; border-radius: 50%; display: grid; place-items: center; background: var(--forest); color: var(--ink); font-size: 46px; line-height: 1; }
.report-level > div { display: flex; flex-direction: column; }
.report-level strong { font-size: 30px; letter-spacing: -1px; }
.report-level small { color: rgba(255,255,255,.68); }
.report-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0; padding: 0 28px; }
.report-grid > div { padding: 20px 0; border-bottom: 1px solid var(--line); }
.report-grid > div:nth-child(odd) { padding-right: 20px; }
.report-grid > div:nth-child(even) { padding-left: 20px; border-left: 1px solid var(--line); }
.report-grid span { display: block; color: var(--muted); font-size: 11px; margin-bottom: 4px; }
.report-grid strong { font-size: 14px; }
.report-section { padding: 26px 28px 0; }
.report-section h3 { margin: 0 0 8px; font-size: 25px; letter-spacing: -.8px; }
.report-section p { color: var(--muted); margin: 0; }
.report-pressure { min-height: 250px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; background: var(--cream); border-radius: var(--radius-sm); padding: 14px; color: var(--muted); }
.report-pressure img { max-width: 100%; max-height: 360px; object-fit: contain; border-radius: 8px; }
.report-pressure small { font-size: 11px; }
.report-foot { margin-top: 26px; padding: 20px 28px 25px; color: var(--muted); border-top: 1px solid var(--line); font-size: 10px; }

/* CRM */
.crm-shell { min-height: 100vh; background: var(--cream); }
.crm-main { width: min(1440px, calc(100% - 56px)); margin: 34px auto 60px; }
.crm-heading { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 26px; }
.crm-heading .section-kicker { margin-bottom: 8px; }
.crm-heading h1 { margin: 0; font-size: clamp(36px,4vw,54px); line-height: 1; letter-spacing: -2px; font-weight: 650; }
.crm-heading p { color: var(--muted); margin: 8px 0 0; }
.crm-actions { display: flex; gap: 10px; }
.crm-actions .button.primary { margin-left: 0; }
.stats-grid { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 12px; margin-bottom: 18px; }
.stat-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 18px; }
.stat-card span { color: var(--muted); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.stat-card strong { display: block; color: var(--forest); font-size: 30px; letter-spacing: -1px; margin-top: 5px; }
.crm-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 24px; }
.crm-filters { display: grid; grid-template-columns: 1.6fr repeat(3,minmax(140px,.7fr)); gap: 10px; margin-bottom: 18px; }
.crm-filters input, .crm-filters select { height: 48px; border: 1px solid var(--line); background: #fff; border-radius: 11px; padding: 0 13px; color: var(--ink); font: inherit; outline: none; }
.crm-filters input:focus, .crm-filters select:focus { border-color: var(--forest); box-shadow: 0 0 0 3px rgba(24,60,54,.08); }
.crm-table-wrap { overflow-x: auto; }
.crm-table { width: 100%; border-collapse: collapse; min-width: 900px; }
.crm-table th { text-align: left; color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .08em; padding: 11px 10px; border-bottom: 1px solid var(--line); }
.crm-table td { padding: 14px 10px; border-bottom: 1px solid var(--line); font-size: 13px; vertical-align: middle; }
.crm-table tr:last-child td { border-bottom: 0; }
.crm-table tbody tr { cursor: pointer; transition: background .15s ease; }
.crm-table tbody tr:hover { background: #f8f6f0; }
.crm-customer strong { display: block; font-size: 14px; }
.crm-customer small { color: var(--muted); }
.status-pill { display: inline-flex; align-items: center; min-height: 27px; padding: 4px 9px; border-radius: 999px; font-size: 10px; font-weight: 850; white-space: nowrap; background: var(--cream); color: var(--muted); }
.status-pill.completed { background: #e4eee6; color: #28573e; }
.status-pill.pressure_mapping { background: #edf0e5; color: #5a6738; }
.status-pill.recommendation_ready { background: #f2eadf; color: #755d36; }
.level-pill { display: inline-flex; align-items: center; justify-content: center; min-width: 34px; height: 34px; border-radius: 50%; background: var(--forest); color: var(--ink); font-weight: 900; }
.table-empty { padding: 50px 20px !important; text-align: center; color: var(--muted); }

/* CRM record */
.record-layout { display: grid; grid-template-columns: minmax(0,1.1fr) minmax(320px,.6fr); gap: 18px; align-items: start; }
.record-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 24px; }
.record-card + .record-card { margin-top: 18px; }
.record-card h2, .record-card h3 { margin: 0 0 14px; }
.record-card h2 { font-size: 30px; letter-spacing: -1px; }
.record-card h3 { font-size: 20px; }
.record-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.record-meta span { padding: 6px 9px; background: var(--cream); border-radius: 999px; color: var(--muted); font-size: 11px; font-weight: 800; }
.record-contact { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.record-contact > div { padding: 14px; background: var(--cream); border-radius: 12px; }
.record-contact span { display: block; color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .06em; }
.record-contact strong { display: block; margin-top: 4px; font-size: 13px; overflow-wrap: anywhere; }
.record-levels { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.record-level-box { border-radius: 14px; padding: 18px; background: var(--cream); }
.record-level-box.final { background: var(--sage-light); color: var(--ink); border: 1px solid var(--line); }
.record-level-box span { font-size: 10px; font-weight: 850; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.record-level-box.final span { color: var(--forest-2); }
.record-level-box strong { display: block; font-size: 27px; margin-top: 5px; }
.record-level-box small { display: block; margin-top: 2px; color: var(--muted); }
.record-level-box.final small { color: rgba(255,255,255,.7); }
.audit-list { display: grid; gap: 10px; }
.audit-item { display: grid; grid-template-columns: 9px 1fr; gap: 11px; align-items: start; }
.audit-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--sage); margin-top: 5px; }
.audit-item strong { display: block; font-size: 12px; }
.audit-item small { color: var(--muted); }
.crm-form .field { margin-bottom: 16px; }
.crm-form .button { width: 100%; }

@media (max-width: 1100px) {
  .stats-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .crm-filters { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .record-layout { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .header-actions { gap: 8px; }
  .header-link { font-size: 10px; padding: 7px 10px; }
  .journey-strip { grid-template-columns: 1fr; gap: 4px; margin-bottom: 24px; }
  .journey-strip span { display: none; min-height: 38px; }
  .journey-strip span.active { display: flex; }
  .mini-recommendation { align-items: flex-start; flex-direction: column; gap: 5px; }
  .scan-form-card, .review-panel { padding: 17px; }
  .scan-card { grid-template-columns: 100px 1fr; gap: 12px; }
  .scan-card img { width: 100px; height: 80px; }
  .stage-actions { flex-direction: column-reverse; }
  .stage-actions .button, .stage-actions .button.primary { width: 100%; margin-left: 0; }
  .review-grid { grid-template-columns: 1fr; }
  .review-panel.full { grid-column: auto; }
  .summary-list > div { grid-template-columns: 1fr; gap: 2px; }
  .summary-list strong { text-align: left; }
  .review-scan { grid-template-columns: 95px 1fr; }
  .review-scan img { width: 95px; height: 76px; }
  .report-head, .report-grid, .report-section, .report-foot { padding-left: 18px; padding-right: 18px; }
  .report-head > span { display: none; }
  .report-hero { padding: 26px 18px; }
  .report-level > b { width: 72px; height: 72px; font-size: 38px; }
  .report-level strong { font-size: 24px; }
  .report-grid { grid-template-columns: 1fr; }
  .report-grid > div:nth-child(odd), .report-grid > div:nth-child(even) { padding: 15px 0; border-left: 0; }
  .report-pressure { min-height: 190px; }
  .crm-main { width: calc(100% - 24px); margin-top: 20px; }
  .crm-heading { align-items: stretch; flex-direction: column; }
  .crm-actions { width: 100%; }
  .crm-actions .button { flex: 1; }
  .stats-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .stat-card:last-child { grid-column: 1 / -1; }
  .crm-card { padding: 15px; border-radius: 20px; }
  .crm-filters { grid-template-columns: 1fr; }
  .record-contact { grid-template-columns: 1fr; }
  .record-levels { grid-template-columns: 1fr; }
}

@media print {
  .site-header, .intro-panel, .site-footer, .journey-strip, .progress-shell, .form-nav, .no-print, .error-box { display: none !important; }
  body { background: #fff; }
  .assessment-wrap { display: block; width: 100%; margin: 0; }
  .form-panel { border: 0; box-shadow: none; padding: 0; min-height: 0; }
  .step { display: none !important; }
  .step.report-step.active { display: block !important; }
  .report-paper { border: 0; box-shadow: none; }
  .report-pressure img { max-height: 290px; }
}
.reporting-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 18px; }
.reporting-card { border-radius: var(--radius-md); box-shadow: none; }
.reporting-card .section-row { margin-bottom: 16px; }
.bar-list { display: grid; gap: 9px; }
.bar-row { display: grid; grid-template-columns: 55px minmax(80px,1fr) 30px 54px; gap: 9px; align-items: center; font-size: 11px; }
.bar-row > span { color: var(--muted); font-weight: 800; }
.bar-row > div { height: 8px; border-radius: 999px; background: var(--cream); overflow: hidden; }
.bar-row i { display: block; height: 100%; border-radius: inherit; background: var(--forest); }
.bar-row strong { text-align: right; }
.bar-row small { color: var(--muted); text-align: right; }
.consultant-stats { display: grid; }
.consultant-stat-row { display: grid; grid-template-columns: minmax(120px,1fr) auto auto; gap: 14px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 11px; }
.consultant-stat-row:last-child { border-bottom: 0; }
.consultant-stat-row > div { display: flex; flex-direction: column; }
.consultant-stat-row strong { font-size: 13px; }
.consultant-stat-row small, .consultant-stat-row > span { color: var(--muted); }
@media (max-width: 900px) { .reporting-grid { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .bar-row { grid-template-columns: 50px minmax(70px,1fr) 26px; } .bar-row small { display: none; } .consultant-stat-row { grid-template-columns: 1fr auto; } .consultant-stat-row > span:last-child { grid-column: 1 / -1; } }


/* exact O’Suan website colour direction
   Warm cream canvas (#F3EFE7), deep blue-green copy (#0C2D37),
   olive CTA/accent (#7CA05B), white surfaces. */
.site-header {
  width: 100%;
  min-height: 98px;
  padding: 0 clamp(24px, 6vw, 100px);
  background: #fff;
  border-bottom: 1px solid rgba(12,45,55,.10);
}
.brand { color: var(--ink); gap: 0; }
.brand-logo { display: block; width: 245px; height: auto; max-width: 38vw; }
.header-note { color: var(--ink); }
.header-link { color: var(--forest); border-color: var(--forest); background: #fff; }
.header-link:hover { background: var(--sage-light); }

.assessment-wrap { margin-top: 44px; }
.intro-panel {
  min-height: 620px;
  padding: clamp(34px, 4.6vw, 64px) clamp(18px, 3.2vw, 48px);
  border-radius: 0;
  color: var(--ink);
  background: transparent;
  box-shadow: none;
}
.intro-panel::after { display: none; }
.eyebrow, .section-kicker { color: var(--forest); }
.intro-panel h1 { color: var(--ink); font-weight: 700; }
.intro-copy { color: var(--ink); opacity: .86; }
.assurance-dot { background: var(--forest); box-shadow: 0 0 0 6px rgba(124,160,91,.14); }
.intro-small { color: var(--muted); border-top-color: rgba(12,45,55,.12); }

.form-panel { background: #fff; border-color: rgba(12,45,55,.09); }
.progress-fill { background: var(--forest); }
.progress-track { background: var(--warm); }
.choice-content, .field input, .field select, .field textarea, .consent-row { background: #fff; }
.choice-card input:checked + .choice-content {
  border-color: var(--forest);
  background: var(--sage-light);
  box-shadow: inset 0 0 0 1px var(--forest);
}
.choice-card input:focus-visible + .choice-content { outline-color: rgba(124,160,91,.24); }
.choice-icon { color: var(--forest); background: var(--cream); }
.field input:focus, .field select:focus, .field textarea:focus,
.crm-filters input:focus, .crm-filters select:focus {
  border-color: var(--forest);
  box-shadow: 0 0 0 3px rgba(124,160,91,.15);
}
.select-wrap::after { border-color: var(--forest); }
.callout, .medical-note, .partner-note, .result-next, .empty-state, .count-badge { background: var(--cream); }
.callout strong, .result-next strong { color: var(--forest-2); }
.review-card, .mini-recommendation, .recommendation-panel, .record-level-box.final { background: var(--sage-light); color: var(--ink); border-color: rgba(124,160,91,.22); }
.review-card span, .mini-recommendation span, .recommendation-panel .section-kicker, .record-level-box.final span { color: var(--forest-2); }
.review-card p, .review-level span, .record-level-box.final small { color: var(--muted); }

.comfort-scale input:checked + span { background: var(--forest); color: #fff; }
.comfort-scale input:checked + span small { color: rgba(255,255,255,.82); }
.chip-grid input:checked + span { background: var(--forest); color: #fff; border-color: var(--forest); }
.consent-row input { accent-color: var(--forest); }

.button.primary { color: #fff; background: var(--forest); box-shadow: 0 10px 24px rgba(124,160,91,.22); }
.button.primary:hover { background: var(--forest-2); }
.button.secondary, .button.ghost { color: var(--forest-2); background: #fff; border-color: var(--forest); }
.button.secondary:hover, .button.ghost:hover { background: var(--sage-light); }

.level-orbit { background: var(--forest); color: #fff; box-shadow: 0 0 0 12px var(--sage-light), 0 0 0 13px rgba(124,160,91,.17); }
.level-orbit span { color: rgba(255,255,255,.80); }
.result-message { color: var(--forest-2); }

.journey-strip { background: var(--cream); }
.journey-strip span.active { background: var(--forest); color: #fff; }
.journey-strip span.done { color: var(--forest-2); background: var(--sage-light); }
.file-input::file-selector-button { background: var(--cream); color: var(--forest-2); }
.scan-card span { color: var(--forest-2); }

.report-head > div { color: var(--ink); }
.report-logo { display: block; width: 210px; height: auto; }
.report-hero { background: var(--cream); color: var(--ink); border-color: rgba(12,45,55,.10); }
.report-hero > span { color: var(--forest-2); }
.report-level > b { background: var(--forest); color: #fff; }
.report-level small { color: var(--muted); }

.crm-shell { background: var(--cream); }
.stat-card strong { color: var(--forest-2); }
.crm-table tbody tr:hover { background: var(--soft-white); }
.level-pill { background: var(--forest); color: #fff; }
.status-pill.completed { background: var(--sage-light); color: #456b35; }
.record-contact > div, .record-level-box { background: var(--cream); }
.audit-dot, .bar-row i { background: var(--forest); }

@media (max-width: 1100px) {
  .site-header { width: 100%; padding-inline: 28px; }
  .intro-panel { padding: 30px 8px 18px; }
}
@media (max-width: 720px) {
  .site-header { width: 100%; min-height: 78px; padding-inline: 18px; }
  .brand-logo { width: 190px; max-width: 58vw; }
  .assessment-wrap { width: calc(100% - 24px); }
  .intro-panel { padding: 24px 10px; }
  .level-orbit { box-shadow: 0 0 0 9px var(--sage-light), 0 0 0 10px rgba(124,160,91,.14); }
  .report-logo { width: 170px; }
}
@media (max-width: 390px) {
  .site-header { padding-inline: 12px; }
  .brand-logo { width: 168px; }
}

/* discreet OrderWolf technology credit */
.powered-footer {
  width: min(1340px, calc(100% - 48px));
  margin: 26px auto 18px;
  padding: 18px 0 max(18px, env(safe-area-inset-bottom));
  border-top: 1px solid rgba(12, 45, 55, .10);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: rgba(12, 45, 55, .58);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .02em;
}
.powered-footer a {
  display: inline-flex;
  align-items: center;
  line-height: 0;
  border-radius: 4px;
}
.powered-footer a:focus-visible {
  outline: 3px solid rgba(124, 160, 91, .24);
  outline-offset: 4px;
}
.powered-footer img {
  display: block;
  width: 92px;
  height: auto;
  max-height: 42px;
  object-fit: contain;
}
.crm-shell .powered-footer {
  margin-top: 42px;
}

@media (max-width: 720px) {
  .powered-footer {
    width: calc(100% - 32px);
    margin-top: 22px;
    padding-top: 16px;
    gap: 8px;
    font-size: 10px;
  }
  .powered-footer img { width: 82px; }
}

@media print {
  .powered-footer { display: none !important; }
}

/* customer lookup, DOB and flexible measurement entry */
.customer-type-fieldset { margin-bottom: 24px; }
.customer-type-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.customer-type-card { position: relative; cursor: pointer; }
.customer-type-card input { position: absolute; opacity: 0; pointer-events: none; }
.customer-type-card > span {
  min-height: 116px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  transition: border-color .18s ease, background .18s ease, box-shadow .18s ease, transform .18s ease;
}
.customer-type-card b { color: var(--ink); font-size: 16px; font-weight: 850; }
.customer-type-card small { color: var(--muted); font-size: 12px; line-height: 1.42; }
.customer-type-card input:checked + span {
  border-color: var(--forest);
  background: var(--sage-light);
  box-shadow: inset 0 0 0 1px var(--forest);
}
.customer-type-card input:focus-visible + span { outline: 3px solid rgba(124,160,91,.22); outline-offset: 2px; }
@media (hover:hover) and (pointer:fine) {
  .customer-type-card:hover > span { border-color: rgba(124,160,91,.62); transform: translateY(-1px); }
}

.existing-customer-panel {
  margin: 4px 0 30px;
  padding: 20px;
  border: 1px solid rgba(124,160,91,.24);
  border-radius: var(--radius-md);
  background: var(--soft-white);
}
.customer-search-box { position: relative; }
.customer-search-box input { padding-right: 48px; }
.search-icon {
  position: absolute;
  right: 17px;
  top: 50%;
  transform: translateY(-52%);
  color: var(--forest-2);
  font-size: 24px;
  line-height: 1;
  pointer-events: none;
}
.customer-search-results {
  overflow: hidden;
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  box-shadow: 0 12px 30px rgba(12,45,55,.08);
}
.customer-search-result {
  width: 100%;
  min-height: 68px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  padding: 12px 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  text-align: left;
}
.customer-search-result:last-child { border-bottom: 0; }
.customer-search-result span { min-width: 0; display: grid; gap: 2px; }
.customer-search-result strong { font-size: 14px; font-weight: 850; }
.customer-search-result small { color: var(--muted); font-size: 11px; overflow-wrap: anywhere; }
.customer-search-result em { flex: 0 0 auto; color: var(--forest-2); font-size: 10px; font-style: normal; font-weight: 800; }
.customer-search-result:hover, .customer-search-result:focus-visible { background: var(--sage-light); outline: none; }
.customer-search-empty { padding: 15px; color: var(--muted); font-size: 12px; line-height: 1.45; }
.selected-customer-banner {
  margin-top: 12px;
  padding: 14px 15px;
  border-radius: var(--radius-sm);
  background: var(--sage-light);
  border: 1px solid rgba(124,160,91,.25);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.selected-customer-banner > div { display: grid; gap: 1px; min-width: 0; }
.selected-customer-banner span { color: var(--forest-2); font-size: 9px; text-transform: uppercase; letter-spacing: .12em; font-weight: 900; }
.selected-customer-banner strong { font-size: 14px; }
.selected-customer-banner small { color: var(--muted); font-size: 11px; overflow-wrap: anywhere; }
.selected-customer-banner button { border: 1px solid var(--forest); border-radius: 999px; background: #fff; color: var(--forest-2); min-height: 38px; padding: 0 14px; font-size: 11px; font-weight: 850; }
.previous-responses-notice {
  margin-top: 10px;
  padding: 13px 15px;
  border: 1px solid rgba(124,160,91,.28);
  border-radius: var(--radius-sm);
  background: #fff;
  display: grid;
  gap: 2px;
}
.previous-responses-notice strong { color: var(--forest-2); font-size: 12px; font-weight: 900; }
.previous-responses-notice span { color: var(--muted); font-size: 11px; line-height: 1.45; }

.detail-section-heading { margin: 8px 0 20px; padding-top: 4px; }
.detail-section-heading p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.field-label-row { min-height: 28px; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 9px; }
.field-label-row label { margin: 0; }
.unit-toggle { display: inline-flex; padding: 3px; gap: 2px; border: 1px solid var(--line); border-radius: 999px; background: var(--cream); }
.unit-toggle button {
  min-width: 52px;
  min-height: 32px;
  padding: 0 11px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}
.unit-toggle button.active { background: var(--forest); color: #fff; box-shadow: 0 3px 8px rgba(124,160,91,.16); }
.unit-toggle button:focus-visible { outline: 3px solid rgba(124,160,91,.22); outline-offset: 1px; }
.split-measurement { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
#agePreview { color: var(--forest-2); font-weight: 850; }
#dateOfBirth { font-variant-numeric: tabular-nums; letter-spacing: .02em; }

@media (max-width: 720px) {
  .customer-type-grid { grid-template-columns: 1fr; gap: 9px; }
  .customer-type-card > span { min-height: 86px; padding: 16px; }
  .existing-customer-panel { padding: 15px; margin-bottom: 24px; }
  .customer-search-result { align-items: flex-start; flex-direction: column; gap: 4px; min-height: 72px; }
  .customer-search-result em { flex: auto; }
  .selected-customer-banner { align-items: flex-start; }
  .field-label-row { align-items: flex-start; flex-direction: column; gap: 7px; }
  .unit-toggle { align-self: flex-start; }
  .unit-toggle button { min-height: 36px; min-width: 58px; }
  .split-measurement { gap: 8px; }
}

@media (max-width: 390px) {
  .selected-customer-banner { flex-direction: column; }
  .selected-customer-banner button { width: 100%; }
}

/* Administrator configuration */
.admin-main { padding-bottom: 20px; }
.admin-heading { margin-bottom: 20px; }
.admin-tabs {
  display: flex;
  gap: 8px;
  margin: 0 0 24px;
  padding: 6px;
  width: fit-content;
  max-width: 100%;
  overflow-x: auto;
  background: rgba(255,255,255,.72);
  border: 1px solid var(--line);
  border-radius: 16px;
  scrollbar-width: none;
}
.admin-tabs::-webkit-scrollbar { display: none; }
.admin-tabs button {
  border: 0;
  white-space: nowrap;
  min-height: 44px;
  padding: 0 17px;
  border-radius: 11px;
  color: var(--muted);
  background: transparent;
  font-size: 13px;
  font-weight: 800;
}
.admin-tabs button.active { background: var(--forest); color: #fff; box-shadow: 0 6px 18px rgba(124,160,91,.19); }
.admin-panel { animation: adminFade .18s ease; }
@keyframes adminFade { from { opacity: .55; transform: translateY(3px); } to { opacity: 1; transform: none; } }
.admin-section-row { margin-bottom: 18px; }
.admin-section-row h3 { margin: 2px 0 0; }
.admin-config-card { padding: clamp(20px, 3vw, 34px); }
.admin-config-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 25px;
}
.admin-config-head h2 { margin: 4px 0 8px; font-size: clamp(28px, 3vw, 38px); line-height: 1.08; letter-spacing: -1.2px; }
.admin-config-head p { margin: 0; color: var(--muted); max-width: 790px; }
.config-actions { display: flex; gap: 9px; flex: 0 0 auto; }
.config-actions .button { white-space: nowrap; min-width: 128px; }
.admin-table-wrap { width: 100%; overflow-x: auto; border: 1px solid var(--line); border-radius: 16px; }
.admin-config-table { width: 100%; border-collapse: collapse; min-width: 900px; background: #fff; }
.admin-config-table th {
  padding: 12px 10px;
  text-align: left;
  color: var(--muted);
  background: var(--soft-white);
  border-bottom: 1px solid var(--line);
  font-size: 10px;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.admin-config-table th:not(:first-child) { text-align: center; }
.admin-config-table td { padding: 8px; border-bottom: 1px solid var(--line); }
.admin-config-table tr:last-child td { border-bottom: 0; }
.admin-config-table input {
  width: 100%;
  min-height: 45px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: #f8f7f2;
  color: var(--ink);
  padding: 0 10px;
  outline: 0;
  transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}
.admin-config-table input:hover { background: #f3f2ec; }
.admin-config-table input:focus { background: #fff; border-color: var(--forest); box-shadow: 0 0 0 3px rgba(124,160,91,.12); }
.admin-config-table .config-text { min-width: 145px; font-weight: 750; }
.admin-config-table .config-number { min-width: 100px; text-align: center; }
.admin-config-table .config-level { min-width: 74px; text-align: center; font-weight: 850; font-size: 16px; }
.config-note {
  margin-top: 17px;
  padding: 14px 16px;
  border-radius: 13px;
  background: var(--sage-light);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}
.config-note strong { color: var(--ink); }
.config-message { margin: -8px 0 18px; padding: 11px 14px; border-radius: 11px; font-size: 13px; font-weight: 750; background: var(--sage-light); color: var(--forest-2); }
.config-message.error { color: var(--danger); background: #fff1ef; }
.profile-admin-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 2px;
}
.profile-admin-row {
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 15px 16px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: #fff;
  transition: border-color .16s ease, box-shadow .16s ease;
}
.profile-admin-row:hover {
  border-color: rgba(124,160,91,.5);
  box-shadow: 0 8px 22px rgba(31,55,49,.045);
}
.profile-admin-row .field { margin: 0; min-width: 0; }
.profile-admin-row .field label { margin-bottom: 6px; }
.profile-admin-row .field input { min-height: 48px; width: 100%; background: #fff; }
.profile-admin-row .field small { display: block; margin-top: 6px; color: var(--muted); font-size: 11px; line-height: 1.35; }
.profile-level-editor.customer-profile-number {
  min-height: 84px;
  border: 1px solid #dfe4de;
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: #f8faf5;
  padding: 9px 8px 8px;
}
.profile-level-editor.customer-profile-number span {
  font-size: .60rem;
  line-height: 1.15;
  letter-spacing: .12em;
  font-weight: 900;
  color: #72905b;
  text-align: center;
}
.profile-level-input {
  width: 72px;
  min-height: 42px;
  padding: 5px 4px 2px;
  margin-top: 2px;
  text-align: center;
  border: 0;
  border-bottom: 1px solid transparent;
  border-radius: 0;
  background: transparent;
  font: 850 1.55rem/1 'Nunito Sans', sans-serif;
  color: var(--ink);
  outline: none;
  box-shadow: none;
}
.profile-level-input:hover { border-bottom-color: rgba(124,160,91,.35); }
.profile-level-input:focus { border-bottom-color: var(--forest); box-shadow: none; }
.profile-level-input::-webkit-outer-spin-button,
.profile-level-input::-webkit-inner-spin-button { margin: 0; }
.profile-name-field input { font-size: 15px; font-weight: 650; }
.profile-card-meta { color: #7b898a !important; }

.profile-row-actions { display: flex; align-items: center; gap: 6px; align-self: center; }
.profile-row-actions > button:not(.matrix-archive-button) { width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 11px; background: #fff; color: var(--ink); font-weight: 900; cursor: pointer; }
.profile-row-actions > button:not(.matrix-archive-button):hover:not(:disabled) { border-color: var(--green); background: #f5f8f1; }
.profile-row-actions > button:disabled { opacity: .35; cursor: default; }
.profile-row-actions .matrix-archive-button {
  white-space: nowrap;
  min-width: 66px;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  color: var(--danger);
  font-weight: 800;
  cursor: pointer;
}
.profile-row-actions .matrix-archive-button:hover:not(:disabled) {
  border-color: rgba(124,160,91,.65);
  background: var(--sage-light);
}

@media (max-width: 1050px) {
  .profile-admin-grid { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .profile-admin-row { grid-template-columns: 84px minmax(0,1fr); padding: 12px; gap: 12px; }
  .profile-admin-row .profile-row-actions { grid-column: 1 / -1; justify-content: flex-end; width: 100%; }
  .profile-level-editor.customer-profile-number { min-height: 76px; border-radius: 15px; }
  .profile-level-input { width: 58px; font-size: 1.35rem; }
}
.admin-history-card { margin-top: 18px; }
.settings-history { display: grid; gap: 0; }
.settings-history-row {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}
.settings-history-row:last-child { border-bottom: 0; }
.settings-history-row div { display: grid; }
.settings-history-row strong { font-size: 13px; }
.settings-history-row span, .settings-history-row small { color: var(--muted); font-size: 12px; }
.settings-history-row small { text-align: right; white-space: nowrap; }

@media (max-width: 900px) {
  .admin-config-head { flex-direction: column; }
  .config-actions { width: 100%; }
  .config-actions .button { flex: 1; }
  .profile-admin-grid { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .admin-tabs { width: 100%; border-radius: 14px; }
  .admin-tabs button { min-height: 46px; padding: 0 14px; }
  .admin-config-card { padding: 16px; }
  .admin-config-head { gap: 16px; }
  .config-actions { flex-direction: column-reverse; }
  .config-actions .button { width: 100%; }
  .profile-admin-row { grid-template-columns: 84px minmax(0,1fr); padding: 12px; gap: 12px; align-items: center; }
  .profile-admin-row .profile-row-actions { grid-column: 1 / -1; justify-content: flex-end; width: 100%; }
  .profile-level-editor.customer-profile-number { min-height: 76px; border-radius: 15px; }
  .profile-level-input { width: 58px; font-size: 1.35rem; }
  .settings-history-row { flex-direction: column; gap: 4px; }
  .settings-history-row small { text-align: left; }
}

/* approved consultation-start layout */
body.consultation-start {
  background:
    radial-gradient(circle at 13% 12%, rgba(255,255,255,.88), transparent 34%),
    radial-gradient(circle at 88% 86%, rgba(255,255,255,.70), transparent 31%),
    var(--cream);
}

body.consultation-start .site-header,
body.consultation-start .intro-panel,
body.consultation-start .site-footer {
  display: none;
}

body.consultation-start .assessment-wrap {
  width: min(1160px, calc(100% - 64px));
  display: block;
  margin: clamp(34px, 6vh, 68px) auto 18px;
}

body.consultation-start .form-panel {
  min-height: min(790px, calc(100dvh - 108px));
  padding: clamp(48px, 6vw, 76px) clamp(40px, 7vw, 92px);
  border-radius: 32px;
  border: 1px solid rgba(12,45,55,.07);
  box-shadow: 0 22px 58px rgba(12,45,55,.10);
  justify-content: flex-start;
}

body.consultation-start #assessmentForm {
  min-height: 100%;
}

body.consultation-start .consultation-start-step {
  width: min(780px, 100%);
  margin: 0 auto;
  text-align: center;
}

body.consultation-start .step-logo-wrap {
  display: flex;
  justify-content: center;
  margin: 0 auto clamp(34px, 5vh, 50px);
}

body.consultation-start .step-logo {
  width: clamp(245px, 29vw, 345px);
  max-width: 80%;
}

body.consultation-start .consultation-start-step h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(44px, 5.1vw, 66px);
  line-height: 1.02;
  letter-spacing: -2.6px;
  font-weight: 700;
  text-align: center;
}

.consultation-ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 82px;
  height: 14px;
  margin: 24px auto 24px;
  position: relative;
}
.consultation-ornament::before,
.consultation-ornament::after {
  content: "";
  height: 2px;
  width: 30px;
  border-radius: 999px;
  background: var(--forest);
  opacity: .82;
}
.consultation-ornament span {
  width: 5px;
  height: 5px;
  margin: 0 6px;
  border-radius: 50%;
  background: var(--forest);
}

body.consultation-start .consultation-start-step .lead {
  max-width: 720px;
  margin: 0 auto clamp(38px, 5vh, 52px);
  color: var(--muted);
  font-size: clamp(17px, 1.55vw, 21px);
  line-height: 1.55;
  text-align: center;
}

body.consultation-start .consultant-picker {
  width: min(700px, 100%);
  max-width: none;
  margin: 0 auto;
}

body.consultation-start .consultant-dropdown {
  position: relative;
  width: 100%;
  z-index: 20;
}

body.consultation-start .consultant-dropdown-button {
  position: relative;
  width: 100%;
  height: 88px;
  display: grid;
  place-items: center;
  padding: 0 64px;
  border: 1px solid rgba(104,140,75,.50);
  border-radius: 16px;
  color: var(--ink);
  background: #fff;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  box-shadow: none;
  transition: border-color .18s ease, box-shadow .18s ease, border-radius .18s ease;
}

body.consultation-start .consultant-dropdown-button:hover,
body.consultation-start .consultant-dropdown-button:focus-visible,
body.consultation-start .consultant-dropdown.open .consultant-dropdown-button {
  border-color: var(--forest);
  box-shadow: 0 0 0 3px rgba(124,160,91,.10);
  outline: none;
}

body.consultation-start .consultant-dropdown.open .consultant-dropdown-button {
  border-bottom-left-radius: 8px;
  border-bottom-right-radius: 8px;
}

body.consultation-start .consultant-dropdown-chevron {
  position: absolute;
  right: 25px;
  top: 50%;
  width: 11px;
  height: 11px;
  border-right: 2px solid var(--forest);
  border-bottom: 2px solid var(--forest);
  transform: translateY(-70%) rotate(45deg);
  transition: transform .18s ease;
  pointer-events: none;
}

body.consultation-start .consultant-dropdown.open .consultant-dropdown-chevron {
  transform: translateY(-30%) rotate(225deg);
}

body.consultation-start .consultant-dropdown-list {
  position: absolute;
  top: calc(100% + 7px);
  left: 0;
  right: 0;
  overflow: hidden;
  padding: 6px;
  border: 1px solid rgba(104,140,75,.40);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 18px 40px rgba(12,45,55,.14);
}

body.consultation-start .consultant-dropdown-option {
  width: 100%;
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--ink);
  font-size: 16px;
  font-weight: 750;
  text-align: center;
  padding: 12px 48px;
}

body.consultation-start .consultant-dropdown-option:hover,
body.consultation-start .consultant-dropdown-option:focus-visible,
body.consultation-start .consultant-dropdown-option[aria-selected="true"] {
  background: var(--sage-light);
  color: var(--ink);
  outline: none;
}

body.consultation-start .consultant-dropdown-option[aria-selected="true"] {
  box-shadow: inset 0 0 0 1px rgba(124,160,91,.28);
}

body.consultation-start .consultant-dropdown-button:disabled {
  cursor: not-allowed;
  opacity: .6;
}

body.consultation-start .consultation-helper {
  margin-top: 22px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
  text-align: center;
}

body.consultation-start .error-box {
  width: min(700px, 100%);
  margin: 20px auto 0;
  text-align: center;
}

body.consultation-start .form-nav {
  position: static;
  width: 100%;
  margin: 40px 0 0;
  padding: 0;
  justify-content: center;
  background: transparent;
}

body.consultation-start .form-nav .button.primary {
  width: min(330px, 100%);
  min-height: 62px;
  margin: 0;
  padding-inline: 34px;
  font-size: 16px;
  box-shadow: 0 14px 30px rgba(124,160,91,.25);
}

body.consultation-start .powered-footer {
  margin-top: 10px;
}

@media (max-width: 900px) {
  body.consultation-start .assessment-wrap {
    width: min(100% - 36px, 760px);
    margin-top: 26px;
  }
  body.consultation-start .form-panel {
    min-height: min(760px, calc(100dvh - 76px));
    padding: 48px 44px 44px;
  }
  body.consultation-start .step-logo-wrap { margin-bottom: 38px; }
  body.consultation-start .consultation-start-step h2 { letter-spacing: -2px; }
}

@media (max-width: 600px) {
  body.consultation-start {
    background: var(--cream);
  }
  body.consultation-start .assessment-wrap {
    width: calc(100% - 20px);
    margin: 10px auto 8px;
  }
  body.consultation-start .form-panel {
    min-height: calc(100dvh - 20px);
    padding: 38px 22px 30px;
    border-radius: 25px;
    box-shadow: 0 12px 32px rgba(12,45,55,.08);
  }
  body.consultation-start .step-logo-wrap {
    margin-bottom: 34px;
  }
  body.consultation-start .step-logo {
    width: min(270px, 82vw);
  }
  body.consultation-start .consultation-start-step h2 {
    font-size: clamp(38px, 11vw, 48px);
    letter-spacing: -1.7px;
  }
  .consultation-ornament {
    margin-top: 20px;
    margin-bottom: 20px;
  }
  body.consultation-start .consultation-start-step .lead {
    margin-bottom: 34px;
    font-size: 16px;
    line-height: 1.5;
  }
  body.consultation-start .consultant-dropdown-button {
    height: 70px;
    font-size: 16px;
  }
  body.consultation-start .consultation-helper {
    margin-top: 17px;
    font-size: 12px;
  }
  body.consultation-start .form-nav {
    margin-top: 32px;
  }
  body.consultation-start .form-nav .button.primary {
    width: min(100%, 360px);
    min-height: 58px;
  }
}


/* restore original left information panel; approved styling applies only to right consultation card */
body.consultation-start .site-header {
  display: flex;
}
body.consultation-start .intro-panel {
  display: block;
}
body.consultation-start .site-footer {
  display: flex;
}
body.consultation-start .assessment-wrap {
  width: min(1440px, calc(100% - 56px));
  margin: 42px auto 56px;
  display: grid;
  grid-template-columns: minmax(300px, .76fr) minmax(600px, 1.24fr);
  gap: 34px;
  align-items: stretch;
}
body.consultation-start .form-panel {
  min-height: 720px;
  padding: clamp(36px, 4.4vw, 64px);
  border-radius: var(--radius-lg);
}
body.consultation-start .consultation-start-step {
  width: min(680px, 100%);
}
body.consultation-start .step-logo-wrap {
  margin-bottom: 34px;
}
body.consultation-start .step-logo {
  width: clamp(220px, 24vw, 305px);
}
body.consultation-start .consultation-start-step h2 {
  font-size: clamp(42px, 4.5vw, 60px);
  letter-spacing: -2.35px;
}
body.consultation-start .consultation-start-step .lead {
  max-width: 650px;
  margin-bottom: 38px;
  font-size: clamp(16px, 1.3vw, 19px);
}
body.consultation-start .consultant-picker {
  width: min(620px, 100%);
}
body.consultation-start .consultant-dropdown-button {
  height: 76px;
}
body.consultation-start .form-nav {
  margin-top: 34px;
}

@media (max-width: 1100px) {
  body.consultation-start .site-header,
  body.consultation-start .assessment-wrap,
  body.consultation-start .site-footer {
    width: min(100% - 40px, 980px);
  }
  body.consultation-start .assessment-wrap {
    grid-template-columns: 1fr;
    margin-top: 26px;
    gap: 20px;
  }
  body.consultation-start .intro-panel {
    position: relative;
    top: auto;
    min-height: auto;
    padding: 34px 38px;
  }
  body.consultation-start .form-panel {
    min-height: min(760px, calc(100dvh - 150px));
    padding: clamp(34px, 5vw, 56px);
  }
  body.consultation-start .consultation-start-step {
    width: min(720px, 100%);
  }
}

@media (max-width: 720px) {
  body.consultation-start .site-header,
  body.consultation-start .assessment-wrap,
  body.consultation-start .site-footer {
    width: calc(100% - 24px);
  }
  body.consultation-start .assessment-wrap {
    margin: 14px auto 28px;
    gap: 12px;
  }
  body.consultation-start .intro-panel {
    padding: 24px 20px 25px;
    border-radius: var(--radius-lg);
  }
  body.consultation-start .form-panel {
    min-height: calc(100dvh - 106px - env(safe-area-inset-top));
    padding: 32px 20px 24px;
    border-radius: var(--radius-lg);
  }
  body.consultation-start .step-logo-wrap {
    margin-bottom: 28px;
  }
  body.consultation-start .step-logo {
    width: min(250px, 76vw);
  }
  body.consultation-start .consultation-start-step h2 {
    font-size: clamp(36px, 10vw, 46px);
    letter-spacing: -1.6px;
  }
  body.consultation-start .consultation-start-step .lead {
    margin-bottom: 30px;
    font-size: 15px;
  }
  body.consultation-start .consultant-dropdown-button {
    height: 64px;
    font-size: 16px;
  }
  body.consultation-start .form-nav {
    margin-top: 28px;
  }
}

@media (max-width: 390px) {
  body.consultation-start .site-header,
  body.consultation-start .assessment-wrap,
  body.consultation-start .site-footer {
    width: calc(100% - 18px);
  }
}

/* Keep the original page canvas around the restored left panel. */
body.consultation-start { background: var(--cream); }

/* staff-friendly assessment references */
.assessment-ref { white-space: nowrap; font-size: 13px; letter-spacing: .035em; color: var(--ink); }

/* optional full partner assessment */
.partner-assessment-shell { margin-top: 8px; }
.partner-full-panel { margin-top: 24px; border: 1px solid var(--line); border-radius: var(--radius-md); overflow: hidden; background: #fff; }
.partner-full-banner { padding: 24px 26px; background: var(--sage-light); border-bottom: 1px solid var(--line); }
.partner-full-banner > span, .partner-section-title > span { display: block; color: var(--forest-2); font-size: 10px; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; }
.partner-full-banner > strong { display: block; margin-top: 4px; color: var(--ink); font-size: 22px; }
.partner-full-banner p { margin: 7px 0 0; color: var(--muted); font-size: 13px; }
.partner-question-section { padding: 28px 26px 10px; border-bottom: 1px solid var(--line); }
.partner-question-section:last-child { border-bottom: 0; }
.partner-section-title { margin-bottom: 22px; }
.partner-section-title > strong { display: block; margin-top: 4px; color: var(--ink); font-size: 18px; }
.partner-question-section fieldset:last-child { margin-bottom: 20px; }
#partnerBasicFields { margin-top: 18px; }
@media (max-width: 760px) {
  .partner-full-banner, .partner-question-section { padding-left: 18px; padding-right: 18px; }
  .partner-full-banner > strong { font-size: 19px; }
}
.partner-recommendation-panel { margin: 20px 0; padding: 20px 22px; border: 1px solid rgba(124,160,91,.35); border-radius: var(--radius-md); background: var(--sage-light); }
.partner-recommendation-panel > span { display:block; color:var(--forest-2); font-size:10px; font-weight:900; letter-spacing:.13em; }
.partner-recommendation-panel > div { display:flex; align-items:baseline; gap:12px; margin-top:6px; }
.partner-recommendation-panel strong { font-size:22px; color:var(--ink); }
.partner-recommendation-panel em { font-style:normal; color:var(--muted); font-weight:750; }
.partner-recommendation-panel p { margin:5px 0 0; color:var(--muted); font-size:13px; }
.partner-recommendation-panel small { display:block; margin-top:10px; color:var(--danger); font-weight:700; }

/* consultation type + proper couple workflow */
.consultation-type-start {
  width: min(620px, 100%);
  margin: 34px auto 0;
  text-align: center;
}
.consultation-type-start legend { text-align: center; width: 100%; }
.consultation-type-start .choice-content { text-align: center; align-items: center; }
.current-setup-panel,
.couple-priority-panel,
.couple-resolution-panel,
.couple-final-review-panel {
  margin: 0 0 30px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--soft-white);
}
.couple-priority-panel { margin-top: 24px; }
.couple-resolution-panel { margin-top: 30px; text-align: left; }
.couple-resolution-panel h3 { margin: 0 0 8px; font-size: 26px; letter-spacing: -.7px; }
.couple-resolution-panel > p { color: var(--muted); margin: 0 0 22px; }

.couple-resolution-panel .choice-grid { align-items: stretch; }
.couple-resolution-panel .choice-card { height: 100%; }
.couple-resolution-panel .choice-content { align-items: flex-start; }
.couple-current-summary {
  margin: 0 0 20px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--cream);
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}
.couple-resolution-note {
  margin-top: 18px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}
.scan-person-wrap {
  margin: 0 0 18px;
  padding: 18px 20px;
  background: var(--sage-light);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}
.couple-report-profiles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin: 0;
  background: var(--line);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.couple-report-profiles > div { background: #fff; padding: 20px 28px; display: grid; gap: 5px; }
.couple-report-profiles span { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; font-weight: 850; }
.couple-report-profiles strong { font-size: 17px; }
.couple-report-profiles small { color: var(--muted); }
.couple-report-profiles > p { grid-column: 1 / -1; margin: 0; background: var(--cream); padding: 14px 28px; color: var(--muted); }

@media (max-width: 760px) {
  .consultation-type-start .choice-grid,
  .couple-priority-panel .choice-grid,
  .couple-resolution-panel .choice-grid { grid-template-columns: 1fr; }
  .current-setup-panel,
  .couple-priority-panel,
  .couple-resolution-panel,
  .couple-final-review-panel { padding: 18px; }
  .couple-report-profiles { grid-template-columns: 1fr; }
}
.crm-customer .couple-row-note { color: var(--forest-2); font-weight: 800; margin-top: 3px; }

/* administrator questionnaire configuration */
.questionnaire-safety-note {
  display: grid;
  gap: 4px;
  margin: 18px 0 24px;
  padding: 16px 18px;
  border: 1px solid rgba(124,160,91,.28);
  border-radius: 14px;
  background: var(--sage-light);
  color: var(--muted);
  font-size: 13px;
}
.questionnaire-safety-note strong { color: var(--forest-2); font-size: 13px; }
.questionnaire-section-list { display: grid; gap: 18px; }
.questionnaire-admin-section { border: 1px solid var(--line); border-radius: 18px; background: #fff; overflow: hidden; }
.questionnaire-admin-section-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 16px 18px; background: var(--soft-white); border-bottom: 1px solid var(--line); }
.questionnaire-admin-section-head div { min-width: 0; }
.questionnaire-admin-section-head h3 { margin: 0; font-size: 19px; letter-spacing: -.35px; }
.questionnaire-admin-section-head span { display: block; margin-top: 2px; color: var(--muted); font-size: 12px; }
.questionnaire-question-list { display: grid; }
.questionnaire-question-row { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 18px; align-items: center; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.questionnaire-question-row:last-child { border-bottom: 0; }
.questionnaire-question-copy { min-width: 0; }
.questionnaire-question-copy strong { display: block; color: var(--ink); font-size: 14px; line-height: 1.35; }
.questionnaire-question-copy > span { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; }
.questionnaire-question-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.question-tag { display: inline-flex; align-items: center; min-height: 24px; padding: 3px 8px; border-radius: 999px; background: var(--cream); color: var(--muted); font-size: 10px; font-weight: 850; letter-spacing: .03em; text-transform: uppercase; }
.question-tag.algorithm { background: #edf4e7; color: var(--forest-2); }
.question-tag.protected { background: #eef2f3; color: var(--ink); }
.question-tag.required { background: #f7f0e5; color: #7b6741; }
.questionnaire-question-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.questionnaire-question-actions button { min-height: 38px; padding: 8px 12px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--ink); font-weight: 800; font-size: 12px; }
.questionnaire-question-actions button:hover { border-color: var(--forest); }
.questionnaire-question-actions .archive-question { color: #87564f; }
.questionnaire-archived-list { display: grid; gap: 10px; }
.archived-question-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--soft-white); }
.archived-question-row strong { display:block; font-size: 13px; }
.archived-question-row small { display:block; color:var(--muted); margin-top:2px; }
.admin-muted-copy { color: var(--muted); font-size: 13px; margin: -2px 0 16px; }

.admin-modal { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 24px; }
.admin-modal[hidden] { display: none !important; }
.admin-modal-backdrop { position: absolute; inset: 0; background: rgba(12,45,55,.34); backdrop-filter: blur(4px); }
.admin-modal-card { position: relative; z-index: 1; width: min(760px, 100%); max-height: min(88vh, 900px); overflow: auto; border-radius: 24px; background: #fff; box-shadow: 0 28px 90px rgba(12,45,55,.24); padding: 26px; }
.admin-modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.admin-modal-head h2 { margin: 3px 0 0; font-size: 30px; letter-spacing: -1.1px; }
.modal-close { width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line); background: var(--soft-white); color: var(--ink); font-size: 24px; line-height: 1; }
.question-editor-form textarea { width: 100%; resize: vertical; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; color: var(--ink); outline: none; }
.question-editor-form textarea:focus { border-color: var(--forest); box-shadow: 0 0 0 3px rgba(124,160,91,.12); }
.admin-check-field { align-self: end; display: flex; gap: 10px; align-items: center; min-height: 58px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); cursor: pointer; }
.admin-check-field input { width: 18px; height: 18px; accent-color: var(--forest); }
.admin-check-field span { display: grid; }
.admin-check-field strong { font-size: 13px; }
.admin-check-field small { color: var(--muted); font-size: 11px; }
.question-editor-lock-note { margin: 16px 0; padding: 13px 15px; border-radius: 12px; background: var(--cream); color: var(--muted); font-size: 12px; }
.question-options-editor { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.question-options-editor h3 { margin: 0; font-size: 20px; }
.question-option-rows { display: grid; gap: 9px; margin: 12px 0; }
.question-option-row { display: grid; grid-template-columns: 34px minmax(0,1fr) minmax(0,1fr) auto; gap: 8px; align-items: center; }
.question-option-row .drag-number { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--cream); color: var(--muted); font-size: 11px; font-weight: 850; }
.question-option-row input { width: 100%; height: 44px; border: 1px solid var(--line); border-radius: 10px; padding: 0 11px; }
.question-option-row button { min-width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line); background: #fff; color: #87564f; font-weight: 900; }
.question-option-row button[disabled] { opacity: .35; cursor: not-allowed; }
.admin-modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line); }
.small-button { min-height: 38px !important; padding: 8px 13px !important; font-size: 12px !important; }

/* Configurable/dynamic questions in the assessment */
.dynamic-question-host { display: grid; gap: 22px; }
.dynamic-question-host:empty { display: none; }
.dynamic-question-block { margin: 0; }
.dynamic-question-block .dynamic-help { display: block; margin: -7px 0 12px; color: var(--muted); font-size: 12px; }
.dynamic-question-block textarea,
.dynamic-question-block input[type="text"],
.dynamic-question-block input[type="number"] { width: 100%; min-height: 58px; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 16px; color: var(--ink); background: #fff; outline: none; font: inherit; }
.dynamic-question-block textarea { min-height: 96px; resize: vertical; }
.dynamic-question-block textarea:focus,
.dynamic-question-block input:focus { border-color: var(--forest); box-shadow: 0 0 0 3px rgba(124,160,91,.10); }
.dynamic-question-block[hidden] { display:none !important; }
.dynamic-question-divider { margin: 28px 0 6px; padding-top: 22px; border-top: 1px solid var(--line); }
.dynamic-question-divider span { color: var(--forest-2); font-size: 10px; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; }

@media (max-width: 760px) {
  .questionnaire-question-row { grid-template-columns: 1fr; gap: 12px; }
  .questionnaire-question-actions { justify-content: flex-start; }
  .admin-modal { padding: 10px; }
  .admin-modal-card { padding: 20px 16px; border-radius: 18px; max-height: 94vh; }
  .question-option-row { grid-template-columns: 30px 1fr auto; }
  .question-option-row .option-help-input { grid-column: 2 / 4; }
}
body.modal-open { overflow: hidden; }

/* matrix lifecycle/versioning and Administrator Excel export */
.matrix-version-note { display: inline-block; margin-top: 10px; color: var(--muted); font-size: 12px; }
.matrix-version-note strong { color: var(--forest-2); }
.matrix-row-actions { min-width: 154px; white-space: nowrap; text-align: center; }
.matrix-row-actions button {
  min-width: 34px;
  min-height: 38px;
  margin: 0 2px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  color: var(--ink);
  font-weight: 800;
}
.matrix-row-actions button:hover:not(:disabled) { border-color: rgba(124,160,91,.65); background: var(--sage-light); }
.matrix-row-actions button:disabled { opacity: .35; cursor: default; }
.matrix-row-actions .matrix-archive-button { color: var(--danger); min-width: 66px; }
.matrix-archived-list { display: grid; gap: 0; }
.matrix-archived-row { border-bottom: 1px solid var(--line); }
.matrix-archived-row:last-child { border-bottom: 0; }
.crm-actions { display: flex; gap: 9px; align-items: center; }
@media (max-width: 720px) {
  .crm-actions { width: 100%; }
  .crm-actions .button { flex: 1; }
  .matrix-row-actions { min-width: 142px; }
}

/* Authentication, team access and governed Sleep Profiles */
.header-button-link{background:transparent;border:0;font:inherit;cursor:pointer;padding:0}.session-actions{gap:16px;align-items:center}.session-identity{display:flex;flex-direction:column;align-items:flex-end;line-height:1.05}.session-identity strong{font-size:.82rem;color:var(--ink)}.session-identity small{font-size:.7rem;color:#6e7d7d;margin-top:3px}.team-permission-summary{display:flex;gap:10px;flex-wrap:wrap;margin:14px 0 20px}.team-permission-summary span{background:#f6f8f3;border:1px solid #e1e7dc;border-radius:999px;padding:8px 12px;font-size:.8rem;color:#5b696b}.team-user-list,.team-invitation-list{display:grid;gap:10px}.team-user-row{display:grid;grid-template-columns:minmax(230px,1fr) 180px 150px auto;gap:14px;align-items:end;padding:15px;border:1px solid #dde3dd;border-radius:16px;background:#fff}.team-user-identity{display:flex;flex-direction:column;gap:2px}.team-user-identity strong{color:var(--ink)}.team-user-identity span{color:#617176;font-size:.84rem}.team-user-identity small{color:#8a9697;font-size:.73rem}.compact-field{margin:0}.compact-field label{font-size:.69rem}.team-owner-pill,.team-status-pill{align-self:center;justify-self:start;border-radius:999px;padding:7px 11px;font-size:.76rem;font-weight:800}.team-owner-pill{background:#edf3e7;color:#58763f}.team-status-pill.active{background:#edf3e7;color:#58763f}.team-status-pill.disabled{background:#f7eeee;color:#925959}.team-invitation-row{display:flex;justify-content:space-between;gap:16px;align-items:center;padding:14px 15px;border:1px solid #e0e5df;border-radius:15px}.team-invitation-row>div:first-child{display:flex;flex-direction:column}.team-invitation-row span{font-size:.84rem;color:#617176}.team-invitation-row small{font-size:.73rem;color:#8a9697}.team-invitation-row>div:last-child{display:flex;gap:7px}.danger-outline{color:#8a4e4e!important;border-color:#e2caca!important}.invite-preview{margin-top:14px;padding:13px 14px;border-radius:14px;background:#f2f6ed;border:1px solid #dbe8cf;display:flex;flex-direction:column;gap:4px;word-break:break-all}.invite-preview strong{color:#526e3c}.invite-preview span{font-size:.82rem;color:#5f6f70}.invite-preview a{color:#42682e;font-size:.78rem}.compact-modal{max-width:560px}
.auth-shell{min-height:100vh;background:var(--cream);display:flex;flex-direction:column}.auth-layout{display:grid;grid-template-columns:minmax(320px,.85fr) minmax(420px,1.15fr);min-height:calc(100vh - 72px)}.auth-brand-panel{padding:8vw 6vw;background:#0c2d37;color:#fff;display:flex;flex-direction:column;justify-content:center}.auth-brand-panel img{width:min(260px,70%);filter:brightness(0) invert(1);margin-bottom:38px}.auth-brand-panel .section-kicker{color:#b7cf9d}.auth-brand-panel h1{font-size:clamp(2.2rem,4vw,4.4rem);line-height:.98;max-width:650px;margin:12px 0 18px}.auth-brand-panel p{max-width:500px;color:#d7e1e2;font-size:1.03rem}.auth-form-panel{display:flex;align-items:center;justify-content:center;padding:40px}.auth-card{width:min(460px,100%);background:#fff;border:1px solid #dbe0dd;border-radius:28px;padding:34px;box-shadow:0 18px 55px rgba(32,49,46,.08)}.auth-card h2{font-size:2rem;color:var(--ink);margin:8px 0}.auth-lead{color:#617176;margin:0 0 24px}.auth-card form{display:grid;gap:14px;margin-top:20px}.auth-submit{width:100%;margin-top:4px}.auth-link{display:inline-block;margin-top:18px;color:#5f8242;font-weight:800;text-decoration:none}.invite-identity{display:flex;flex-direction:column;padding:13px 15px;background:#f5f7f2;border:1px solid #e0e6dc;border-radius:14px;margin-top:18px}.invite-identity strong{color:var(--ink)}.invite-identity span,.invite-identity small{color:#6d7b7d}.auth-success{display:grid;gap:12px;padding:16px;background:#f2f6ed;border-radius:14px}.auth-success strong{color:#526e3c;font-size:1.05rem}.auth-success span{color:#617176}
@media(max-width:900px){.auth-layout{grid-template-columns:1fr}.auth-brand-panel{padding:44px 28px}.auth-brand-panel h1{font-size:2.4rem}.auth-brand-panel img{width:190px;margin-bottom:20px}.auth-form-panel{padding:26px 18px 40px}.team-user-row{grid-template-columns:1fr 1fr}.team-user-identity{grid-column:1/-1}.session-identity{display:none}}
@media(max-width:600px){.team-user-row{grid-template-columns:1fr}.team-user-identity{grid-column:auto}.team-invitation-row{align-items:flex-start;flex-direction:column}.auth-card{padding:24px;border-radius:22px}.auth-brand-panel{display:none}.auth-layout{min-height:calc(100vh - 56px)}.session-actions{gap:10px}.header-actions .header-link{font-size:.76rem}}


/* Compact matrix presentation with governed profiles */
.admin-config-table select.config-level {
  width: 100%;
  min-width: 82px;
  min-height: 45px;
  border: 1px solid transparent;
  border-radius: 10px;
  background-color: #f8f7f2;
  color: var(--ink);
  padding: 0 30px 0 10px;
  outline: 0;
  appearance: none;
  -webkit-appearance: none;
  text-align: center;
  text-align-last: center;
  font: 850 16px/1 'Nunito Sans', sans-serif;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position:
    calc(100% - 16px) 19px,
    calc(100% - 11px) 19px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}
.admin-config-table select.config-level:hover { background-color: #f3f2ec; }
.admin-config-table select.config-level:focus {
  background-color: #fff;
  border-color: var(--forest);
  box-shadow: 0 0 0 3px rgba(124,160,91,.12);
}
.matrix-table th:nth-child(n+4):nth-child(-n+7),
.matrix-table td:nth-child(n+4):nth-child(-n+7) { min-width: 82px; }

/* compact desktop assessment canvas.
   Keep the approved two-panel composition, but use the available viewport more
   efficiently once an assessment is underway. Content-heavy later steps can
   still expand naturally and scroll when their content genuinely requires it. */
@media (min-width: 1101px) {
  body.assessment-in-progress .site-header {
    min-height: 78px;
    padding-inline: clamp(24px, 5vw, 84px);
  }

  body.assessment-in-progress .brand-logo {
    width: 215px;
  }

  body.assessment-in-progress .assessment-wrap {
    margin: 18px auto 18px;
    gap: 30px;
  }

  body.assessment-in-progress .intro-panel {
    min-height: 0;
    padding: 34px 36px 30px;
  }

  body.assessment-in-progress .eyebrow {
    margin-bottom: 16px;
  }

  body.assessment-in-progress .intro-panel h1 {
    max-width: 580px;
    margin-bottom: 20px;
    font-size: clamp(44px, 4vw, 58px);
    line-height: .99;
    letter-spacing: -2.6px;
  }

  body.assessment-in-progress .intro-copy {
    max-width: 500px;
    margin-bottom: 26px;
    font-size: 16px;
    line-height: 1.45;
  }

  body.assessment-in-progress .assurance-list {
    gap: 10px;
  }

  body.assessment-in-progress .assurance-list > div {
    font-size: 13px;
  }

  body.assessment-in-progress .intro-small {
    margin-top: 28px;
    padding-top: 18px;
    font-size: 12px;
    line-height: 1.45;
  }

  body.assessment-in-progress .form-panel {
    min-height: clamp(600px, calc(100dvh - 170px), 660px);
    padding: 34px clamp(38px, 4vw, 56px) 28px;
  }

  body.assessment-in-progress .progress-shell {
    margin-bottom: 26px;
  }

  body.assessment-in-progress .section-kicker {
    margin-bottom: 10px;
  }

  body.assessment-in-progress .step h2 {
    font-size: clamp(34px, 3.45vw, 48px);
  }

  body.assessment-in-progress .lead {
    margin-bottom: 24px;
    font-size: 16px;
  }

  body.assessment-in-progress fieldset {
    margin-bottom: 24px;
  }

  body.assessment-in-progress .customer-type-card > span {
    min-height: 96px;
    padding: 16px 18px;
  }

  body.assessment-in-progress .form-nav {
    padding-top: 24px;
  }

  body.assessment-in-progress .site-footer {
    margin-bottom: 18px;
    padding-top: 14px;
  }
}

@media (min-width: 1101px) {
  body.assessment-in-progress .powered-footer {
    margin: 0 auto 8px;
    padding: 4px 0 6px;
    border-top: 0;
    gap: 7px;
    font-size: 10px;
  }

  body.assessment-in-progress .powered-footer img {
    width: 76px;
    max-height: 26px;
  }
}

/* explicit 20–300 kg matrix bounds and numeric-only profile selectors */
.matrix-table .matrix-profile-select { min-width: 68px; padding-left: 8px; padding-right: 26px; }

/* Explicit customer consent evidence */
.consent-evidence-card {
  margin: 24px 0;
  padding: 22px;
  border: 1px solid rgba(39, 83, 66, .22);
  border-radius: 18px;
  background: rgba(244, 248, 244, .88);
  box-shadow: 0 10px 28px rgba(35, 57, 47, .06);
}
.consent-evidence-card.compact { margin: 18px 0; }
.consent-evidence-head { display: grid; gap: 5px; margin-bottom: 12px; }
.consent-evidence-head span {
  font-size: .74rem;
  font-weight: 800;
  letter-spacing: .12em;
  color: #567364;
}
.consent-evidence-head strong { font-size: 1.04rem; color: #233f33; }
.consent-evidence-card p { margin: 8px 0; color: #53645c; line-height: 1.55; }
.customer-consent-check {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin: 18px 0 16px;
  padding: 15px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid rgba(39, 83, 66, .16);
  cursor: pointer;
}
.customer-consent-check input { margin-top: 3px; width: 20px; height: 20px; flex: 0 0 auto; }
.customer-consent-check span { line-height: 1.48; color: #243a31; font-weight: 650; }
.consent-confirm-button { width: 100%; }
.consent-recorded {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(52, 111, 83, .09);
  color: #2d5c47;
}
.consent-recorded strong, .consent-recorded span { display: block; }
.consent-recorded span { margin-top: 3px; font-size: .82rem; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; overflow-wrap: anywhere; }
.consent-gated.is-locked,
.partner-full-panel.consent-locked .partner-question-section:not(:first-of-type) {
  opacity: .48;
}
.consent-gated.is-locked { position: relative; }
.consent-gated.is-locked::before {
  content: 'Customer consent is required before these fields can be completed.';
  display: block;
  margin: 10px 0 14px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(90, 90, 80, .08);
  color: #68716c;
  font-size: .84rem;
}
.consent-summary-note { margin-top: 22px; }
@media (max-width: 680px) {
  .consent-evidence-card { padding: 17px; border-radius: 15px; }
}
.privacy-question-note {
  margin: 0 0 16px;
  padding: 10px 12px;
  border-left: 3px solid rgba(55, 101, 79, .35);
  background: rgba(55, 101, 79, .05);
  color: #5b6b63;
  font-size: .88rem;
  line-height: 1.5;
}
.consent-customer-action { display: block; margin: -5px 0 14px; }

/* simplified consent confirmation and privacy/data-use summary */
.consent-info-link {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0;
  margin: 6px 0 2px;
  color: #3f6f58;
  font: inherit;
  font-size: .86rem;
  font-weight: 750;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.consent-info-link:hover { color: #2e5945; }
.consent-evidence-card.is-recorded {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}
.consent-recorded {
  margin-top: 0;
  padding: 13px 15px;
  border-radius: 12px;
  background: rgba(52, 111, 83, .09);
  color: #2d5c47;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}
.consent-recorded-main { display: inline-flex; align-items: center; gap: 9px; }
.consent-recorded-tick {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #5f8c70;
  color: #fff;
  font-size: .9rem;
  font-weight: 900;
}
.consent-recorded .consent-info-link { margin: 0; color: #3f6f58; font-size: .82rem; }

.data-use-modal[hidden] { display: none !important; }
.data-use-modal { position: fixed; inset: 0; z-index: 1500; display: grid; place-items: center; padding: 22px; }
.data-use-backdrop { position: absolute; inset: 0; border: 0; background: rgba(20, 42, 34, .46); backdrop-filter: blur(4px); cursor: default; }
.data-use-dialog {
  position: relative;
  z-index: 1;
  width: min(760px, 100%);
  max-height: min(88vh, 900px);
  overflow: auto;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 30px 95px rgba(21, 48, 38, .28);
  padding: 26px;
  outline: none;
}
.data-use-dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 18px; }
.data-use-dialog-head h2 { margin: 4px 0 0; font-size: clamp(1.65rem, 4vw, 2.2rem); line-height: 1.05; letter-spacing: -.045em; color: var(--ink); }
.data-use-close { width: 42px; height: 42px; flex: 0 0 auto; border-radius: 50%; border: 1px solid var(--line); background: var(--soft-white); color: var(--ink); font-size: 24px; line-height: 1; cursor: pointer; }
.data-use-content { display: grid; gap: 16px; }
.data-use-content section { padding: 15px 16px; border: 1px solid #e2e8e1; border-radius: 15px; background: #fafbf8; }
.data-use-content h3 { margin: 0 0 6px; font-size: .98rem; color: #294838; }
.data-use-content p { margin: 0; color: #56675f; line-height: 1.58; }
.data-use-content p + p { margin-top: 10px; }
.data-use-footnote { padding: 12px 14px; border-radius: 12px; background: #f1f5ed; color: #617066 !important; font-size: .84rem; }
.data-use-actions { display: flex; justify-content: flex-end; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
body.modal-open { overflow: hidden; }
@media (max-width: 680px) {
  .data-use-modal { padding: 10px; }
  .data-use-dialog { padding: 19px 16px; border-radius: 17px; max-height: 94vh; }
  .data-use-content section { padding: 13px; }
  .consent-recorded { align-items: flex-start; }
}
.consent-recorded .consent-recorded-tick {
  display: inline-grid;
  margin-top: 0;
  font-family: inherit;
  font-size: .9rem;
  overflow-wrap: normal;
}


/* full Privacy & Data Use Notice */
.full-privacy-notice { line-height: 1.58; }
.full-privacy-notice section ul { margin: 0.65rem 0 0; padding-left: 1.35rem; }
.full-privacy-notice section li { margin: 0.28rem 0; }
.full-privacy-notice a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.privacy-notice-meta { margin: 0 0 1rem; font-size: 0.88rem; opacity: 0.78; }
.data-use-page-link { text-align: center; margin: 1rem 0 0; font-weight: 800; }
.privacy-page-shell { min-height: 100vh; }
.privacy-page-wrap { width: min(980px, calc(100% - 32px)); margin: 28px auto 56px; }
.privacy-page-card { background: #fff; border-radius: 28px; padding: clamp(24px, 5vw, 54px); box-shadow: 0 24px 70px rgba(26, 45, 41, 0.10); }
.privacy-page-card > h1 { margin: 0.4rem 0 1.6rem; font-size: clamp(2rem, 5vw, 3.4rem); line-height: 1.02; }
@media (max-width: 640px) { .privacy-page-wrap { width: min(100% - 20px, 980px); margin-top: 12px; } .privacy-page-card { border-radius: 20px; padding: 22px 18px; } }


/* GoHighLevel integration status */
.integration-status-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; margin:20px 0; }
.integration-status-item { border:1px solid var(--line); border-radius:16px; padding:16px; background:rgba(255,255,255,.52); display:grid; gap:5px; }
.integration-status-item span { color:var(--muted); font-size:12px; font-weight:800; text-transform:uppercase; letter-spacing:.06em; }
.integration-status-item strong { color:var(--ink); font-size:15px; line-height:1.3; }
@media (max-width:900px){ .integration-status-grid{grid-template-columns:1fr 1fr;} }
@media (max-width:560px){ .integration-status-grid{grid-template-columns:1fr;} }

/* client profiles and GoHighLevel operations */
.admin-operations-card { margin-top: 18px; }
.operations-summary-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; margin-top:14px; }
.operations-summary-grid > div { border:1px solid var(--line, #d8ddd5); border-radius:16px; padding:14px 16px; background:#fafbf8; display:flex; flex-direction:column; gap:4px; }
.operations-summary-grid span { font-size:11px; text-transform:uppercase; letter-spacing:.08em; color:#52616a; font-weight:800; }
.operations-summary-grid strong { font-size:24px; color:#638c42; }
.ops-action-preview { display:grid; gap:8px; margin-top:14px; }
.ops-action-row { display:flex; align-items:center; justify-content:space-between; gap:14px; padding:11px 13px; border:1px solid #dde2da; border-radius:13px; background:#fff; }
.ops-action-row > div { display:flex; flex-direction:column; gap:2px; min-width:0; }
.ops-action-row strong { font-size:14px; }
.ops-action-row small { color:#60707a; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.action-urgency { flex:0 0 auto; padding:5px 9px; border-radius:999px; font-size:10px; font-weight:900; letter-spacing:.06em; text-transform:uppercase; background:#f2eee5; }
.action-urgency.high { background:#f8e5df; color:#8b3e2c; }
.action-urgency.medium { background:#f7efd9; color:#7a5a19; }
.operations-card-footer { margin-top:12px; display:flex; justify-content:flex-end; }
.text-button { border:0; background:transparent; font:inherit; color:#527c38; font-weight:800; cursor:pointer; padding:6px 0; }

.client-directory-search { margin:8px 0 16px; }
.client-directory-search input { width:100%; max-width:560px; }
.client-admin-layout { display:grid; grid-template-columns:minmax(520px, .95fr) minmax(420px, 1.05fr); gap:18px; align-items:start; }
.client-list-pane, .client-profile-pane { min-width:0; }
.client-table-wrap { max-height:720px; overflow:auto; border:1px solid #e0e4dd; border-radius:16px; }
.client-table { margin:0; }
.client-table tbody tr { cursor:pointer; }
.client-table tbody tr:hover, .client-table tbody tr.selected { background:#f1f6ec; }
.client-table .client-name-cell { display:flex; flex-direction:column; gap:2px; }
.client-table .client-name-cell strong { font-size:14px; }
.client-table .client-name-cell small { color:#687681; }
.crm-link-pill { display:inline-flex; padding:4px 8px; border-radius:999px; background:#eef4e8; color:#557a3d; font-size:10px; font-weight:900; text-transform:uppercase; letter-spacing:.05em; }
.crm-link-pill.unlinked { background:#f2efe9; color:#6d6b64; }
.client-profile-pane { border:1px solid #dde2da; background:#fbfcf9; border-radius:18px; padding:20px; position:sticky; top:18px; }
.client-profile-empty { min-height:280px; display:flex; flex-direction:column; justify-content:center; align-items:flex-start; color:#5e6c76; }
.client-profile-empty h3 { margin:6px 0; color:#072c38; font-size:26px; }
.client-profile-head { display:flex; justify-content:space-between; gap:16px; align-items:flex-start; padding-bottom:16px; border-bottom:1px solid #dde2da; }
.client-profile-head h3 { margin:4px 0 2px; font-size:28px; }
.client-profile-head p { margin:0; color:#65737c; }
.client-profile-actions { display:flex; gap:8px; flex-wrap:wrap; justify-content:flex-end; }
.client-profile-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; margin:16px 0; }
.client-profile-field { padding:11px 12px; border:1px solid #e0e4dd; border-radius:13px; background:#fff; }
.client-profile-field span { display:block; text-transform:uppercase; font-size:9px; letter-spacing:.08em; color:#687681; font-weight:900; margin-bottom:4px; }
.client-profile-field strong { display:block; font-size:13px; overflow-wrap:anywhere; }
.client-profile-section { margin-top:18px; }
.client-profile-section h4 { margin:0 0 10px; font-size:16px; }
.profile-event-list, .profile-assessment-list, .profile-task-list, .profile-opportunity-list { display:grid; gap:8px; }
.profile-list-row { border:1px solid #dfe3dc; border-radius:12px; padding:10px 12px; background:#fff; display:flex; justify-content:space-between; gap:12px; align-items:flex-start; }
.profile-list-row > div { display:flex; flex-direction:column; gap:2px; min-width:0; }
.profile-list-row strong { font-size:13px; }
.profile-list-row small { color:#687681; }
.profile-list-row a { font-weight:800; color:#557a3d; white-space:nowrap; }
.crm-unavailable { padding:10px 12px; border-radius:12px; background:#f4f1ea; color:#6e6a61; font-size:12px; }

.appointments-admin-card { margin-bottom:18px; }
.appointment-stats-grid { margin-top:18px; }
.compact-select { min-height:42px; border:1px solid #d5dad3; border-radius:999px; padding:0 36px 0 14px; background:#fff; font:inherit; }
.integration-access-note { margin-top:14px; border:1px solid #ead9b7; background:#fff9e9; border-radius:14px; padding:12px 14px; color:#6b582a; font-size:13px; }
.appointments-action-card { margin-bottom:18px; }
.needs-action-list { display:grid; gap:9px; }
.needs-action-row { display:grid; grid-template-columns:auto minmax(0,1fr) auto; gap:12px; align-items:center; border:1px solid #dfe3dc; border-radius:14px; padding:12px 14px; background:#fff; }
.needs-action-row .action-icon { width:34px; height:34px; border-radius:50%; background:#f3efe5; display:grid; place-items:center; font-weight:900; }
.needs-action-row.high .action-icon { background:#f8e5df; color:#8b3e2c; }
.needs-action-row.medium .action-icon { background:#f7efd9; color:#7a5a19; }
.needs-action-row > div:nth-child(2) { min-width:0; display:flex; flex-direction:column; gap:2px; }
.needs-action-row strong { font-size:14px; }
.needs-action-row small { color:#66757e; }
.needs-action-row .action-links { display:flex; gap:8px; }
.appointment-table .appointment-client { display:flex; flex-direction:column; gap:2px; }
.appointment-table .appointment-client small { color:#687681; }
.appointment-status-pill { display:inline-flex; padding:5px 9px; border-radius:999px; font-size:10px; font-weight:900; text-transform:uppercase; letter-spacing:.05em; background:#edf2e8; color:#557a3d; }
.appointment-status-pill.cancelled, .appointment-status-pill.invalid, .appointment-status-pill.noshow { background:#f6e8e4; color:#8a4737; }
.appointment-status-pill.completed, .appointment-status-pill.showed { background:#e8f0f2; color:#365f68; }

@media (max-width: 1150px) {
  .client-admin-layout { grid-template-columns:1fr; }
  .client-profile-pane { position:static; }
}
@media (max-width: 800px) {
  .operations-summary-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .client-profile-grid { grid-template-columns:1fr; }
  .needs-action-row { grid-template-columns:auto minmax(0,1fr); }
  .needs-action-row .action-links { grid-column:2; }
}


/* Appointment calendar — visual day-group layout */
.appointment-day-list { display:grid; gap:16px; }
.appointment-section-label { margin:8px 2px -2px; font-size:11px; font-weight:900; letter-spacing:.09em; text-transform:uppercase; color:#77838a; }
.appointment-day-group { border:1px solid #dfe3dc; border-radius:18px; background:#fbfcf9; overflow:hidden; }
.appointment-day-group.today { border-color:#9eb987; box-shadow:0 0 0 2px rgba(127,163,92,.09); }
.appointment-day-group > header { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:13px 16px; background:#f3f5ef; border-bottom:1px solid #e1e5de; }
.appointment-day-group.today > header { background:#eef5e9; }
.appointment-day-group > header > div { display:flex; align-items:baseline; gap:10px; flex-wrap:wrap; }
.appointment-day-group > header strong { font-size:15px; color:#082e39; }
.appointment-day-group > header span { font-size:11px; color:#6d7980; }
.appointment-card-list { display:grid; }
.appointment-card { display:grid; grid-template-columns:84px minmax(0,1fr) minmax(120px,auto); gap:15px; align-items:center; padding:14px 16px; background:#fff; border-bottom:1px solid #e7eae5; }
.appointment-card:last-child { border-bottom:0; }
.appointment-card:hover { background:#fcfdfb; }
.appointment-card.cancelled, .appointment-card.invalid { opacity:.72; background:#fbf7f5; }
.appointment-time-block { display:flex; flex-direction:column; align-items:flex-start; border-right:1px solid #e2e6df; padding-right:14px; }
.appointment-time-block strong { font-size:19px; line-height:1.1; color:#082e39; }
.appointment-time-block span { margin-top:3px; font-size:11px; color:#7a858b; }
.appointment-main { min-width:0; display:flex; flex-direction:column; gap:5px; }
.appointment-title-row { display:flex; align-items:center; gap:9px; flex-wrap:wrap; }
.appointment-title-row > strong { font-size:14px; color:#082e39; }
.appointment-meta { display:flex; gap:7px 12px; flex-wrap:wrap; color:#68757d; font-size:11px; }
.appointment-meta span + span::before { content:'•'; margin-right:12px; color:#a1aaa6; }
.appointment-assessment-link, .appointment-client-link, .appointment-assessment-empty { min-width:122px; padding:9px 11px; border-radius:12px; border:1px solid #dce2d8; background:#f8faf6; display:flex; flex-direction:column; align-items:flex-start; text-decoration:none; color:#18353d; font:inherit; text-align:left; }
.appointment-client-link { cursor:pointer; }
.appointment-assessment-link span, .appointment-client-link span, .appointment-assessment-empty span { font-size:9px; font-weight:900; text-transform:uppercase; letter-spacing:.07em; color:#718078; }
.appointment-assessment-link strong, .appointment-client-link strong, .appointment-assessment-empty strong { margin-top:2px; font-size:11px; color:#557a3d; }
.appointment-assessment-empty strong { color:#7b858a; }
.appointment-status-pill.new, .appointment-status-pill.booked, .appointment-status-pill.confirmed, .appointment-status-pill.active { background:#edf4e8; color:#557a3d; }
@media (max-width: 800px) {
  .appointment-card { grid-template-columns:68px minmax(0,1fr); gap:12px; }
  .appointment-card > :last-child { grid-column:2; width:100%; }
  .appointment-time-block strong { font-size:17px; }
}


/* Unified client directory + month calendar */
.crm-link-pill.external { background:#e9f0f3; color:#365f68; }
.client-directory-note { margin:0 0 16px; }
.calendar-section-row { align-items:center; }
.visual-calendar-nav { display:flex; align-items:center; gap:10px; flex:0 0 auto; }
.visual-calendar-nav strong { min-width:150px; text-align:center; color:#082e39; font-size:15px; }
.calendar-nav-button { width:38px; height:38px; border-radius:50%; border:1px solid #d5dbd3; background:#fff; color:#557a3d; font-size:25px; line-height:1; cursor:pointer; }
.calendar-nav-button:hover { background:#f1f6ec; }
.visual-calendar { border:1px solid #dfe3dc; border-radius:18px; overflow:hidden; background:#fff; margin-top:14px; }
.visual-calendar-weekdays { display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); background:#f3f5ef; border-bottom:1px solid #dfe3dc; }
.visual-calendar-weekdays span { padding:10px 8px; text-align:center; font-size:10px; font-weight:900; letter-spacing:.08em; text-transform:uppercase; color:#66747b; }
.visual-calendar-grid { display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); }
.visual-calendar-day { min-height:122px; padding:9px; border-right:1px solid #e6e9e4; border-bottom:1px solid #e6e9e4; background:#fff; min-width:0; }
.visual-calendar-day:nth-child(7n) { border-right:0; }
.visual-calendar-day.outside { background:#fafbf8; }
.visual-calendar-day.today { background:#f2f7ee; box-shadow:inset 0 0 0 2px #9eb987; }
.visual-calendar-day-head { display:flex; align-items:center; justify-content:space-between; margin-bottom:7px; }
.visual-calendar-day-head strong { width:26px; height:26px; display:grid; place-items:center; border-radius:50%; font-size:12px; color:#18353d; }
.visual-calendar-day.today .visual-calendar-day-head strong { background:#7fa35c; color:#fff; }
.visual-calendar-day-head span { min-width:22px; height:20px; display:grid; place-items:center; border-radius:999px; background:#eef2ea; color:#5c6b62; font-size:9px; font-weight:900; }
.visual-calendar-events { display:grid; gap:5px; }
.visual-calendar-event { width:100%; min-width:0; border:1px solid #dbe4d5; background:#f2f7ee; border-radius:8px; padding:5px 6px; display:grid; grid-template-columns:auto minmax(0,1fr); gap:5px; align-items:center; text-align:left; font:inherit; color:#18353d; cursor:pointer; }
.visual-calendar-event span { font-size:9px; font-weight:900; color:#557a3d; }
.visual-calendar-event strong { font-size:10px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.visual-calendar-event.cancelled, .visual-calendar-event.invalid { background:#fbf3f0; border-color:#edddd7; opacity:.72; }
.visual-calendar-event.completed, .visual-calendar-event.showed { background:#edf4f5; border-color:#d8e3e5; }
.visual-calendar-more { font-size:9px; color:#68757d; font-weight:800; padding:2px 4px; }
.calendar-agenda-heading { margin:24px 0 12px; }
.calendar-agenda-heading h3 { margin:3px 0 0; }
@media (max-width: 980px) {
  .visual-calendar-day { min-height:100px; padding:6px; }
  .visual-calendar-event { grid-template-columns:1fr; gap:1px; }
  .visual-calendar-event strong { font-size:9px; }
}
@media (max-width: 700px) {
  .visual-calendar { overflow-x:auto; }
  .visual-calendar-weekdays, .visual-calendar-grid { min-width:760px; }
  .calendar-section-row { align-items:flex-start; }
}


/* consistent admin rhythm, client filters and actionable follow-up */
.admin-panel.active[data-admin-panel="assessments"] { display:grid; gap:18px; }
.admin-panel.active[data-admin-panel="assessments"] > .stats-grid,
.admin-panel.active[data-admin-panel="assessments"] > .admin-operations-card,
.admin-panel.active[data-admin-panel="assessments"] > .reporting-grid,
.admin-panel.active[data-admin-panel="assessments"] > .crm-card { margin-top:0; margin-bottom:0; }
.client-filters { grid-template-columns:minmax(280px,1.8fr) minmax(170px,.7fr) minmax(190px,.8fr); margin:8px 0 18px; }
.client-filters input, .client-filters select { min-width:0; }
.client-admin-layout { align-items:start; }
.client-table-wrap { max-height:680px; }
.needs-action-row .action-links { display:flex; gap:7px; flex-wrap:wrap; justify-content:flex-end; }
.needs-action-row .action-links .button { min-height:38px; padding:0 12px; white-space:nowrap; }
.ops-action-preview { margin-top:14px; }
.operations-card-footer { margin-top:14px; }
@media (max-width: 900px) { .client-filters { grid-template-columns:1fr; } }

/* actionable appointment follow-up and six Sleep Profile terminology */
.ops-action-row { align-items:flex-start; flex-wrap:wrap; }
.ops-action-row .ops-action-copy { flex:1 1 320px; }
.ops-action-row .ops-action-controls { margin-left:auto; display:flex; align-items:center; justify-content:flex-end; gap:10px; flex-wrap:wrap; }
.ops-action-row .action-links { display:flex; gap:7px; flex-wrap:wrap; justify-content:flex-end; }
.ops-action-row .action-links .button { min-height:36px; padding:0 10px; white-space:nowrap; }
#appointmentLinkModal .field.full { width:100%; }
#appointmentLinkModal select { width:100%; }
@media (max-width: 760px) {
  .ops-action-row .ops-action-controls { width:100%; margin-left:0; justify-content:flex-start; }
  .ops-action-row .action-links { justify-content:flex-start; }
  .needs-action-row .action-links { grid-column:1 / -1; justify-content:flex-start; }
}


/* client directory layout polish */
.client-list-pane { overflow:hidden; }
.client-table-wrap {
  overflow-y:auto;
  overflow-x:hidden;
}
.client-table {
  width:100%;
  min-width:0;
  table-layout:fixed;
}
.client-table th,
.client-table td {
  vertical-align:middle;
  overflow:hidden;
}
.client-table th:nth-child(1), .client-table td:nth-child(1) { width:50%; text-align:left; }
.client-table th:nth-child(2), .client-table td:nth-child(2) { width:16%; text-align:center; }
.client-table th:nth-child(3), .client-table td:nth-child(3) { width:34%; text-align:left; }
.client-table .client-name-cell { gap:3px; min-width:0; }
.client-table .client-name-cell strong,
.client-table .client-name-cell small,
.client-last-activity,
.client-last-activity .table-subline {
  min-width:0;
  max-width:100%;
  overflow-wrap:anywhere;
  white-space:normal;
}
.client-table .client-name-cell small { line-height:1.35; }
.client-table .crm-link-pill { align-self:flex-start; margin-top:5px; }
.client-assessment-count { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:2px; }
.client-assessment-count > strong { font-size:15px; }
.client-last-activity { display:flex; flex-direction:column; gap:3px; line-height:1.35; }
.client-last-activity .table-subline { display:block; margin-top:2px; color:#687681; }

@media (max-width: 760px) {
  .client-table-wrap { border:0; border-radius:0; max-height:none; overflow:visible; background:transparent; }
  .client-table, .client-table tbody { display:block; width:100%; }
  .client-table thead { display:none; }
  .client-table tbody { display:grid; gap:10px; }
  .client-table tbody tr {
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:10px 14px;
    width:100%;
    padding:14px;
    border:1px solid #dfe3dc;
    border-radius:14px;
    background:#fff;
  }
  .client-table tbody tr:hover, .client-table tbody tr.selected { background:#f1f6ec; }
  .client-table tbody td {
    display:block;
    width:auto !important;
    padding:0;
    border:0;
    text-align:left !important;
    overflow:visible;
  }
  .client-table tbody td:first-child { grid-column:1/-1; padding-bottom:9px; border-bottom:1px solid #e4e7e1; }
  .client-table tbody td:not(:first-child)::before {
    content:attr(data-label);
    display:block;
    margin-bottom:4px;
    color:#687681;
    font-size:9px;
    font-weight:900;
    letter-spacing:.08em;
    text-transform:uppercase;
  }
  .client-assessment-count { align-items:flex-start; }
}


/* polished in-app appointment confirmation and feedback */
.action-confirm-modal { max-width: 590px; }
.action-confirm-body { display: grid; gap: 16px; }
.action-confirm-person { padding: 16px 18px; border: 1px solid #dce4d7; border-radius: 16px; background: #f8faf5; color: var(--ink); font-weight: 800; font-size: 1rem; line-height: 1.45; }
.action-confirm-body > p { margin: 0; color: #58696d; line-height: 1.65; }
.action-confirm-note { display: grid; gap: 4px; padding: 14px 16px; border-radius: 14px; background: #f4f0e7; border: 1px solid #e9e0cf; color: #5d625b; font-size: .88rem; line-height: 1.5; }
.action-confirm-note strong { color: var(--ink); }
.admin-toast-region { position: fixed; right: 24px; bottom: 24px; z-index: 2200; display: grid; gap: 10px; width: min(420px, calc(100vw - 32px)); pointer-events: none; }
.admin-toast { display: flex; align-items: center; gap: 11px; padding: 14px 16px; border: 1px solid #d7e2cf; border-radius: 14px; background: rgba(255,255,255,.98); color: var(--ink); box-shadow: 0 18px 48px rgba(12,45,55,.18); opacity: 0; transform: translateY(10px); transition: opacity .2s ease, transform .2s ease; font-size: .9rem; font-weight: 700; }
.admin-toast.visible { opacity: 1; transform: translateY(0); }
.admin-toast.error { border-color: #ead0d0; }
.admin-toast-icon { flex: 0 0 auto; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: #edf4e7; color: #5c7d43; font-weight: 900; }
.admin-toast.error .admin-toast-icon { background: #f8eaea; color: #9a5555; }
@media (max-width: 600px) {
  .admin-toast-region { right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); }
  .action-confirm-modal .admin-modal-actions { flex-direction: column-reverse; }
  .action-confirm-modal .admin-modal-actions .button { width: 100%; }
}

/* professional customer report / PDF output */
.report-paper {
  border-radius: 22px;
  border: 1px solid rgba(12,45,55,.12);
  background: #fff;
}
.report-head {
  align-items: flex-start;
  padding: 30px 34px 26px;
  border-bottom: 0;
}
.report-brand { display: flex; align-items: center; }
.report-logo { width: 205px; }
.report-document-meta {
  margin-left: auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
  text-align: right;
}
.report-document-type {
  color: var(--forest-2);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .15em;
  line-height: 1.35;
}
.report-reference {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}
.report-hero {
  position: relative;
  margin: 0 34px;
  padding: 31px 32px 32px;
  border: 1px solid rgba(124,160,91,.24);
  border-radius: 18px;
  background: linear-gradient(135deg, #f5f8f1 0%, #fbfaf6 100%);
  overflow: hidden;
}
.report-hero::after {
  content: "";
  position: absolute;
  width: 175px;
  height: 175px;
  right: -85px;
  bottom: -100px;
  border-radius: 50%;
  border: 1px solid rgba(124,160,91,.16);
  box-shadow: 0 0 0 30px rgba(124,160,91,.05), 0 0 0 60px rgba(124,160,91,.025);
}
.report-hero > span {
  position: relative;
  z-index: 1;
  margin-bottom: 16px;
  font-size: 10px;
  letter-spacing: .16em;
}
.report-level { position: relative; z-index: 1; gap: 24px; }
.report-level > b {
  width: 84px;
  height: 84px;
  background: var(--forest);
  color: #fff;
  border: 1px solid var(--forest-2);
  box-shadow: 0 7px 18px rgba(124,160,91,.18);
  font-size: 42px;
}
.report-level > div { gap: 1px; }
.report-level small {
  order: -1;
  color: var(--forest-2);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.report-level strong {
  font-size: 30px;
  line-height: 1.12;
  letter-spacing: -1px;
}
.report-level em {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 650;
}
.report-details {
  display: grid;
  grid-template-columns: 1.25fr .95fr .95fr 1.35fr;
  margin: 28px 34px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.report-detail {
  min-width: 0;
  padding: 16px 18px;
  border-left: 1px solid var(--line);
}
.report-detail:first-child { padding-left: 0; border-left: 0; }
.report-detail:last-child { padding-right: 0; }
.report-detail span {
  display: block;
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: .04em;
}
.report-detail strong {
  display: block;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.report-section { padding: 30px 34px 0; }
.report-section h3 { margin: 2px 0 9px; font-size: 25px; line-height: 1.15; }
.report-section p { max-width: 720px; line-height: 1.65; }
.report-assessment-summary { padding-bottom: 4px; }
.report-section-heading {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 10px;
}
.report-section-heading .section-kicker { margin-bottom: 0; }
.report-section-heading small { color: var(--muted); font-size: 10px; }
.report-pressure {
  min-height: 210px;
  border: 1px solid rgba(12,45,55,.10);
  background: #faf9f5;
}
.report-foot {
  display: grid;
  grid-template-columns: auto minmax(0,1fr);
  gap: 28px;
  align-items: end;
  margin-top: 34px;
  padding: 18px 34px 24px;
  border-top: 1px solid var(--line);
}
.report-foot > div { display: flex; flex-direction: column; }
.report-foot strong { color: var(--ink); font-size: 11px; }
.report-foot span { color: var(--forest-2); font-size: 9px; font-weight: 750; }
.report-foot p { margin: 0; color: var(--muted); font-size: 9px; line-height: 1.45; text-align: right; }

@media (max-width: 720px) {
  .report-head { padding: 22px 20px 18px; }
  .report-logo { width: 165px; }
  .report-document-meta { display: none; }
  .report-hero { margin: 0 20px; padding: 25px 22px; }
  .report-level > b { width: 70px; height: 70px; font-size: 36px; }
  .report-level strong { font-size: 23px; }
  .report-details { grid-template-columns: 1fr 1fr; margin: 22px 20px 0; }
  .report-detail { padding: 13px 12px; }
  .report-detail:nth-child(odd) { padding-left: 0; border-left: 0; }
  .report-detail:nth-child(n+3) { border-top: 1px solid var(--line); }
  .report-section { padding-left: 20px; padding-right: 20px; }
  .report-foot { margin-top: 26px; padding: 16px 20px 20px; grid-template-columns: 1fr; gap: 8px; }
  .report-foot p { text-align: left; }
}

@page { size: A4 portrait; margin: 0; }
@media print {
  html, body {
    width: 210mm !important;
    max-width: none !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    background: #fff !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
  .assessment-wrap,
  .form-panel,
  .step.report-step.active {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  .report-step { max-width: none !important; }
  .report-paper {
    width: 210mm;
    min-height: 297mm;
    margin: 0;
    padding: 13mm 15mm 11mm;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    overflow: visible;
    display: flex;
    flex-direction: column;
  }
  .report-head { padding: 0 0 7mm; }
  .report-logo { width: 47mm; }
  .report-document-type { font-size: 7.4pt; }
  .report-reference { font-size: 7.8pt; }
  .report-hero {
    margin: 0;
    padding: 8mm 8.5mm;
    border-radius: 4mm;
    break-inside: avoid;
  }
  .report-hero::after { display: none; }
  .report-hero > span { font-size: 7.3pt; margin-bottom: 4mm; }
  .report-level { gap: 6mm; }
  .report-level > b {
    width: 19mm;
    height: 19mm;
    font-size: 25pt;
    box-shadow: none;
  }
  .report-level small { font-size: 6.8pt; }
  .report-level strong { font-size: 19pt; letter-spacing: -.5pt; }
  .report-level em { font-size: 8pt; }
  .report-details {
    margin: 7mm 0 0;
    break-inside: avoid;
  }
  .report-detail { padding: 4mm 4.5mm; }
  .report-detail:first-child { padding-left: 0; }
  .report-detail:last-child { padding-right: 0; }
  .report-detail span { font-size: 6.8pt; }
  .report-detail strong { font-size: 8.5pt; }
  .report-section { padding: 8mm 0 0; }
  .report-section .section-kicker { font-size: 7pt; margin-bottom: 2mm; }
  .report-section h3 { font-size: 16pt; margin-bottom: 2.5mm; }
  .report-section p { font-size: 9pt; line-height: 1.55; }
  .report-pressure-section { break-before: auto; break-inside: avoid; }
  .report-pressure { min-height: 47mm; padding: 4mm; }
  .report-pressure img { max-height: 72mm; }
  .report-pressure small { font-size: 7pt; }
  .couple-report-profiles { break-inside: avoid; }
  .report-foot {
    margin-top: auto;
    padding: 5mm 0 0;
    gap: 7mm;
    break-inside: avoid;
  }
  .report-foot strong { font-size: 7.5pt; }
  .report-foot span, .report-foot p { font-size: 6.5pt; }
}
@media print {
  .report-paper { position: relative; display: block; padding-bottom: 27mm; }
  .report-details { min-height: 0; height: auto; align-items: start; }
  .report-detail { min-height: 0; height: auto; }
  .report-foot {
    position: absolute;
    left: 15mm;
    right: 15mm;
    bottom: 11mm;
    margin: 0;
  }
}

/* multi-image pressure scans */
.image-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}
.image-preview-grid figure { margin: 0; min-width: 0; }
.image-preview-grid img {
  width: 100%;
  height: 150px;
  max-height: none;
  object-fit: contain;
  background: #f3f3ef;
  border-radius: 8px;
}
.image-preview-grid figcaption {
  margin-top: 6px;
  color: var(--muted);
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.scan-image-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  width: 145px;
}
.scan-card .scan-image-strip img {
  width: 100%;
  height: 72px;
}
.scan-image-strip img:only-child { grid-column: 1 / -1; height: 105px; }
.review-scan-images {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  width: 130px;
}
.review-scan .review-scan-images img {
  width: 100%;
  height: 62px;
}
.review-scan-images img:only-child { grid-column: 1 / -1; height: 95px; }
.report-pressure-images {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  align-items: center;
  justify-items: center;
}
.report-pressure-images img {
  width: 100%;
  height: 180px;
  object-fit: contain;
  background: #fff;
}
.report-pressure-images img:only-child {
  grid-column: 1 / -1;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 360px;
}
@media (max-width: 720px) {
  .scan-image-strip { width: 100px; }
  .scan-card .scan-image-strip img { height: 55px; }
  .scan-image-strip img:only-child { height: 80px; }
  .review-scan-images { width: 95px; }
  .review-scan .review-scan-images img { height: 48px; }
  .review-scan-images img:only-child { height: 76px; }
  .image-preview-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .image-preview-grid img { height: 120px; }
}
@media print {
  .report-pressure-images { gap: 3mm; }
  .report-pressure-images img { height: 35mm; }
  .report-pressure-images img:only-child { max-height: 72mm; }
}

/* custom Customer Details questions participate in the main field grid. */
.customer-details-dynamic-host { display: contents; }
.customer-details-dynamic-host .dynamic-question-block.field { margin: 0; }
.customer-details-dynamic-host .dynamic-question-block.field > label { display: block; margin-bottom: 8px; font-weight: 800; color: var(--ink); }


/* v0.27.1 — tablet / phone assessment hotfix
   Touch devices use the platform-native consultant picker. This avoids the
   intermittent iPad/iPhone selection failure seen with the custom listbox and
   gives users the familiar iOS/Android selection UI. */
.consultant-native-select {
  display: none;
  width: 100%;
  min-height: 64px;
  padding: 0 52px 0 18px;
  border: 1px solid rgba(104,140,75,.50);
  border-radius: 14px;
  color: var(--ink);
  background-color: #fff;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--forest) 50%),
    linear-gradient(135deg, var(--forest) 50%, transparent 50%);
  background-position:
    calc(100% - 22px) 50%,
    calc(100% - 16px) 50%;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  appearance: none;
  -webkit-appearance: none;
  font-size: 16px;
  font-weight: 800;
  text-align: center;
  text-align-last: center;
  outline: none;
}
.consultant-native-select:focus {
  border-color: var(--forest);
  box-shadow: 0 0 0 3px rgba(124,160,91,.13);
}
.consultant-native-select:disabled {
  cursor: not-allowed;
  opacity: .6;
}

/* Tablet app canvas: remove the desktop marketing panel and give the actual
   assessment the viewport. The desktop two-panel layout remains unchanged. */
@media (max-width: 1100px) {
  body.consultation-start .intro-panel,
  body.assessment-in-progress .intro-panel {
    display: none !important;
  }

  body.consultation-start .assessment-wrap,
  body.assessment-in-progress .assessment-wrap {
    width: min(calc(100% - 32px), 900px);
    grid-template-columns: 1fr;
    margin: 20px auto 30px;
    gap: 0;
  }

  body.consultation-start .form-panel,
  body.assessment-in-progress .form-panel {
    width: 100%;
    min-height: auto;
    padding: clamp(30px, 5vw, 48px);
  }

  body.consultation-start .consultation-start-step {
    width: min(700px, 100%);
  }

  .fields-grid > *,
  .choice-grid > *,
  .review-grid > *,
  .scan-card > * {
    min-width: 0;
  }
}

/* Use the operating system picker on tablets/phones and on coarse-pointer
   devices such as iPads even when they report a desktop-sized viewport. */
@media (max-width: 1100px), (hover: none) and (pointer: coarse) {
  body.consultation-start .consultant-native-select {
    display: block;
  }
  body.consultation-start .consultant-dropdown {
    display: none;
  }
}

@media (max-width: 720px) {
  .site-header {
    min-height: 68px;
    padding-inline: 12px;
  }
  .brand-logo {
    width: min(142px, 39vw);
    max-width: 142px;
  }
  .header-actions,
  .session-actions {
    gap: 5px;
  }
  .header-link,
  .header-button-link {
    padding: 6px 8px;
    font-size: 9px;
    letter-spacing: .025em;
    white-space: nowrap;
  }

  body.consultation-start .assessment-wrap,
  body.assessment-in-progress .assessment-wrap {
    width: calc(100% - 16px);
    margin: 8px auto 20px;
  }

  body.consultation-start .form-panel,
  body.assessment-in-progress .form-panel {
    min-height: calc(100dvh - 92px - env(safe-area-inset-top));
    padding: 24px 16px 18px;
    border-radius: 18px;
  }

  body.consultation-start .step-logo-wrap {
    margin-bottom: 22px;
  }
  body.consultation-start .step-logo {
    width: min(220px, 72vw);
  }
  body.consultation-start .consultation-start-step h2 {
    font-size: clamp(32px, 9.4vw, 40px);
    letter-spacing: -1.35px;
  }
  body.consultation-start .consultation-start-step .lead {
    margin-bottom: 24px;
    font-size: 14px;
  }
  body.consultation-start .consultation-helper {
    margin-top: 12px;
    font-size: 11px;
  }
  body.consultation-start .consultation-helper br {
    display: none;
  }
  body.consultation-start .consultation-type-start {
    margin-top: 24px;
  }
  body.consultation-start .consultant-native-select {
    min-height: 60px;
    border-radius: 12px;
  }

  body.assessment-in-progress .progress-shell {
    margin-bottom: 22px;
  }
  body.assessment-in-progress .lead {
    margin-bottom: 22px;
  }
  body.assessment-in-progress .form-nav {
    margin-inline: -4px;
    padding: 22px 4px max(8px, env(safe-area-inset-bottom));
  }
}

@media (max-width: 390px) {
  .brand-logo {
    width: 126px;
    max-width: 126px;
  }
  .header-link,
  .header-button-link {
    padding-inline: 6px;
    font-size: 8.5px;
  }
  body.consultation-start .form-panel,
  body.assessment-in-progress .form-panel {
    padding-inline: 13px;
  }
}

/* v0.27.2 — Administrator phone/tablet responsive hotfix
   The administrator dashboard previously stayed too close to the desktop
   layout on iPad-sized/coarse-pointer screens. These rules make the full
   dashboard fit the viewport without clipped stat cards or unusable tabs. */
.admin-shell .crm-main,
.admin-shell .admin-panel,
.admin-shell .crm-card,
.admin-shell .stats-grid,
.admin-shell .reporting-grid,
.admin-shell .admin-tabs,
.admin-shell .operations-summary-grid {
  min-width: 0;
  max-width: 100%;
}

.admin-shell .crm-card,
.admin-shell .stat-card,
.admin-shell .operations-summary-grid > div {
  overflow-wrap: anywhere;
}

/* iPad landscape can report a desktop-class CSS width, so use both a generous
   width breakpoint and coarse-pointer detection. */
@media (max-width: 1400px), (hover: none) and (pointer: coarse) {
  .admin-shell .site-header,
  .admin-shell .crm-main {
    width: min(calc(100% - 32px), 1180px);
  }

  .admin-shell .crm-main {
    margin-top: 24px;
    margin-bottom: 42px;
  }

  .admin-shell .crm-heading {
    gap: 18px;
    margin-bottom: 20px;
  }

  .admin-shell .crm-heading > div:first-child {
    min-width: 0;
    max-width: 820px;
  }

  .admin-shell .crm-heading p {
    max-width: 760px;
  }

  .admin-shell .admin-tabs {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 7px;
    padding: 7px;
    overflow: visible;
  }

  .admin-shell .admin-tabs button {
    width: 100%;
    min-width: 0;
    min-height: 48px;
    height: auto;
    padding: 10px 9px;
    white-space: normal;
    line-height: 1.18;
    text-align: center;
  }

  .admin-shell .stats-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .admin-shell .stat-card {
    min-width: 0;
    padding: 16px;
  }

  .admin-shell .reporting-grid {
    grid-template-columns: 1fr;
  }

  .admin-shell .operations-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-shell .crm-card,
  .admin-shell .admin-config-card {
    min-width: 0;
  }

  .admin-shell .crm-table-wrap,
  .admin-shell .admin-table-wrap,
  .admin-shell .visual-calendar {
    max-width: 100%;
    -webkit-overflow-scrolling: touch;
  }
}

@media (max-width: 900px) {
  .admin-shell .site-header,
  .admin-shell .crm-main {
    width: calc(100% - 24px);
  }

  .admin-shell .site-header {
    min-height: 76px;
  }

  .admin-shell .brand-logo {
    width: 180px;
    max-width: 34vw;
  }

  .admin-shell .crm-heading {
    flex-direction: column;
    align-items: stretch;
  }

  .admin-shell .crm-heading h1 {
    font-size: clamp(34px, 6.2vw, 46px);
    letter-spacing: -1.5px;
  }

  .admin-shell .crm-actions {
    width: 100%;
  }

  .admin-shell .crm-actions .button,
  .admin-shell .crm-actions .button-link {
    flex: 1 1 0;
    min-width: 0;
    margin-left: 0;
    text-align: center;
  }

  .admin-shell .admin-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-shell .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-shell .stats-grid .stat-card:last-child {
    grid-column: 1 / -1;
  }

  .admin-shell .section-row,
  .admin-shell .admin-section-row {
    align-items: flex-start;
  }

  .admin-shell .section-row > div:first-child,
  .admin-shell .admin-section-row > div:first-child {
    min-width: 0;
  }
}

@media (max-width: 600px) {
  .admin-shell .site-header,
  .admin-shell .crm-main {
    width: calc(100% - 16px);
  }

  .admin-shell .site-header {
    min-height: 66px;
  }

  .admin-shell .brand-logo {
    width: 132px;
    max-width: 38vw;
  }

  .admin-shell .header-actions,
  .admin-shell .session-actions {
    gap: 5px;
  }

  .admin-shell .header-actions .header-link,
  .admin-shell .header-button-link {
    min-height: 38px;
    padding: 6px 8px;
    font-size: 9px;
    letter-spacing: .025em;
  }

  .admin-shell .crm-main {
    margin-top: 14px;
    margin-bottom: 26px;
  }

  .admin-shell .crm-heading {
    gap: 14px;
    margin-bottom: 16px;
  }

  .admin-shell .crm-heading h1 {
    font-size: clamp(30px, 9vw, 38px);
    line-height: 1.03;
    letter-spacing: -1.2px;
  }

  .admin-shell .crm-heading p {
    font-size: 14px;
    line-height: 1.48;
  }

  .admin-shell .crm-actions {
    gap: 8px;
  }

  .admin-shell .crm-actions .button,
  .admin-shell .crm-actions .button-link {
    min-height: 46px;
    padding-inline: 12px;
    font-size: 12px;
  }

  .admin-shell .admin-tabs {
    margin-bottom: 16px;
    border-radius: 13px;
    gap: 6px;
    padding: 6px;
  }

  .admin-shell .admin-tabs button {
    min-height: 48px;
    padding: 9px 7px;
    font-size: 11px;
  }

  .admin-shell .stats-grid {
    gap: 8px;
    margin-bottom: 0;
  }

  .admin-shell .stat-card {
    padding: 13px 12px;
    border-radius: 15px;
  }

  .admin-shell .stat-card span {
    font-size: 9px;
    line-height: 1.25;
  }

  .admin-shell .stat-card strong {
    margin-top: 4px;
    font-size: 26px;
  }

  .admin-shell .crm-card {
    padding: 14px;
    border-radius: 18px;
  }

  .admin-shell .section-row,
  .admin-shell .admin-section-row {
    gap: 10px;
  }

  .admin-shell .section-row h3,
  .admin-shell .admin-section-row h3 {
    font-size: 21px;
    line-height: 1.14;
  }

  .admin-shell .admin-muted-copy {
    font-size: 12px;
    line-height: 1.45;
  }

  .admin-shell .operations-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .admin-shell .operations-summary-grid > div {
    padding: 11px 10px;
    border-radius: 13px;
  }

  .admin-shell .operations-summary-grid span {
    font-size: 9px;
    line-height: 1.25;
  }

  .admin-shell .operations-summary-grid strong {
    font-size: 22px;
  }

  .admin-shell .small-button {
    min-height: 40px;
    padding-inline: 12px;
    font-size: 11px;
  }
}

@media (max-width: 390px) {
  .admin-shell .admin-tabs {
    grid-template-columns: 1fr 1fr;
  }

  .admin-shell .crm-actions {
    flex-direction: column;
  }

  .admin-shell .crm-actions .button,
  .admin-shell .crm-actions .button-link {
    width: 100%;
  }
}

/* v0.27.3 — mobile administrator refinement + client profile sheet */
.client-profile-close,
.client-profile-backdrop {
  display: none;
}

/* Give iOS standalone/browser safe areas an opaque application background so
   scrolled cards do not visually sit underneath the device status area. */
@supports (padding: max(0px)) {
  body.admin-shell {
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
  }
  body.admin-shell::before {
    content: "";
    position: fixed;
    z-index: 1190;
    top: 0;
    left: 0;
    right: 0;
    height: env(safe-area-inset-top);
    background: var(--sand, #f3efe7);
    pointer-events: none;
  }
}

/* On tablets/phones a selected client is an immediate sheet rather than a
   second column pushed below the entire client directory. */
@media (max-width: 1150px), (hover: none) and (pointer: coarse) {
  body.client-profile-open {
    overflow: hidden;
  }

  .admin-shell .client-admin-layout {
    grid-template-columns: 1fr;
  }

  .admin-shell .client-profile-pane {
    display: none;
    position: fixed;
    z-index: 1401;
    top: max(14px, env(safe-area-inset-top));
    bottom: max(14px, env(safe-area-inset-bottom));
    left: 50%;
    width: min(760px, calc(100% - 28px));
    max-height: none;
    overflow: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    transform: translateX(-50%);
    padding: 18px;
    border-radius: 22px;
    background: #fbfcf9;
    box-shadow: 0 24px 80px rgba(7, 44, 56, .28);
  }

  .admin-shell .client-profile-pane.is-open {
    display: block;
  }

  .admin-shell .client-profile-backdrop {
    display: none;
    position: fixed;
    z-index: 1400;
    inset: 0;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    background: rgba(7, 44, 56, .34);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
  }

  body.client-profile-open .client-profile-backdrop {
    display: block;
  }

  .admin-shell .client-profile-close {
    display: grid;
    position: sticky;
    z-index: 3;
    top: 0;
    width: 42px;
    height: 42px;
    margin: 0 0 8px auto;
    place-items: center;
    border: 1px solid #d8ded6;
    border-radius: 50%;
    background: rgba(255, 255, 255, .96);
    color: var(--ink, #082e39);
    font: inherit;
    font-size: 24px;
    line-height: 1;
    box-shadow: 0 4px 16px rgba(7, 44, 56, .08);
    cursor: pointer;
  }

  .admin-shell #clientProfileContent {
    min-width: 0;
  }
}

@media (max-width: 600px) {
  .admin-shell .admin-operations-card .admin-section-row {
    flex-direction: column;
    align-items: stretch;
  }

  .admin-shell #refreshOperationalOverview {
    align-self: flex-start;
    width: auto;
    min-width: 94px;
    white-space: nowrap;
    padding-inline: 15px;
  }

  .admin-shell .ops-action-row {
    padding: 13px;
    gap: 11px;
  }

  .admin-shell .ops-action-row .ops-action-copy {
    flex: 1 1 100%;
  }

  .admin-shell .ops-action-row small {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    line-height: 1.42;
  }

  .admin-shell .ops-action-row .ops-action-controls {
    width: 100%;
    margin-left: 0;
    align-items: flex-start;
    justify-content: flex-start;
  }

  .admin-shell .ops-action-row .action-urgency {
    align-self: flex-start;
  }

  .admin-shell .ops-action-row .action-links {
    width: 100%;
    justify-content: flex-start;
  }

  .admin-shell .ops-action-row .action-links .button {
    flex: 1 1 calc(50% - 4px);
    min-width: 0;
    min-height: 44px;
    height: auto;
    padding: 9px 8px;
    white-space: normal;
    line-height: 1.15;
    text-align: center;
    justify-content: center;
  }

  .admin-shell .operations-card-footer .text-button {
    width: 100%;
    padding: 12px 0 3px;
    text-align: right;
  }

  .admin-shell .client-profile-pane {
    top: max(6px, env(safe-area-inset-top));
    bottom: max(6px, env(safe-area-inset-bottom));
    width: calc(100% - 12px);
    padding: 13px;
    border-radius: 18px;
  }

  .admin-shell .client-profile-head {
    flex-direction: column;
    gap: 12px;
  }

  .admin-shell .client-profile-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .admin-shell .client-profile-actions .button,
  .admin-shell .client-profile-actions .button-link {
    flex: 1 1 calc(50% - 4px);
    min-width: 0;
    justify-content: center;
    text-align: center;
  }

  .admin-shell .profile-list-row {
    flex-direction: column;
  }
}

@media (max-width: 390px) {
  .admin-shell .ops-action-row .action-links .button,
  .admin-shell .client-profile-actions .button,
  .admin-shell .client-profile-actions .button-link {
    flex-basis: 100%;
  }
}
