:root {
  --srpi-navy: #083f5b;
  --srpi-navy-deep: #052f45;
  --srpi-body: #405e6a;
  --srpi-muted: #617d89;
  --srpi-link: #087cac;
  --srpi-teal: #087c8a;
  --srpi-cyan: #27b9c0;
  --srpi-cyan-dark: #1e9da4;
  --srpi-edge: #dce9ee;
  --srpi-edge-strong: #c6dde6;
  --srpi-surface: #f7fbfc;
  --srpi-tint: #e7f8f9;
  --srpi-white: #fff;
  --srpi-danger: #a43d4a;
  --srpi-danger-bg: #fff5f6;
  --srpi-warning: #765218;
  --srpi-warning-bg: #fff9eb;
  --srpi-success: #166d62;
  --srpi-shadow: 0 26px 80px rgba(5, 47, 69, .22);
  --srpi-soft-shadow: 0 10px 30px rgba(8, 63, 91, .07);
  --srpi-font: "Source Sans Pro", "Helvetica Neue", Arial, sans-serif;
}

body.srpi-dialog-open {
  overflow: hidden;
}

.srpi-local-launch {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 99980;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 8px 7px 13px;
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 999px;
  background: rgba(5, 47, 69, .94);
  box-shadow: 0 12px 36px rgba(5, 47, 69, .24);
  color: #fff;
  font-family: var(--srpi-font);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  backdrop-filter: blur(12px);
}

.srpi-launch {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 20px;
  border: 0;
  border-radius: 8px;
  background: var(--srpi-cyan);
  box-shadow: 0 6px 18px rgba(8, 63, 91, .12);
  color: var(--srpi-navy);
  cursor: pointer;
  font-family: var(--srpi-font);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
  transition: background .18s ease, box-shadow .18s ease, transform .18s ease;
}

.srpi-launch:hover {
  background: #36c8ce;
  box-shadow: 0 10px 24px rgba(8, 63, 91, .18);
  transform: translateY(-1px);
}

.srpi-launch svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.srpi-launch--preview {
  min-height: 38px;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 13px;
  text-transform: none;
}

.srpi-dialog {
  width: min(1440px, calc(100vw - 36px));
  max-width: none;
  height: min(920px, calc(100dvh - 36px));
  max-height: none;
  margin: auto;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 20px;
  background: #fff;
  box-shadow: var(--srpi-shadow);
  color: var(--srpi-body);
  font-family: var(--srpi-font);
}

.srpi-dialog::backdrop {
  background: rgba(3, 28, 42, .72);
  backdrop-filter: blur(6px);
}

.srpi-dialog[open] {
  animation: srpi-rise .22s ease-out both;
}

@keyframes srpi-rise {
  from { opacity: 0; transform: translateY(10px) scale(.99); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.srpi-shell {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  height: 100%;
  min-height: 0;
  background: var(--srpi-white);
}

.srpi-topbar {
  display: flex;
  min-height: 86px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 15px 24px 15px 28px;
  border-bottom: 1px solid var(--srpi-edge);
  background: rgba(255, 255, 255, .98);
}

.srpi-brand {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 18px;
}

.srpi-brand img {
  display: block;
  width: auto;
  height: 52px;
  object-fit: contain;
}

.srpi-brand div {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.srpi-brand span {
  color: var(--srpi-teal);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .13em;
  line-height: 1.25;
  text-transform: uppercase;
}

.srpi-brand strong {
  overflow: hidden;
  color: var(--srpi-navy);
  font-size: clamp(21px, 2vw, 28px);
  font-weight: 600;
  letter-spacing: -.02em;
  line-height: 1.12;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.srpi-topbar-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 14px;
}

.srpi-test-pill {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  padding: 5px 11px;
  border: 1px solid #efd796;
  border-radius: 999px;
  background: var(--srpi-warning-bg);
  color: var(--srpi-warning);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.srpi-close {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  padding: 0;
  border: 1px solid var(--srpi-edge);
  border-radius: 50%;
  background: #fff;
  color: var(--srpi-navy);
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease, transform .18s ease;
}

.srpi-close:hover {
  border-color: #a9ceda;
  background: var(--srpi-surface);
  transform: rotate(2deg);
}

.srpi-close svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 1.8;
}

.srpi-safety {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  padding: 9px 24px;
  border-bottom: 1px solid #f0dda7;
  background: var(--srpi-warning-bg);
  color: #684815;
  font-size: 13px;
  line-height: 1.4;
}

.srpi-safety svg {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.srpi-safety strong {
  color: #56390d;
}

.srpi-workspace {
  display: grid;
  min-height: 0;
  grid-template-columns: 302px minmax(0, 1fr);
}

.srpi-rail {
  display: flex;
  min-height: 0;
  flex-direction: column;
  padding: 28px 24px 24px;
  overflow: auto;
  border-right: 1px solid var(--srpi-edge);
  background:
    radial-gradient(circle at 18% 6%, rgba(39, 185, 192, .11), transparent 30%),
    linear-gradient(180deg, #f8fcfd 0%, #f3f9fb 100%);
}

.srpi-progress-copy {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  color: var(--srpi-muted);
  font-size: 13px;
}

.srpi-progress-copy span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.srpi-progress-copy strong {
  color: var(--srpi-navy);
  font-size: 13px;
}

.srpi-progress-track {
  height: 5px;
  margin: 10px 0 24px;
  overflow: hidden;
  border-radius: 999px;
  background: #d9eaf0;
}

.srpi-progress-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--srpi-teal), var(--srpi-cyan));
  transition: width .28s ease;
}

.srpi-step-list {
  display: grid;
  gap: 3px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.srpi-step-list button {
  display: grid;
  width: 100%;
  grid-template-columns: 29px minmax(0, 1fr);
  align-items: center;
  gap: 11px;
  padding: 9px 10px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--srpi-muted);
  cursor: pointer;
  font: inherit;
  text-align: left;
  transition: color .18s ease, background .18s ease;
}

.srpi-step-list button:hover:not(:disabled) {
  background: rgba(255, 255, 255, .78);
  color: var(--srpi-navy);
}

.srpi-step-list button:disabled {
  cursor: default;
  opacity: .72;
}

.srpi-step-number {
  display: grid;
  width: 29px;
  height: 29px;
  place-items: center;
  border: 1px solid var(--srpi-edge-strong);
  border-radius: 50%;
  background: rgba(255, 255, 255, .8);
  color: var(--srpi-muted);
  font-size: 11px;
  font-weight: 800;
}

.srpi-step-list button[aria-current="step"] {
  background: #fff;
  box-shadow: 0 6px 20px rgba(8, 63, 91, .06);
  color: var(--srpi-navy);
  font-weight: 700;
}

.srpi-step-list button[aria-current="step"] .srpi-step-number {
  border-color: var(--srpi-teal);
  background: var(--srpi-teal);
  color: #fff;
}

.srpi-step-list button[data-complete="true"] .srpi-step-number {
  border-color: #8dcbc7;
  background: var(--srpi-tint);
  color: var(--srpi-success);
}

.srpi-step-title {
  display: block;
  overflow: hidden;
  font-size: 14px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.srpi-privacy-card {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 11px;
  margin-top: auto;
  padding: 15px;
  border: 1px solid var(--srpi-edge);
  border-radius: 13px;
  background: rgba(255, 255, 255, .82);
  box-shadow: 0 5px 18px rgba(8, 63, 91, .035);
}

.srpi-privacy-card svg {
  width: 25px;
  height: 25px;
  fill: none;
  stroke: var(--srpi-teal);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.srpi-privacy-card div {
  display: grid;
  gap: 2px;
}

.srpi-privacy-card strong {
  color: var(--srpi-navy);
  font-size: 13px;
}

.srpi-privacy-card span {
  color: var(--srpi-muted);
  font-size: 12px;
  line-height: 1.35;
}

.srpi-main {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: auto;
  background: #fff;
  scroll-behavior: smooth;
}

.srpi-loading {
  display: grid;
  min-height: 460px;
  place-items: center;
  align-content: center;
  gap: 14px;
  color: var(--srpi-muted);
}

.srpi-loading[hidden],
.srpi-form[hidden],
.srpi-repeater[hidden],
.srpi-field--other[hidden],
.srpi-repeat-other[hidden] {
  display: none !important;
}

.srpi-spinner {
  width: 34px;
  height: 34px;
  border: 3px solid var(--srpi-edge);
  border-top-color: var(--srpi-teal);
  border-radius: 50%;
  animation: srpi-spin .8s linear infinite;
}

@keyframes srpi-spin { to { transform: rotate(360deg); } }

.srpi-live {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.srpi-form {
  width: min(920px, calc(100% - 64px));
  margin: 0 auto;
  padding: 42px 0 34px;
}

.srpi-step[hidden],
.srpi-conditional[hidden] {
  display: none !important;
}

.srpi-step-head {
  margin-bottom: 30px;
}

.srpi-step-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  color: var(--srpi-teal);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.srpi-step-head h2 {
  margin: 0 0 10px;
  color: var(--srpi-navy);
  font-family: var(--srpi-font);
  font-size: clamp(30px, 3.3vw, 43px);
  font-weight: 600;
  letter-spacing: -.035em;
  line-height: 1.08;
}

.srpi-step-head p {
  max-width: 720px;
  margin: 0;
  color: var(--srpi-body);
  font-size: 17px;
  line-height: 1.6;
}

.srpi-section {
  margin: 0 0 22px;
  padding: 24px;
  border: 1px solid var(--srpi-edge);
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--srpi-soft-shadow);
}

.srpi-section--soft {
  box-shadow: none;
  background: var(--srpi-surface);
}

.srpi-section--story {
  padding: 28px;
  border-color: #bfe0e8;
  background:
    radial-gradient(circle at 96% 3%, rgba(39, 185, 192, .13), transparent 32%),
    linear-gradient(145deg, #f9fdfe 0%, #f3fafb 100%);
}

.srpi-section-head {
  margin-bottom: 18px;
}

.srpi-section-head h3 {
  margin: 0 0 5px;
  color: var(--srpi-navy);
  font-family: var(--srpi-font);
  font-size: 21px;
  font-weight: 650;
  line-height: 1.25;
}

.srpi-section-head p,
.srpi-section-note {
  margin: 0;
  color: var(--srpi-muted);
  font-size: 14px;
  line-height: 1.5;
}

.srpi-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 18px;
}

.srpi-demographics-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 22px;
}

/* Nested section cards are full rows, not single tracks of the field grid. */
.srpi-grid > .srpi-section {
  grid-column: 1 / -1;
  min-width: 0;
}

.srpi-field {
  grid-column: span 6;
  min-width: 0;
}

.srpi-field[data-width="third"] { grid-column: span 4; }
.srpi-field[data-width="two-thirds"] { grid-column: span 8; }
.srpi-field[data-width="full"] { grid-column: 1 / -1; }

.srpi-field > label,
.srpi-field-label,
.srpi-field legend {
  display: block;
  margin: 0 0 7px;
  padding: 0;
  color: var(--srpi-navy);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
}

.srpi-required {
  color: var(--srpi-danger);
}

.srpi-help {
  display: block;
  margin-top: 6px;
  color: var(--srpi-muted);
  font-size: 12px;
  line-height: 1.4;
}

.srpi-field input[type="text"],
.srpi-field input[type="email"],
.srpi-field input[type="tel"],
.srpi-field input[type="date"],
.srpi-field input[type="number"],
.srpi-field select,
.srpi-field textarea {
  width: 100%;
  min-height: 48px;
  margin: 0;
  padding: 11px 13px;
  border: 1px solid #b9d2dc;
  border-radius: 9px;
  outline: 0;
  background: #fff;
  box-shadow: 0 1px 0 rgba(8, 63, 91, .02);
  color: #173f50;
  font-family: var(--srpi-font);
  font-size: 16px;
  line-height: 1.45;
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

.srpi-field textarea {
  min-height: 112px;
  resize: vertical;
}

.srpi-field textarea[data-story] {
  min-height: 250px;
  padding: 16px;
  font-size: 17px;
  line-height: 1.65;
}

.srpi-field input:hover,
.srpi-field select:hover,
.srpi-field textarea:hover {
  border-color: #89bac9;
}

.srpi-field input:focus,
.srpi-field select:focus,
.srpi-field textarea:focus,
.srpi-option input:focus-visible + span,
.srpi-step-list button:focus-visible,
.srpi-launch:focus-visible,
.srpi-close:focus-visible,
.srpi-button:focus-visible {
  outline: 3px solid rgba(39, 185, 192, .24);
  outline-offset: 2px;
}

.srpi-field input:focus,
.srpi-field select:focus,
.srpi-field textarea:focus {
  border-color: var(--srpi-teal);
  box-shadow: 0 0 0 3px rgba(39, 185, 192, .12);
}

.srpi-field [aria-invalid="true"] {
  border-color: var(--srpi-danger) !important;
  background: var(--srpi-danger-bg) !important;
}

.srpi-error {
  display: block;
  min-height: 0;
  margin-top: 6px;
  color: var(--srpi-danger);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}

.srpi-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.srpi-options[data-columns="1"] { grid-template-columns: 1fr; }
.srpi-options[data-columns="3"] { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.srpi-health-adjust { border-bottom: 1px solid #d9e7ec; padding-bottom: 12px; }
.srpi-health-adjust > summary { cursor: pointer; color: var(--srpi-teal); font-size: 14px; font-weight: 700; }
.srpi-health-adjust > summary span { color: var(--srpi-muted); font-weight: 400; }
.srpi-health-adjust > summary:focus-visible { outline: 3px solid rgba(39,185,192,.3); outline-offset: 4px; }
.srpi-health-adjust > p { margin: 12px 0; color: var(--srpi-muted); font-size: 13px; }
.srpi-compact-options { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,230px),1fr)); gap: 0 20px; }
.srpi-compact-option { display: flex; align-items: center; gap: 9px; min-height: 44px; font-size: 14px; cursor: pointer; }
.srpi-compact-option input { width: 18px; height: 18px; margin: 0; flex: 0 0 auto; accent-color: var(--srpi-teal); }
.srpi-visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.srpi-option {
  position: relative;
  min-width: 0;
  cursor: pointer;
}

.srpi-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}

.srpi-option > span {
  display: flex;
  min-height: 45px;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border: 1px solid #c9dee6;
  border-radius: 9px;
  background: #fff;
  color: #315563;
  font-size: 14px;
  line-height: 1.35;
  transition: border-color .16s ease, background .16s ease, color .16s ease, box-shadow .16s ease;
}

.srpi-option > span::before {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  border: 1.5px solid #97b7c4;
  border-radius: 5px;
  background: #fff;
  content: "";
}

.srpi-option input[type="radio"] + span::before {
  border-radius: 50%;
}

.srpi-option:hover > span {
  border-color: #8abac9;
  background: #fbfeff;
}

.srpi-option input:checked + span {
  border-color: var(--srpi-teal);
  background: var(--srpi-tint);
  box-shadow: inset 0 0 0 1px rgba(8, 124, 138, .12);
  color: var(--srpi-navy);
  font-weight: 650;
}

.srpi-option input:checked + span::before {
  border-color: var(--srpi-teal);
  background-color: var(--srpi-teal);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='2.2' d='m5 10 3 3 7-7'/%3E%3C/svg%3E");
  background-position: center;
  background-repeat: no-repeat;
  background-size: 15px;
}

.srpi-option input[type="radio"]:checked + span::before {
  background-image: radial-gradient(circle, #fff 0 3px, transparent 3.5px);
}

.srpi-option--standalone {
  display: block;
}

.srpi-option--standalone > span {
  min-height: 48px;
}

.srpi-field--other {
  margin-top: 10px;
}

.srpi-help--before {
  margin: -1px 0 9px;
}

.srpi-composite {
  grid-column: 1 / -1;
  padding: 15px;
  border: 1px solid var(--srpi-edge);
  border-radius: 11px;
  background: var(--srpi-surface);
}

.srpi-step-fields > .srpi-field,
.srpi-step-fields > .srpi-composite {
  margin-bottom: 20px;
}

.srpi-step-fields > .srpi-callout + .srpi-callout {
  margin-top: -12px;
}

.srpi-substance-row { padding: 18px 0; border-top: 1px solid var(--srpi-edge); }
.srpi-substance-section .srpi-section-head + .srpi-substance-row { border-top: 0; padding-top: 0; }
.srpi-substance-row:last-child { padding-bottom: 0; }
.srpi-substance-status > .srpi-field { display: grid; grid-template-columns: minmax(160px,1fr) minmax(240px,1fr); gap: 0 24px; align-items: center; }
.srpi-substance-status label { margin: 0; font-size: 16px; }
.srpi-substance-status .srpi-error { grid-column: 1 / -1; }
.srpi-substance-row > .srpi-field:not([hidden]) { margin-top: 16px; }
.srpi-substance-row [hidden] { display: none !important; }
.srpi-care-history { margin: 0 0 16px; color: var(--srpi-body); }
.srpi-care-history > summary { cursor: pointer; color: var(--srpi-teal); font-size: 13px; font-weight: 700; }
.srpi-care-history > summary span { color: var(--srpi-muted); font-weight: 400; }
.srpi-care-history > summary:focus-visible { outline: 3px solid rgba(39,185,192,.3); outline-offset: 4px; }
.srpi-care-history > p { margin: 12px 0; font-size: 13px; color: var(--srpi-muted); }
.srpi-care-history > .srpi-grid { margin-top: 14px; }

@media (max-width: 760px) {
  .srpi-substance-status > .srpi-field { grid-template-columns: minmax(0,1fr); gap: 7px; }
}

.srpi-symptom-family {
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--srpi-edge);
}

.srpi-symptom-family:first-child {
  padding-top: 0;
  border-top: 0;
}

.srpi-symptom-family {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-top: 1px solid var(--srpi-edge);
}

.srpi-screening-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 78px;
  padding: 14px 0;
}

.srpi-screening-row > div:first-child { min-width: 0; }
.srpi-screening-row h4 { margin: 0 0 3px; line-height: 1.35; }
.srpi-screening-row small { color: var(--srpi-muted); font-size: 12px; }
.srpi-screening-choices { display: flex; flex: 0 0 auto; gap: 6px; }
.srpi-screening-choices .srpi-option > span { min-width: 65px; min-height: 44px; justify-content: center; padding: 9px 12px; font-weight: 700; }
.srpi-screening-choices .srpi-option > span::before { display: none; }
.srpi-symptom-body[hidden] { display: none !important; }

@media (max-width: 760px) {
  .srpi-screening-row { gap: 10px; }
  .srpi-screening-row h4 { font-size: 15px; }
  .srpi-screening-choices .srpi-option > span { min-width: 48px; padding: 9px 8px; }
}

.srpi-symptom-family h4 {
  margin: 0 0 10px;
  color: var(--srpi-navy);
  font-size: 16px;
  font-weight: 700;
}

.srpi-symptom-family > summary {
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 4px;
  color: var(--srpi-navy);
  cursor: pointer;
  font-size: 16px;
  font-weight: 750;
  list-style: none;
}

.srpi-symptom-family > summary::-webkit-details-marker { display: none; }

.srpi-symptom-family > summary::after {
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  border-right: 2px solid var(--srpi-teal);
  border-bottom: 2px solid var(--srpi-teal);
  content: "";
  transform: rotate(45deg);
  transition: transform .18s ease;
}

.srpi-symptom-family[open] > summary::after {
  transform: rotate(225deg) translate(-2px, -2px);
}

.srpi-symptom-family > summary span {
  flex: 1 1 auto;
}

.srpi-symptom-family > summary small {
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--srpi-surface);
  color: var(--srpi-muted);
  font-size: 11px;
  font-weight: 700;
}

.srpi-symptom-body {
  padding: 4px 4px 20px;
}

.srpi-symptom-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.srpi-symptom-item {
  display: grid;
  min-width: 0;
  align-content: start;
  gap: 5px;
}

.srpi-symptom-item select {
  width: 100%;
  min-height: 38px;
  padding: 7px 10px;
  border: 1px solid #b9d2dc;
  border-radius: 8px;
  background: #fff;
  color: #315563;
  font: 13px/1.3 var(--srpi-font);
}

.srpi-selected-followup label {
  color: var(--srpi-navy);
  font-size: 13px;
  font-weight: 700;
}

.srpi-selected-followup textarea {
  min-height: 88px;
  padding: 10px 12px;
  border: 1px solid #b9d2dc;
  border-radius: 9px;
  color: #173f50;
  font: 15px/1.45 var(--srpi-font);
  resize: vertical;
}

.srpi-symptom-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.srpi-symptom-summary span {
  color: var(--srpi-muted);
  font-size: 13px;
}

.srpi-none-button {
  border: 0;
  background: none;
  color: var(--srpi-link);
  cursor: pointer;
  font: 700 12px/1.2 var(--srpi-font);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.srpi-selected-followup {
  display: grid;
  gap: 12px;
  margin-top: 14px;
  padding: 16px;
  border: 1px solid #c8e3e5;
  border-radius: 11px;
  background: #f2fbfb;
}

.srpi-callout {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 12px;
  margin: 0 0 22px;
  padding: 17px 18px;
  border: 1px solid #bedee8;
  border-radius: 12px;
  background: #f1f9fc;
  color: #315563;
  font-size: 14px;
  line-height: 1.5;
}

.srpi-callout--urgent {
  border-color: #efc6cc;
  background: var(--srpi-danger-bg);
  color: #77313b;
}

.srpi-callout svg {
  width: 27px;
  height: 27px;
  fill: none;
  stroke: var(--srpi-teal);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.6;
}

.srpi-callout--urgent svg { stroke: var(--srpi-danger); }
.srpi-callout strong { color: var(--srpi-navy); }

.srpi-repeater {
  display: grid;
  gap: 12px;
}

.srpi-repeat-row {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  align-items: start;
  padding: 14px 58px 14px 14px;
  border: 1px solid var(--srpi-edge);
  border-radius: 11px;
  background: var(--srpi-surface);
}

.srpi-repeat-row .srpi-field { grid-column: auto; }
.srpi-repeat-row [data-repeat-width="full"] { grid-column: 1 / -1; }

.srpi-repeat-row > .srpi-icon-button {
  position: absolute;
  top: 14px;
  right: 12px;
}

.srpi-repeat-other {
  margin-top: 10px;
}

.srpi-repeat-other > label {
  display: block;
  margin-bottom: 6px;
  color: var(--srpi-navy);
  font-size: 13px;
  font-weight: 700;
}

.srpi-repeat-choice-options {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.srpi-icon-button {
  display: grid;
  width: 38px;
  height: 38px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--srpi-edge-strong);
  border-radius: 8px;
  background: #fff;
  color: var(--srpi-muted);
  cursor: pointer;
}

.srpi-icon-button:hover { border-color: #d79ca5; color: var(--srpi-danger); }

.srpi-icon-button svg,
.srpi-add-button svg {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.srpi-add-button {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  justify-self: start;
  padding: 8px 13px;
  border: 1px solid var(--srpi-edge-strong);
  border-radius: 8px;
  background: #fff;
  color: var(--srpi-link);
  cursor: pointer;
  font: 700 13px/1.2 var(--srpi-font);
}

.srpi-matrix {
  display: grid;
  grid-column: 1 / -1;
  gap: 8px;
}

.srpi-matrix-row {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(150px, .8fr) minmax(130px, .65fr);
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  border: 1px solid var(--srpi-edge);
  border-radius: 9px;
  background: #fff;
}

.srpi-matrix-row strong {
  color: var(--srpi-navy);
  font-size: 13px;
}

.srpi-matrix-row select,
.srpi-matrix-row input {
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid #b9d2dc;
  border-radius: 8px;
  background: #fff;
  color: #315563;
  font: 14px/1.3 var(--srpi-font);
}

.srpi-scale {
  display: grid;
  grid-template-columns: auto minmax(140px, 1fr) 40px auto;
  align-items: center;
  gap: 12px;
  padding: 13px 15px;
  border: 1px solid var(--srpi-edge);
  border-radius: 10px;
  background: var(--srpi-surface);
  color: var(--srpi-muted);
  font-size: 12px;
}

.srpi-scale input { width: 100%; accent-color: var(--srpi-teal); }

.srpi-scale strong {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 50%;
  background: var(--srpi-teal);
  color: #fff;
  font-size: 14px;
}

.srpi-signature {
  display: grid;
  gap: 12px;
}

.srpi-signature-pad {
  position: relative;
  min-height: 178px;
  overflow: hidden;
  border: 1px solid #aac9d5;
  border-radius: 12px;
  background:
    linear-gradient(to bottom, transparent calc(100% - 43px), #dce9ee calc(100% - 42px), transparent calc(100% - 41px)),
    #fff;
  touch-action: none;
}

.srpi-signature-pad canvas {
  display: block;
  width: 100%;
  height: 176px;
  cursor: crosshair;
}

.srpi-signature-hint {
  position: absolute;
  right: 15px;
  bottom: 12px;
  pointer-events: none;
  color: #8ba2ab;
  font-size: 12px;
}

.srpi-signature-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.srpi-link-button {
  padding: 0;
  border: 0;
  background: none;
  color: var(--srpi-link);
  cursor: pointer;
  font: 700 13px/1.3 var(--srpi-font);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.srpi-consent-copy {
  max-height: 220px;
  padding: 17px;
  overflow: auto;
  border: 1px solid var(--srpi-edge);
  border-radius: 10px;
  background: var(--srpi-surface);
  color: #405e6a;
  font-size: 13px;
  line-height: 1.58;
}

.srpi-consent-copy p:first-child { margin-top: 0; }
.srpi-consent-copy p:last-child { margin-bottom: 0; }

.srpi-consent-actions {
  margin-top: 14px;
}

.srpi-optional-label {
  display: inline-flex;
  margin-left: 6px;
  padding: 3px 7px;
  border-radius: 999px;
  background: var(--srpi-tint);
  color: var(--srpi-teal);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  vertical-align: middle;
}

.srpi-review {
  display: grid;
  gap: 14px;
}

.srpi-review-group {
  overflow: hidden;
  border: 1px solid var(--srpi-edge);
  border-radius: 13px;
  background: #fff;
}

.srpi-review-group header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--srpi-edge);
  background: var(--srpi-surface);
}

.srpi-review-group h3 {
  margin: 0;
  color: var(--srpi-navy);
  font-size: 17px;
}

.srpi-review-group dl {
  display: grid;
  grid-template-columns: minmax(150px, .7fr) minmax(0, 1.3fr);
  margin: 0;
}

.srpi-review-group dt,
.srpi-review-group dd {
  margin: 0;
  padding: 10px 16px;
  border-bottom: 1px solid #edf3f5;
  font-size: 13px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.srpi-review-group dt { color: var(--srpi-muted); font-weight: 650; }
.srpi-review-group dd { color: #274b5a; white-space: pre-wrap; }
.srpi-review-group dt:last-of-type,
.srpi-review-group dd:last-of-type { border-bottom: 0; }

.srpi-test-confirm {
  margin-top: 20px;
  padding: 17px;
  border: 1px solid #e4c875;
  border-radius: 12px;
  background: var(--srpi-warning-bg);
}

.srpi-navigation {
  position: sticky;
  z-index: 5;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 30px;
  padding: 19px 0 12px;
  border-top: 1px solid var(--srpi-edge);
  background: linear-gradient(180deg, rgba(255, 255, 255, .9), #fff 24%);
}

.srpi-navigation-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.srpi-button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 11px 18px;
  border: 1px solid transparent;
  border-radius: 9px;
  cursor: pointer;
  font: 700 15px/1.2 var(--srpi-font);
  transition: background .17s ease, border-color .17s ease, box-shadow .17s ease, transform .17s ease;
}

.srpi-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.srpi-button--primary {
  background: var(--srpi-cyan);
  box-shadow: 0 6px 18px rgba(8, 63, 91, .12);
  color: var(--srpi-navy);
}

.srpi-button--primary:hover:not(:disabled) {
  background: #36c8ce;
  box-shadow: 0 9px 22px rgba(8, 63, 91, .16);
  transform: translateY(-1px);
}

.srpi-button--secondary {
  border-color: var(--srpi-edge-strong);
  background: #fff;
  color: var(--srpi-navy);
}

.srpi-button--secondary:hover:not(:disabled) {
  border-color: #9bc4d1;
  background: var(--srpi-surface);
}

.srpi-button--quiet {
  padding-inline: 12px;
  border-color: transparent;
  background: transparent;
  color: var(--srpi-link);
}

.srpi-button:disabled {
  cursor: not-allowed;
  filter: grayscale(.25);
  opacity: .52;
}

.srpi-fieldset-reset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.srpi-divider {
  height: 1px;
  margin: 20px 0;
  border: 0;
  background: var(--srpi-edge);
}

.srpi-meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-top: 10px;
  color: var(--srpi-muted);
  font-size: 12px;
}

.srpi-success-panel {
  padding: 32px;
  border: 1px solid #b8ded9;
  border-radius: 16px;
  background: linear-gradient(145deg, #f3fbfa, #fbfefe);
  text-align: center;
}

.srpi-success-icon {
  display: grid;
  width: 62px;
  height: 62px;
  place-items: center;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: var(--srpi-teal);
  color: #fff;
}

.srpi-success-icon svg { width: 30px; height: 30px; fill: none; stroke: currentColor; stroke-width: 2; }
.srpi-success-panel h3 { margin: 0 0 8px; color: var(--srpi-navy); font-size: 26px; }
.srpi-success-panel p { max-width: 620px; margin: 0 auto 20px; color: var(--srpi-body); line-height: 1.55; }

@media (max-width: 1050px) {
  .srpi-dialog {
    width: calc(100vw - 20px);
    height: calc(100dvh - 20px);
    border-radius: 16px;
  }

  .srpi-workspace { grid-template-columns: 224px minmax(0, 1fr); }
  .srpi-rail { padding: 22px 15px 18px; }
  .srpi-form { width: min(820px, calc(100% - 40px)); padding-top: 32px; }
  .srpi-step-list button { grid-template-columns: 27px minmax(0, 1fr); gap: 8px; padding-inline: 7px; }
  .srpi-step-number { width: 27px; height: 27px; }
  .srpi-step-title { font-size: 12px; }
}

@media (max-width: 760px) {
  .srpi-local-launch > span { display: none; }
  .srpi-local-launch { right: 12px; bottom: 12px; padding: 6px; }

  .srpi-dialog {
    width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    border-radius: 0;
  }

  .srpi-topbar {
    min-height: 70px;
    padding: 10px 13px;
  }

  .srpi-brand { gap: 10px; }
  .srpi-brand img { width: 46px; height: 46px; object-fit: contain; object-position: left; }
  .srpi-brand span { font-size: 9px; }
  .srpi-brand strong { font-size: 18px; }
  .srpi-test-pill { display: none; }
  .srpi-close { width: 40px; height: 40px; }

  .srpi-safety {
    justify-content: flex-start;
    padding: 8px 13px;
    font-size: 11px;
  }

  .srpi-workspace {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
    overflow: hidden;
  }

  .srpi-rail {
    display: block;
    height: auto;
    padding: 9px 15px 10px;
    overflow: visible;
    border-right: 0;
    border-bottom: 1px solid var(--srpi-edge);
  }

  .srpi-progress-copy { font-size: 11px; }
  .srpi-progress-copy strong { font-size: 11px; }
  .srpi-progress-track { margin: 6px 0 0; }
  .srpi-step-list,
  .srpi-privacy-card { display: none; }

  .srpi-main { height: auto; min-height: 0; }
  .srpi-form { width: calc(100% - 28px); padding: 24px 0 26px; }
  .srpi-step-head { margin-bottom: 22px; }
  .srpi-step-head h2 { font-size: 31px; }
  .srpi-step-head p { font-size: 15px; }
  .srpi-section { padding: 18px 15px; border-radius: 13px; box-shadow: none; }
  .srpi-section--story { padding: 20px 16px; }
  .srpi-grid { gap: 15px; }
  .srpi-field,
  .srpi-field[data-width="third"],
  .srpi-field[data-width="two-thirds"] { grid-column: 1 / -1; }
  .srpi-options,
  .srpi-options[data-columns="3"] { grid-template-columns: 1fr; }
  .srpi-symptom-options { grid-template-columns: 1fr; }
  .srpi-repeat-row { grid-template-columns: 1fr; padding-right: 56px; }
  .srpi-repeat-row .srpi-field,
  .srpi-repeat-row [data-repeat-width="full"] { grid-column: 1 / -1; }
  .srpi-review-group dl { grid-template-columns: 1fr; }
  .srpi-review-group dt { padding-bottom: 2px; border-bottom: 0; }
  .srpi-review-group dd { padding-top: 2px; }
  .srpi-matrix-row { grid-template-columns: 1fr; }
  .srpi-scale { grid-template-columns: 1fr 42px; }
  .srpi-scale > span { display: none; }
  .srpi-navigation { bottom: 0; margin-top: 24px; padding-bottom: 10px; }
  .srpi-button { min-height: 44px; padding-inline: 14px; }
  .srpi-button--quiet { display: none; }
}

@media (max-width: 420px) {
  .srpi-brand img { width: 38px; height: 42px; }
  .srpi-brand strong { font-size: 16px; }
  .srpi-safety svg { display: none; }
  .srpi-main { height: auto; }
  .srpi-step-head h2 { font-size: 28px; }
  .srpi-repeat-row { grid-template-columns: 1fr; }
  .srpi-navigation { gap: 8px; }
  .srpi-button { font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .srpi-dialog[open],
  .srpi-spinner,
  .srpi-progress-track span,
  .srpi-launch,
  .srpi-button,
  .srpi-close { animation: none; scroll-behavior: auto; transition: none; }
}

@media print {
  .srpi-local-launch,
  .srpi-dialog { display: none !important; }
}
/* Local consent review: full-width, readable copy with compact disclosures. */
#srpi-dialog .srpi-document { margin: 14px 0 20px; border: 1px solid #c8dfe6; border-radius: 10px; background: #fff; }
#srpi-dialog .srpi-document > summary { padding: 16px 20px; color: #083f5b; font-weight: 650; cursor: pointer; }
#srpi-dialog .srpi-document > summary:focus-visible { outline: 3px solid #087c8a; outline-offset: 3px; }
#srpi-dialog .srpi-document .srpi-consent-copy { padding: 0 20px 16px; max-width: 85ch; }
#srpi-dialog .srpi-document h4 { margin: 20px 0 7px; font-size: 1.05em; color: #083f5b; }
#srpi-dialog .srpi-document p, #srpi-dialog .srpi-document li { line-height: 1.55; }
#srpi-dialog .srpi-legal-document > .srpi-field { width: 100%; min-width: 0; }
#srpi-dialog .srpi-legal-document .srpi-options { grid-template-columns: 1fr; }
#srpi-dialog .srpi-arbitration-notice { padding: 16px 18px; border-left: 3px solid #087c8a; background: #f2f8f9; }
#srpi-dialog .srpi-download-options { margin: 24px 0; max-width: 640px; }
#srpi-dialog .srpi-download-options > label { display: block; margin-bottom: 8px; font-weight: 700; color: #083f5b; }
#srpi-dialog .srpi-download-options select { width: 100%; }
