/* ============================================================
   FLOW v2 — patient-type toggle, new consent, streaming records
   ============================================================ */

/* Top-right patient-type pill in header */
.flow-toggle {
  display: inline-flex;
  align-items: center;
  background: var(--n-canvas);
  border: 1px solid var(--c-border);
  border-radius: var(--r-pill);
  padding: 3px;
  margin-right: 14px;
  position: relative;
}
.flow-toggle-label {
  font-size: var(--t-xs);
  font-weight: var(--w-bold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--c-muted);
  padding: 0 12px 0 12px;
}
.flow-toggle-btn {
  background: transparent;
  border: none;
  padding: 6px 14px;
  font-size: var(--t-xs);
  font-weight: var(--w-semi);
  font-family: inherit;
  color: var(--c-muted);
  cursor: pointer;
  border-radius: var(--r-pill);
  transition: all 0.18s ease;
}
.flow-toggle-btn.is-active {
  background: var(--c-primary);
  color: #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}
.flow-toggle-btn:hover:not(.is-active) {
  color: var(--c-text);
}

/* ============================================================
   WELCOME + CONSENT SCREEN — 3 styles
   ============================================================ */

/* Shared */
.wc-page { max-width: var(--w-card); margin: 0 auto; }
.wc-card {
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: var(--card-radius);
  box-shadow: var(--shadow-card);
  padding: 40px 44px;
}
.wc-cobrand {
  display:flex; align-items:center; justify-content: center; gap: 20px;
  margin: 0 0 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--c-border);
}
.wc-cobrand-pair { display:flex; align-items:center; gap: 10px; }
.wc-cobrand-pair img { height: 28px; width:auto; display:block; }
.wc-cobrand-pair .wc-clear-text {
  font-weight: var(--w-regular); letter-spacing: 0.18em; font-size: var(--t-xl);
  color: var(--n-ink); font-family: -apple-system, "Helvetica Neue", Helvetica, Arial, sans-serif;
  display: inline-flex; align-items: center; gap: 8px;
}
.wc-cobrand-pair .wc-clear-text img { height: 22px; }
.wc-cobrand-sep { width: 1px; height: 26px; background: var(--c-border); }

.wc-h1 {
  font-family: var(--font-sans);
  font-weight: var(--t-title-weight); font-size: var(--t-title-size); line-height: var(--t-title-lh);
  color: var(--c-text);
  margin: 40px 0 14px;
  letter-spacing: -0.01em;
  text-align: center;
}
.wc-lede {
  font-size: var(--t-body-size); line-height: 1.55; color: var(--t-sub-color);
  margin: 0 auto 28px;
  max-width: 60ch;
  text-align: center;
}

/* Steps preview */
.wc-steps {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 14px;
  margin: 24px 0 44px;
}
.wc-step-card {
  background: #EFF4FB;
  border: 1px solid #D6E0F0;
  border-radius: var(--r-lg);
  padding: 20px 18px;
  display: flex; flex-direction: column; gap: 14px;
  position: relative;
}
.wc-step-card .wc-step-head {
  display: flex; align-items: center; gap: 12px;
}
.wc-step-icon {
  width: 40px; height: 40px; border-radius: var(--r-md);
  background: #fff;
  border: 1px solid #D6E0F0;
  color: #2D5BA8;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.is-confident .wc-step-icon {
  background: rgba(198,227,113,0.15);
  border-color: rgba(198,227,113,0.3);
  color: #C6E371;
}
.wc-step-num {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--c-primary); color:#fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: var(--w-bold); font-size: var(--t-sm);
}
.wc-step-body-col { display: flex; flex-direction: column; gap: 8px; }
.wc-step-title { font-weight: var(--w-bold); font-size: var(--t-md); color: var(--c-text); line-height: 1.25; }
.wc-step-body { font-size: var(--t-sm); line-height: 1.5; color: var(--c-muted); }
.wc-step-tag {
  font-size: var(--t-xs); font-weight: var(--w-bold); letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--c-muted);
}
.wc-step-tag img { height: 12px; vertical-align: -2px; margin-right: 4px; }

/* Consent rows */
.wc-consents {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 12px 0 44px;
}
.wc-consent {
  display: grid; grid-template-columns: 28px 1fr;
  gap: 14px; align-items: flex-start;
  padding: 16px 18px;
  background: #F1F5EE;
  border: 1px solid #C8DBB8;
  border-radius: var(--r-md);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.wc-consent:hover { border-color: var(--c-primary); }
.wc-consent.is-on {
  background: #E4EFD8;
  border-color: var(--c-primary);
}
.wc-consent-check {
  width: 22px; height: 22px; border-radius: var(--r-sm);
  border: 2px solid var(--n-disabled); background: #fff;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; margin-top: 1px;
}
.wc-consent.is-on .wc-consent-check {
  background: var(--c-primary); border-color: var(--c-primary); color: #fff;
}
.wc-consent-title { font-weight: var(--w-semi); font-size: var(--t-sm); color: var(--c-text); margin-bottom: 4px; }
.wc-consent-body { font-size: var(--t-sm); line-height: 1.5; color: var(--c-muted); }
.wc-consent-body a { color: var(--c-primary); font-weight: var(--w-semi); text-decoration: underline; cursor: pointer; }
.wc-consents-stack { grid-template-columns: 1fr; gap: 12px; }
.wc-consents-stack .wc-consent-title strong { font-weight: var(--w-bold); }
.wc-consent-disclosure {
  font-size: var(--t-xs); line-height: 1.5; color: var(--c-muted);
  padding: 0 4px; margin-top: 2px;
}
.is-confident .wc-consent-disclosure { color: rgba(255,255,255,0.6); }

/* ---- b.well consent block (structured, single-checkbox) ---- */
.wc-bwell {
  margin: 12px 0 36px;
  border: 1px solid #C5D6B5;
  border-radius: var(--r-lg);
  background: #FAFBF7;
  overflow: hidden;
}
.wc-bwell-head {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 20px;
  background: #ECF1E4;
  border-bottom: 1px solid #C5D6B5;
}
.wc-bwell-mark {
  width: 36px; height: 36px; border-radius: var(--r-md);
  background: #fff; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 1px 2px rgba(45,74,31,0.08);
}
.wc-bwell-mark img { width: 24px; height: 24px; border-radius: var(--r-sm); }
.wc-bwell-eyebrow {
  font-size: var(--t-xs); font-weight: var(--w-bold); color: #4A6B3A;
  letter-spacing: 0;
  margin-bottom: 2px;
}
.wc-bwell-labels-caps .wc-bwell-eyebrow {
  font-size: var(--t-xs);
  text-transform: uppercase; letter-spacing: 0.08em;
}
.wc-bwell-title {
  font-family: var(--font-sans); font-weight: var(--w-bold); font-size: var(--t-md); color: #1F3614;
  letter-spacing: -0.01em;
  line-height: 1.25;
}
.wc-bwell-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0;
}
.wc-bwell-row {
  border-top: 1px solid #E4ECDA;
  border-right: 1px solid #E4ECDA;
  background: #fff;
  transition: background 0.15s;
}
.wc-bwell-row:nth-child(2n) { border-right: none; }
.wc-bwell-row:nth-child(-n+2) { border-top: none; }
.wc-bwell-row.is-open { background: #F5F8EF; }
.wc-bwell-row-head {
  width: 100%;
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  background: transparent; border: none;
  font-family: inherit; text-align: left;
  cursor: pointer;
}
.wc-bwell-row-head:hover { background: rgba(45,74,31,0.04); }
.wc-bwell-row-head-l { min-width: 0; }
.wc-bwell-label {
  font-size: var(--t-sm); font-weight: var(--w-bold); color: #1F3614;
  letter-spacing: -0.01em;
  margin-bottom: 4px;
}
.wc-bwell-labels-caps .wc-bwell-label {
  font-size: var(--t-xs); color: #4A6B3A;
  text-transform: uppercase; letter-spacing: 0.06em;
}
.wc-bwell-summary {
  font-size: var(--t-sm); line-height: 1.4; color: var(--c-text);
  font-weight: var(--w-semi);
}
.wc-bwell-labels-caps .wc-bwell-summary {
  font-size: var(--t-sm); font-weight: var(--w-semi);
}
.wc-bwell-chev {
  flex-shrink: 0;
  width: 24px; height: 24px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #4A6B3A;
  background: rgba(45,74,31,0.06);
  transition: background 0.15s;
}
.wc-bwell-row.is-open .wc-bwell-chev { background: rgba(45,74,31,0.12); }
.wc-bwell-row-body {
  padding: 0 18px 16px;
  border-top: 1px dashed #D5E1C9;
  padding-top: 12px;
  margin-top: 0;
}
.wc-bwell-row-body p {
  font-size: var(--t-sm); line-height: 1.55; color: var(--c-text);
  margin: 0 0 8px;
}
.wc-bwell-row-body p:last-child { margin-bottom: 0; }
.wc-bwell-row-body p a {
  color: var(--c-primary); font-weight: var(--w-semi); text-decoration: underline; cursor: pointer;
}
.wc-bwell-row-body p strong { font-weight: var(--w-bold); color: var(--c-text); }

.wc-bwell-privacy {
  padding: 14px 18px;
  background: #fff;
  border-top: 1px solid #E4ECDA;
}
.wc-bwell-privacy p {
  font-size: var(--t-sm); line-height: 1.55; color: var(--c-text);
  margin: 0;
}
.wc-bwell-privacy p a { color: var(--c-primary); font-weight: var(--w-semi); text-decoration: underline; cursor: pointer; }

.wc-bwell-agree {
  display: grid; grid-template-columns: 28px 1fr;
  gap: 12px; align-items: center;
  padding: 14px 20px;
  border-top: 1px solid #E4ECDA;
  cursor: pointer;
  background: #F5F8EF;
  transition: background 0.15s;
}
.wc-bwell-agree:hover { background: #EEF3E5; }
.wc-bwell-agree.is-on { background: #E4EFD8; }
.wc-bwell-agree.is-on .wc-consent-check { background: var(--c-primary); border-color: var(--c-primary); color: #fff; }
.wc-bwell-agree-text {
  font-family: var(--font-sans); font-weight: var(--w-semi); font-size: var(--t-sm); color: var(--c-text);
}
@media (max-width: 720px) {
  .wc-bwell-grid { grid-template-columns: 1fr; }
  .wc-bwell-row { border-right: none; }
  .wc-bwell-row:nth-child(2) { border-top: 1px solid #E4ECDA; }
}

/* Confident (dark) variant overrides */
.is-confident .wc-bwell {
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.14);
}
.is-confident .wc-bwell-head {
  background: rgba(198,227,113,0.08);
  border-bottom-color: rgba(255,255,255,0.1);
}
.is-confident .wc-bwell-mark { background: rgba(255,255,255,0.95); }
.is-confident .wc-bwell-eyebrow { color: #C6E371; }
.is-confident .wc-bwell-title { color: #fff; }
.is-confident .wc-bwell-row {
  background: rgba(255,255,255,0.02);
  border-top-color: rgba(255,255,255,0.08);
  border-right-color: rgba(255,255,255,0.08);
}
.is-confident .wc-bwell-row.is-open { background: rgba(198,227,113,0.06); }
.is-confident .wc-bwell-row-head:hover { background: rgba(255,255,255,0.04); }
.is-confident .wc-bwell-label { color: #C6E371; }
.is-confident .wc-bwell-summary { color: rgba(255,255,255,0.82); }
.is-confident .wc-bwell-chev { color: #C6E371; background: rgba(198,227,113,0.1); }
.is-confident .wc-bwell-row.is-open .wc-bwell-chev { background: rgba(198,227,113,0.2); }
.is-confident .wc-bwell-row-body { border-top-color: rgba(255,255,255,0.1); }
.is-confident .wc-bwell-row-body p { color: rgba(255,255,255,0.82); }
.is-confident .wc-bwell-row-body p strong { color: #fff; }
.is-confident .wc-bwell-row-body p a { color: #C6E371; }
.is-confident .wc-bwell-privacy { background: rgba(255,255,255,0.02); border-top-color: rgba(255,255,255,0.08); }
.is-confident .wc-bwell-privacy p { color: rgba(255,255,255,0.82); }
.is-confident .wc-bwell-privacy p a { color: #C6E371; }
.is-confident .wc-bwell-agree { background: rgba(255,255,255,0.04); border-top-color: rgba(255,255,255,0.08); }
.is-confident .wc-bwell-agree:hover { background: rgba(255,255,255,0.07); }
.is-confident .wc-bwell-agree.is-on { background: rgba(198,227,113,0.12); }
.is-confident .wc-bwell-agree.is-on .wc-consent-check { background: #C6E371; border-color: #C6E371; color: var(--n-ink); }
.is-confident .wc-bwell-agree-text { color: #fff; }

.wc-cta-row {
  display: flex; flex-direction: column; gap: 14px; align-items: center;
  margin-top: 20px;
}
.wc-cta-primary, .wc-cta-secondary {
  font-family: inherit; font-weight: var(--w-bold); font-size: var(--t-md);
  padding: 14px 28px;
  border-radius: var(--cta-radius);
  cursor: pointer; border: none;
}
.wc-cta-primary {
  background: var(--c-primary); color: #fff;
  padding: 16px 56px;
}
.wc-cta-primary.is-disabled {
  background: var(--n-disabled); color: #fff; cursor: not-allowed;
}
.wc-cta-secondary {
  background: transparent;
  color: var(--c-muted);
  font-weight: var(--w-semi);
  font-size: var(--t-sm);
  text-decoration: underline;
  padding: 6px 12px;
}
.wc-cta-back {
  background: transparent;
  color: var(--c-text);
  font-weight: var(--w-semi);
  font-size: var(--t-md);
  padding: 14px 28px;
  border: 1.5px solid var(--c-border);
  border-radius: var(--cta-radius);
  cursor: pointer;
  font-family: inherit;
}
.wc-cta-back:hover {
  border-color: var(--c-primary);
  color: var(--c-primary);
}
.wc-cta-secondary:hover { color: var(--c-text); }

.wc-time {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: var(--t-xs); color: var(--c-muted); font-weight: var(--w-semi);
  margin: 10px auto 14px;
  padding-bottom: 14px;
  justify-content: center;
  width: 100%;
  border-bottom: 1px solid var(--c-border);
}

/* Style B — confident/modern */
.wc-card.is-confident {
  background: var(--n-ink);
  color: #fff;
  padding: 56px 56px 48px;
  border-radius: var(--r-xl);
  border: none;
}
.is-confident .wc-h1 { color: #fff; font-size: var(--t-3xl); line-height: 1.05; }
.is-confident .wc-lede { color: rgba(255,255,255,0.7); font-size: var(--t-lg); }
.is-confident .wc-cobrand { color: rgba(255,255,255,0.5); }
.is-confident .wc-cobrand-pair img { filter: brightness(0) invert(1) opacity(0.8); }
.is-confident .wc-cobrand-pair .wc-clear-text { color: #fff; }
.is-confident .wc-cobrand-sep { background: rgba(255,255,255,0.18); }
.is-confident .wc-steps { gap: 18px; }
.is-confident .wc-step-card {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.12);
  color: #fff;
}
.is-confident .wc-step-num { background: #C6E371; color: var(--n-ink); }
.is-confident .wc-step-title { color: #fff; font-size: var(--t-md); }
.is-confident .wc-step-body { color: rgba(255,255,255,0.65); }
.is-confident .wc-step-tag { color: rgba(255,255,255,0.45); }
.is-confident .wc-consent {
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.14);
}
.is-confident .wc-consent.is-on { background: rgba(198,227,113,0.1); border-color: #C6E371; }
.is-confident .wc-consent-title { color: #fff; }
.is-confident .wc-consent-body { color: rgba(255,255,255,0.7); }
.is-confident .wc-consent-body a { color: #C6E371; }
.is-confident .wc-consent-check { background: transparent; border-color: rgba(255,255,255,0.35); }
.is-confident .wc-consent.is-on .wc-consent-check { background: #C6E371; border-color: #C6E371; color: var(--n-ink); }
.is-confident .wc-cta-primary { background: #C6E371; color: var(--n-ink); }
.is-confident .wc-cta-primary.is-disabled { background: rgba(255,255,255,0.18); color: rgba(255,255,255,0.5); }
.is-confident .wc-cta-secondary { color: rgba(255,255,255,0.75); }
.is-confident .wc-cta-secondary:hover { color: #fff; }
.is-confident .wc-time { color: rgba(255,255,255,0.5); }

/* Style C — storyboard illustrated */
.wc-storyboard {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin: 8px 0 28px;
  position: relative;
}
.wc-sb-frame {
  display: flex; flex-direction: column; gap: 12px;
  align-items: center; text-align: center;
}
.wc-sb-illust {
  width: 100%; aspect-ratio: 1/1;
  background: var(--n-sunken);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  display: flex; align-items: center; justify-content: center;
  color: var(--c-primary);
}
.wc-sb-title { font-weight: var(--w-bold); font-size: var(--t-sm); color: var(--c-text); }
.wc-sb-body { font-size: var(--t-xs); line-height: 1.45; color: var(--c-muted); }
.wc-sb-num {
  position: absolute; top: 4px; right: -6px;
  width: 24px; height: 24px; border-radius: 50%;
  background: #fff; color: var(--c-primary);
  border: 2px solid var(--c-primary);
  display: flex; align-items: center; justify-content: center;
  font-weight: var(--w-bold); font-size: var(--t-xs);
}

/* ============================================================
   STREAMING RECORDS + PARALLEL INTAKE
   ============================================================ */

.sr-wrap { max-width: var(--w-stage); margin: 0 auto; }

/* Status banner across top */
.sr-banner {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 18px;
  background: #FCFBF6;
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  margin-bottom: 18px;
}
.sr-banner-pulse {
  width: 36px; height: 36px; border-radius: 50%;
  background: radial-gradient(circle, rgba(45,90,255,0.18) 0%, transparent 70%);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  position: relative;
}
.sr-banner-pulse::before {
  content: ""; width: 14px; height: 14px; border-radius: 50%;
  background: #2D5BFF;
  animation: sr-pulse 1.8s ease-in-out infinite;
}
@keyframes sr-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.3); opacity: 0.6; }
}
.sr-banner-body { flex: 1; }
.sr-banner-title { font-weight: var(--w-bold); font-size: var(--t-sm); color: var(--c-text); }
.sr-banner-sub { font-size: var(--t-xs); color: var(--c-muted); margin-top: 2px; }
.sr-banner-actions { display: flex; gap: 8px; }
.sr-banner-btn {
  background: #fff; border: 1px solid var(--c-border);
  border-radius: var(--r-sm); padding: 7px 12px;
  font-size: var(--t-xs); font-weight: var(--w-semi); color: var(--c-text);
  cursor: pointer; font-family: inherit;
}
.sr-banner-btn:hover { border-color: var(--c-primary); color: var(--c-primary); }
.sr-banner-btn.is-primary { background: var(--c-primary); color: #fff; border-color: var(--c-primary); }

/* Layout A — split pane */
.sr-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: 18px;
  align-items: start;
}
.sr-pane {
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
.sr-pane-head {
  padding: 18px 22px;
  border-bottom: 1px solid var(--c-border);
  display: flex; align-items: center; justify-content: space-between;
}
.sr-pane-h { font-weight: var(--w-bold); font-size: var(--t-md); color: var(--c-text); }
.sr-pane-sub { font-size: var(--t-xs); color: var(--c-muted); margin-top: 2px; }
.sr-pane-body { padding: 18px 22px; }

/* Layout B — stacked: intake top, records strip bottom */
.sr-stacked { display: flex; flex-direction: column; gap: 18px; }
.sr-strip {
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: 14px 18px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: center;
  position: sticky;
  bottom: 14px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}
.sr-strip-tracks {
  display: flex; gap: 10px;
  overflow-x: auto;
}
.sr-strip-track {
  flex-shrink: 0;
  display: flex; flex-direction: column; gap: 4px;
  padding: 8px 12px; border-radius: var(--r-md);
  background: var(--n-sunken); border: 1px solid var(--c-border);
  min-width: 130px;
}
.sr-strip-track.is-done { background: #F1F5EE; border-color: #B5C9A4; }
.sr-strip-track.is-loading { background: #EAF1FB; border-color: #C8D8EE; }
.sr-strip-track-name { font-size: var(--t-xs); font-weight: var(--w-bold); color: var(--c-text); display:flex; align-items:center; gap: 4px; }
.sr-strip-track-meta { font-size: var(--t-xs); color: var(--c-muted); }

/* Layout C — tabs */
.sr-tabs-row {
  display: flex; gap: 6px;
  border-bottom: 1px solid var(--c-border);
  margin-bottom: 18px;
}
.sr-tab {
  background: transparent;
  border: none; padding: 12px 18px;
  font-size: var(--t-sm); font-weight: var(--w-semi); color: var(--c-muted);
  cursor: pointer; font-family: inherit;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  display: inline-flex; align-items: center; gap: 8px;
}
.sr-tab.is-active { color: var(--c-text); border-bottom-color: var(--c-primary); }
.sr-tab-count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 20px; height: 18px; padding: 0 6px;
  border-radius: var(--r-pill); background: var(--c-primary); color: #fff;
  font-size: var(--t-xs); font-weight: var(--w-bold);
}
.sr-tab.is-pending .sr-tab-count { background: #2D5BFF; }
.sr-tab:not(.is-active) .sr-tab-count { background: var(--n-disabled); }
.sr-tab-pulse {
  width: 8px; height: 8px; border-radius: 50%;
  background: #2D5BFF; animation: sr-pulse 1.6s ease-in-out infinite;
}

/* Record cards in streaming view */
.sr-record-list { display: flex; flex-direction: column; gap: 10px; }
.sr-record {
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  padding: 14px 16px;
  background: #fff;
}
.sr-record.is-loading {
  background: var(--n-sunken);
  opacity: 0.7;
}
.sr-record.just-arrived {
  border-color: #2D5BFF;
  background: #F5F8FF;
}
.sr-record.is-done {
  background: #F1F5EE;
  border-color: #B5C9A4;
}
.sr-record-h {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px;
}
.sr-record-label {
  display: flex; align-items: center; gap: 8px;
  font-weight: var(--w-bold); font-size: var(--t-sm); color: var(--c-text);
}
.sr-record-state {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: var(--t-xs); font-weight: var(--w-semi);
}
.sr-record-state.is-loading { color: #2D5BFF; }
.sr-record-state.is-arrived { color: #2D5BFF; }
.sr-record-state.is-done { color: #2D7A3C; }
.sr-record-state-spin {
  width: 12px; height: 12px; border-radius: 50%;
  border: 2px solid #C8D8EE;
  border-top-color: #2D5BFF;
  animation: spin 0.8s linear infinite;
}
.sr-record-body {
  font-size: var(--t-sm); color: var(--c-muted); line-height: 1.45;
  margin-top: 8px;
}
.sr-record-items {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-top: 10px;
}
.sr-record-chip {
  font-size: var(--t-xs); padding: 4px 10px;
  background: #fff; border: 1px solid var(--c-border);
  border-radius: var(--r-pill); color: var(--c-text);
}
.sr-record.is-done .sr-record-chip { background: #fff; border-color: #B5C9A4; }
.sr-record-actions {
  display: flex; gap: 8px; margin-top: 10px;
}
.sr-record-btn {
  background: #fff; border: 1px solid var(--c-border);
  border-radius: var(--r-sm); padding: 6px 12px;
  font-size: var(--t-xs); font-weight: var(--w-semi); color: var(--c-text);
  cursor: pointer; font-family: inherit;
}
.sr-record-btn-primary {
  background: var(--c-primary); color: #fff; border-color: var(--c-primary);
}
.sr-record-skel {
  height: 8px;
  background: #EFEDE6;
  border-radius: var(--r-sm);
  margin-top: 6px;
}
.sr-record-skel:nth-child(2) { width: 80%; }
.sr-record-skel:nth-child(3) { width: 60%; }

/* Intake side */
.sr-intake-q {
  font-weight: var(--w-bold); font-size: var(--t-md); color: var(--c-text);
  margin-bottom: 12px;
}
.sr-intake-progress {
  font-size: var(--t-xs); color: var(--c-muted); margin-bottom: 8px;
  display: flex; align-items: center; gap: 8px;
}
.sr-intake-bar {
  flex: 1; height: 4px; background: var(--c-border); border-radius: var(--r-pill); overflow: hidden;
}
.sr-intake-bar-fill {
  height: 100%; background: var(--c-primary); transition: width 0.3s ease;
}
.sr-intake-actions { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; }

/* Escalating prompt modal */
.sr-prompt-modal {
  position: fixed; inset: 0;
  background: rgba(20,25,15,0.55);
  display: flex; align-items: center; justify-content: center;
  z-index: 500; padding: 24px;
  animation: sr-fade 0.2s ease-out;
}
@keyframes sr-fade { from { opacity: 0; } to { opacity: 1; } }
.sr-prompt {
  background: #fff; border-radius: var(--r-lg);
  max-width: 480px; width: 100%;
  padding: 28px; text-align: center;
  box-shadow: 0 24px 64px rgba(0,0,0,0.28);
}
.sr-prompt-icon {
  width: 56px; height: 56px; border-radius: 50%;
  background: #EAF1FB;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 14px;
  color: #2D5BFF;
}
.sr-prompt-h { font-weight: var(--w-bold); font-size: var(--t-lg); margin: 0 0 10px; color: var(--c-text); }
.sr-prompt-body { font-size: var(--t-sm); color: var(--c-muted); line-height: 1.5; margin: 0 0 22px; }
.sr-prompt-actions { display: flex; flex-direction: column; gap: 8px; }
.sr-prompt-btn {
  font-family: inherit; font-size: var(--t-sm); font-weight: var(--w-semi);
  padding: 12px 18px; border-radius: var(--cta-radius);
  cursor: pointer; border: 1px solid var(--c-border); background: #fff; color: var(--c-text);
}
.sr-prompt-btn.is-primary {
  background: var(--c-primary); color: #fff; border-color: var(--c-primary);
}
.sr-prompt-btn:hover:not(.is-primary) { border-color: var(--c-primary); color: var(--c-primary); }

/* ============================================================
   RETURNING PATIENT FLOW
   ============================================================ */

.rp-card {
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: var(--card-radius);
  box-shadow: var(--shadow-card);
  padding: 40px 44px;
  max-width: 640px; margin: 0 auto;
}
.rp-eyebrow {
  font-size: var(--t-xs); font-weight: var(--w-bold); letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--c-muted);
  margin-bottom: 14px;
}
.rp-h1 {
  font-family: var(--font-sans);
  font-weight: var(--w-bold); font-size: var(--t-2xl);
  margin: 0 0 10px; line-height: 1.2;
  color: var(--c-text);
}
.rp-sub { font-size: var(--t-md); line-height: 1.5; color: var(--c-muted); margin: 0 0 22px; }
.rp-list {
  display: flex; flex-direction: column; gap: 10px;
  margin: 18px 0 28px;
  padding: 16px 18px;
  background: var(--n-sunken);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
}
.rp-list-row { display: flex; align-items: center; gap: 10px; font-size: var(--t-sm); color: var(--c-text); }
.rp-list-row-ic { color: var(--c-primary); }
.rp-list-row.is-skipped { color: var(--c-muted); }
.rp-list-row.is-skipped .rp-list-row-strike { text-decoration: line-through; }

.rp-scan {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 50px 0 30px;
}
.rp-scan-orb {
  width: 140px; height: 140px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(45,90,255,0.18) 0%, transparent 70%);
  display: flex; align-items: center; justify-content: center;
  position: relative;
  margin-bottom: 28px;
}
.rp-scan-orb::before, .rp-scan-orb::after {
  content: ""; position: absolute;
  border-radius: 50%; border: 1.5px solid #2D5BFF;
  width: 100%; height: 100%;
  animation: rp-ripple 2s ease-out infinite;
  opacity: 0;
}
.rp-scan-orb::after { animation-delay: 1s; }
@keyframes rp-ripple {
  0% { transform: scale(0.5); opacity: 0.8; }
  100% { transform: scale(1.4); opacity: 0; }
}
.rp-scan-core {
  width: 60px; height: 60px; border-radius: 50%;
  background: #2D5BFF;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  position: relative; z-index: 2;
}
.rp-scan-status {
  font-size: var(--t-md); color: var(--c-text); font-weight: var(--w-semi);
  margin-bottom: 8px; text-align: center;
}
.rp-scan-source { font-size: var(--t-xs); color: var(--c-muted); font-family: ui-monospace, monospace; }
.rp-scan-tally {
  display: flex; gap: 18px; align-items: center;
  margin-top: 22px;
  padding: 10px 18px;
  background: var(--n-sunken); border: 1px solid var(--c-border); border-radius: var(--r-md);
}
.rp-scan-tally-n { font-size: var(--t-xl); font-weight: var(--w-bold); color: var(--c-primary); }
.rp-scan-tally-l { font-size: var(--t-xs); color: var(--c-muted); text-transform: uppercase; letter-spacing: 0.08em; }

.rp-new-records {
  display: flex; flex-direction: column; gap: 10px;
  margin: 18px 0 28px;
}
.rp-new-record {
  border: 1px solid var(--c-border);
  border-radius: var(--r-md); padding: 14px 16px;
  display: flex; align-items: flex-start; gap: 12px;
  background: #fff;
}
.rp-new-record-tag {
  width: 6px; align-self: stretch; border-radius: var(--r-sm);
  background: #2D5BFF;
  flex-shrink: 0;
}
.rp-new-record-body { flex: 1; }
.rp-new-record-h {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 4px;
}
.rp-new-record-title { font-weight: var(--w-semi); font-size: var(--t-sm); color: var(--c-text); }
.rp-new-record-meta { font-size: var(--t-xs); color: var(--c-muted); }
.rp-new-record-body-text { font-size: var(--t-sm); color: var(--c-muted); line-height: 1.4; }

/* Records-pending banner on dashboard */
.rec-pending {
  display: grid; grid-template-columns: 44px 1fr auto;
  gap: 14px; align-items: center;
  padding: 14px 18px;
  background: #FCFBF6;
  border: 1px solid #E7D9A8;
  border-radius: var(--r-md);
  margin-bottom: 18px;
}
.rec-pending-icon {
  width: 44px; height: 44px; border-radius: 50%;
  background: #FBE9A8; color: #8A6D11;
  display: flex; align-items: center; justify-content: center;
}
.rec-pending-title { font-weight: var(--w-bold); font-size: var(--t-sm); color: var(--c-text); }
.rec-pending-sub { font-size: var(--t-xs); color: var(--c-muted); margin-top: 2px; }
.rec-pending-link {
  font-size: var(--t-sm); font-weight: var(--w-semi); color: var(--c-primary);
  background: none; border: none; cursor: pointer; font-family: inherit;
  text-decoration: underline;
}

/* Profile screen rebrand to CLEAR */
.confirm-poweredby.is-clear .confirm-poweredby-logo { height: 14px; }

@media (max-width: 900px) {
  .sr-split { grid-template-columns: 1fr; }
  .wc-steps { grid-template-columns: 1fr; }
  .wc-storyboard { grid-template-columns: 1fr 1fr; }
  .wc-consents { grid-template-columns: 1fr; }
}


/* Confirm profile — 2-column grid layout */
.profile-card { max-width: var(--w-card); margin: 0 auto; }
.profile-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 18px;
  margin-bottom: 4px;
}
.profile-grid .prefilled-field-wrap { margin-bottom: 0; }
.profile-grid .profile-span-2 { grid-column: 1 / -1; }
/* Confirm profile — Contact + Current location side by side */
.profile-contact-loc {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 28px;
  align-items: start;
}
.profile-contact-loc .h3 { margin-top: 24px; }
.profile-contact-loc .prefilled-field { margin-bottom: 0; }
@media (max-width: 720px) {
  .profile-contact-loc { grid-template-columns: 1fr; }
}
/* Contact: label + helper text left, the field itself right \u2014 the same left/right rhythm
   as Current location below it, instead of a single narrow field stranded on a full-width row. */
.profile-contact-row { display:flex; align-items:center; justify-content:space-between; gap:24px; }
.profile-contact-row > div:first-child { flex:1 1 auto; min-width:0; }
.profile-contact-row .prefilled-field-wrap { flex:0 0 320px; }
@media (max-width: 720px) {
  .profile-grid { grid-template-columns: 1fr; }
}


/* Profile: pencil icon aligned to the value/input row specifically, not the whole field.
   It used to be a CSS-grid sibling of the label+value block combined, so it centered against
   their combined height and sat noticeably above the input once editing swapped the plain value
   text for a bordered input (the input alone is taller and sits lower than that center point).
   The label now gets its own row above; value/input + button share a row and align only to
   each other, so the fix holds regardless of label length or editing state. */
.prefilled-field-wrap { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.profile-grid .prefilled-field-wrap,
.profile-grid-3 .prefilled-field-wrap,
.profile-contact-row .prefilled-field-wrap { margin-bottom: 0; }
.prefilled-field-row { display: flex; align-items: center; gap: 8px; }
.prefilled-field-row .prefilled-value,
.prefilled-field-row .input { flex: 1 1 auto; min-width: 0; }
.profile-grid .prefilled-field-row,
.profile-grid-3 .prefilled-field-row { min-height: 40px; }
.prefilled-edit-side {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border: 1px solid var(--c-border);
  background: #fff;
  border-radius: var(--r-md);
  color: var(--c-muted);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-family: inherit;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.prefilled-edit-side:hover {
  border-color: var(--c-primary);
  color: var(--c-primary);
  background: var(--c-soft);
}
.profile-grid .profile-span-2 { grid-column: 1 / -1; }


/* Rich persistent banner on streaming records screen */
.sr-banner-rich {
  display: block;
  padding: 20px 22px;
  background: #FCFBF6;
}
.sr-banner-rich.is-done {
  background: #F1F5EE;
  border-color: #B5C9A4;
}
.sr-banner-head {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 14px;
}
.sr-banner-rich .sr-banner-body { flex: 1; }
.sr-banner-progress-wrap {
  display: flex; align-items: center; gap: 12px;
  margin-top: 6px;
}
.sr-banner-progress {
  flex: 1;
  height: 6px;
  background: var(--c-border);
  border-radius: var(--r-pill);
  overflow: hidden;
}
.sr-banner-progress-fill {
  height: 100%;
  background: #2D5BFF;
  transition: width 0.5s ease;
}
.sr-banner-rich.is-done .sr-banner-progress-fill {
  background: #2D7A3C;
}
.sr-banner-elapsed {
  font-family: ui-monospace, monospace;
  font-size: var(--t-xs);
  color: var(--c-muted);
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}

.sr-banner-explainer {
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  padding: 14px 16px;
  margin-bottom: 14px;
}
.sr-banner-explainer-h {
  font-weight: var(--w-semi);
  font-size: var(--t-sm);
  color: var(--c-text);
  margin-bottom: 10px;
}
.sr-banner-explainer-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.sr-banner-explainer-list li {
  font-size: var(--t-sm);
  line-height: 1.5;
  color: var(--c-muted);
  padding-left: 18px;
  position: relative;
}
.sr-banner-explainer-list li::before {
  content: "•";
  position: absolute;
  left: 4px;
  color: #2D5BFF;
  font-weight: var(--w-bold);
}
.sr-banner-explainer-list li strong {
  color: var(--c-text);
  font-weight: var(--w-bold);
}

.sr-banner-notify-on {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  background: #F1F5EE;
  border: 1px solid #B5C9A4;
  border-radius: var(--r-md);
  margin-bottom: 14px;
}
.sr-banner-notify-on-icon {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: #2D7A3C; color: #fff;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.sr-banner-notify-on-text {
  flex: 1;
  font-size: var(--t-sm);
  color: var(--c-text);
}
.sr-banner-notify-undo {
  background: none; border: none;
  color: var(--c-muted);
  font-size: var(--t-xs); font-weight: var(--w-semi);
  cursor: pointer;
  padding: 4px 8px;
  font-family: inherit;
  text-decoration: underline;
}
.sr-banner-notify-undo:hover { color: var(--c-text); }

.sr-banner-actions-rich {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.sr-banner-actions-rich .sr-banner-btn {
  flex: 1;
  min-width: 220px;
  justify-content: center;
  padding: 11px 16px;
  font-size: var(--t-sm);
}


/* Bell-icon button inside the importing banner */
.sr-banner-icon-btn {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid var(--c-border);
  color: var(--c-muted);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  font-family: inherit;
  margin-left: auto;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.sr-banner-icon-btn:hover {
  border-color: #2D5BFF;
  color: #2D5BFF;
  background: #EAF1FB;
}

/* "Finish without all records" — placed below the right-hand intake column */
.sr-finish-without {
  display: block;
  margin: 14px auto 0;
  background: transparent;
  border: none;
  color: var(--c-muted);
  font-size: var(--t-sm);
  font-weight: var(--w-semi);
  font-family: inherit;
  cursor: pointer;
  text-decoration: underline;
  padding: 8px 12px;
}
.sr-finish-without:hover { color: var(--c-primary); }

/* Position the actions row right-aligned (bell icon flush right) */
.sr-banner-actions-rich {
  justify-content: flex-end;
}


/* ============================================================
   RECORDS IMPORT v2 — Review-and-continue workspace
   ============================================================ */
.sr-only { position:absolute; width:1px; height:1px; padding:0; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }

.srv2-wrap {
  max-width: var(--w-card);
  margin: 0 auto;
  padding: 32px 36px 36px;
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: var(--card-radius);
  box-shadow: var(--shadow-card);
}
/* In the Health-records TAB, fill the content column like every other tab. */
.srv2-tab-main .srv2-wrap { max-width: none; }
/* A light/white brand mark on the white hub circle needs a brand-colored fill. */
.srv2-imp-mark[data-brand-light] { background: var(--brand-primary, #2D4A1F); border-radius: 50%; padding: 18px; }
.srv2-imp-mark[data-brand-applied][data-brand-light] { background: var(--brand-primary, #2D4A1F); }

/* Header */
.srv2-header { margin-bottom: 20px; }
.srv2-h1 {
  font-family: var(--font-sans);
  font-weight: var(--w-bold);
  font-size: var(--t-2xl); line-height: 1.15;
  color: var(--c-text);
  margin: 0 0 6px;
  letter-spacing: -0.01em;
}
.srv2-subtitle {
  font-size: var(--t-md); line-height: 1.5;
  color: var(--c-muted);
  margin: 0 0 10px;
  max-width: 72ch;
}
.srv2-trust {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: var(--t-xs); color: var(--c-muted);
  margin: 0;
}

/* Status module */
.srv2-status {
  background: var(--n-sunken);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  padding: 18px 20px;
  margin-bottom: 22px;
  box-shadow: none;
}
.srv2-status-row {
  display: grid;
  grid-template-columns: minmax(0,1fr) minmax(0,1fr) auto;
  gap: 28px;
  align-items: start;
}
.srv2-status-col { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.srv2-status-label {
  font-size: var(--t-xs); font-weight: var(--w-bold);
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--c-muted);
}
.srv2-status-value {
  font-family: var(--font-sans);
  font-size: var(--t-md); font-weight: var(--w-bold);
  color: var(--c-text);
  line-height: 1.2;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.srv2-status-total {
  font-size: var(--t-sm); font-weight: var(--w-semi); color: var(--c-muted);
}
.srv2-progress {
  width: 100%; height: 6px;
  background: var(--c-border);
  border-radius: var(--r-pill);
  overflow: hidden;
}
/* Only inside the condensed "Records confirmed" bar does this sit inline. */
.srv2-reviewbar .srv2-progress {
  flex: 1; width: auto; min-width: 90px;
}
.srv2-progress-fill {
  height: 100%; background: #2D5BFF;
  transition: width 0.4s ease;
}
.srv2-progress-fill-green { background: #6B9248; }

.srv2-status-eta {
  align-items: flex-end;
  gap: 10px;
  justify-content: flex-start;
}
.srv2-status-eta-label {
  font-size: var(--t-xs); font-weight: var(--w-semi); color: var(--c-muted);
  background: var(--n-canvas);
  padding: 5px 12px;
  border-radius: var(--r-pill);
  white-space: nowrap;
}
.srv2-status-eta-label.is-delayed {
  background: #FBF0D8;
  color: #8A6D11;
}
.srv2-notify-link {
  display: inline-flex; align-items: center; gap: 6px;
  background: none; border: none;
  color: var(--c-primary);
  font-size: var(--t-sm); font-weight: var(--w-semi);
  cursor: pointer; font-family: inherit;
  padding: 6px 10px;
  border-radius: var(--r-sm);
  text-decoration: underline;
}
.srv2-notify-link:hover { background: var(--c-soft); }
.srv2-notify-on {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: var(--t-xs);
  color: #2D5A1F;
  background: #F1F5EE;
  padding: 7px 12px;
  border-radius: var(--r-md);
  border: 1px solid #C8DBB8;
}
.srv2-notify-undo {
  background: none; border: none;
  color: var(--c-muted);
  font-size: var(--t-xs); font-weight: var(--w-semi);
  cursor: pointer; font-family: inherit;
  text-decoration: underline;
  margin-left: 4px;
}

.srv2-status-detail {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--c-border);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 24px;
  align-items: start;
}
.srv2-status-list-row {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: var(--t-sm);
  color: var(--c-text);
  line-height: 1.45;
}
.srv2-status-list-row > span:last-child {
  word-break: break-word;
}
.srv2-pill {
  font-size: var(--t-xs); font-weight: var(--w-bold);
  letter-spacing: 0.06em; text-transform: uppercase;
  padding: 3px 9px;
  border-radius: var(--r-pill);
  white-space: nowrap;
  flex-shrink: 0;
}
.srv2-pill-ready   { background: #E2ECF8; color: #1F4F94; }
.srv2-pill-pending { background: var(--n-canvas); color: var(--n-ink-2); }

/* Main grid — single column at narrow card width */
.srv2-grid {
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.srv2-section-h {
  font-family: var(--font-sans);
  font-weight: var(--w-bold); font-size: var(--t-md);
  color: var(--c-text);
  margin: 0 0 14px;
}
.srv2-card-list { display: flex; flex-direction: column; gap: 12px; }

/* Cards */
.srv2-card {
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: 16px 18px;
}
.srv2-card-loading {
  background: var(--n-sunken);
}
.srv2-card-ready {
  border-color: #B8C6E5;
  background: #F1F5FB;
}
.srv2-card-confirmed {
  border-color: #6B9248;
  background: #E8F1DC;
}
.srv2-card-edited {
  border-color: #6B9248;
  background: #E8F1DC;
}
.srv2-card-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.srv2-card-meta { min-width: 0; }
.srv2-card-title {
  font-weight: var(--w-bold); font-size: var(--t-md); color: var(--c-text);
}
.srv2-card-source {
  font-size: var(--t-xs); color: var(--c-muted);
  margin-top: 3px;
}
.srv2-card-badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: var(--t-xs); font-weight: var(--w-bold);
  letter-spacing: 0.04em; text-transform: uppercase;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  white-space: nowrap;
}
.srv2-card-badge.is-importing { background: var(--n-canvas); color: var(--n-ink-2); }
.srv2-card-badge.is-delayed   { background: #FBF0D8; color: #8A6D11; }
.srv2-card-badge.is-ready     { background: #E2ECF8; color: #1F4F94; }
.srv2-card-badge.is-confirmed { background: #DCEACB; color: #2D5A1F; }
/* Distinct from is-confirmed on purpose: "Connected" means a source is linked, not that the
   patient has reviewed and confirmed its data — reusing the green Confirmed pill made the two
   read as the same state. Same blue as the other not-yet-confirmed indicators on this screen. */
.srv2-card-badge.is-connected { background: #E2ECF8; color: #1F4F94; }
.srv2-card-badge.is-edited    { background: #F2E2A8; color: #6B5810; }
.srv2-card-badge.is-flagged   { background: #FDE7D6; color: #9A4E13; }
.srv2-card-btn-flag {
  font-family: inherit; font-size: var(--t-xs); font-weight: var(--w-bold);
  display: inline-flex; align-items: center; gap: 5px;
  padding: 8px 12px; border-radius: var(--r-md); cursor: pointer;
  background: #fff; color: #9A4E13; border: 1px solid #EAD2BC;
}
.srv2-card-btn-flag:hover { background: #FDF3EA; }
.srv2-card-flag-note { display: inline-flex; align-items: center; gap: 6px; font-size: var(--t-xs); color: #9A4E13; font-weight: var(--w-semi); }

.srv2-card-items {
  list-style: none;
  padding: 0; margin: 0 0 12px;
  display: flex; flex-direction: column;
}
.srv2-card-items li {
  font-size: var(--t-sm);
  color: var(--c-text);
  padding: 7px 0;
  border-bottom: 1px solid rgba(0,0,0,0.05);
}
.srv2-card-items li:last-child { border-bottom: none; }
.srv2-card-items-scroll { max-height: 176px; overflow-y: auto; padding-right: 6px; }
.srv2-item-subhead { font-size: var(--t-xs); font-weight: var(--w-bold); text-transform: uppercase; letter-spacing: 0.05em; color: var(--c-muted); padding: 12px 0 4px; border-bottom: none !important; }
.srv2-item-subhead:first-child { padding-top: 2px; }
.srv2-edit-subhead { width: 100%; font-size: var(--t-xs); font-weight: var(--w-bold); text-transform: uppercase; letter-spacing: 0.05em; color: var(--c-muted); margin: 8px 0 2px; list-style: none; }

/* Connect-a-source modal (b.well Smart Connect) */
.cs-modal { max-width: 480px; width: 100%; }
.cs-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.cs-head .srv2-modal-h { margin: 0; }
.cs-x { background: none; border: none; cursor: pointer; color: var(--c-muted); padding: 4px; display: inline-flex; }
.cs-x:hover { color: var(--c-text); }
.cs-back { background: none; border: none; cursor: pointer; color: var(--c-primary); font-family: var(--font-sans); font-size: var(--t-sm); font-weight: var(--w-semi); display: inline-flex; align-items: center; gap: 3px; padding: 0; }
.cs-sub { font-size: var(--t-sm); line-height: 1.5; color: var(--c-muted); margin: 8px 0 14px; }
.cs-sub-center { text-align: center; }
.cs-search { display: flex; align-items: center; gap: 9px; border: 1px solid var(--c-border); border-radius: var(--r-md); padding: 11px 13px; color: var(--c-muted); margin-bottom: 12px; }
.cs-search input { border: none; outline: none; flex: 1; font-family: var(--font-sans); font-size: var(--t-sm); color: var(--c-text); background: none; }
.cs-list { display: flex; flex-direction: column; gap: 8px; max-height: 300px; overflow-y: auto; margin: 0 -4px; padding: 0 4px; }
.cs-portal { display: flex; align-items: center; gap: 13px; width: 100%; text-align: left; background: #fff; border: 1px solid var(--c-border); border-radius: var(--r-lg); padding: 13px 14px; cursor: pointer; font-family: var(--font-sans); color: var(--c-text); transition: border-color 0.15s, box-shadow 0.15s; }
.cs-portal:hover { border-color: var(--c-primary); box-shadow: 0 2px 10px rgba(0,0,0,0.06); }
.cs-portal-logo { flex: 0 0 auto; width: 40px; height: 40px; border-radius: var(--r-md); background: var(--c-soft); color: var(--c-primary); font-weight: var(--w-bold); font-size: var(--t-sm); display: inline-flex; align-items: center; justify-content: center; letter-spacing: -0.02em; }
.cs-portal-logo-lg { width: 56px; height: 56px; font-size: var(--t-lg); border-radius: var(--r-lg); }
.cs-portal-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.cs-portal-name { font-weight: var(--w-semi); font-size: var(--t-md); display: flex; align-items: center; gap: 8px; }
.cs-portal-tag { font-size: var(--t-xs); font-weight: var(--w-bold); text-transform: uppercase; letter-spacing: 0.04em; color: var(--c-primary); background: var(--c-soft); border-radius: var(--r-pill); padding: 2px 8px; }
.cs-portal-detail { font-size: var(--t-xs); color: var(--c-muted); }
.cs-portal svg { color: var(--c-muted); flex: 0 0 auto; }
.cs-empty { font-size: var(--t-sm); color: var(--c-muted); padding: 18px 4px; text-align: center; }
.cs-foot { display: flex; align-items: flex-start; gap: 7px; font-size: var(--t-xs); line-height: 1.45; color: var(--c-muted); margin-top: 14px; }
.cs-foot-center { justify-content: center; text-align: center; }
.cs-signin-brand { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; margin: 6px 0 14px; }
.cs-signin-name { font-weight: var(--w-bold); font-size: var(--t-md); color: var(--c-text); margin-top: 8px; }
.cs-signin-portal { font-size: var(--t-sm); color: var(--c-muted); }
.cs-signin-lede { font-size: var(--t-sm); line-height: 1.5; color: var(--c-muted); text-align: center; margin: 0 0 16px; }
.cs-form { display: flex; flex-direction: column; gap: 12px; margin-bottom: 18px; }
.cs-field { display: flex; flex-direction: column; gap: 5px; }
.cs-field span { font-size: var(--t-sm); font-weight: var(--w-semi); color: var(--c-text); }
.cs-field input { border: 1px solid var(--c-border); border-radius: var(--r-md); padding: 12px 13px; font-family: var(--font-sans); font-size: var(--t-sm); color: var(--c-text); outline: none; }
.cs-field input:focus { border-color: var(--c-primary); }
.cs-primary { width: 100%; background: var(--c-primary); color: var(--brand-on-primary, #fff); border: none; border-radius: var(--r-pill); padding: 14px; font-family: var(--font-sans); font-size: var(--t-md); font-weight: var(--w-semi); cursor: pointer; }
.cs-primary:hover { background: var(--c-primary-hover, var(--c-primary)); }
.cs-center { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 12px 0; gap: 6px; }
.cs-center .srv2-modal-h { margin: 10px 0 0; }
.cs-spinner { width: 46px; height: 46px; border-radius: 50%; border: 4px solid var(--c-soft); border-top-color: var(--c-primary); animation: cs-spin 0.9s linear infinite; }
@keyframes cs-spin { to { transform: rotate(360deg); } }
.cs-done-badge { width: 60px; height: 60px; border-radius: 50%; background: var(--c-soft); color: var(--c-primary); display: inline-flex; align-items: center; justify-content: center; }
.cs-center .cs-primary { margin-top: 18px; max-width: 200px; }

/* "Connect another source" entry (Review screen + Your Connected Data tab) */
.srv2-connect-more { display: flex; align-items: center; gap: 13px; width: 100%; text-align: left; background: #fff; border: 1px dashed var(--c-border-strong); border-radius: var(--r-lg); padding: 14px 16px; cursor: pointer; font-family: var(--font-sans); color: var(--c-text); margin-top: 14px; transition: border-color 0.15s, background 0.15s; }
.srv2-connect-more:hover { border-color: var(--c-primary); background: var(--c-soft); }
.srv2-connect-more-ic { flex: 0 0 auto; width: 38px; height: 38px; border-radius: var(--r-md); background: var(--c-soft); color: var(--c-primary); display: inline-flex; align-items: center; justify-content: center; }
.srv2-connect-more-body { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.srv2-connect-more-t { font-weight: var(--w-semi); font-size: var(--t-md); }
.srv2-connect-more-d { font-size: var(--t-xs); color: var(--c-muted); }
.srv2-connect-more svg { color: var(--c-muted); flex: 0 0 auto; }
.srv2-extra-sources { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }

/* MyChart partner mark (real logo) */
.mychart-mark { display: inline-flex; align-items: center; gap: 6px; vertical-align: middle; }
.mychart-img { width: 20px; height: 20px; object-fit: contain; display: block; }
.mychart-mark.is-compact .mychart-img { width: 30px; height: 30px; }
.mychart-word { font-size: var(--t-sm); font-weight: var(--w-bold); color: #C8102E; letter-spacing: -0.01em; }
.srv2-connect-more-partners { display: inline-flex; align-items: center; gap: 5px; font-size: var(--t-xs); color: var(--c-muted); margin-top: 5px; }
/* let the MyChart logo sit on white inside the portal tile */
.cs-portal-logo:has(.mychart-mark), .cs-portal-logo-lg:has(.mychart-mark) { background: #fff; border: 1px solid var(--c-border); }

/* Partial-import scenario: banner + "couldn't import" cards */
.srv2-partial-banner { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; margin-bottom: 16px; background: #FDF3E7; border: 1px solid #F0D7B8; border-radius: var(--r-lg); }
.srv2-partial-ic { flex: 0 0 auto; color: #B5571F; margin-top: 1px; }
.srv2-partial-title { font-weight: var(--w-bold); font-size: var(--t-sm); color: #7A3D12; }
.srv2-partial-body { font-size: var(--t-sm); line-height: 1.5; color: #6B4A2E; margin: 3px 0 0; }
.srv2-missing { margin-top: 20px; }
.srv2-missing-h { font-size: var(--t-sm); font-weight: var(--w-bold); text-transform: uppercase; letter-spacing: 0.04em; color: var(--c-muted); margin: 0 0 10px; }
.srv2-card-missing { opacity: 0.85; }
.srv2-live-note { display: inline-flex; align-items: center; gap: 8px; font-size: var(--t-xs); font-weight: var(--w-semi); color: #2D5A1F; background: #E8F1DC; padding: 6px 12px; border-radius: var(--r-pill); margin: 0 0 16px; }.srv2-card-summary-static { width: 100%; display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; cursor: default; }
.srv2-card-state-icon[data-state="missing"] { background: #F3E0DA; color: #B5571F; }
.srv2-card-badge.is-missing { background: #EFE7E2; color: #8A5A3C; }

.srv2-card-loading-body {
  display: flex; flex-direction: column; gap: 7px;
  padding: 4px 0 6px;
}
.srv2-card-skel {
  height: 9px; background: #EFEDE6; border-radius: var(--r-sm);
}
.srv2-card-skel:nth-child(1) { width: 72%; }
.srv2-card-skel:nth-child(2) { width: 92%; }
.srv2-card-skel:nth-child(3) { width: 56%; }
.srv2-card-delayed-note {
  font-size: var(--t-xs); color: #8A6D11;
  margin-top: 10px;
  padding: 8px 10px;
  background: #FBF0D8;
  border-radius: var(--r-sm);
}

.srv2-card-meaning { margin: 0 0 12px; }
.srv2-card-meaning-toggle {
  background: none; border: none;
  color: var(--c-primary);
  font-size: var(--t-xs); font-weight: var(--w-semi);
  cursor: pointer; font-family: inherit;
  padding: 0;
  text-decoration: underline;
}
.srv2-card-meaning-body {
  font-size: var(--t-xs); color: var(--c-muted);
  line-height: 1.5;
  margin-top: 8px;
  padding: 10px 12px;
  background: rgba(0,0,0,0.03);
  border-radius: var(--r-md);
}

.srv2-card-actions { display: flex; gap: 8px; }
.srv2-card-btn-primary,
.srv2-card-btn-secondary {
  font-family: inherit;
  font-size: var(--t-xs); font-weight: var(--w-bold);
  letter-spacing: 0.02em;
  padding: 7px 14px 7px 16px;
  border-radius: var(--r-pill);
  cursor: pointer;
  border: 1px solid;
  transition: background .15s, border-color .15s, color .15s;
  white-space: nowrap;
}
.srv2-card-btn-primary {
  background: var(--c-primary); color: #fff;
  border-color: var(--c-primary);
}
.srv2-card-btn-primary:hover:not(:disabled) { background: var(--c-primary-hover); }
.srv2-card-btn-primary:disabled { opacity: 0.4; cursor: not-allowed; }
.srv2-card-btn-secondary {
  background: #fff; color: var(--c-text);
  border-color: var(--c-border);
}
.srv2-card-btn-secondary:hover:not(:disabled) {
  border-color: var(--c-primary); color: var(--c-primary);
  background: var(--c-soft);
}

/* Right column — readiness or intake */
.srv2-side { position: static; }
.srv2-readiness,
.srv2-intake {
  background: var(--n-sunken);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  padding: 18px 20px;
  box-shadow: none;
}
.srv2-readiness-list {
  list-style: none; padding: 0; margin: 0 0 14px;
  display: flex; flex-direction: column;
  gap: 10px;
}
.srv2-readiness-list li {
  display: flex; align-items: center; gap: 10px;
  font-size: var(--t-sm);
  color: var(--c-muted);
}
.srv2-readiness-list li.is-done { color: var(--c-text); }
.srv2-readiness-list li.is-done svg { color: var(--c-primary); }
.srv2-readiness-sub {
  font-size: var(--t-xs); color: var(--c-muted); margin-left: 6px; font-weight: var(--w-semi);
}
.srv2-readiness-dot {
  display: inline-block;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--n-disabled);
  flex-shrink: 0;
}
.srv2-readiness-note {
  font-size: var(--t-sm); color: var(--c-muted);
  margin: 14px 0 0; padding-top: 14px;
  border-top: 1px solid var(--c-border);
  line-height: 1.5;
}
.srv2-side-sub {
  font-size: var(--t-sm); color: var(--c-muted);
  margin: 0 0 14px;
}

/* Intake (right column while in progress) */
.srv2-intake-progress {
  display: flex; align-items: center; gap: 10px;
  font-size: var(--t-xs); color: var(--c-muted);
  margin-bottom: 12px;
}
.srv2-intake-bar {
  flex: 1; height: 4px;
  background: var(--c-border);
  border-radius: var(--r-pill); overflow: hidden;
}
.srv2-intake-bar-fill {
  height: 100%; background: var(--c-primary);
  transition: width 0.3s ease;
}
.srv2-intake-q {
  font-weight: var(--w-bold); font-size: var(--t-md);
  color: var(--c-text);
  margin-bottom: 12px;
  line-height: 1.4;
}
.srv2-intake-actions {
  display: flex; justify-content: space-between;
  margin-top: 14px;
}

/* Permanent footer below records (replaces old sticky) */
.srv2-footer {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 18px;
  align-items: center;
  margin-top: 24px;
  padding-top: 22px;
  border-top: 1px solid var(--c-border);
}
.srv2-footer-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.srv2-iq-footer { border-top: none; padding-top: 0; margin-top: 10px; }
.srv2-footer-center .srv2-sticky-helper {
  font-size: var(--t-xs); color: var(--c-muted);
  margin: 0;
}
.srv2-sticky {
  display: none;
}
.srv2-sticky-inner {
  max-width: 760px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 18px;
  align-items: center;
}
.srv2-sticky-secondary {
  background: #fff;
  border: 1.5px solid var(--c-border);
  color: var(--c-text);
  font-family: inherit;
  font-weight: var(--w-semi);
  font-size: var(--t-sm);
  padding: 11px 22px;
  border-radius: var(--cta-radius);
  cursor: pointer;
  white-space: nowrap;
}
.srv2-sticky-secondary:hover { border-color: var(--c-primary); color: var(--c-primary); }
.srv2-sticky-helper {
  font-size: var(--t-xs);
  color: var(--c-muted);
  text-align: center;
}
.srv2-sticky-primary {
  background: var(--c-primary);
  border: none;
  color: #fff;
  font-family: inherit;
  font-weight: var(--w-bold);
  font-size: var(--t-md);
  padding: 13px 30px;
  border-radius: var(--cta-radius);
  cursor: pointer;
  min-width: 220px;
  white-space: nowrap;
}
.srv2-sticky-primary:hover:not(:disabled) { background: var(--c-primary-hover); }
.srv2-sticky-primary.is-disabled,
.srv2-sticky-primary:disabled {
  background: var(--n-disabled);
  color: #fff;
  cursor: not-allowed;
}

/* Light non-blocking confirmation modal */
.srv2-modal-bg {
  position: fixed; inset: 0;
  background: rgba(15,20,15,0.45);
  display: flex; align-items: center; justify-content: center;
  z-index: 300;
  padding: 24px;
}
.srv2-modal {
  background: #fff;
  border-radius: var(--r-lg);
  max-width: 460px; width: 100%;
  padding: 28px;
  text-align: center;
  box-shadow: 0 24px 64px rgba(0,0,0,0.28);
}
.srv2-modal-icon {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: #EAF1FB;
  color: #2D5BFF;
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 14px;
}
.srv2-modal-h {
  font-weight: var(--w-bold); font-size: var(--t-lg);
  color: var(--c-text);
  margin: 0 0 10px;
}
.srv2-modal-body {
  font-size: var(--t-sm); line-height: 1.5;
  color: var(--c-muted);
  margin: 0 0 20px;
}
.srv2-modal-actions {
  display: flex; gap: 10px; justify-content: center;
}
.srv2-modal-back {
  background: #fff;
  border: 1.5px solid var(--c-border);
  color: var(--c-text);
  font-family: inherit;
  font-weight: var(--w-semi);
  font-size: var(--t-sm);
  padding: 10px 22px;
  border-radius: var(--cta-radius);
  cursor: pointer;
}
.srv2-modal-back:hover { border-color: var(--c-primary); color: var(--c-primary); }
.srv2-modal-continue {
  background: var(--c-primary);
  border: none;
  color: #fff;
  font-family: inherit;
  font-weight: var(--w-bold);
  font-size: var(--t-sm);
  padding: 10px 26px;
  border-radius: var(--cta-radius);
  cursor: pointer;
}
.srv2-modal-continue:hover { background: var(--c-primary-hover); }

/* Focus indicators (a11y) */
.srv2-card-btn-primary:focus-visible,
.srv2-card-btn-secondary:focus-visible,
.srv2-sticky-primary:focus-visible,
.srv2-sticky-secondary:focus-visible,
.srv2-modal-back:focus-visible,
.srv2-modal-continue:focus-visible,
.srv2-notify-link:focus-visible,
.srv2-card-meaning-toggle:focus-visible {
  outline: 2px solid var(--c-primary);
  outline-offset: 2px;
}

@media (max-width: 900px) {
  .srv2-grid { grid-template-columns: 1fr; }
  .srv2-side { position: static; }
  .srv2-status-row { grid-template-columns: 1fr; gap: 18px; }
  .srv2-sticky-inner { grid-template-columns: 1fr 1fr; }
  .srv2-sticky-helper { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .srv2-progress-fill,
  .srv2-intake-bar-fill { transition: none; }
}


/* ============================================================
   v3 — collapsed-by-default accordion record cards
   ============================================================ */
.srv2-card { padding: 0; overflow: hidden; }
.srv2-card.is-open { box-shadow: 0 4px 14px rgba(0,0,0,0.06); }

.srv2-card-summary {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px;
  width: 100%;
  padding: 14px 18px;
  background: transparent;
  border: none;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  transition: background .12s;
}
.srv2-card-summary:hover:not(:disabled) { background: rgba(0,0,0,0.02); }
.srv2-card-summary:disabled { cursor: default; }

.srv2-card-summary-l { display: flex; align-items: center; gap: 12px; min-width: 0; flex: 1; }
.srv2-card-summary-r { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

.srv2-card-state-icon {
  width: 28px; height: 28px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  background: var(--n-canvas);
  color: var(--c-muted);
}
.srv2-card-state-icon[data-state="ready"]      { background: #DEE7F4; color: #1F4F94; }
.srv2-card-state-icon[data-state="confirmed"]  { background: #DCEACB; color: #2D5A1F; }
.srv2-card-state-icon[data-state="edited"]     { background: #DCEACB; color: #2D5A1F; }
.srv2-card-dot-blue {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: #2D5BFF;
}
.srv2-card-spin {
  width: 14px; height: 14px;
  border-radius: 50%;
  border: 2px solid var(--n-line);
  border-top-color: var(--c-muted);
  animation: srv2-spin 1s linear infinite;
}
@keyframes srv2-spin { to { transform: rotate(360deg); } }

.srv2-card-cta-pill {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: var(--t-xs); font-weight: var(--w-bold);
  letter-spacing: 0.02em;
  color: #1F4F94;
  background: #DEE7F4;
  padding: 7px 12px 7px 14px;
  border-radius: var(--r-pill);
  border: 1px solid #B8C6E5;
  white-space: nowrap;
  transition: background .12s;
}
.srv2-card-summary:hover .srv2-card-cta-pill {
  background: #CFDEF0;
}
.srv2-card-chev {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px;
  color: var(--c-muted);
}

.srv2-card-body {
  padding: 0 18px 16px;
  border-top: 1px solid var(--c-border);
  margin-top: -1px;
}
.srv2-card.srv2-card-confirmed .srv2-card-body { border-top-color: #B5C9A4; }
.srv2-card.srv2-card-edited .srv2-card-body    { border-top-color: #E0C880; }
.srv2-card.srv2-card-ready .srv2-card-body     { border-top-color: #B8C6E5; }

.srv2-card-body .srv2-card-items { margin-top: 14px; }


/* ============================================================
   INTAKE QUESTIONS v2 — prefilled answers + outstanding qs
   ============================================================ */
/* Aug 26, 2026 — the prefill pill sits top-right on the title's row rather than
   claiming a line of its own under it. It is a status badge, not a subtitle. */
.srv2-header-row {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
}
.srv2-header-row .srv2-h1 { margin: 0; }
.srv2-iq-subtitle {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: var(--t-sm); color: #1F4F94;
  background: #E2ECF8;
  border: 1px solid #C8D8EE;
  padding: 6px 12px;
  border-radius: var(--r-pill);
  margin: 0;
  flex-shrink: 0;
}
.srv2-prefill-summary {
  margin: 20px 0 24px; padding: 16px 18px;
  background: #F4F8F0; border: 1px solid #D8E6CC; border-radius: var(--r-lg);
}
.srv2-prefill-summary-h {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: var(--t-xs); font-weight: var(--w-semi); letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--n-ink-3); margin-bottom: 14px;
}
.srv2-prefill-chips { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 20px; }
.srv2-prefill-chip { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
/* Sentence case, regular weight: these are labels, not headings. Three
   stacked small-caps layers made the box shout at itself. */
.srv2-pf-k { font-size: var(--t-xs); font-weight: var(--w-regular); color: var(--n-ink-3); }
.srv2-pf-v { font-size: var(--t-sm); color: var(--n-ink); font-weight: var(--w-semi); line-height: var(--lh-snug); }
.srv2-prefill-note { font-size: var(--t-xs); color: var(--n-ink-3); margin: 14px 0 0; line-height: var(--lh-body); }
@media (max-width: 560px){ .srv2-prefill-chips { grid-template-columns: 1fr; } }
.srv2-iq-progress {
  background: var(--n-sunken);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  padding: 12px 16px;
  margin: 20px 0 34px;
}
.srv2-iq-progress-row {
  display: flex; justify-content: space-between; align-items: center;
  font-size: var(--t-xs);
  color: var(--c-muted);
  margin-bottom: 8px;
}
.srv2-iq-progress-row > span:first-child {
  font-weight: var(--w-semi);
  color: var(--c-text);
}
.srv2-iq-progress-sub {
  color: #2D5A1F;
  font-weight: var(--w-semi);
}
.srv2-iq-question {
  font-family: var(--font-sans);
  font-weight: var(--w-semi); font-size: var(--t-lg);
  line-height: 1.35;
  color: var(--c-text);
  margin: 0 0 12px;
}
.srv2-iq-prefill-note {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: var(--t-xs); font-weight: var(--w-semi);
  color: #2D5A1F;
  background: #E8F1DC;
  padding: 5px 10px;
  border-radius: var(--r-pill);
  margin: 0 0 14px;
}
.srv2-iq-prefill-note.is-pending {
  color: #8A6D11;
  background: #FBF0D8;
  border: 1px solid #E7D9A8;
}
.srv2-iq-sub-q {
  font-size: var(--t-sm); font-weight: var(--w-semi);
  color: var(--c-text);
  margin: 22px 0 10px;
}

/* Attest */
.srv2-iq-attest {
  border: 1px solid #E7D9A8;
  background: #FBF6E5;
  border-radius: var(--r-md);
  padding: 18px 20px;
  margin-bottom: 8px;
}
.srv2-iq-attest-warning {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: var(--t-xs); font-weight: var(--w-bold);
  letter-spacing: 0.08em; text-transform: uppercase;
  color: #8A6D11;
  margin-bottom: 12px;
}

/* Check + radio rows */
.srv2-iq-check-row {
  display: flex; align-items: flex-start; gap: 12px;
  cursor: pointer;
  padding: 12px 14px;
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  font-size: var(--t-sm);
  color: var(--c-text);
  line-height: 1.45;
}
.srv2-iq-check-row:hover { border-color: var(--c-primary); }

.srv2-iq-box {
  width: 22px; height: 22px;
  flex-shrink: 0;
  border: 1.5px solid var(--n-disabled);
  border-radius: var(--r-sm);
  background: #fff;
  display: flex; align-items: center; justify-content: center;
  margin-top: 1px;
}
.srv2-iq-box.is-on {
  background: var(--c-primary);
  border-color: var(--c-primary);
  color: #fff;
}

.srv2-iq-list {
  display: flex; flex-direction: column;
  gap: 8px;
}
.srv2-iq-cond-row {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 12px 14px;
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  font-size: var(--t-sm);
  color: var(--c-text);
  cursor: pointer;
  line-height: 1.45;
}
.srv2-iq-cond-row:hover:not(.is-prefilled) { border-color: var(--c-primary); }
.srv2-iq-cond-row.is-prefilled {
  background: #F4F8EE;
  border-color: #B5C9A4;
  cursor: default;
}
.srv2-iq-cond-body {
  display: flex; flex-direction: column;
  gap: 4px;
  flex: 1;
}
.srv2-iq-source-mini {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: var(--t-xs);
  color: #2D5A1F;
  font-weight: var(--w-semi);
}
.srv2-iq-source-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #2D5A1F;
  flex-shrink: 0;
}

.srv2-iq-divider {
  height: 1px;
  background: var(--c-border);
  margin: 20px 0;
}

/* H+W prefilled */
.srv2-iq-hw {
  display: flex; flex-direction: column;
  gap: 10px;
  padding: 14px 16px;
  background: #F4F8EE;
  border: 1px solid #B5C9A4;
  border-radius: var(--r-md);
  margin-bottom: 10px;
}
.srv2-iq-hw-row {
  display: flex; align-items: center; gap: 14px;
  font-size: var(--t-sm);
}
.srv2-iq-hw-label {
  font-weight: var(--w-semi);
  color: var(--c-text);
  min-width: 70px;
}
.srv2-iq-hw-value {
  color: var(--c-text);
  font-size: var(--t-md);
}
.srv2-iq-hw-source {
  margin-left: auto;
  display: inline-flex; align-items: center; gap: 6px;
  font-size: var(--t-xs);
  color: #2D5A1F;
  font-weight: var(--w-semi);
}
.srv2-iq-update-link {
  background: none; border: none;
  color: var(--t-link-color);
  font-size: var(--t-sm); font-weight: var(--w-semi);
  cursor: pointer;
  font-family: inherit;
  padding: 6px 0;
  text-decoration: none;
}

/* Radios */
.srv2-iq-radios {
  display: flex; flex-direction: column;
  gap: 8px;
}
.srv2-iq-radio-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  font-size: var(--t-sm);
  color: var(--c-text);
  cursor: pointer;
}
.srv2-iq-radio-row:hover { border-color: var(--c-primary); }
.srv2-iq-radio {
  width: 20px; height: 20px;
  border-radius: 50%;
  border: 1.5px solid var(--n-disabled);
  background: #fff;
  flex-shrink: 0;
  position: relative;
}
.srv2-iq-radio.is-on {
  border-color: var(--c-primary);
}
.srv2-iq-radio.is-on::after {
  content: ""; position: absolute; inset: 4px;
  border-radius: 50%;
  background: var(--c-primary);
}

/* Textarea */
.srv2-iq-textarea {
  width: 100%;
  min-height: 120px;
  padding: 12px 14px;
  font-family: inherit;
  font-size: var(--t-sm);
  line-height: 1.5;
  color: var(--c-text);
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  resize: vertical;
  box-sizing: border-box;
}
.srv2-iq-textarea:focus {
  outline: none;
  border-color: var(--c-primary);
  box-shadow: 0 0 0 3px rgba(45,74,31,0.1);
}


/* Powered by b.well — top-right of container */
.srv2-header-row {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 18px;
  margin-bottom: 8px;
}
.srv2-poweredby {
  display: flex; align-items: center; gap: 6px;
  flex-shrink: 0;
  padding-top: 6px;
}
.srv2-poweredby-label {
  font-size: var(--t-xs); text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--c-muted);
  font-weight: var(--w-semi);
}
.srv2-poweredby-logo { height: 16px; width: auto; display: block; }

.srv2-header-context {
  font-size: var(--t-body-size);
  line-height: 1.55;
  color: var(--c-muted);
  margin: 0;
  max-width: 60ch;
}

/* Blue ETA pill (status module) */
.srv2-status-eta-label {
  font-size: var(--t-xs);
  font-weight: var(--w-semi);
  color: #1F4F94;
  background: #E2ECF8;
  border: 1px solid #C8D8EE;
  padding: 5px 12px;
  border-radius: var(--r-pill);
  white-space: nowrap;
}

/* Chevron rotates down when ready card is open */
.srv2-card-cta-pill svg {
  transition: transform .2s ease;
}
.srv2-card-cta-pill.is-open svg {
  transform: rotate(90deg);
}

/* Hide the now-empty Ready/Still-importing detail row */
.srv2-status-detail:empty { display: none; }


/* Tweaks: bigger b.well lockup, purple ETA pill, lighter-green Confirm button,
   compact email-notify pill */
.srv2-poweredby-label { font-size: var(--t-xs); }
.srv2-poweredby-logo { height: 24px; }

.srv2-status-eta-label {
  color: #4A2D7A;
  background: #EFE8F8;
  border: 1px solid #D7C9EC;
}

.srv2-card-btn-primary {
  background: #6B9248;
  border-color: #6B9248;
  color: #fff;
}
.srv2-card-btn-primary:hover:not(:disabled) {
  background: #5A7C3D;
  border-color: #5A7C3D;
}

.srv2-notify-on {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: var(--t-xs);
  padding: 5px 10px;
  white-space: nowrap;
}
.srv2-notify-on > span { white-space: normal; }


/* ============================================================
   HEALTH RECORDS TAB (patient app)
   ============================================================ */
.hr-summary {
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 18px 4px;
  background: var(--n-sunken);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  margin-bottom: 18px;
}
.hr-summary-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0 8px;
  flex: 1;
  min-width: 0;
}
.hr-summary-num {
  font-family: var(--font-sans);
  font-weight: var(--w-bold);
  font-size: var(--t-2xl);
  line-height: 1;
  letter-spacing: -0.01em;
}
.hr-summary-label {
  font-size: var(--t-xs);
  font-weight: var(--w-semi);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--c-muted);
  margin-top: 4px;
}
.hr-summary-divider {
  width: 1px;
  height: 36px;
  background: var(--c-border);
  margin: 0 auto;
}
.hr-summary > .hr-summary-divider:last-of-type { display: none; }

.hr-importing-banner {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 18px;
  background: #FBF0D8;
  border: 1px solid #E7D9A8;
  border-radius: var(--r-md);
  margin-bottom: 22px;
}
.hr-importing-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: #C49414;
  flex-shrink: 0;
  animation: srv2-spin 1.6s ease-in-out infinite alternate;
}
@keyframes hr-pulse {
  from { opacity: 1; }
  to { opacity: 0.4; }
}
.hr-importing-body { flex: 1; }
.hr-importing-title {
  font-weight: var(--w-bold);
  font-size: var(--t-sm);
  color: #6B5810;
}
.hr-importing-sub {
  font-size: var(--t-xs);
  color: #8A6D11;
  margin-top: 2px;
}
.hr-notify-btn {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: var(--t-sm); font-weight: var(--w-semi);
  color: #1F4F94;
  background: #fff;
  border: 1px solid #C8D8EE;
  padding: 8px 14px;
  border-radius: var(--r-pill);
  cursor: pointer;
  font-family: inherit;
  flex-shrink: 0;
}
.hr-notify-btn:hover { background: #E2ECF8; }
.hr-notify-on {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: var(--t-xs);
  color: #2D5A1F;
  background: #E8F1DC;
  border: 1px solid #B5C9A4;
  padding: 6px 12px;
  border-radius: var(--r-pill);
  white-space: nowrap;
}

.hr-section-h {
  font-family: var(--font-sans);
  font-weight: var(--w-bold);
  font-size: var(--t-sm);
  color: var(--c-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 0 0 12px;
}

.hr-foot {
  display: flex; align-items: flex-start; gap: 10px;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--c-border);
  font-size: var(--t-xs);
  color: var(--c-muted);
  line-height: 1.5;
}
.hr-foot svg { flex-shrink: 0; margin-top: 2px; }

/* ---- CONNECTED SOURCES (disconnect/delete management) ---- */
.hr-source-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 22px; }
.hr-source-row {
  display: grid; grid-template-columns: 44px 1fr auto; gap: 14px; align-items: center;
  padding: 14px 16px; border: 1px solid var(--c-border); border-radius: var(--r-lg);
  background: #fff; transition: background 0.15s, opacity 0.15s;
}
.hr-source-row.is-disconnected { background: #FAFAF7; }
.hr-source-row.is-wiped { opacity: 0.7; }
.hr-source-icon {
  width: 44px; height: 44px; border-radius: var(--r-md);
  background: #F4F3EC; border: 1px solid var(--c-border);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-sans); font-weight: var(--w-bold); font-size: var(--t-md); color: #5C5945;
}
.hr-source-row.is-disconnected .hr-source-icon { background: #F0EFE8; color: #8A8770; }
.hr-source-icon-initial { line-height: 1; }
.hr-source-meta { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.hr-source-name-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.hr-source-name { font-family: var(--font-sans); font-weight: var(--w-bold); font-size: var(--t-md); color: var(--c-text); }
.hr-source-badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 8px; border-radius: var(--r-pill);
  font-family: var(--font-sans); font-size: var(--t-xs); font-weight: var(--w-bold); letter-spacing: 0.04em; text-transform: uppercase;
}
.hr-source-badge.is-on { background: #E4EFD8; color: #2D5A1F; }
.hr-source-badge.is-on .hr-source-dot { background: #2D5A1F; }
.hr-source-badge.is-off { background: #F0EFE8; color: #6B6856; }
.hr-source-badge.is-off .hr-source-dot { background: #8A8770; }
.hr-source-badge.is-wiped { background: #FBE9E9; color: #8E2A2A; }
.hr-source-badge.is-syncing { background: #E2ECF7; color: #1F5091; }
.hr-source-badge.is-expired { background: #FDEFDD; color: #8A5316; }
.hr-source-badge.is-expired .hr-source-dot { background: #C67B1E; }
.hr-source-spin { width: 9px; height: 9px; border-radius: 50%; border: 1.6px solid #A9C4E4; border-top-color: #1F5091; display: inline-block; animation: hr-src-spin 0.8s linear infinite; }
@keyframes hr-src-spin { to { transform: rotate(360deg); } }
.hr-source-synced { color: var(--c-muted); }
.hr-source-synced.is-warn { color: #8A5316; font-weight: var(--w-semi); }
.hr-source-badge.is-wiped::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #8E2A2A; }
.hr-source-dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; }
.hr-source-sub { font-size: var(--t-xs); color: var(--c-muted); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.hr-source-dot-sep { opacity: 0.5; }
.hr-source-actions { display: flex; gap: 8px; align-items: center; }
.hr-source-btn {
  font-family: var(--font-sans); font-size: var(--t-sm); font-weight: var(--w-semi);
  padding: 7px 12px; border-radius: var(--r-md);
  background: transparent; color: var(--c-text);
  border: 1px solid var(--c-border); cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s;
}
.hr-source-btn:hover { background: #F4F3EC; }
.hr-source-btn-primary { background: var(--c-primary); color: #fff; border-color: var(--c-primary); }
.hr-source-btn-primary:hover { background: #28401F; }
.hr-source-btn-danger { color: #8E2A2A; border-color: #E8C5C5; }
.hr-source-btn-danger:hover { background: #FBE9E9; border-color: #D89999; }
.hr-source-btn-note { font-size: var(--t-xs); color: var(--c-muted); font-style: italic; padding: 7px 4px; }

/* ---- CONNECTED FROM B.WELL: source groups (sources folded into records) ---- */
.hr-srcgroup {
  border: 1px solid var(--c-border); border-radius: var(--r-lg);
  background: #fff; overflow: hidden; margin-bottom: 14px;
  transition: opacity 0.15s;
}
.hr-srcgroup.is-disconnected { background: #FCFCFA; }
.hr-srcgroup.is-wiped { opacity: 0.72; }
.hr-srcgroup-head {
  display: grid; grid-template-columns: 44px 1fr auto auto; gap: 14px; align-items: center;
  padding: 14px 16px; border-bottom: 1px solid transparent;
  background: #FBFBF8; cursor: pointer; transition: background 0.15s;
}
.hr-srcgroup-head:hover { background: #F4F4EE; }
.hr-srcgroup.is-expanded .hr-srcgroup-head { border-bottom-color: var(--c-border); }
.hr-srcgroup-chev { display: flex; align-items: center; justify-content: center; color: #8A8770; }
.hr-srcgroup.is-wiped .hr-srcgroup-head { border-bottom-color: transparent; }
.hr-srcgroup-records { padding: 14px 16px; }
.hr-srcgroup-records .srv2-card:last-child { margin-bottom: 0; }
.hr-srcgroup-empty {
  padding: 16px; font-family: var(--font-sans); font-size: var(--t-sm); color: #8A8770;
  text-align: center;
}
@media (max-width: 720px) {
  .hr-srcgroup-head { grid-template-columns: 40px 1fr auto; }
  .hr-srcgroup-head .hr-source-actions { grid-column: 1 / 3; justify-content: flex-end; padding-top: 4px; }
  .hr-srcgroup-chev { grid-row: 1; grid-column: 3; }
}

/* ---- MANAGE ALL (download / stop all / delete all) ---- */
.hr-manage {
  margin-top: 26px; padding: 18px 20px;
  border: 1px solid var(--c-border); border-radius: var(--r-lg); background: #FBFBF8;
}
.hr-manage-h { font-family: var(--font-sans); font-weight: var(--w-bold); font-size: var(--t-sm); color: var(--c-text); margin-bottom: 12px; }
.hr-manage-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.hr-manage-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 16px; border-radius: var(--r-pill);
  border: 1px solid var(--c-border); background: #fff;
  font-family: var(--font-sans); font-size: var(--t-sm); font-weight: var(--w-semi); color: var(--c-text);
  cursor: pointer; transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.hr-manage-btn:hover { background: var(--c-soft, var(--n-canvas)); border-color: #C2BFB0; }
.hr-manage-btn.is-danger { color: #A8341F; border-color: #E6C4BC; }
.hr-manage-btn.is-danger:hover { background: #FBF1EE; border-color: #D88; }

/* ---- PATIENT RIGHTS note (b.well) ---- */
.hr-rights {
  display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: start;
  margin-top: 16px; padding: 14px 16px;
  border: 1px solid var(--c-border); border-radius: var(--r-lg); background: #fff;
}
.hr-rights-ic { color: #2D5A1F; display: flex; padding-top: 1px; }
.hr-rights-p { font-family: var(--font-sans); font-size: var(--t-sm); line-height: 1.55; color: #555140; margin: 0 0 8px; }
.hr-rights-p strong { color: var(--c-text); font-weight: var(--w-semi); }
.hr-rights-fine { font-family: var(--font-sans); font-size: var(--t-xs); line-height: 1.5; color: #8A8770; margin: 0; }
.hr-rights-fine a { color: var(--t-link-color); text-decoration: none; font-weight: var(--w-semi); }
.hr-rights-fine a:hover { text-decoration: underline; }
.hr-rights-link {
  background: none; border: none; padding: 0; font: inherit; cursor: pointer;
  color: var(--t-link-color); font-weight: var(--w-semi); text-decoration: underline; text-underline-offset: 2px;
}

/* ---- PRIVACY QUESTIONS modal ---- */
.hr-privacy-input {
  width: 100%; box-sizing: border-box; resize: vertical; margin: 12px 0 4px;
  border: 1px solid var(--c-border); border-radius: var(--r-md);
  padding: 10px 12px; font-family: var(--font-sans); font-size: var(--t-sm); color: var(--c-text); outline: none;
}
.hr-privacy-input:focus { border-color: #2D5A1F; }
.hr-privacy-contact {
  margin-top: 12px; padding: 12px 14px; border-radius: var(--r-md); background: var(--c-soft, var(--n-canvas));
  font-family: var(--font-sans); font-size: var(--t-xs); line-height: 1.6; color: #6B6856;
}
.hr-privacy-contact-h { font-weight: var(--w-bold); color: var(--c-text); margin-bottom: 3px; }

/* ---- IDENTITY VERIFICATION (CLEAR) ---- */
.hr-identity-card {
  display: grid; grid-template-columns: auto 1fr auto; gap: 18px; align-items: start;
  padding: 18px 20px;
  border: 1px solid var(--c-border); border-radius: var(--r-lg);
  background: #fff;
  margin-bottom: 22px;
}
.hr-identity-logo {
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  height: 32px;
}
.hr-identity-logo img {
  height: 22px; width: auto; display: block;
}
.hr-identity-meta { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.hr-identity-name-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.hr-identity-name { font-family: var(--font-sans); font-weight: var(--w-bold); font-size: var(--t-md); color: var(--c-text); }
.hr-identity-sub { font-size: var(--t-xs); color: var(--c-muted); }
.hr-identity-foot { font-size: var(--t-xs); line-height: 1.5; color: var(--c-muted); margin-top: 4px; max-width: 56ch; }
.hr-identity-actions { display: flex; gap: 8px; align-items: center; }
.hr-source-btn-link {
  display: inline-flex; align-items: center;
  color: #1A2A4A; border-color: #C8D0E3;
  text-decoration: none;
}
.hr-source-btn-link:hover { background: #F4F6FB; border-color: #1A2A4A; color: #0B1F3F; }
@media (max-width: 720px) {
  .hr-identity-card { grid-template-columns: auto 1fr; }
  .hr-identity-actions { grid-column: 1 / -1; justify-content: flex-start; padding-top: 4px; }
}

/* ---- DANGER ZONE ---- */
.hr-danger {
  margin-top: 18px;
  display: grid; grid-template-columns: 1fr auto; gap: 18px; align-items: center;
  padding: 16px 18px; border-radius: var(--r-lg);
  background: #FDF5F5; border: 1px solid #E8C5C5;
}
.hr-danger-title { font-family: var(--font-sans); font-weight: var(--w-bold); font-size: var(--t-sm); color: #8E2A2A; margin-bottom: 4px; }
.hr-danger-sub { font-size: var(--t-xs); line-height: 1.5; color: #6F3A3A; }
.hr-danger-btn {
  font-family: var(--font-sans); font-weight: var(--w-semi); font-size: var(--t-sm);
  padding: 9px 16px; border-radius: var(--r-md);
  background: #fff; color: #8E2A2A; border: 1px solid #D89999;
  cursor: pointer; white-space: nowrap;
  transition: background 0.15s;
}
.hr-danger-btn:hover { background: #FBE9E9; }

/* ---- TOAST ---- */
.hr-toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%);
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px 12px 14px; border-radius: var(--r-md);
  background: #1F2A1A; color: #fff;
  font-family: var(--font-sans); font-size: var(--t-sm); font-weight: var(--w-semi);
  box-shadow: 0 10px 30px rgba(0,0,0,0.18);
  z-index: 1000;
  animation: hrToastIn 0.22s ease-out;
}
.hr-toast svg { color: #C6E371; }
.hr-toast-dismiss {
  background: transparent; border: none; color: rgba(255,255,255,0.7); cursor: pointer;
  padding: 4px; margin-left: 6px; display: inline-flex; border-radius: var(--r-sm);
}
.hr-toast-dismiss:hover { color: #fff; background: rgba(255,255,255,0.1); }
@keyframes hrToastIn {
  from { opacity: 0; transform: translate(-50%, 10px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}

/* ---- CONFIRM MODAL ---- */
.hr-modal-bg {
  position: fixed; inset: 0;
  background: rgba(20, 24, 18, 0.45);
  display: flex; align-items: center; justify-content: center;
  z-index: 2000;
  animation: hrModalBgIn 0.18s ease-out both;
  padding: 20px;
}
@keyframes hrModalBgIn { from { opacity: 0; } to { opacity: 1; } }
.hr-modal {
  position: relative;
  max-width: 480px; width: 100%;
  background: #fff; border-radius: var(--r-xl);
  padding: 28px 28px 24px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
  animation: hrModalIn 0.22s ease-out both;
}
@keyframes hrModalIn { from { opacity: 0; transform: translateY(8px) scale(0.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
.hr-modal-x {
  position: absolute; top: 12px; right: 12px;
  background: transparent; border: none; cursor: pointer;
  width: 32px; height: 32px; border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center;
  color: var(--c-muted);
}
.hr-modal-x:hover { background: #F4F3EC; color: var(--c-text); }
.hr-modal-icon {
  width: 48px; height: 48px; border-radius: var(--r-lg);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 14px;
}
.hr-modal-icon.is-warn { background: #E4EFD8; color: #2D4A1F; }
.hr-modal-icon.is-danger { background: #FBE9E9; color: #8E2A2A; }
.hr-modal-h {
  font-family: var(--font-sans); font-weight: var(--w-bold); font-size: var(--t-lg); color: var(--c-text);
  margin: 0 0 10px;
  letter-spacing: -0.01em;
}
.hr-modal-body { font-size: var(--t-sm); line-height: 1.55; color: var(--c-text); }
.hr-modal-body p { margin: 0 0 10px; }
.hr-modal-body p:last-child { margin-bottom: 0; }
.hr-modal-body .muted { color: var(--c-muted); }
.hr-modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 22px; }
.hr-modal-cancel {
  font-family: var(--font-sans); font-weight: var(--w-semi); font-size: var(--t-sm);
  padding: 10px 18px; border-radius: var(--r-md);
  background: transparent; color: var(--c-text);
  border: 1px solid var(--c-border); cursor: pointer;
}
.hr-modal-cancel:hover { background: #F4F3EC; }
.hr-modal-confirm {
  font-family: var(--font-sans); font-weight: var(--w-semi); font-size: var(--t-sm);
  padding: 10px 18px; border-radius: var(--r-md);
  border: none; cursor: pointer; color: #fff;
}
.hr-modal-confirm.is-warn { background: #2D4A1F; }
.hr-modal-confirm.is-warn:hover { background: #24401A; }
.hr-modal-confirm.is-danger { background: #8E2A2A; }
.hr-modal-confirm.is-danger:hover { background: #722020; }

@media (max-width: 720px) {
  .hr-source-row { grid-template-columns: 40px 1fr; }
  .hr-source-actions { grid-column: 1 / -1; justify-content: flex-end; padding-top: 4px; }
  .hr-danger { grid-template-columns: 1fr; }
  .hr-danger-btn { justify-self: start; }
}


/* H1 secondary fragment — un-bolded parenthetical inside the bold heading */
.srv2-h1 .srv2-h1-sub {
  font-weight: var(--w-regular);
  color: var(--c-muted);
  font-size: 0.7em;
  letter-spacing: 0;
}
.srv2-header-context strong {
  color: var(--c-text);
  font-weight: var(--w-bold);
}


/* Inline record card inside a chat bubble */
.bubble.bubble-card {
  background: #fff;
  border: 1px solid #B8C6E5;
  padding: 14px 16px;
  border-radius: var(--r-lg);
  max-width: 340px;
  color: var(--c-text);
}
.bubble-card-h {
  display: flex; align-items: flex-start; gap: 12px;
  margin-bottom: 10px;
}
.bubble-card-h > svg { color: #1F4F94; margin-top: 2px; flex-shrink: 0; }
.bubble-card-title { font-weight: var(--w-bold); font-size: var(--t-sm); }
.bubble-card-sub { font-size: var(--t-xs); color: var(--c-muted); margin-top: 2px; }
.bubble-card-cta {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--c-primary);
  color: #fff;
  border: none;
  border-radius: var(--r-pill);
  padding: 9px 16px;
  font-family: inherit;
  font-weight: var(--w-bold);
  font-size: var(--t-sm);
  cursor: pointer;
}
.bubble-card-cta:hover { background: var(--c-primary-hover); }


/* ============================================================
   v4 — single-batch import: b.well hub animation, inline edit,
   Continue+Skip footer, skip-warning modal
   ============================================================ */

/* ---- Phase 1: import animation ---- */
.srv2-imp {
  display: flex; flex-direction: column; align-items: center;
  text-align: center;
  padding: 10px 0 6px;
}
.srv2-imp-stage {
  position: relative;
  width: 100%; max-width: 420px;
  aspect-ratio: 360 / 240;
  margin: 8px auto 26px;
}
.srv2-imp-lines { position: absolute; inset: 0; width: 100%; height: 100%; }
.srv2-imp-line {
  stroke: #DDE0D5; stroke-width: 2; stroke-linecap: round;
  stroke-dasharray: 3 9;
  transition: stroke .4s ease;
}
/* Blue, not green: this marks a category's data ARRIVING mid-import, before the patient has
   confirmed anything. Green means "confirmed" everywhere else in this screen (the progress bar,
   the card badges below) — lighting these up green while still importing read as already-done. */
.srv2-imp-line.is-on {
  stroke: #2D5BFF;
}
@keyframes srv2-flow { to { stroke-dashoffset: -12; } }

/* Static lighting only — all continuous motion removed per request. */
.srv2-imp-node-check { display: inline-flex; opacity: 0; }
.srv2-imp.is-running .srv2-imp-line { stroke: #2D5BFF; }
@keyframes srv2-lineOn { from { stroke: #DDE0D5; } to { stroke: #2D5BFF; } }
.srv2-imp.is-running .srv2-imp-node { animation: srv2-nodeOn .5s ease forwards; }
@keyframes srv2-nodeOn { to { border-color: #B8C6E5; box-shadow: 0 4px 14px rgba(45,91,255,0.18); } }
.srv2-imp.is-running .srv2-imp-node-dot { animation: srv2-dotOn .5s ease forwards; }
@keyframes srv2-dotOn { to { background: #2D5BFF; } }
.srv2-imp.is-running .srv2-imp-node-name { animation: srv2-nameOn .5s ease forwards; }
@keyframes srv2-nameOn { to { color: var(--c-text); } }
.srv2-imp.is-running .srv2-imp-node-check { animation: srv2-checkIn .4s ease forwards; }
@keyframes srv2-checkIn { to { opacity: 1; } }

.srv2-imp-orbit { list-style: none; margin: 0; padding: 0; position: absolute; inset: 0; }
.srv2-imp-node {
  position: absolute;
  display: flex; align-items: center; gap: 8px;
  transform: translate(-50%, -50%);
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: var(--r-pill);
  padding: 6px 13px 6px 6px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  white-space: nowrap;
  transition: border-color .3s, box-shadow .3s;
}
.srv2-imp-node-dot {
  width: 20px; height: 20px; border-radius: 50%;
  background: #EFEDE6; color: #fff;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: background .3s;
}
.srv2-imp-node-name { font-size: var(--t-xs); font-weight: var(--w-semi); color: var(--c-muted); transition: color .3s; }
.srv2-imp-node.is-on { border-color: #B8C6E5; box-shadow: 0 4px 14px rgba(45,91,255,0.18); }
.srv2-imp-node.is-on .srv2-imp-node-dot { background: #2D5BFF; }
.srv2-imp-node.is-on .srv2-imp-node-name { color: var(--c-text); }
.srv2-imp-tl { left: 13%; top: 19%; }
.srv2-imp-tr { left: 87%; top: 19%; }
.srv2-imp-bl { left: 13%; top: 81%; }
.srv2-imp-br { left: 87%; top: 81%; }

.srv2-imp-hub {
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: 84px; height: 84px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid var(--c-border);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 20px rgba(0,0,0,0.08);
  z-index: 2;
}
.srv2-imp-mark { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
/* A pulled brand mark (any aspect) must fit inside the circle, not be cropped. */
.srv2-imp-mark[data-brand-applied] { object-fit: contain; padding: 16px; background: #fff; }
/* White/light brand mark: brand-colored fill so it stays visible (beats the #fff rule above). */
.srv2-imp-mark[data-brand-applied][data-brand-light] { background: var(--brand-primary, #2D4A1F); }
.srv2-fail-hub .srv2-imp-mark[data-brand-applied] { padding: 14px; }
.srv2-imp-ring { display: none; }
@keyframes srv2-pulse {
  0% { transform: scale(1); opacity: 0.5; }
  100% { transform: scale(2.1); opacity: 0; }
}

.srv2-imp-readout { width: 100%; max-width: 460px; margin: 0 auto; }
.srv2-imp-pct {
  font-family: var(--font-sans);
  font-size: var(--t-2xl); font-weight: var(--w-bold);
  color: var(--c-text);
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}
.srv2-progress-lg { height: 10px; }
.srv2-imp-copy {
  font-size: var(--t-sm); line-height: 1.6;
  color: var(--c-muted);
  max-width: 56ch;
  margin: 18px auto 0;
}
.srv2-imp-copy strong { color: var(--c-text); font-weight: var(--w-bold); }
.srv2-imp-secure {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: var(--t-xs); color: var(--c-muted);
  margin-top: 16px;
}

/* ---- Phase 2: review bar + confirm-all ---- */
/* Aug 26, 2026 — condensed. It was a tall stacked block for what is really one
   line of information: a count and a progress bar. Now a single centred row. */
.srv2-reviewbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
  background: var(--n-sunken);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  padding: 10px 16px;
  margin-bottom: 14px;
}
.srv2-reviewbar-l { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; }
.srv2-confirmall {
  display: inline-flex; align-items: center; gap: 7px;
  flex-shrink: 0;
  font-family: inherit; font-size: var(--t-sm); font-weight: var(--w-bold);
  color: #2D5A1F;
  background: #E8F1DC;
  border: 1px solid #B5C9A4;
  border-radius: var(--r-pill);
  padding: 9px 16px;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s, opacity .15s;
}
/* Aug 26, 2026 — Confirm all shares the records heading's row and baseline, so
   it lines up with "Your … records" instead of floating above it. */
.srv2-section-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 0 0 14px; }
.srv2-section-head .srv2-section-h { margin: 0; }
.srv2-confirmall:hover:not(:disabled) { background: #DCEACB; }
.srv2-confirmall:disabled { opacity: 0.45; cursor: default; }

/* ---- Inline edit within a card ---- */
.srv2-edit-hint { font-size: var(--t-sm); color: var(--c-muted); margin: 14px 0 12px; }
.srv2-edit-chips { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.srv2-edit-chip {
  display: inline-flex; align-items: center; gap: 8px;
  background: #fff; border: 1px solid var(--c-border);
  border-radius: var(--r-pill); padding: 6px 8px 6px 14px;
  font-size: var(--t-sm); color: var(--c-text);
}
.srv2-edit-chip-x {
  width: 20px; height: 20px; border-radius: 50%;
  border: none; background: #F1EFE8; color: var(--c-muted);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; flex-shrink: 0;
}
.srv2-edit-chip-x:hover { background: #E7C8C0; color: #8A3520; }
.srv2-edit-empty { font-size: var(--t-sm); color: var(--c-muted); font-style: italic; }
.srv2-edit-add { position: relative; margin-bottom: 14px; }
.srv2-edit-add-btn {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: inherit; font-size: var(--t-sm); font-weight: var(--w-semi);
  color: var(--c-primary); background: none; border: none;
  cursor: pointer; padding: 4px 0;
}
.srv2-edit-add-btn:hover { text-decoration: underline; }
.srv2-edit-add-pop {
  margin-top: 8px;
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  background: #fff;
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
  padding: 6px;
  display: flex; flex-direction: column; gap: 2px;
}
.srv2-add-search { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--c-border); border-radius: var(--r-md); margin: 2px 2px 6px; color: var(--c-muted); }
.srv2-add-search input { border: none; outline: none; flex: 1; font-family: inherit; font-size: var(--t-sm); color: var(--c-text); background: none; }
.srv2-add-scroll { display: flex; flex-direction: column; gap: 2px; max-height: 200px; overflow: auto; }
.srv2-add-grouplabel { font-size: var(--t-xs); font-weight: var(--w-bold); text-transform: uppercase; letter-spacing: 0.04em; color: var(--c-muted); padding: 6px 10px 3px; }
.srv2-edit-add-opt {
  display: flex; align-items: center; gap: 8px;
  width: 100%; text-align: left;
  font-family: inherit; font-size: var(--t-sm); color: var(--c-text);
  background: none; border: none; border-radius: var(--r-sm);
  padding: 9px 10px; cursor: pointer;
}
.srv2-edit-add-opt:hover { background: var(--c-soft); color: var(--c-primary); }
.srv2-edit-add-opt svg { color: var(--c-primary); flex-shrink: 0; }
.srv2-edit-add-empty { font-size: var(--t-sm); color: var(--c-muted); padding: 9px 10px; }

/* ---- Footer: Continue + Skip side by side ---- */
.srv2-footer-block {
  margin-top: 30px; padding-top: 0;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.srv2-footer-actions { display: flex; align-items: center; gap: 18px; }
.srv2-footer-sticky {
  position: sticky; bottom: 0; z-index: 6;
  background: #fff;
}
.srv2-skip-link {
  font-family: inherit; font-size: var(--t-sm); font-weight: var(--w-semi);
  color: var(--c-muted);
  background: none; border: none; cursor: pointer;
  text-decoration: underline; text-underline-offset: 2px;
  padding: 8px 4px;
}
.srv2-skip-link:hover { color: var(--c-text); }
.srv2-skip-link:focus-visible { outline: 2px solid var(--c-primary); outline-offset: 2px; border-radius: var(--r-sm); }

/* ---- Skip-warning modal ---- */
.srv2-modal-icon-warn { background: #FBEFD6; color: #B7791F; }
.srv2-modal-warn .srv2-modal-actions { flex-direction: column; gap: 8px; }
.srv2-modal-warn .srv2-modal-continue,
.srv2-modal-warn .srv2-modal-back { width: 100%; }
.srv2-modal-warn .srv2-modal-back { color: var(--c-muted); }
.srv2-modal-warn .srv2-modal-back:hover { border-color: #C9988A; color: #8A3520; }

@media (prefers-reduced-motion: reduce) {
  .srv2-imp-line.is-on, .srv2-imp-ring,
  .srv2-imp.is-running .srv2-imp-line, .srv2-imp.is-running .srv2-imp-node,
  .srv2-imp.is-running .srv2-imp-node-dot, .srv2-imp.is-running .srv2-imp-node-name { animation: none; }
  .srv2-imp.is-running .srv2-imp-node-check { opacity: 1; animation: none; }
}
@media (max-width: 560px) {
  .srv2-reviewbar { flex-direction: column; align-items: stretch; }
  .srv2-imp-node-name { display: none; }
  .srv2-imp-node { padding: 6px; }
}


/* ============================================================
   v5 — PHR failure + disqualify demo states
   ============================================================ */

/* Failed source card */
.srv2-card-failed { border-color: #E2C887; background: #FCF7EA; }
.srv2-card-state-icon[data-state="failed"] { background: #FBEFD6; color: #B7791F; }
.srv2-card-dot-amber {
  width: 16px; height: 16px; border-radius: 50%;
  background: #B7791F; color: #fff;
  font-size: var(--t-xs); font-weight: var(--w-bold); line-height: 1;
  display: flex; align-items: center; justify-content: center;
}
.srv2-card-badge.is-failed { background: #FBEFD6; color: #9A6A14; }
.srv2-card.srv2-card-failed .srv2-card-body { border-top-color: #E2C887; }
.srv2-fail-note {
  display: flex; align-items: flex-start; gap: 9px;
  font-size: var(--t-sm); line-height: 1.5;
  color: #7A5A12;
  background: #FBF3DE;
  border: 1px solid #EAD9A6;
  border-radius: var(--r-md);
  padding: 11px 13px;
  margin: 14px 0 12px;
}
.srv2-fail-note svg { flex-shrink: 0; margin-top: 1px; color: #B7791F; }
.srv2-fail-note strong { color: #5E450D; }

/* Partial-fail banner */
.srv2-failbanner {
  display: flex; align-items: flex-start; gap: 11px;
  background: #FBF3DE;
  border: 1px solid #EAD9A6;
  border-radius: var(--r-md);
  padding: 13px 16px;
  margin-bottom: 18px;
  font-size: var(--t-sm); line-height: 1.5;
  color: #7A5A12;
}
.srv2-failbanner strong { color: #5E450D; font-weight: var(--w-bold); }
.srv2-failbanner-ic {
  flex-shrink: 0;
  width: 28px; height: 28px; border-radius: 50%;
  background: #F3E4B8; color: #B7791F;
  display: flex; align-items: center; justify-content: center;
}

/* Flagged record item (disqualify) */
.srv2-card-items li.srv2-item-flagged {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; flex-wrap: wrap;
}
.srv2-item-flag {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: var(--t-xs); font-weight: var(--w-bold);
  letter-spacing: 0.02em;
  color: #9A6A14; background: #FBEFD6;
  border: 1px solid #EAD9A6;
  padding: 3px 9px; border-radius: var(--r-pill);
  white-space: nowrap;
}

/* Verify (double-check) view */
.srv2-verify-card {
  border: 1px solid #EAD9A6;
  background: #FBF7EC;
  border-radius: var(--r-lg);
  padding: 18px 20px;
  margin: 20px 0 22px;
}
.srv2-verify-flag {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: var(--t-xs); font-weight: var(--w-bold);
  letter-spacing: 0.05em; text-transform: uppercase;
  color: #9A6A14;
  margin-bottom: 10px;
}
.srv2-verify-item {
  font-family: var(--font-sans);
  font-weight: var(--w-bold); font-size: var(--t-lg);
  color: var(--c-text);
  line-height: 1.3;
}
.srv2-verify-src {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: var(--t-xs); color: #2D5A1F; font-weight: var(--w-semi);
  margin-top: 8px;
}
.srv2-verify-actions {
  display: flex; flex-direction: column; gap: 10px;
  max-width: 360px;
}
.srv2-verify-actions .srv2-sticky-primary { width: 100%; min-width: 0; }
.srv2-verify-deny {
  font-family: inherit; font-size: var(--t-sm); font-weight: var(--w-semi);
  color: var(--c-text);
  background: #fff;
  border: 1.5px solid var(--c-border);
  border-radius: var(--cta-radius);
  padding: 12px 22px;
  cursor: pointer;
  width: 100%;
}
.srv2-verify-deny:hover { border-color: var(--c-primary); color: var(--c-primary); }

/* Disqualify redirect view */
.srv2-disq { text-align: center; }
.srv2-disq-icon {
  width: 60px; height: 60px; border-radius: 50%;
  background: var(--c-soft); color: var(--c-primary);
  display: inline-flex; align-items: center; justify-content: center;
  margin: 4px auto 14px;
}
.srv2-disq-h1 {
  font-family: var(--font-sans);
  font-weight: var(--w-bold); font-size: var(--t-title-size); line-height: 1.18;
  letter-spacing: -0.01em;
  color: var(--c-text);
  margin: 0 0 12px;
}
.srv2-disq-lede {
  font-size: var(--t-md); line-height: 1.6;
  color: var(--c-muted);
  max-width: 54ch; margin: 0 auto 22px;
}
.srv2-disq-lede strong { color: var(--c-text); font-weight: var(--w-bold); }
.srv2-refund {
  display: flex; align-items: flex-start; gap: 12px;
  text-align: left;
  background: #E8F1DC;
  border: 1px solid #B5C9A4;
  border-radius: var(--r-lg);
  padding: 15px 18px;
  max-width: 460px;
  margin: 0 auto 26px;
}
.srv2-refund-check {
  flex-shrink: 0;
  width: 28px; height: 28px; border-radius: 50%;
  background: #6B9248; color: #fff;
  display: flex; align-items: center; justify-content: center;
}
.srv2-refund-h { font-weight: var(--w-bold); font-size: var(--t-md); color: #234017; }
.srv2-refund-sub { font-size: var(--t-sm); color: #3F5A2E; margin-top: 3px; line-height: 1.45; }
.srv2-disq-next-h {
  font-size: var(--t-xs); font-weight: var(--w-bold);
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--c-muted);
  text-align: left;
  max-width: 460px; margin: 0 auto 12px;
}
.srv2-disq-opts {
  display: flex; flex-direction: column; gap: 10px;
  max-width: 460px; margin: 0 auto;
}
.srv2-disq-opt {
  display: flex; align-items: center; gap: 14px;
  text-align: left;
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: 15px 16px;
  cursor: pointer;
  font-family: inherit;
  transition: border-color .15s, box-shadow .15s;
}
.srv2-disq-opt:hover { border-color: var(--c-primary); box-shadow: 0 3px 12px rgba(0,0,0,0.05); }
.srv2-disq-opt-ic {
  flex-shrink: 0;
  width: 38px; height: 38px; border-radius: var(--r-md);
  background: var(--c-soft); color: var(--c-primary);
  display: flex; align-items: center; justify-content: center;
}
.srv2-disq-opt-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.srv2-disq-opt-t { font-weight: var(--w-bold); font-size: var(--t-sm); color: var(--c-text); }
.srv2-disq-opt-s { font-size: var(--t-xs); color: var(--c-muted); line-height: 1.4; }
.srv2-disq-opt > svg { color: var(--c-muted); flex-shrink: 0; }
.srv2-disq-home { margin: 22px auto 0; display: block; }


/* ============================================================
   v6 — all-or-nothing import failure (full-screen recovery)
   ============================================================ */
.srv2-failwrap { text-align: center; }
.srv2-fail-stage {
  position: relative;
  width: 96px; height: 96px;
  margin: 8px auto 22px;
  display: flex; align-items: center; justify-content: center;
}
.srv2-fail-ring {
  position: absolute; inset: 0; border-radius: 50%;
  border: 2px solid #E2C887; opacity: 0.5;
  display: none;
}
@keyframes srv2-failpulse {
  0% { transform: scale(0.86); opacity: 0.5; }
  100% { transform: scale(1.5); opacity: 0; }
}
.srv2-fail-hub {
  position: relative;
  width: 84px; height: 84px; border-radius: 50%;
  background: #fff;
  border: 1px solid var(--c-border);
  box-shadow: 0 6px 20px rgba(0,0,0,0.08);
  display: flex; align-items: center; justify-content: center;
}
.srv2-fail-hub .srv2-imp-mark { filter: grayscale(0.55); opacity: 0.7; }
.srv2-fail-badge {
  position: absolute; right: -4px; bottom: -4px;
  width: 30px; height: 30px; border-radius: 50%;
  background: #B7791F; color: #fff;
  border: 2.5px solid #fff;
  display: flex; align-items: center; justify-content: center;
}
.srv2-fail-h1 {
  font-family: var(--font-sans);
  font-weight: var(--w-bold); font-size: var(--t-title-size); line-height: 1.18;
  letter-spacing: -0.01em;
  color: var(--c-text);
  margin: 0 0 12px;
}
.srv2-fail-lede {
  font-size: var(--t-md); line-height: 1.6;
  color: var(--c-muted);
  max-width: 52ch; margin: 0 auto 26px;
}
.srv2-fail-lede strong { color: var(--c-text); font-weight: var(--w-bold); }
.srv2-fail-actions {
  display: flex; flex-direction: column; gap: 10px;
  max-width: 360px; margin: 0 auto 14px;
}
.srv2-fail-actions .srv2-sticky-primary { width: 100%; min-width: 0; }
.srv2-fail-manual {
  font-family: inherit; font-size: var(--t-sm); font-weight: var(--w-semi);
  color: var(--c-text);
  background: #fff;
  border: 1.5px solid var(--c-border);
  border-radius: var(--cta-radius);
  padding: 12px 22px;
  cursor: pointer; width: 100%;
}
.srv2-fail-manual:hover { border-color: var(--c-primary); color: var(--c-primary); }
.srv2-fail-manual-note {
  font-size: var(--t-xs); line-height: 1.5;
  color: var(--c-muted);
  max-width: 44ch; margin: 0 auto 20px;
}
.srv2-fail-manual-note strong { color: var(--c-text); font-weight: var(--w-bold); }
.srv2-failwrap .srv2-imp-secure { justify-content: center; }
@media (prefers-reduced-motion: reduce) { .srv2-fail-ring { animation: none; } }


/* ============================================================
   v7 — on-screen prototype scenario toggle (demo control)
   ============================================================ */
.srv2-demobar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap;
  margin: -8px 0 22px;
  padding: 8px 8px 8px 14px;
  border: 1px dashed #C7CDBC;
  border-radius: var(--r-md);
  background: repeating-linear-gradient(45deg, #FAFAF6, #FAFAF6 10px, #F5F5EE 10px, #F5F5EE 20px);
}
.srv2-demobar-label {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: var(--t-xs); font-weight: var(--w-bold);
  letter-spacing: 0.07em; text-transform: uppercase;
  color: #7A8169;
}
.srv2-demobar-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #B58A3E;
  box-shadow: 0 0 0 3px rgba(181,138,62,0.18);
}
.srv2-demobar-seg {
  display: flex; gap: 2px;
  background: #ECEDE5;
  border-radius: var(--r-pill);
  padding: 3px;
}
.srv2-demobar-btn {
  font-family: inherit; font-size: var(--t-xs); font-weight: var(--w-semi);
  color: var(--n-ink-2);
  background: transparent;
  border: none; cursor: pointer;
  padding: 6px 14px; border-radius: var(--r-pill);
  white-space: nowrap;
  transition: background .15s, color .15s;
}
.srv2-demobar-btn:hover { color: var(--c-text); }
.srv2-demobar-btn.is-active {
  background: #fff;
  color: var(--c-text);
  box-shadow: 0 1px 3px rgba(0,0,0,0.12);
}
@media (max-width: 560px) {
  .srv2-demobar { margin-top: 0; }
  .srv2-demobar-seg { width: 100%; }
  .srv2-demobar-btn { flex: 1; padding: 8px 6px; }
}


/* ============================================================
   v8 — WM-scoped review: "rest of your data" disclaimer
   ============================================================ */
.srv2-rest-note {
  display: flex; align-items: flex-start; gap: 9px;
  margin: 18px 0 0;
  padding: 13px 15px;
  background: var(--n-sunken);
  border: 1px solid var(--n-line);
  border-radius: var(--r-md);
  font-size: var(--t-sm); line-height: var(--lh-body);
  color: var(--n-ink-3);
}
.srv2-rest-note svg { flex-shrink: 0; margin-top: 2px; color: var(--c-primary); }
.srv2-rest-note strong { color: var(--c-text); font-weight: var(--w-bold); }

/* ============================================================
   DECOUPLED WELCOME (redesign) — Wheel alone, numbered journey,
   upfront cost, value/ease framing. No partner logos, no consent wall.
   ============================================================ */
.wc-wheel-brand {
  display: flex; align-items: center; justify-content: center;
  padding-bottom: 22px; margin-bottom: 4px;
  border-bottom: 1px solid var(--c-border);
}
.wc-wheel-brand img { height: 30px; width: auto; display: block; }
/* tighter heading now that only the Wheel wordmark sits above it */
.wc-card .wc-h1 { margin-top: 26px; }
.wc-card .wc-lede { margin-bottom: 22px; }

.wc-journey {
  list-style: none; margin: 0 0 24px; padding: 0;
  display: flex; flex-direction: column; gap: 2px;
  border: 1px solid var(--c-border); border-radius: var(--r-lg); overflow: hidden;
  background: var(--c-soft);
}
.wc-journey-step {
  display: flex; align-items: center; gap: 16px;
  padding: 16px 18px; background: #fff;
}
.wc-journey-step + .wc-journey-step { border-top: 1px solid var(--c-border); }
.wc-journey-num {
  flex: none; width: 26px; height: 26px; border-radius: 50%;
  background: var(--c-primary); color: #fff;
  font-size: var(--t-sm); font-weight: var(--w-bold);
  display: grid; place-items: center;
}
.wc-journey-ic {
  flex: none; width: 38px; height: 38px; border-radius: var(--r-md);
  background: var(--c-soft); color: var(--c-primary);
  display: grid; place-items: center;
}
.wc-journey-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.wc-journey-t { font-size: var(--t-md); font-weight: var(--w-semi); color: var(--c-text); }
.wc-journey-d { font-size: var(--t-sm); line-height: 1.45; color: var(--c-muted); text-wrap: pretty; }

.wc-cost {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 16px 20px; margin-bottom: 26px;
  border: 1px solid var(--c-border); border-radius: var(--r-lg);
  background: #fff;
}
.wc-cost-l { display: flex; flex-direction: column; gap: 2px; }
.wc-cost-label { font-size: var(--t-xs); font-weight: var(--w-bold); letter-spacing: 0.05em; text-transform: uppercase; color: var(--c-muted); }
.wc-cost-svc { font-size: var(--t-sm); font-weight: var(--w-semi); color: var(--c-text); }
.wc-cost-r { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; text-align: right; }
.wc-cost-amt { font-size: var(--t-xl); font-weight: var(--w-bold); color: var(--c-text); letter-spacing: -0.01em; }
.wc-cost-note { font-size: var(--t-xs); color: var(--c-muted); max-width: 28ch; }

.wc-reassure {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: var(--t-xs); color: var(--c-muted); text-align: center;
  max-width: 52ch; line-height: 1.45;
}
.wc-reassure svg { flex: none; color: var(--c-primary); }
.wc-cta-row .wc-cta-primary { white-space: nowrap; min-width: 220px; }

@media (max-width: 560px) {
  .wc-cost { flex-direction: column; align-items: flex-start; }
  .wc-cost-r { align-items: flex-start; text-align: left; }
  .wc-journey-step { gap: 12px; padding: 14px; }
}

/* ============================================================
   PHR IMPORT — b.well consent gate (decoupled trust moment)
   ============================================================ */
/* Aug 26, 2026 — no override. This card used to be 680 while the import and
   confirm cards were 760, so advancing between them moved the column. */
.srv2-consent { max-width: var(--w-card); }
.srv2-consent-poweredby { display: flex; align-items: center; gap: 9px; margin-bottom: 16px; }
.srv2-consent-poweredby .srv2-poweredby-label { font-size: var(--t-xs); color: var(--c-muted); }
.srv2-consent-poweredby .srv2-poweredby-logo { height: 20px; width: auto; display: block; }
.srv2-consent-lede { font-size: var(--t-md); line-height: 1.55; color: var(--c-text); margin: 6px 0 20px; max-width: 60ch; }
.srv2-consent-lede strong { font-weight: var(--w-semi); }
/* b.well trust badges (standalone, under the lede) + info tooltip by the logo */
.srv2-bwelltrust-badges { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 22px; }
.srv2-bwelltrust-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 11px; border-radius: var(--r-pill); background: #E4EFD8; color: #2D5A1F;
  font-family: var(--font-sans); font-size: var(--t-xs); font-weight: var(--w-bold); letter-spacing: 0.01em;
}
.srv2-bwelltrust-badge svg { flex-shrink: 0; }
.srv2-bwell-mark { display: inline-flex; align-items: center; gap: 8px; }
.srv2-bwell-info { position: relative; display: inline-flex; align-items: center; color: #8A8770; cursor: help; }
.srv2-bwell-info:hover, .srv2-bwell-info:focus-visible { color: #2D5A1F; outline: none; }
.srv2-bwell-info::after { content: ""; position: absolute; top: 100%; right: 0; width: 280px; height: 10px; }
.srv2-bwell-tip {
  display: none; position: absolute; top: calc(100% + 8px); right: 0; z-index: 50;
  width: 280px; padding: 12px 14px; border-radius: var(--r-md); background: #fff;
  border: 1px solid var(--c-border); box-shadow: 0 8px 28px rgba(0,0,0,0.14);
  font-family: var(--font-sans); font-size: var(--t-xs); line-height: 1.55; color: #5C5C50; font-weight: var(--w-regular);
  text-align: left; cursor: default; white-space: normal;
}
.srv2-bwell-info:hover .srv2-bwell-tip, .srv2-bwell-info:focus-within .srv2-bwell-tip { display: block; }
.srv2-bwell-tip a { color: var(--t-link-color); font-weight: var(--w-semi); text-decoration: none; white-space: nowrap; }
.srv2-bwell-tip a:hover { text-decoration: underline; }
/* Idle import animation shown on the consent screen — gray until the user connects */
.srv2-imp-idle { margin: 8px 0 26px; opacity: 0.5; filter: grayscale(1); pointer-events: none; }
.srv2-imp-idle .srv2-imp-ring { animation: none; opacity: 0.35; }
.srv2-imp-idle .srv2-imp-stage { margin-bottom: 0; }
.srv2-value {
  list-style: none; margin: 0 0 22px; padding: 18px 20px;
  background: #EAF1E4; border: 1px solid #CFE0C2; border-radius: var(--r-lg);
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px 20px;
}
.srv2-value li { display: flex; align-items: flex-start; gap: 10px; font-size: var(--t-sm); color: #234017; line-height: 1.4; }
.srv2-value-ic { flex: none; width: 20px; height: 20px; border-radius: 50%; background: var(--c-primary); color: #fff; display: grid; place-items: center; margin-top: 1px; }
@media (max-width: 560px) { .srv2-value { grid-template-columns: 1fr; } }

.wc-bwell-inline { margin: 0 0 22px; }
.srv2-consent-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 8px; }
.srv2-consent-head .srv2-h1 { margin: 0; }
.srv2-consent-bwell-logo { height: 22px; width: auto; display: block; flex: none; }
.wc-bwell-grid-labels { grid-template-columns: 1fr; }
.wc-bwell-statictext { padding: 14px 16px; border-bottom: 1px solid var(--c-border); }
.wc-bwell-statictext p { margin: 0 0 7px; font-size: var(--t-xs); line-height: 1.5; color: var(--c-muted); }
.wc-bwell-statictext p:last-child { margin-bottom: 0; }
.wc-bwell-statictext strong { color: var(--c-text); font-weight: var(--w-semi); }
.wc-bwell-statictext a { color: var(--t-link-color); font-weight: var(--w-semi); cursor: pointer; }
.wc-bwell-link-out { text-decoration: underline; text-underline-offset: 2px; }
/* Consent display variants */
.wc-bwell-summary-row { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.wc-bwell-summary-row .wc-bwell-summary-line { flex: 1; min-width: 0; }
.wc-bwell-summary-row .wc-bwell-disclose { margin-top: 0; flex-shrink: 0; white-space: nowrap; }
.wc-bwell-summary-line { font-size: var(--t-sm) !important; color: var(--c-text) !important; line-height: 1.5; }
.wc-bwell-disclose { display: inline-flex; align-items: center; gap: 5px; margin-top: 10px; background: none; border: none; padding: 0; cursor: pointer; font-family: var(--font-sans); font-size: var(--t-sm); font-weight: var(--w-semi); color: var(--t-link-color); }
.wc-bwell-fulltext { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--c-border); }
.wc-bwell-fulllink { display: inline-block; margin-top: 8px; background: none; border: none; padding: 0; cursor: pointer; font-family: var(--font-sans); font-size: var(--t-sm); font-weight: var(--w-semi); color: var(--t-link-color); }
.wc-bwell-microbullets { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.wc-bwell-microbullets li { display: flex; align-items: center; gap: 9px; font-size: var(--t-sm); color: var(--c-text); }
.wc-bwell-microbullets li svg { flex: none; color: var(--c-primary); }
.srv2-modal-fulltext { text-align: left; max-width: 520px; }
.srv2-fulltext-body p { font-size: var(--t-sm); line-height: 1.55; color: var(--c-muted); margin: 0 0 10px; }
.srv2-fulltext-body strong { color: var(--c-text); font-weight: var(--w-semi); }
.srv2-fulltext-body a { color: var(--t-link-color); font-weight: var(--w-semi); cursor: pointer; }
.wc-bwell-grid-labels .wc-bwell-label-strong { font-size: var(--t-sm); font-weight: var(--w-semi); color: var(--c-text); }
.srv2-consent-actions { display: flex; flex-direction: row; align-items: center; justify-content: center; gap: 12px; margin-bottom: 8px; flex-wrap: wrap; }
.srv2-consent-actions .srv2-sticky-primary { min-width: 0; }
.srv2-outline-btn {
  font-family: var(--font-sans); font-weight: var(--w-semi); font-size: var(--t-md);
  padding: 0 26px; height: 52px; border-radius: var(--r-pill); cursor: pointer;
  background: #fff; color: var(--c-primary); border: 1.5px solid var(--c-border-strong);
}
.srv2-outline-btn:hover { border-color: var(--c-primary); background: var(--c-soft); }
.srv2-consent .srv2-imp-secure { justify-content: center; }
.srv2-modal-manual { text-align: left; }
/* Returning refresh — "already authorized" row (has-consent scenario) */
.rp-authorized-row { display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; }
.rp-authorized-ic { flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--c-primary); color: #fff; display: grid; place-items: center; margin-top: 1px; }
.rp-authorized-title { font-size: var(--t-sm); font-weight: var(--w-semi); color: var(--c-text); }
.rp-authorized-sub { font-size: var(--t-sm); color: var(--c-muted); margin-top: 2px; }
.rp-authorized-sub a { color: var(--t-link-color); font-weight: var(--w-semi); cursor: pointer; }
.srv2-manual-list { list-style: none; margin: 4px 0 4px; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.srv2-manual-list li { display: flex; align-items: center; gap: 10px; font-size: var(--t-sm); color: var(--c-text); }
.srv2-manual-list li svg { flex: none; color: var(--c-muted); }

/* ============================================================
   REVIEW YOUR ANSWERS — returning-patient onboarding, step 2.
   One scrollable list of everything the patient told us last visit, with
   confirm-all and per-row edit.

   Built from the returning flow's own .rp-* card so the column does not jump
   width mid-flow (640, same as Welcome back and Refresh records).

   NOTE: no small-caps eyebrow here. .rp-eyebrow is uppercase 11px and is
   listed in CLAUDE.md as known debt — this screen uses a real heading and a
   plain sub instead, per the standing rule.
   ============================================================ */
.ra-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s-4); flex-wrap: wrap; }
.ra-head-text { flex: 1 1 22ch; min-width: 0; }
.ra-count { font-size: var(--t-sm); line-height: var(--lh-sm); color: var(--c-muted); white-space: nowrap; padding-top: var(--s-1); }

/* The scroll region. Capped so the sticky action bar is always on screen —
   a confirm button below 12 rows of fold is a confirm button nobody finds. */
/* The card is the thing that must fit the window. Capping the LIST instead let the card grow
   at the same rate as the viewport — 741px of card at a 540px fold — so "Confirm and continue"
   was below the fold at every realistic height and only cleared it around 1200px. The list now
   takes whatever is left after the heading, the confirm-all button and the footer. */
/* Three separate things keep the footer off the list, and the first two are the ones that
   actually make it impossible rather than unlikely:
     overflow: hidden  — children can never paint outside the card, whatever the arithmetic
     min-height: 0     — on BOTH card and list, so flex can really shrink them
   `min-height: 340px` used to be here and was the bug: it pinned the card to exactly the size
   that could not hold its own chrome (80 padding + 111 head + 50 button + 108 foot = 349),
   so the list spilled 39px past the card and the sticky footer resolved against the viewport
   and painted over question 1. The media query below reclaims that chrome instead. */
.ra-card {
  display: flex; flex-direction: column;
  max-height: calc(100vh - 200px); min-height: 0; overflow: hidden;
}
.ra-scroll {
  flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain;
  margin: var(--s-5) calc(var(--s-5) * -1) 0;
  padding: 0 var(--s-5);
  border-top: 1px solid var(--c-border);
  border-bottom: 1px solid var(--c-border);
}
.ra-scroll::-webkit-scrollbar { width: 10px; }
.ra-scroll::-webkit-scrollbar-thumb { background: var(--n-line); border-radius: var(--r-pill); border: 3px solid var(--n-surface); }

.ra-section { padding: var(--s-5) 0 var(--s-2); }
.ra-section + .ra-section { border-top: 1px solid var(--n-line-3); }
.ra-section-h { display: flex; align-items: center; gap: var(--s-2); margin-bottom: var(--s-3); }
.ra-section-h .material-icons-round { color: var(--c-primary); font-size: var(--t-lg); }
.ra-section-t { font-size: var(--t-md); line-height: var(--lh-md); font-weight: var(--w-semi); color: var(--c-text); }

.ra-row { display: grid; grid-template-columns: 1fr auto; gap: var(--s-3); align-items: start; padding: var(--s-3) 0; }
.ra-row + .ra-row { border-top: 1px solid var(--n-line-3); }
.ra-q { font-size: var(--t-sm); line-height: var(--lh-sm); color: var(--c-muted); }
.ra-a { font-size: var(--t-md); line-height: var(--lh-md); color: var(--c-text); margin-top: 2px; }
.ra-a.is-empty { color: var(--n-ink); font-weight: var(--w-medium); }
.ra-from { font-size: var(--t-xs); line-height: var(--lh-xs); color: var(--c-muted); margin-top: var(--s-1); }
.ra-side { display: flex; align-items: center; gap: var(--s-2); }

.ra-edit {
  padding: var(--s-1) var(--s-3); border-radius: var(--r-pill); border: 1px solid var(--c-border);
  background: var(--n-surface); color: var(--c-text);
  font-family: inherit; font-size: var(--t-sm); font-weight: var(--w-medium); cursor: pointer; white-space: nowrap;
}
.ra-edit:hover { background: var(--n-hover); }

/* Row state. Sentence case on purpose — these are labels, not pills shouting. */
.ra-chip { display: inline-flex; align-items: center; gap: var(--s-1); padding: 3px var(--s-2); border-radius: var(--r-pill); font-size: var(--t-xs); font-weight: var(--w-semi); white-space: nowrap; }
.ra-chip .material-icons-round { font-size: var(--t-sm); }
.ra-chip.is-confirmed { background: var(--st-success-soft); color: var(--n-ink); }
.ra-chip.is-confirmed .material-icons-round { color: var(--st-success); }
.ra-chip.is-edited { background: var(--st-info-soft); color: var(--n-ink); }
.ra-chip.is-edited .material-icons-round { color: var(--st-info); }
.ra-chip.is-needs { background: var(--st-warning-soft); color: var(--n-ink); }
.ra-chip.is-needs .ra-dot { width: 7px; height: 7px; border-radius: var(--r-round); background: var(--st-warning); flex: 0 0 7px; }

.ra-editor { grid-column: 1 / -1; margin-top: var(--s-3); padding: var(--s-4); background: var(--n-well); border-radius: var(--r-md); }
.ra-editor-actions { display: flex; gap: var(--s-2); margin-top: var(--s-3); }
.ra-editor-actions .btn { padding: var(--s-2) var(--s-4); }
.ra-check-row { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-2) 0; font-size: var(--t-sm); color: var(--c-text); cursor: pointer; }
.ra-check {
  width: 20px; height: 20px; flex: 0 0 20px; border-radius: var(--r-sm);
  border: 1.5px solid var(--n-line-input); background: var(--n-surface);
  display: inline-flex; align-items: center; justify-content: center; color: var(--n-surface);
}
.ra-check.is-on { background: var(--c-primary); border-color: var(--c-primary); }
.ra-check .material-icons-round { font-size: var(--t-sm); }

/* Action bar. flex-shrink:0 keeps it out of the scroll region's fight for space; sticky is the
   belt to that braces if the card is ever placed somewhere unbounded. */
.ra-foot {
  flex: 0 0 auto; position: sticky; bottom: 0; z-index: 1;
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-4);
  flex-wrap: wrap; padding-top: var(--s-5); background: var(--n-surface);
}
.ra-foot-status { font-size: var(--t-sm); line-height: var(--lh-sm); color: var(--c-muted); }
.ra-foot-status strong { color: var(--c-text); font-weight: var(--w-semi); }
.ra-foot .wc-cta-primary { margin-top: 0; width: auto; min-width: 240px; }
@media (max-width: 640px) {
  .ra-foot .wc-cta-primary { width: 100%; min-width: 0; }
}

/* Question numbering, nesting and the EMR's flag — so the list the patient confirms is
   recognisably the same document the clinician reads in the Intake Interview panel. */
.ra-num { color: var(--c-muted); font-weight: var(--w-semi); margin-right: var(--s-2); }
.ra-row.is-sub { padding-left: var(--s-6); position: relative; }
.ra-row.is-sub::before {
  content: ""; position: absolute; left: var(--s-3); top: var(--s-4); bottom: var(--s-4);
  width: 2px; background: var(--n-line-2); border-radius: var(--r-pill);
}
/* Highlighted like the EMR, but the ink is --n-ink, not --st-warning: warning ink on
   warning-soft measures 2.93:1 and this is the content the clinician most needs read. */
.ra-a-flag {
  display: inline-block; padding: 1px var(--s-2); border-radius: var(--r-sm);
  background: var(--st-warning-soft); color: var(--n-ink); font-weight: var(--w-medium);
}
.ra-flag-note { color: var(--n-ink-2); font-weight: var(--w-medium); }

/* Short windows — the preview pane is 540px, well under any laptop. The card cannot grow (it
   would leave the viewport), so the chrome around the list has to give: tighter padding, the
   sub paragraph dropped, a compact action bar. That buys the list ~150px at 540px instead of
   the negative space it had. */
/* Declared before the media query on purpose: same specificity, so a later rule would win and
   hide both copies of Confirm-all at once — which is exactly what happened. */
.ra-foot-confirm { display: none; }

@media (max-height: 780px) {
  .ra-card { padding: var(--s-5) var(--s-6); max-height: calc(100vh - 190px); }
  .ra-card .rp-h1 { margin-bottom: var(--s-1); }
  /* The sub is the only instruction on the screen and it STAYS — the first cut of this rule hid
     it, which removed the explanation at exactly the viewport where the UI is least obvious.
     It is clamped to two lines instead. */
  .ra-card .rp-sub { font-size: var(--t-sm); line-height: var(--lh-sm); margin-bottom: 0; }
  /* Confirm-all moves INTO the action bar. As its own block it cost 62px — a fifth of the card —
     to hold one secondary button, while the list it was meant to serve had 118px and could not
     show a single complete answer. */
  /* display:none still leaves the margin behind — 18px of nothing above the list. */
  .ra-confirm-all { display: none; margin-top: 0 !important; }
  .ra-foot-confirm { display: inline-flex; }
  .ra-foot .btn, .ra-foot .wc-cta-primary { padding-top: var(--s-2); padding-bottom: var(--s-2); }
  .ra-scroll { margin-top: var(--s-2) !important; }
  /* Rows shrink too. At 110px each, even a 162px list showed no complete answer — and the point
     of the screen is reading answers, so the provenance line is what gives way, not the answer. */
  .ra-row { padding: var(--s-3) 0; }
  .ra-row .ra-from { display: none; }
  .ra-row .ra-flag-note { display: block; }
  .ra-q { margin-bottom: 2px; }
  .ra-foot { padding-top: var(--s-3); flex-wrap: nowrap; }
  .ra-foot-status { font-size: var(--t-xs); line-height: var(--lh-xs); }
  /* The first section header sat 69px into a 139px window, so the first answer could not fit
     under it however short the row got. */
  /* 60px sat above the first answer: 20 section padding + 28 header + 12 header margin. */
  .ra-section { padding-top: var(--s-2); }
  .ra-section:first-child { padding-top: 0; }
  .ra-section-h { margin-top: 0; margin-bottom: var(--s-1); padding-bottom: 0; }

  /* THE SHEET. A 278–345px control cannot be operated through a 149px porthole, so at short
     heights the open editor leaves the scroll region and takes the card: absolutely positioned
     against .ra-card (hence position:static on the row, which would otherwise be the anchor),
     its own scroll, Save pinned at the bottom. Reviewing and answering stop competing for the
     same box instead of splitting it more finely. */
  .ra-card { position: relative; }
  /* .ra-row.is-sub carries position:relative at (0,2,0) and outranks a bare .ra-row, which left
     the sheet anchored to a 70px row instead of the card. Match the specificity. */
  .ra-card .ra-row, .ra-card .ra-row.is-sub { position: static; }
  .ra-editor-sheet {
    position: absolute; inset: 0; z-index: 5; margin: 0;
    display: flex; flex-direction: column; gap: var(--s-2);
    padding: var(--s-5) var(--s-6);
    background: var(--n-surface); border-radius: var(--r-card);
    overflow-y: auto; overscroll-behavior: contain;
  }
  .ra-sheet-q {
    flex: 0 0 auto; font-size: var(--t-md); line-height: var(--lh-md);
    font-weight: var(--w-semi); color: var(--n-ink); margin-bottom: var(--s-2);
  }
  .ra-editor-sheet .radio-row, .ra-editor-sheet .ra-check-row { padding: var(--s-2) 0; }
  .ra-editor-sheet .ra-editor-actions {
    position: sticky; bottom: 0; margin-top: auto;
    padding-top: var(--s-3); background: var(--n-surface);
  }
}


/* ============================================================================
   PREFILL BANNERS prototype (.pf-*). The alternative to the .ra-* review list.
   ============================================================================ */

/* Above the card, not inside it — the banner is a statement ABOUT the card.
   Ink is --n-ink, not --st-info: status ink on status-soft measures 4.3:1 at best
   and this is the one line on the screen the patient must read. The icon and the
   left rule carry the colour, which is the split .subs-alert already uses. */
.pf-banner {
  display: grid; grid-template-columns: 20px 1fr; gap: var(--s-3);
  align-items: start; width: 100%; max-width: 640px; margin: 0 auto var(--s-3);
  padding: var(--s-4) var(--s-4) var(--s-4) var(--s-3);
  background: var(--st-info-soft); border-left: 3px solid var(--st-info);
  border-radius: var(--r-sm);
  font-size: var(--t-sm); line-height: var(--lh-sm); color: var(--n-ink);
}
.pf-banner-i { display: inline-flex; color: var(--st-info); padding-top: 1px; }

.pf-card { max-width: 640px; }
.pf-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-4); }
.pf-head .rp-h1 { margin-bottom: 0; }
.pf-step { flex: 0 0 auto; font-size: var(--t-sm); line-height: var(--lh-sm); color: var(--c-muted); }

.pf-rows { display: flex; flex-direction: column; gap: var(--s-5); margin-top: var(--s-5); }
.pf-row { display: flex; flex-direction: column; gap: var(--s-3); }
/* A follow-up to the question above it, so it is indented rather than numbered. */
.pf-row.is-sub { padding-left: var(--s-5); border-left: 2px solid var(--n-line-3); }
.pf-q {
  font-size: var(--t-md); line-height: var(--lh-md); font-weight: var(--w-medium);
  color: var(--n-ink); text-wrap: pretty;
}

/* The field-level half of the banner's promise: which answers it meant. */
.pf-tag {
  display: inline-flex; align-items: center; gap: 3px; margin-left: var(--s-2);
  padding: 2px var(--s-2); border-radius: var(--r-pill);
  background: var(--st-info-soft); color: var(--n-ink);
  font-size: var(--t-xs); line-height: var(--lh-xs); font-weight: var(--w-semi);
  vertical-align: middle; white-space: nowrap;
}
.pf-tag .material-icons-round { color: var(--st-info); }
.pf-tag.is-changed { background: var(--st-success-soft); }
.pf-tag.is-changed .material-icons-round { color: var(--st-success); }

.pf-foot { display: flex; align-items: center; gap: var(--s-3); margin-top: var(--s-6); }
.pf-cta { flex: 1 1 auto; }

.pf-done-check {
  width: 56px; height: 56px; border-radius: var(--r-round); margin: 0 auto var(--s-4);
  background: var(--c-soft); color: var(--c-primary);
  display: flex; align-items: center; justify-content: center;
}
.pf-card .pf-done-check ~ .rp-h1, .pf-card .pf-done-check ~ .rp-sub { text-align: center; }
.pf-tally {
  display: flex; align-items: center; gap: var(--s-3);
  margin-top: var(--s-5); padding: var(--s-4);
  background: var(--n-well); border-radius: var(--r-md);
  font-size: var(--t-sm); line-height: var(--lh-sm); color: var(--n-ink-2);
}
.pf-tally-n {
  flex: 0 0 auto; font-size: var(--t-2xl); line-height: var(--lh-2xl);
  font-weight: var(--w-semi); color: var(--n-ink);
}
.pf-restart { margin-top: var(--s-5); width: 100%; }

@media (max-height: 780px) {
  .pf-rows { gap: var(--s-4); margin-top: var(--s-4); }
  .pf-banner { padding: var(--s-3) var(--s-3) var(--s-3) var(--s-3); }
}

/* Stepper + back link, at shell width above the reading column (see FlowShell). */
.flow-head { width: 100%; max-width: var(--w-flow); margin: 0 auto; padding: 0 var(--s-4); box-sizing: border-box; }
.flow-head .stepper { padding: 0; }
.flow-head .back-link { margin-bottom: var(--s-6); }
/* A back link that the prototype does not wire is shown DISABLED, never removed: its absence
   moved everything below it up, so two screens of one flow disagreed on where the card starts. */
.back-link.is-disabled { color: var(--n-ink-3); opacity: 0.55; cursor: default; pointer-events: none; }
