/* Brand fonts, served from this app (not Google) so no visitor details
   go to a third party, and the phone app works offline.
   Headings: DM Serif Display. Everything else: Inter. */
@font-face { font-family: 'DM Serif Display'; src: url('/fonts/DMSerifDisplay.woff2') format('woff2'), url('/fonts/DMSerifDisplay.ttf') format('truetype'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('/fonts/Inter.woff2') format('woff2'), url('/fonts/Inter.ttf') format('truetype'); font-weight: 100 900; font-style: normal; font-display: swap; }
/* DM Serif Display has one weight: never fake a bold version of it. */
html { font-synthesis-weight: none; }
button, input, select, textarea { font-family: inherit; }

:root {
  --teal: #0F6E56;
  --sage: #5DCAA5;
  --bg: #F9F8F5;
  --text: #1C1C1A;
  --muted: #6B6B66;
  --border: #E2E0D8;
  --red: #D85A30;
  --red-bg: #FAECE7;
  --red-text: #712B13;
  --amber: #EF9F27;
  --amber-bg: #FAEEDA;
  --amber-text: #633806;
  --green-bg: #EAF3DE;
  --green-text: #27500A;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-tap-highlight-color: transparent;
}

#app { max-width: 480px; margin: 0 auto; min-height: 100vh; }

.header {
  background: var(--teal);
  padding: 1.25rem 1rem 1rem;
  color: #fff;
}
.header h1 { font-size: 19px; margin: 0 0 2px; font-weight: 600; }
.header p { font-size: 12px; color: var(--sage); margin: 0; }

.section-label {
  font-size: 11px;
  letter-spacing: 0.03em;
  color: var(--muted);
  text-transform: uppercase;
  padding: 0.9rem 1rem 0.5rem;
  margin: 0;
}

.card-list { padding: 0 1rem; display: flex; flex-direction: column; gap: 10px; }

.card {
  background: #fff;
  border: 0.5px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  cursor: pointer;
}
.card.overdue { border-left: 3px solid var(--red); border-radius: 0 12px 12px 0; }
.card-title { font-size: 15px; font-weight: 500; margin: 0 0 3px; }
.card-sub { font-size: 12px; color: var(--muted); margin: 0; }

.badge {
  font-size: 11px;
  font-weight: 500;
  padding: 3px 9px;
  border-radius: 20px;
  white-space: nowrap;
}
.badge.on-track { background: var(--green-bg); color: var(--green-text); }
.badge.due-soon { background: var(--amber-bg); color: var(--amber-text); }
.badge.overdue { background: var(--red-bg); color: var(--red-text); }
.badge.green { background: var(--green-bg); color: var(--green-text); }
.badge.amber { background: var(--amber-bg); color: var(--amber-text); }
.badge.red { background: var(--red-bg); color: var(--red-text); }

.btn {
  display: block;
  width: 100%;
  background: var(--teal);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 13px;
  font-size: 15px;
  font-weight: 500;
  text-align: center;
  cursor: pointer;
}
.btn:disabled { opacity: 0.5; }
.btn.secondary {
  background: #fff;
  color: var(--teal);
  border: 0.5px solid var(--teal);
}
.btn-wrap { padding: 1rem; }

.field { padding: 0 1rem; margin-bottom: 1rem; }
.field label { display: block; font-size: 13px; font-weight: 500; margin-bottom: 6px; }
.field input, .field select {
  width: 100%;
  padding: 12px;
  border: 0.5px solid var(--border);
  border-radius: 8px;
  font-size: 15px;
  background: #fff;
}

.topbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 1rem;
  background: #fff;
  border-bottom: 0.5px solid var(--border);
}
.topbar .back { font-size: 22px; color: var(--teal); cursor: pointer; }
.topbar h2 { font-size: 16px; margin: 0; }

.error-text { color: var(--red-text); font-size: 13px; padding: 0 1rem; margin: -0.5rem 0 1rem; }

.login-wrap {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100vh;
  padding: 2rem 1.5rem;
}
.login-wrap h1 {
  font-family: 'DM Serif Display', Georgia, serif;
  color: var(--teal);
  text-align: center;
  margin-bottom: 2rem;
}

.loading { text-align: center; padding: 3rem 1rem; color: var(--muted); }

.progress-wrap { padding: 1rem; }
.progress-bar {
  width: 100%;
  height: 8px;
  background: var(--border);
  border-radius: 20px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: var(--teal);
  transition: width 0.2s ease;
}
.progress-label { font-size: 12px; color: var(--muted); margin: 8px 0 0; }

.checklist-stage {
  padding: 0.9rem 1rem;
  border-top: 0.5px solid var(--border);
}
.checklist-stage-title {
  font-size: 13px;
  font-weight: 600;
  margin: 0 0 10px;
  display: flex;
  justify-content: space-between;
}
.checklist-stage-count { color: var(--muted); font-weight: 400; }
.checklist-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  font-size: 14px;
  cursor: pointer;
}
.checklist-item input[type="checkbox"] {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  accent-color: var(--teal);
}

.indicator-field {
  padding: 10px 0;
  border-bottom: 0.5px solid var(--border);
}
.indicator-label-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 6px;
}
.indicator-label-row label {
  font-size: 14px;
  font-weight: 500;
}
.indicator-prev {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}
.indicator-field input {
  width: 100%;
  padding: 10px 12px;
  border: 0.5px solid var(--border);
  border-radius: 8px;
  font-size: 15px;
  background: #fff;
}

.indicator-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.indicator-input-row input { flex: 1; }
.clear-btn {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  border: 0.5px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}
.input-error { border-color: var(--red) !important; }
.field-error-text {
  color: var(--red-text);
  font-size: 12px;
  margin: 4px 0 0;
}

.notes-textarea {
  width: 100%;
  min-height: 100px;
  padding: 10px 12px;
  border: 0.5px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  background: #fff;
  resize: vertical;
}

.checklist-stage-title .badge { margin-left: 8px; vertical-align: middle; }

.legal-text {
  font-size: 11px;
  color: var(--muted);
  padding: 1rem;
  line-height: 1.5;
  border-top: 0.5px solid var(--border);
  margin-top: 1rem;
}

.reference-item {
  background: #fff;
  border: 0.5px solid var(--border);
  border-radius: 10px;
  padding: 10px 14px;
}
.reference-name { font-size: 14px; font-weight: 600; margin: 0 0 2px; }
.reference-meta { font-size: 12px; color: var(--muted); margin: 0; }
.reference-threshold { font-size: 12px; color: var(--muted); margin: 4px 0 0; font-style: italic; }

@media print {
  .no-print { display: none !important; }
  body { background: #fff; }
  #app { max-width: none; }
}

/* ================================================================
   WELLBEING REPORT — PRINT-DOCUMENT LAYOUT
   ================================================================
   This is a self-contained document design (not a stretched phone
   screen) matching the Everwell Wellbeing Report reference PDF.
   Every class here is prefixed "rp-" so it never collides with the
   mobile app styles above. It applies whenever the report view is
   open (state.view === 'visitReport' toggles body.report-mode),
   both on screen and in the printed/exported PDF — so what the
   assessor reviews before printing already looks like the finished
   document, not a mobile checklist stretched wide.
   ================================================================ */

body.report-mode {
  background: #EAE8E0;
}
body.report-mode #app {
  max-width: 968px;
}

.rp-sheet {
  --rp-teal: #0F6E56;
  --rp-teal-dark: #0A4F3E;
  --rp-teal-mid: #1D9E75;
  --rp-sage: #5DCAA5;
  --rp-cream: #F9F8F5;
  --rp-panel: #FFFFFF;
  --rp-ink: #1C1C1A;
  --rp-ink-muted: #5B5B56;
  --rp-border: #E2E0D8;

  --rp-stable: #0F6E56;
  --rp-stable-bg: #E7F3EE;
  --rp-stable-text: #0A4F3E;

  --rp-improved: #1D7A57;
  --rp-improved-bg: #E4F2E8;
  --rp-improved-text: #155C40;

  --rp-monitor: #A66A12;
  --rp-monitor-bg: #FBF0DC;
  --rp-monitor-text: #7A4E0C;

  --rp-action: #B14332;
  --rp-action-bg: #FBEAE6;
  --rp-action-text: #8A3324;

  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  color: var(--rp-ink);
  background: var(--rp-cream);
  margin: 24px auto;
  max-width: 920px;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.10);
}
.rp-sheet h1, .rp-sheet h2, .rp-sheet h3 {
  font-family: 'DM Serif Display', Georgia, serif;
  font-weight: 400;
  margin: 0;
}

/* ---------- masthead ---------- */
.rp-masthead {
  background: var(--rp-teal-dark);
  color: #fff;
  padding: 22px 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.rp-brand { display: flex; align-items: center; }
.rp-brand-mark {
  width: 32px; height: 32px; border-radius: 8px; background: var(--rp-sage);
  display: inline-flex; align-items: center; justify-content: center;
  font-family: 'DM Serif Display', serif; color: var(--rp-teal-dark); font-size: 17px;
  margin-right: 12px; flex-shrink: 0;
}
.rp-brand-name { font-size: 14px; letter-spacing: 0.03em; font-weight: 600; }
.rp-brand-tagline { font-size: 12px; color: #CFEBE0; font-style: italic; font-family: 'DM Serif Display', serif; }
.rp-masthead-right { font-size: 11.5px; color: #CFEBE0; text-align: right; line-height: 1.5; }

/* ---------- cover ---------- */
.rp-cover { padding: 28px 28px 6px; }
.rp-cover-top { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.rp-cover-top-left { flex: 1; min-width: 240px; }
.rp-cover-top-right { width: 230px; flex-shrink: 0; }

.rp-kicker {
  font-size: 12px; font-weight: 600; letter-spacing: 0.07em; text-transform: uppercase;
  color: var(--rp-teal); margin: 0 0 6px;
}
.rp-client-name { font-size: 30px; color: var(--rp-ink); }
.rp-client-meta { margin-top: 10px; font-size: 13.5px; color: var(--rp-ink-muted); }
.rp-client-meta span { display: block; margin-bottom: 2px; }

.rp-overall-card {
  background: var(--rp-panel);
  border: 1px solid var(--rp-border);
  border-radius: 12px;
  padding: 14px 18px;
}
.rp-overall-card-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--rp-ink-muted); font-weight: 600; margin: 0; }
.rp-overall-card-headline { font-size: 17px; font-weight: 600; margin: 4px 0 0; color: var(--rp-ink); }
.rp-overall-card-sub { font-size: 12.5px; color: var(--rp-ink-muted); margin: 2px 0 0; }

/* ---------- rapid-scan domain strip ---------- */
.rp-scan-strip {
  margin: 22px 28px 0;
  background: var(--rp-panel);
  border: 1px solid var(--rp-border);
  border-radius: 12px;
  padding: 16px 20px;
}
.rp-scan-strip-title { font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--rp-ink-muted); margin: 0 0 10px; }
.rp-scan-row { display: flex; align-items: center; padding: 7px 0; border-top: 1px solid var(--rp-border); gap: 16px; flex-wrap: wrap; }
.rp-scan-row:first-of-type { border-top: none; }
.rp-scan-domain-name { width: 160px; flex-shrink: 0; font-size: 13px; font-weight: 600; color: var(--rp-ink); }
.rp-scan-dots { flex: 1; min-width: 160px; }
.rp-domain-bar { display: flex; width: 100%; height: 8px; border-radius: 4px; overflow: hidden; background: var(--rp-border); }
.rp-domain-bar > div { border-right: 1.5px solid var(--rp-panel); }
.rp-domain-bar > div:last-child { border-right: none; }
.rp-seg-stable { background: var(--rp-stable); }
.rp-seg-improved { background: var(--rp-improved); }
.rp-seg-monitor { background: var(--rp-monitor); }
.rp-seg-action { background: var(--rp-action); }
.rp-scan-caption { font-size: 11.5px; color: var(--rp-ink-muted); margin: 4px 0 0; }

/* ---------- stat dashboard ---------- */
.rp-dashboard {
  margin: 16px 28px 0;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.rp-stat-tile-wrap { flex: 1 1 0; min-width: 130px; }
.rp-stat-tile { border-radius: 12px; padding: 14px 12px; border: 1px solid var(--rp-border); }
.rp-stat-tile.t-stable { background: var(--rp-stable-bg); border-color: #CFE7DC; }
.rp-stat-tile.t-improved { background: var(--rp-improved-bg); border-color: #CBE6D4; }
.rp-stat-tile.t-monitor { background: var(--rp-monitor-bg); border-color: #F0DDAF; }
.rp-stat-tile.t-action { background: var(--rp-action-bg); border-color: #F0C9BE; }
.rp-stat-count { font-size: 26px; font-weight: 700; line-height: 1; }
.t-stable .rp-stat-count { color: var(--rp-stable-text); }
.t-improved .rp-stat-count { color: var(--rp-improved-text); }
.t-monitor .rp-stat-count { color: var(--rp-monitor-text); }
.t-action .rp-stat-count { color: var(--rp-action-text); }
.rp-stat-label { font-size: 12px; font-weight: 600; margin-top: 4px; }
.t-stable .rp-stat-label { color: var(--rp-stable-text); }
.t-improved .rp-stat-label { color: var(--rp-improved-text); }
.t-monitor .rp-stat-label { color: var(--rp-monitor-text); }
.t-action .rp-stat-label { color: var(--rp-action-text); }
.rp-stat-desc { font-size: 11px; color: var(--rp-ink-muted); margin-top: 3px; }

.rp-legend-note { margin: 10px 28px 0; font-size: 11.5px; color: var(--rp-ink-muted); line-height: 1.9; }
.rp-legend-note .li { display: inline-block; margin-right: 16px; }
.rp-legend-note .li b { font-weight: 700; }

/* ---------- narrative ---------- */
.rp-narrative {
  margin: 24px 28px 0;
  background: var(--rp-panel);
  border: 1px solid var(--rp-border);
  border-left: 4px solid var(--rp-teal);
  border-radius: 0 10px 10px 0;
  padding: 16px 20px;
}
.rp-narrative h2 { font-size: 16px; margin-bottom: 6px; color: var(--rp-ink); }
.rp-narrative .notes-textarea { font-size: 14px; }
.rp-narrative-print { display: none; font-size: 14px; color: var(--rp-ink); line-height: 1.6; margin: 0; }

/* ---------- section headings ---------- */
.rp-section-heading {
  margin: 30px 28px 12px;
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}
.rp-section-heading h2 { font-size: 19px; color: var(--rp-ink); }
.rp-count-pill {
  font-size: 11.5px; color: var(--rp-ink-muted); font-weight: 600;
  background: #EFEDE5; padding: 3px 10px; border-radius: 20px;
}

/* ---------- flags ---------- */
.rp-flag-card {
  margin: 0 28px 12px;
  background: var(--rp-panel);
  border: 1px solid var(--rp-border);
  border-left: 5px solid var(--rp-monitor);
  border-radius: 0 10px 10px 0;
  padding: 14px 18px;
}
.rp-flag-card.is-action { border-left-color: var(--rp-action); }
.rp-flag-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 6px; flex-wrap: wrap; }
.rp-flag-title { font-size: 14.5px; font-weight: 700; color: var(--rp-ink); }
.rp-flag-body { font-size: 13.5px; color: var(--rp-ink-muted); margin: 0; line-height: 1.6; }
.rp-flag-next {
  margin-top: 10px; font-size: 13px; font-weight: 600; color: var(--rp-teal-dark);
  background: var(--rp-stable-bg); padding: 8px 12px; border-radius: 8px;
}
.rp-flag-next strong { font-weight: 700; }

/* ---------- domain cards ---------- */
.rp-domain-card {
  margin: 0 28px 16px;
  background: var(--rp-panel);
  border: 1px solid var(--rp-border);
  border-radius: 12px;
  overflow: hidden;
}
.rp-domain-head {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 13px 18px; background: var(--rp-stable-bg); border-bottom: 1px solid var(--rp-border);
  flex-wrap: wrap;
}
.rp-domain-head h3 { font-size: 16px; color: var(--rp-teal-dark); }
.rp-domain-why { font-size: 12px; color: var(--rp-ink-muted); max-width: 520px; margin: 2px 0 0; }
.rp-domain-pill { font-size: 11.5px; font-weight: 600; color: var(--rp-teal-dark); white-space: nowrap; }

.rp-indicator-row {
  display: flex;
  align-items: center;
  padding: 12px 18px;
  border-top: 1px solid var(--rp-border);
  gap: 14px;
  flex-wrap: wrap;
}
.rp-indicator-row:first-of-type { border-top: none; }
.rp-ind-name-col { flex: 1 1 220px; min-width: 180px; }
.rp-ind-values-col { flex: 0 0 130px; }
.rp-ind-spark-col { flex: 0 0 auto; }
.rp-ind-badge-col { flex: 0 0 auto; margin-left: auto; }
.rp-ind-name { font-size: 14px; font-weight: 600; color: var(--rp-ink); margin: 0; }
.rp-ind-method { font-size: 11px; color: var(--rp-ink-muted); margin: 2px 0 0; line-height: 1.4; }
.rp-ind-current { font-size: 16px; font-weight: 700; color: var(--rp-ink); margin: 0; }
.rp-ind-prev { font-size: 11px; color: var(--rp-ink-muted); margin: 2px 0 0; }

.rp-arrow { font-size: 12px; margin-left: 4px; }
.rp-arrow-up { color: var(--rp-improved-text); }
.rp-arrow-down { color: var(--rp-action-text); }
.rp-arrow-flat { color: var(--rp-ink-muted); }

.rp-badge {
  display: inline-flex; align-items: center;
  font-size: 11.5px; font-weight: 700; padding: 5px 10px; border-radius: 20px;
  white-space: nowrap;
}
.rp-badge.b-stable, .rp-badge.b-improved { background: var(--rp-stable-bg); color: var(--rp-stable-text); }
.rp-badge.b-monitor { background: var(--rp-monitor-bg); color: var(--rp-monitor-text); }
.rp-badge.b-action { background: var(--rp-action-bg); color: var(--rp-action-text); }

/* ---------- trend table ---------- */
.rp-trend-wrap {
  margin: 0 28px 16px;
  background: var(--rp-panel);
  border: 1px solid var(--rp-border);
  border-radius: 12px;
  padding: 18px;
  overflow-x: auto;
}
table.rp-trend-table { width: 100%; border-collapse: collapse; font-size: 13px; }
table.rp-trend-table th {
  text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em;
  color: var(--rp-ink-muted); font-weight: 600; padding: 8px 10px; border-bottom: 2px solid var(--rp-border);
  white-space: nowrap;
}
table.rp-trend-table td { padding: 9px 10px; border-bottom: 1px solid var(--rp-border); white-space: nowrap; }
table.rp-trend-table td.rp-trend-label { white-space: normal; font-weight: 500; color: var(--rp-ink); }
table.rp-trend-table td.rp-trend-val { font-weight: 600; }
table.rp-trend-table tr:last-child td { border-bottom: none; }
.rp-trend-date { color: var(--rp-ink-muted); font-weight: 400; font-size: 10.5px; }

/* ---------- footer contacts ---------- */
.rp-footer-grid { margin: 30px 28px 0; display: flex; gap: 12px; flex-wrap: wrap; }
.rp-footer-card-wrap { flex: 1 1 260px; min-width: 220px; }
.rp-footer-card { background: var(--rp-panel); border: 1px solid var(--rp-border); border-radius: 10px; padding: 14px 18px; }
.rp-footer-card h4 { font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--rp-ink-muted); font-weight: 700; margin: 0 0 8px; }
.rp-footer-row { display: flex; justify-content: space-between; font-size: 13px; padding: 3px 0; }
.rp-footer-row .k { color: var(--rp-ink-muted); }
.rp-footer-row .v { font-weight: 600; text-align: right; }

/* ---------- legal ---------- */
.rp-legal {
  margin: 26px 28px 34px;
  font-size: 11px; color: var(--rp-ink-muted); line-height: 1.6;
  border-top: 1px solid var(--rp-border); padding-top: 14px;
}

/* ---------- print ---------- */
@media print {
  /* Browsers strip background colours from printed/exported PDFs
     by default. This forces them to keep the report's colour —
     the teal masthead, the domain scan-strip bars, the stat tiles,
     and the badges — exactly as shown on screen. */
  .rp-sheet, .rp-sheet * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    color-adjust: exact !important;
  }

  body.report-mode { background: #fff; }
  .rp-sheet { margin: 0; max-width: none; box-shadow: none; border-radius: 0; }
  .no-print-textarea { display: none !important; }
  .rp-narrative-print { display: block; }
  .rp-flag-card, .rp-domain-card, .rp-trend-wrap, .rp-dashboard, .rp-scan-strip, .rp-footer-card {
    page-break-inside: avoid;
  }
  .rp-indicator-row { page-break-inside: avoid; }
  .rp-domain-head { page-break-after: avoid; }
  .rp-section-heading { page-break-after: avoid; }
  .rp-narrative { page-break-inside: avoid; }
  @page { size: A4; margin: 12mm; }
}

@media (max-width: 700px) {
  .rp-cover-top { flex-direction: column; }
  .rp-cover-top-right { width: 100%; }
  .rp-dashboard { flex-wrap: wrap; }
  .rp-stat-tile-wrap { flex: 1 1 45%; }
}

/* ================================================================
   DESKTOP SHELL (sidebar + topbar)
   Applies to the Dashboard/People screen only, for now. Other
   screens (client detail, visit checklist, org admin, etc.) still
   use the narrow mobile layout via #app's default max-width — see
   body.shell-mode below for the one exception.
   ================================================================ */

body.shell-mode {
  background: #EAE8E0;
}
body.shell-mode #app {
  max-width: none;
}

.sh-shell {
  display: flex;
  min-height: 100vh;
}

.sh-sidenav {
  width: 230px;
  flex-shrink: 0;
  background: #0A4F3E;
  color: #fff;
  display: flex;
  flex-direction: column;
  padding: 18px 0;
}
.sh-sidenav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 18px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  margin-bottom: 14px;
}
.sh-sidenav-mark {
  width: 28px; height: 28px; border-radius: 7px; background: var(--sage);
  display: flex; align-items: center; justify-content: center;
  font-family: 'DM Serif Display', Georgia, serif; color: #0A4F3E; font-size: 15px; flex-shrink: 0;
}
.sh-sidenav-brand-text { font-size: 13px; font-weight: 600; }
.sh-sidenav-org { font-size: 10.5px; color: #BFE4D6; margin-top: 1px; }
.sh-sidenav-item {
  display: block;
  padding: 9px 18px;
  font-size: 13px;
  font-weight: 500;
  color: #CFEBE0;
  border-left: 3px solid transparent;
  cursor: pointer;
}
.sh-sidenav-item:hover { background: rgba(255, 255, 255, 0.05); }
.sh-sidenav-item.active {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-left-color: var(--sage);
}
.sh-sidenav-footer {
  margin-top: auto;
  padding: 14px 18px 0;
  font-size: 11px;
  color: #7FB9A5;
}

.sh-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.sh-topbar {
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 12px 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}
.sh-topbar-title { font-size: 13.5px; font-weight: 600; color: var(--text); }
.sh-topbar-profile {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 10px 5px 5px; border-radius: 20px; border: 1px solid var(--border);
}
.sh-topbar-avatar {
  width: 24px; height: 24px; border-radius: 50%; background: var(--teal); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 700;
}
.sh-topbar-name { font-size: 12px; font-weight: 600; }
.sh-topbar-role { font-size: 10px; color: var(--muted); }

.sh-content { padding: 24px 26px 60px; flex: 1; }

.sh-page-header {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 20px; flex-wrap: wrap; gap: 10px;
}
.sh-page-title { font-size: 24px; font-family: 'DM Serif Display', Georgia, serif; color: var(--text); }
.sh-page-sub { font-size: 13px; color: var(--muted); margin-top: 3px; }

.sh-kpi-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 20px; }
.sh-kpi-card { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 16px 18px; }
.sh-kpi-value { font-size: 26px; font-weight: 700; color: var(--text); font-family: 'DM Serif Display', Georgia, serif; line-height: 1; }
.sh-kpi-label { font-size: 12px; color: var(--muted); margin-top: 6px; }
.sh-kpi-card.warn .sh-kpi-value { color: var(--amber-text); }
.sh-kpi-card.alert .sh-kpi-value { color: var(--red-text); }

.sh-table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.sh-table thead th {
  text-align: left; font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.05em; font-weight: 700;
  color: var(--muted); padding: 11px 16px; background: #F9F8F5; border-bottom: 1px solid var(--border);
}
.sh-table tbody tr { border-top: 1px solid var(--border); cursor: pointer; }
.sh-table tbody tr:hover { background: #FAFAF6; }
.sh-table td { padding: 12px 16px; font-size: 13px; vertical-align: middle; }
.sh-person-cell { display: flex; align-items: center; gap: 10px; }
.sh-person-avatar {
  width: 30px; height: 30px; border-radius: 50%; background: var(--teal); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; flex-shrink: 0;
}
.sh-person-name { font-weight: 600; color: var(--text); }
.sh-open-link { font-size: 12px; font-weight: 700; color: var(--teal); }

.sh-hamburger-btn {
  display: none;
  width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--border);
  background: #fff; align-items: center; justify-content: center; font-size: 18px;
  cursor: pointer; flex-shrink: 0;
}

.sh-nav-backdrop {
  display: none;
  position: fixed; inset: 0; background: rgba(0, 0, 0, 0.4); z-index: 40;
}
.sh-nav-backdrop.open { display: block; }

@media (max-width: 900px) {
  .sh-sidenav {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    z-index: 50;
    transform: translateX(-100%);
    transition: transform 0.18s ease;
    box-shadow: 2px 0 16px rgba(0, 0, 0, 0.2);
  }
  .sh-sidenav.open { transform: translateX(0); }
  .sh-hamburger-btn { display: inline-flex; }
  .sh-kpi-strip { grid-template-columns: repeat(2, 1fr); }
  .sh-content { padding: 18px 16px 60px; }
  .sh-table { font-size: 12px; }
  .sh-table thead th:nth-child(2), .sh-table td:nth-child(2) { display: none; } /* hide "Plan" column on small screens */
  .sh-two-col-grid { grid-template-columns: minmax(0, 1fr) !important; }
}

.sh-two-col-grid { display: grid; }
.sh-two-col-grid > * { min-width: 0; }

.sh-filter-bar { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.sh-filter-chip {
  font-size: 12.5px; font-weight: 500; padding: 7px 13px; border-radius: 8px;
  border: 1px solid var(--border); background: #fff; color: var(--muted); cursor: pointer;
}
.sh-filter-chip.active { border-color: var(--teal); color: var(--teal); background: var(--green-bg); font-weight: 600; }

/* ---------------- Person Profile ---------------- */
.sh-hero-card {
  background: #fff; border: 1px solid var(--border); border-radius: 12px;
  padding: 20px 22px; margin-bottom: 18px; display: flex; justify-content: space-between;
  align-items: flex-start; gap: 16px; flex-wrap: wrap;
}
.sh-hero-left { display: flex; gap: 14px; align-items: center; }
.sh-hero-avatar {
  width: 48px; height: 48px; border-radius: 50%; background: var(--teal); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 17px; font-weight: 700; flex-shrink: 0;
}
.sh-hero-name { font-size: 20px; font-family: 'DM Serif Display', Georgia, serif; color: var(--text); }
.sh-hero-meta { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.sh-hero-right { text-align: right; }
.sh-hero-status { font-size: 14px; font-weight: 600; }
.sh-hero-status-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }

.sh-tab-bar { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 18px; }
.sh-tab-item {
  font-size: 13px; font-weight: 600; padding: 9px 14px; color: var(--muted);
  border-bottom: 2.5px solid transparent; cursor: pointer;
}
.sh-tab-item.active { color: var(--teal); border-bottom-color: var(--teal); }

.sh-domain-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.sh-domain-card { background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; }
.sh-domain-card-name { font-size: 13.5px; font-weight: 600; margin-bottom: 3px; }
.sh-domain-card-status { font-size: 12px; color: var(--muted); }
.sh-domain-bar-mini { display: flex; height: 6px; border-radius: 3px; overflow: hidden; margin-top: 8px; background: var(--border); }
.sh-domain-bar-mini > div { border-right: 1px solid #fff; }
.sh-domain-bar-mini > div:last-child { border-right: none; }
.sh-seg-s { background: #0F6E56; }
.sh-seg-m { background: #EF9F27; }
.sh-seg-a { background: #D85A30; }

.sh-measure-table-wrap { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 16px 18px; overflow-x: auto; }
table.sh-measure-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
table.sh-measure-table th {
  text-align: left; font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.04em;
  color: var(--muted); font-weight: 700; padding: 8px 10px; border-bottom: 2px solid var(--border); white-space: nowrap;
}
table.sh-measure-table td { padding: 9px 10px; border-bottom: 1px solid var(--border); white-space: nowrap; }
table.sh-measure-table td.sh-m-label { white-space: normal; font-weight: 600; color: var(--text); }
table.sh-measure-table tr:last-child td { border-bottom: none; }

/* ================================================================
   FAMILY MEMBER EXPERIENCE
   A deliberately separate, simplified surface — narrow mobile-first
   layout (uses #app's default max-width, no shell/report-mode
   override), plain-language cards rather than clinical detail.
   ================================================================ */
.family-shell { min-height: 100vh; background: var(--bg); }
.family-header { background: #0A4F3E; color: #fff; padding: 22px 20px; }
.family-header-brand { font-size: 13px; font-weight: 700; letter-spacing: 0.03em; margin-bottom: 3px; }
.family-header-greeting { font-size: 20px; font-family: 'DM Serif Display', Georgia, serif; }
.family-body { padding: 18px; }
.family-status-card {
  background: #fff; border-radius: 14px; padding: 22px; text-align: center;
  border: 1px solid var(--border); margin-bottom: 16px;
}
.family-status-icon { font-size: 34px; margin-bottom: 8px; }
.family-status-headline { font-size: 17px; font-weight: 600; margin-bottom: 6px; }
.family-status-sub { font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.family-section-title { font-size: 15px; font-weight: 600; margin: 20px 0 10px; font-family: 'DM Serif Display', Georgia, serif; }
.family-card { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; margin-bottom: 10px; }
.family-card-title { font-size: 13.5px; font-weight: 600; margin-bottom: 4px; }
.family-card-body { font-size: 12.5px; color: var(--muted); line-height: 1.55; }

/* ---------------- Family access panel (staff side, Client Detail) --------------- */
.family-access-row { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-top: 1px solid var(--border); }
.family-access-row:first-child { border-top: none; }
.family-access-name { font-size: 13px; font-weight: 600; }
.family-access-meta { font-size: 11.5px; color: var(--muted); }
.family-access-revoke { font-size: 11.5px; font-weight: 600; color: var(--red-text); cursor: pointer; }

/* ================================================================
   MODULE B — OUTCOMES & IMPACT
   Reuses the shell (sh-*) design language, not the rp- print
   system — this is an internal working record, not a family-facing
   printed document like the Module A wellbeing report.
   ================================================================ */
.ob-status-pill {
  font-size: 10.5px; font-weight: 700; padding: 3px 10px; border-radius: 20px; white-space: nowrap;
}
.ob-status-pill.not_started { background: #EFEDE5; color: var(--muted); }
.ob-status-pill.in_progress { background: var(--amber-bg); color: var(--amber-text); }
.ob-status-pill.achieved { background: var(--green-bg); color: var(--green-text); }
.ob-status-pill.declined { background: var(--red-bg); color: var(--red-text); }
.ob-status-pill.not_applicable { background: #EFEDE5; color: var(--muted); }

.ob-domain-card {
  background: #fff; border: 1px solid var(--border); border-radius: 12px;
  padding: 16px 18px; margin-bottom: 14px;
}
.ob-domain-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 4px; flex-wrap: wrap; }
.ob-domain-name { font-size: 15px; font-weight: 600; }
.ob-domain-category { font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.03em; }
.ob-domain-previous { font-size: 12px; color: var(--muted); margin-bottom: 10px; }
.ob-domain-field { margin-bottom: 10px; }
.ob-domain-field label { display: block; font-size: 12.5px; font-weight: 500; margin-bottom: 5px; color: var(--muted); }
.ob-domain-field select, .ob-domain-field input, .ob-domain-field textarea {
  width: 100%; padding: 10px 12px; border: 0.5px solid var(--border); border-radius: 8px;
  font-size: 14px; font-family: inherit; background: #fff;
}
.ob-domain-field textarea { min-height: 70px; resize: vertical; }

.ob-concern-card {
  background: #fff; border: 1px solid var(--border); border-left: 4px solid var(--amber);
  border-radius: 0 10px 10px 0; padding: 14px 16px; margin-bottom: 12px;
}
.ob-concern-card.action { border-left-color: var(--red); }
.ob-concern-top { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.ob-concern-title { font-size: 14px; font-weight: 600; }
.ob-intervention-row { background: var(--bg); border-radius: 8px; padding: 10px 12px; margin-top: 8px; font-size: 12.5px; }
.ob-intervention-type { font-weight: 600; }
.ob-followup-row { font-size: 12px; color: var(--muted); margin-top: 6px; padding-left: 10px; border-left: 2px solid var(--border); }

/* ---------------- Outcomes aggregate (Org Admin) ---------------- */
.ob-agg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.ob-agg-card { background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; }
.ob-agg-card-name { font-size: 12.5px; font-weight: 600; margin-bottom: 8px; }
.ob-agg-bar { display: flex; height: 8px; border-radius: 4px; overflow: hidden; background: var(--border); margin-bottom: 8px; }
.ob-agg-bar > div { border-right: 1px solid #fff; }
.ob-agg-bar > div:last-child { border-right: none; }
.ob-agg-stats { font-size: 11px; color: var(--muted); }
.ob-agg-suppressed { font-size: 11.5px; color: var(--muted); font-style: italic; }

/* ------------------------------------------------------------
   Visit checklist: tap-to-answer pills, hints, one-box BP entry
   ------------------------------------------------------------ */
.ew-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}
.ew-pill {
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  line-height: 1.25;
  text-align: left;
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}
.ew-pill:hover { border-color: var(--sage); }
.ew-pill.selected {
  background: var(--teal);
  border-color: var(--teal);
  color: #fff;
  font-weight: 600;
}
.ew-pill:focus-visible { outline: 2px solid var(--sage); outline-offset: 2px; }
.ew-field-hint {
  margin: 0 0 6px;
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.45;
}
.indicator-field input.ew-bp-input {
  width: 140px;
  flex: none;
  font-size: 20px;
  letter-spacing: 1px;
  text-align: center;
}

/* ------------------------------------------------------------
   Family app tabs
   ------------------------------------------------------------ */
.fam-tabs {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  margin: 18px 0 0;
  padding: 0 20px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.fam-tab {
  flex: 1;
  min-height: 46px;
  padding: 12px 4px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 14px;
  color: var(--muted);
  cursor: pointer;
}
.fam-tab.active {
  color: var(--teal);
  font-weight: 600;
  border-bottom-color: var(--teal);
}
.fam-tab:focus-visible { outline: 2px solid var(--sage); outline-offset: -2px; }

/* ------------------------------------------------------------
   Trend cards (family Trends tab and reports)
   ------------------------------------------------------------ */
.tc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
  margin: 12px 0 0;
}
.tc-grid-single { grid-template-columns: minmax(0, 1fr); }
.tc-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  break-inside: avoid;
  page-break-inside: avoid;
  min-width: 0;
}
.tc-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.tc-name { margin: 0; font-size: 15px; font-weight: 600; color: var(--text); }
.tc-desc { margin: 3px 0 0; font-size: 12.5px; color: var(--muted); line-height: 1.45; }
.tc-pill {
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
  white-space: nowrap;
}
.tc-pill-ok { background: #E1F5EE; color: #085041; }
.tc-pill-monitor { background: #FAEEDA; color: #633806; }
.tc-pill-action { background: #FAECE7; color: #712B13; }
.tc-line { display: block; width: 100%; height: auto; margin-top: 10px; overflow: visible; }
.tc-labels { position: relative; height: 16px; margin-top: 2px; }
.tc-label {
  position: absolute;
  top: 0;
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
}
.tc-bar-wrap { margin-top: 12px; }
.tc-bar-label { margin: 0 0 4px; font-size: 11px; color: var(--muted); }
.tc-bar-track { position: relative; padding-top: 9px; }
.tc-bar {
  display: flex;
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
}
.tc-marker {
  position: absolute;
  top: 0;
  width: 0;
  height: 0;
  transform: translateX(-50%);
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 8px solid #085041;
}
.tc-ticks { position: relative; height: 16px; margin-top: 3px; }
.tc-tick {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  font-size: 11px;
  color: var(--muted);
}
.tc-note { margin: 10px 0 0; font-size: 13px; line-height: 1.45; }
.tc-note-ok { color: #085041; }
.tc-note-monitor { color: #854F0B; }
.tc-note-action { color: #993C1D; }
.tc-guide-note { margin: 12px 0 0; font-size: 11.5px; color: var(--muted); line-height: 1.5; }

.rp-sheet .tc-grid { margin: 12px 0 0; }
@media print {
  .fam-tabs { display: none; }
  .tc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tc-card { border-color: #D3D1C7; }
  .tc-bar div, .tc-pill, .tc-marker { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ------------------------------------------------------------
   Family overview: friendly summary first, detail on request
   ------------------------------------------------------------ */
.fam-hero {
  border-radius: 16px;
  padding: 20px 20px 18px;
  background: #EEF6F2;
}
.fam-hero-watch { background: #FBF3E4; }
.fam-hero-urgent { background: #FBE9E4; }
.fam-hero-kicker { margin: 0; font-size: 12px; color: var(--muted); letter-spacing: 0.02em; }
.fam-hero-line {
  margin: 8px 0 0;
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 22px;
  line-height: 1.35;
  color: var(--text);
}
.fam-hero-urgent .fam-hero-line { color: #712B13; }
.fam-hero-next { margin: 14px 0 0; font-size: 13.5px; color: var(--text); }
.fam-sum-card {
  margin-top: 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px 18px;
  background: #fff;
}
.fam-sum-title { margin: 0 0 8px; font-size: 14px; font-weight: 600; }
.fam-sum-list { list-style: none; margin: 0; padding: 0; }
.fam-sum-item { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 1.5; padding: 4px 0; }
.fam-sum-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; margin-top: 8px; }
.fam-sum-foot { margin: 8px 0 0; font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.fam-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }
.fam-action {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 52px;
  padding: 14px 18px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: var(--teal);
  cursor: pointer;
  text-align: left;
}
.fam-action:hover { border-color: var(--sage); }
.fam-more { margin-top: 28px; border-top: 1px solid var(--border); padding-top: 4px; }
.fam-more summary {
  cursor: pointer;
  list-style: none;
  padding: 14px 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
}
.fam-more summary::-webkit-details-marker { display: none; }
.fam-more summary::after { content: ' +'; }
.fam-more[open] summary::after { content: ' \2212'; }
.fam-label { font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); font-weight: 500; margin-bottom: 10px; }

/* Family overview: watching / doing dropdowns */
.fam-drop {
  margin-top: 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
}
.fam-drop summary {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 14px 18px;
  cursor: pointer;
  list-style: none;
  font-size: 14.5px;
  font-weight: 600;
}
.fam-drop summary::-webkit-details-marker { display: none; }
.fam-drop summary::after {
  content: '';
  margin-left: auto;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
  transition: transform 0.15s ease;
}
.fam-drop[open] summary::after { transform: rotate(-135deg); }
.fam-drop-count {
  font-size: 12px;
  font-weight: 600;
  min-width: 22px;
  text-align: center;
  padding: 2px 8px;
  border-radius: 999px;
}
.fam-drop-body { padding: 0 18px 8px; }

/* ------------------------------------------------------------
   Staff lock screen
   ------------------------------------------------------------ */
.ew-lock-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: #E1F5EE;
  color: var(--teal);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ------------------------------------------------------------
   Family display options and read aloud
   ------------------------------------------------------------ */
.fam-tools {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.fam-tool-btns { display: flex; gap: 8px; }
.fam-tool {
  min-height: 40px;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  color: var(--teal);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
}
.fam-tool[aria-expanded="true"], .fam-tool[aria-pressed="true"] { background: var(--teal); border-color: var(--teal); color: #fff; }
.fam-tool:focus-visible, .fam-opt:focus-visible { outline: 3px solid var(--sage); outline-offset: 2px; }
.fam-display-panel {
  margin-top: 12px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
}
.fam-display-label { margin: 0 0 8px; font-size: 13px; font-weight: 600; }
.fam-display-label + .fam-opt-row { margin-bottom: 14px; }
.fam-opt-row { display: flex; flex-wrap: wrap; gap: 8px; }
.fam-opt {
  min-height: 46px;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 14px;
  cursor: pointer;
}
.fam-opt.selected { border: 2px solid var(--teal); color: var(--teal); font-weight: 600; background: #EEF6F2; }
.fam-display-note { margin: 0; font-size: 12px; color: var(--muted); line-height: 1.5; }

/* High contrast (family screens only) */
body.fam-contrast-high {
  --muted: #2C2C2A;
  --border: #6B6B66;
  --text: #000000;
  --teal: #064A39;
  background: #FFFFFF;
}
body.fam-contrast-high .family-shell { background: #FFFFFF; }
body.fam-contrast-high .fam-tabs { background: #FFFFFF; border-bottom: 2px solid #000; }
body.fam-contrast-high .fam-tab { color: #2C2C2A; }
body.fam-contrast-high .fam-tab.active { color: #064A39; border-bottom-width: 3px; }
body.fam-contrast-high .fam-hero { border: 2px solid #000; }
body.fam-contrast-high .fam-hero-line, body.fam-contrast-high .fam-hero-kicker, body.fam-contrast-high .fam-hero-next { color: #000 !important; }
body.fam-contrast-high .fam-sum-card, body.fam-contrast-high .fam-drop, body.fam-contrast-high .fam-action, body.fam-contrast-high .tc-card { border: 2px solid #000; }
body.fam-contrast-high .tc-note-ok { color: #04342C; }
body.fam-contrast-high .tc-note-monitor { color: #412402; }
body.fam-contrast-high .tc-note-action { color: #4A1B0C; }
body.fam-contrast-high .tc-label, body.fam-contrast-high .tc-tick, body.fam-contrast-high .tc-desc { color: #2C2C2A; }

/* Offer to set up one-tap sign-in after a password sign-in */
.ew-pk-offer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 16px;
  padding: 14px 16px;
  border: 1px solid #9FE1CB;
  border-radius: 12px;
  background: #EEF6F2;
  max-width: 1000px;
}
.ew-pk-title { margin: 0 0 4px; font-size: 14.5px; font-weight: 600; color: #04342C; }
.ew-pk-text { margin: 0; font-size: 13px; color: #085041; line-height: 1.5; max-width: 560px; }
.ew-pk-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.ew-pk-done { border-color: #5DCAA5; }

/* ------------------------------------------------------------
   Cover, reassigning and availability
   ------------------------------------------------------------ */
.ew-assign-away { margin: 0 0 10px; font-size: 13.5px; color: #8A2C12; font-weight: 600; }
.ew-cover-box { padding: 12px 14px; border-radius: 10px; background: #EEF6F2; border: 1px solid #9FE1CB; }
.ew-cover-title { margin: 0; font-size: 14px; font-weight: 600; color: #04342C; }
.ew-cover-sub { margin: 4px 0 0; font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.ew-cover-warn { margin: 8px 0 0; padding: 8px 10px; border-radius: 8px; background: #FAEEDA; color: #633806; font-size: 13px; line-height: 1.5; }
.ew-inline-form { margin-top: 10px; padding: 14px; border: 1px solid var(--border); border-radius: 10px; background: #FBFAF7; }
.ew-form-title { margin: 0 0 10px; font-size: 14px; font-weight: 600; }
.ew-form-label { display: block; font-size: 12.5px; font-weight: 600; margin-bottom: 10px; }
.ew-form-label select, .ew-form-label input, .ew-form-row input {
  display: block; width: 100%; margin-top: 4px; padding: 10px 12px; min-height: 44px;
  border: 0.5px solid var(--border); border-radius: 8px; font-size: 14px; font-family: inherit; background: #fff; box-sizing: border-box;
}
.ew-form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 10px; }
.ew-form-row label { font-size: 12.5px; font-weight: 600; }
.ew-form-btns { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.ew-needs-cover { margin: 0 0 16px; padding: 14px 16px; border: 1px solid #F0997B; border-radius: 12px; background: #FDF4F1; max-width: 1000px; }
.ew-nc-title { margin: 0 0 4px; font-size: 15px; font-weight: 600; color: #712B13; }
.ew-nc-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 0; border-top: 1px solid #F5C4B3; }
.ew-nc-name { margin: 0; font-size: 14px; font-weight: 600; }
.ew-nc-sub { margin: 2px 0 0; font-size: 12.5px; color: var(--muted); }
.ew-my-avail { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 16px; max-width: 1000px; }
.ew-my-avail .ew-inline-form { flex-basis: 100%; margin-top: 0; max-width: 520px; }
.ew-away-chip { display: inline-block; padding: 7px 12px; border-radius: 999px; background: #FAEEDA; color: #633806; font-size: 13px; }
.ew-cell-sub { font-size: 12px; margin-top: 2px; }
.ew-cell-cover { color: #085041; }
.ew-cell-away { color: #993C1D; font-weight: 600; }

/* ------------------------------------------------------------
   Client record: Everwell ID, medicines, health history, activity
   ------------------------------------------------------------ */
.ew-id-chip { display: inline-block; margin: 4px 0 2px; padding: 3px 10px; border-radius: 999px; background: #EEF6F2; color: #085041; font-size: 12.5px; letter-spacing: 0.02em; }
.ew-id-chip strong { font-family: ui-monospace, 'SF Mono', Menlo, monospace; letter-spacing: 0.06em; }
.ew-rec-grid { grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; margin-bottom: 0; }
@media (max-width: 900px) { .ew-rec-grid { grid-template-columns: 1fr; } }
.ew-rec-panel { background: #fff; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; margin-bottom: 16px; }
.ew-rec-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 14px 18px; font-weight: 600; font-size: 14px; }
.ew-rec-hint { font-weight: 400; color: var(--muted); font-size: 12px; margin-left: 6px; }
.ew-rec-empty { margin: 0; padding: 0 18px 16px; font-size: 13px; color: var(--muted); line-height: 1.5; }
.ew-rec-row { display: flex; gap: 12px; align-items: flex-start; padding: 12px 18px; border-top: 1px solid var(--border); }
.ew-rec-date { flex: 0 0 92px; font-size: 12.5px; font-weight: 600; color: var(--teal); padding-top: 1px; }
.ew-rec-title { margin: 0; font-size: 14px; font-weight: 600; }
.ew-rec-sub { margin: 2px 0 0; font-size: 13px; color: var(--text); line-height: 1.45; }
.ew-rec-meta { margin: 4px 0 0; font-size: 12px; color: var(--muted); line-height: 1.45; }
.ew-rec-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.ew-rec-link { cursor: pointer; color: var(--teal); font-size: 12.5px; font-weight: 600; white-space: nowrap; padding: 2px 0; }
.ew-rec-link-muted { color: var(--muted); font-weight: 500; }
.ew-rec-wrong .ew-rec-title, .ew-rec-wrong .ew-rec-sub { text-decoration: line-through; color: var(--muted); }
.ew-rec-stopped .ew-rec-title { color: var(--muted); }
.ew-rec-more { border-top: 1px solid var(--border); }
.ew-rec-more summary { cursor: pointer; padding: 12px 18px; font-size: 13px; font-weight: 600; color: var(--muted); }
.ew-rec-log { margin: 0; padding: 0 18px 14px 36px; font-size: 12.5px; line-height: 1.6; color: var(--text); }
.ew-rec-checkrow { padding: 10px 18px 14px; border-top: 1px solid var(--border); }
.ew-textarea { display: block; width: 100%; min-height: 64px; margin-top: 4px; padding: 10px 12px; border: 0.5px solid var(--border); border-radius: 8px; font-size: 14px; font-family: inherit; box-sizing: border-box; }
.ew-visit-meds { margin: 4px 0 12px; }
.ew-visit-meds .ew-rec-panel { margin-bottom: 0; background: #FBFAF7; }
.ew-tl { list-style: none; margin: 0; padding: 0 18px 14px; }
.ew-tl-day { margin: 12px 0 4px; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.ew-tl-item { display: flex; gap: 10px; padding: 6px 0; }
.ew-tl-dot { flex: 0 0 8px; height: 8px; margin-top: 6px; border-radius: 50%; background: #B4B2A9; }
.ew-tl-visit .ew-tl-dot, .ew-tl-record .ew-tl-dot, .ew-tl-consent .ew-tl-dot { background: var(--teal); }
.ew-tl-health .ew-tl-dot { background: #D4537E; }
.ew-tl-medicine .ew-tl-dot { background: #534AB7; }
.ew-tl-flag .ew-tl-dot, .ew-tl-check .ew-tl-dot { background: #EF9F27; }
.ew-tl-action .ew-tl-dot, .ew-tl-assign .ew-tl-dot, .ew-tl-family .ew-tl-dot { background: #5DCAA5; }
.ew-tl-title { margin: 0; font-size: 13.5px; }
.ew-tl-meta { margin: 1px 0 0; font-size: 12px; color: var(--muted); }

/* Family: news opt-in */
.fam-pref { margin-top: 32px; padding: 14px 16px; border: 1px solid var(--border); border-radius: 14px; background: #fff; }
.fam-pref-row { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; line-height: 1.45; cursor: pointer; }
.fam-pref-row input { width: 22px; height: 22px; flex-shrink: 0; margin-top: 2px; accent-color: var(--teal); }
.fam-pref-sub { font-size: 12.5px; color: var(--muted); }

/* ---------- Step-by-step visit ---------- */
.ew-visit-col { max-width: 720px; }
.ew-step-list { display: flex; flex-direction: column; gap: 8px; }
.ew-step-card { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 14px 16px; background: #fff; border: 0.5px solid var(--border); border-radius: 10px; font: inherit; cursor: pointer; min-height: 56px; }
.ew-step-card:hover { border-color: var(--teal); }
.ew-step-card.next { border: 1.5px solid var(--teal); }
.ew-step-num { flex: 0 0 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: #EEF5F2; color: var(--teal); font-weight: 600; font-size: 14px; }
.ew-step-card.done .ew-step-num { background: var(--teal); color: #fff; }
.ew-step-title { flex: 1; font-size: 15.5px; font-weight: 600; }
.ew-step-state { font-size: 13px; color: var(--muted, #6b6b6b); }
.ew-step-card.done .ew-step-state { color: var(--teal); }
.ew-step-review .ew-step-num { background: #FAEEDA; color: #633806; }
.ew-step-heading { font-family: 'DM Serif Display', Georgia, serif; font-weight: 400; font-size: 26px; margin: 4px 0 10px; }
.ew-step-hint { margin: 0 0 14px; padding: 10px 12px; border-radius: 8px; background: #EEF5F2; color: #0B5443; font-size: 14px; line-height: 1.5; }
.ew-step-body { padding: 0; border: 0; background: none; }
.ew-step-nav { position: sticky; bottom: 0; display: flex; gap: 10px; padding: 10px; margin-top: 16px; background: rgba(255,255,255,0.97); border: 0.5px solid var(--border); border-radius: 12px 12px 0 0; box-shadow: 0 -4px 14px rgba(0,0,0,0.06); z-index: 5; }
.ew-step-nav .btn { flex: 1; min-height: 48px; }
.ew-step-nav .btn.secondary { flex: 0 0 auto; width: auto; padding: 10px 18px; }
@media (max-width: 480px) { .ew-step-nav { flex-wrap: wrap; } .ew-step-nav .btn { flex: 1 1 100%; } .ew-step-nav .btn.secondary { flex: 1 1 calc(50% - 5px); } }
.ew-excluded { opacity: 0.85; background: #F6F6F4; border-radius: 8px; padding: 10px 12px; }
.ew-review-box { padding: 12px 14px; border-radius: 10px; border: 0.5px solid var(--border); background: #fff; margin-bottom: 14px; }
.ew-review-warn { background: #FFF8EC; border-color: #EBCB8B; }
.ew-review-ok { background: #EEF5F2; border-color: #BFDCD1; }
.ew-review-title { margin: 0 0 6px; font-weight: 600; font-size: 15px; }
.ew-review-line { margin: 4px 0; font-size: 14px; line-height: 1.5; }
.ew-test-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 2px 12px; }
.ew-cond-list { display: flex; flex-wrap: wrap; gap: 6px; }
.ew-cond-chip { display: inline-block; padding: 4px 10px; border-radius: 999px; background: #EEF5F2; color: #0B5443; font-size: 13px; }
.ew-profile-visit { margin-bottom: 14px; }
@media (max-width: 600px) {
  .ew-step-heading { font-size: 22px; }
  .ew-step-card { padding: 12px; }
}

/* ---------- Spreadsheet import ---------- */
.ew-imp-list { display: flex; flex-direction: column; gap: 8px; }
.ew-imp-row { background: #fff; border: 0.5px solid var(--border); border-radius: 10px; padding: 10px 14px; }
.ew-imp-row.is-bad { border-color: #E8B4A6; background: #FFF9F7; }
.ew-imp-top { display: flex; align-items: center; gap: 10px; }
.ew-imp-num { font-size: 12px; color: var(--muted, #6b6b6b); flex: 0 0 auto; }
.ew-imp-name { flex: 1; font-weight: 600; font-size: 14.5px; min-width: 0; overflow-wrap: anywhere; }
.ew-imp-note { margin: 4px 0 0; font-size: 13px; line-height: 1.45; color: #4a4a4a; }
.ew-imp-note.bad { color: #8A2C12; }
.ew-imp-row .ew-pill { margin: 6px 6px 0 0; }

/* ================================================================
   Family app (redesign): one shell, bottom bar on phones, side menu
   on computers. Calm, plain and large enough to read easily.
   ================================================================ */
body.fam-app #app { max-width: none; }
.fx { display: flex; min-height: 100vh; background: #F6F5F1; color: #17201C; font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif; }
.fx a { text-decoration: none; }
.fx-rail { display: none; }
.fx-body { flex: 1; min-width: 0; padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
.fx-top { display: flex; align-items: center; gap: 8px; padding: 16px 20px 4px; max-width: 1100px; margin: 0 auto; box-sizing: border-box; }
.fx-top-spacer { flex: 1; }
.fx-brand { font-size: 12px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: #5E6863; }
.fx-top-tools { display: flex; align-items: center; gap: 8px; }
.fx-tool { height: 40px; padding: 0 12px; border-radius: 20px; border: 1px solid #E6E3DC; background: #fff; color: #17201C; font: inherit; font-size: 14px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.fx-tool[aria-pressed="true"], .fx-tool[aria-expanded="true"] { background: #0F6E56; border-color: #0F6E56; color: #fff; }
.fx-tool:focus-visible, .fx-chip:focus-visible, .fx-btn:focus-visible, .fx a:focus-visible { outline: 3px solid #5DCAA5; outline-offset: 2px; }
.fx-avatar { width: 40px; height: 40px; border-radius: 20px; background: #17201C; color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 600; font-size: 14px; flex: none; }
.fx-avatar-sm { width: 28px; height: 28px; font-size: 11px; }
.fx-panel-wrap { max-width: 1100px; margin: 0 auto; padding: 8px 20px 0; box-sizing: border-box; }
.fx-main { max-width: 1100px; margin: 0 auto; padding: 12px 20px 28px; box-sizing: border-box; }

.fx-bottom { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: #fff; border-top: 1px solid #E6E3DC; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); padding: 8px 8px calc(10px + env(safe-area-inset-bottom)); }
.fx-bottom-item { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 0; font-size: 12px; font-weight: 500; color: #5E6863; min-height: 48px; }
.fx-bottom-item.active { color: #0F6E56; font-weight: 600; }

.fx-h1 { font-family: 'DM Serif Display', Georgia, serif; font-weight: 400; font-size: 32px; line-height: 1.12; margin: 6px 0 4px; }
.fx-h2 { font-size: 16px; font-weight: 600; margin: 0 0 10px; }
.fx-h3 { font-size: 17px; font-weight: 600; }
.fx-sub { margin: 0 0 18px; font-size: 14px; color: #5E6863; line-height: 1.5; }
.fx-lead { margin: 0 0 4px; font-size: 18px; line-height: 1.45; font-weight: 500; }
.fx-body-text { margin: 0 0 12px; font-size: 15.5px; line-height: 1.55; color: #2B3430; }
.fx-big { font-size: 17px; }
.fx-meta { font-size: 13px; color: #5E6863; line-height: 1.4; }
.fx-ok { color: #0B5443; }
.fx-label { margin: 18px 0 8px; font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: #5E6863; }
.fx-link { color: #0F6E56; font-weight: 600; }
.fx-quiet { margin: 16px 0 0; padding: 12px 14px; background: #ECEAE4; border-radius: 14px; font-size: 13.5px; line-height: 1.5; color: #3F4844; }
.fx-notice { margin: 0 0 14px; padding: 12px 14px; border-radius: 14px; background: #E3F0EA; color: #0B5443; font-size: 14.5px; font-weight: 500; }
.fx-narrow { max-width: 620px; }

.fx-title-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.fx-home-grid { display: flex; flex-direction: column; gap: 14px; }
.fx-col { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.fx-card { display: block; background: #fff; border: 1px solid #E6E3DC; border-radius: 20px; padding: 16px 18px; color: inherit; }
.fx-card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.fx-card-head .fx-h2 { margin: 0; }
.fx-card-foot { display: block; margin-top: 12px; padding-top: 12px; border-top: 1px solid #EFECE6; font-size: 14.5px; }

.fx-pill { display: inline-flex; align-self: flex-start; align-items: center; font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.fx-pill-amber { background: #FBF1DF; color: #7A4F0E; }
.fx-pill-green { background: #E3F0EA; color: #0B5443; }
.fx-pill-grey { background: #F0EEE9; color: #3F4844; }
.fx-pill-red { background: #FBE9E4; color: #8A2C12; }

.fx-hls { display: flex; flex-direction: column; gap: 4px; margin-top: 12px; }
.fx-hl { display: flex; align-items: center; gap: 10px; padding: 8px 0; color: #17201C; }
.fx-hl-text { flex: 1; font-size: 15.5px; line-height: 1.4; }
.fx-hl svg { color: #9AA19D; flex: none; }

.fx-actions { display: flex; flex-direction: column; gap: 12px; }
.fx-action { display: flex; gap: 12px; align-items: flex-start; }
.fx-action-text { display: flex; flex-direction: column; gap: 2px; font-size: 15px; }
.fx-action-text strong { font-weight: 600; }
.fx-icon-box { width: 36px; height: 36px; border-radius: 12px; background: #E7F1ED; color: #0F6E56; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.fx-icon-dark { background: #17201C; color: #fff; }
.fx-icon-red { background: #FBE9E4; color: #9A2F14; }

.fx-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.fx-tile { background: #fff; border: 1px solid #E6E3DC; border-radius: 16px; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; color: #17201C; }
.fx-tile-k { font-size: 12.5px; color: #5E6863; }
.fx-tile-v { font-size: 16px; font-weight: 600; }
.fx-tile-dark { background: #17201C; border-color: #17201C; color: #fff; }
.fx-tile-dark .fx-tile-k { color: #C9CFCB; }
.fx-row-link { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; background: #fff; border: 1px solid #E6E3DC; border-radius: 16px; color: #17201C; font-weight: 600; font-size: 15px; }

.fx-areas { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.fx-area-cell { padding: 12px; border: 1px solid #EFECE6; border-radius: 14px; display: flex; flex-direction: column; gap: 3px; }
.fx-area-name { font-size: 14.5px; font-weight: 600; }
.fx-area-word { font-size: 13px; color: #3F4844; }
.fx-word-amber { color: #7A4F0E; font-weight: 600; }
.fx-word-green { color: #0B5443; font-weight: 600; }
.fx-area-nc { font-size: 12px; color: #5E6863; }
.fx-area-list { display: flex; flex-direction: column; gap: 10px; }
.fx-area-card { display: flex; flex-direction: column; gap: 6px; }
.fx-area-card-top { display: flex; justify-content: space-between; align-items: center; color: #9AA19D; }
.fx-area-card .fx-body-text { margin: 0; }

.fx-readings { display: flex; flex-direction: column; border-top: 1px solid #EFECE6; margin-top: 4px; }
.fx-reading { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 10px 0; border-bottom: 1px solid #EFECE6; }
.fx-reading:last-child { border-bottom: 0; }
.fx-reading-v { font-size: 16px; font-weight: 600; }

.fx-back { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; margin-left: -6px; color: #17201C; font-size: 15px; font-weight: 500; }
.fx-feed { padding: 4px 16px; }
.fx-feed-row { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid #EFECE6; color: #17201C; }
.fx-feed-row:last-child { border-bottom: 0; }
.fx-feed-row > svg { margin-top: 10px; color: #9AA19D; }
.fx-feed-text { flex: 1; display: flex; flex-direction: column; gap: 2px; font-size: 15px; }
.fx-feed-text strong { font-weight: 600; }

.fx-warn { display: flex; gap: 10px; align-items: flex-start; margin: 4px 0 16px; padding: 12px 14px; background: #FBE9E4; border-radius: 14px; color: #5C1F0D; font-size: 14.5px; line-height: 1.45; }
.fx-warn svg { flex: none; margin-top: 2px; }
.fx-field-label { display: block; margin: 16px 0 8px; font-size: 15px; font-weight: 600; }
.fx-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.fx-chip { min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid #E6E3DC; background: #fff; color: #17201C; font: inherit; font-size: 15px; cursor: pointer; }
.fx-chip.on { background: #17201C; border-color: #17201C; color: #fff; font-weight: 600; }
.fx-textarea { width: 100%; min-height: 120px; box-sizing: border-box; padding: 14px; border: 1.5px solid #D9D5CD; border-radius: 14px; font: inherit; font-size: 16px; line-height: 1.5; color: #17201C; background: #fff; resize: vertical; }
.fx-textarea:focus { outline: none; border-color: #0F6E56; }

.fx-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 20px; border-radius: 14px; font: inherit; font-size: 15.5px; font-weight: 600; cursor: pointer; border: 0; }
.fx-btn-primary { background: #0F6E56; color: #fff; }
.fx-btn-dark { background: #17201C; color: #fff; }
.fx-btn-outline { background: #fff; color: #17201C; border: 1.5px solid #17201C; }
.fx-btn-block { width: 100%; margin-top: 18px; min-height: 56px; }
.fx-btn[disabled] { opacity: 0.6; cursor: default; }
.fx-show-lg { display: none; }
.fx-trend-grid { margin-top: 4px; }
.fam-display-panel.fx-flat { border: 0; padding: 0; margin: 0; background: none; }

@media (max-width: 420px) {
  .fx-hide-sm { display: none; }
  .fx-h1 { font-size: 29px; }
}
@media (min-width: 900px) {
  .fx-rail { display: flex; flex-direction: column; gap: 4px; width: 248px; flex: none; box-sizing: border-box; padding: 26px 18px; background: #fff; border-right: 1px solid #E6E3DC; position: sticky; top: 0; height: 100vh; }
  .fx-rail .fx-brand { padding: 0 12px 18px; }
  .fx-rail-item { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 12px; border-radius: 12px; color: #3F4844; font-size: 15px; font-weight: 500; }
  .fx-rail-item svg { width: 20px; height: 20px; }
  .fx-rail-item.active { background: #E7F1ED; color: #0B5443; font-weight: 600; }
  .fx-bottom, .fx-brand-phone, .fx-avatar-top { display: none; }
  .fx-body { padding-bottom: 0; }
  .fx-top { padding: 22px 40px 0; }
  .fx-main, .fx-panel-wrap { padding-left: 40px; padding-right: 40px; }
  .fx-h1 { font-size: 40px; }
  .fx-home-grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 20px; align-items: start; }
  .fx-areas { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .fx-show-lg { display: inline-flex; }
  .fx-lead { font-size: 20px; }
  .fx-trend-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

body.fam-contrast-high .fx { background: #fff; }
body.fam-contrast-high .fx-card, body.fam-contrast-high .fx-tile, body.fam-contrast-high .fx-row-link, body.fam-contrast-high .fx-chip, body.fam-contrast-high .fx-area-cell { border: 2px solid #000; }
body.fam-contrast-high .fx-meta, body.fam-contrast-high .fx-sub, body.fam-contrast-high .fx-tile-k, body.fam-contrast-high .fx-bottom-item, body.fam-contrast-high .fx-rail-item { color: #1A1A1A; }
body.fam-contrast-high .fx-bottom-item.active, body.fam-contrast-high .fx-rail-item.active { color: #064A39; text-decoration: underline; }
body.fam-contrast-high .fx-tile-dark .fx-tile-k { color: #fff; }

/* Phones zoom in on small form text; 16px stops that now zooming is allowed. */
@media (max-width: 700px) {
  input, select, textarea { font-size: 16px; }
}
.ew-fn-row { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.ew-fn-row.seen { opacity: 0.75; }
.ew-fn-body { margin: 2px 0; font-size: 14.5px; line-height: 1.5; }
.ew-fn-setting { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-top: 12px; flex-wrap: wrap; }
.ew-fn-setting select { padding: 8px 10px; border: 0.5px solid var(--border); border-radius: 8px; font-size: 14px; background: #fff; }

/* ---------- Family home, refined ---------- */
.fx { background: #F4F2EC; }
.fx-card { border: 0; box-shadow: 0 1px 2px rgba(23,32,28,0.04), 0 6px 20px rgba(23,32,28,0.05); border-radius: 22px; }
.fx-greet { margin: 4px 0 12px; font-size: 14px; color: #5E6863; }
.fx-hero { background: #fff; border-radius: 26px; padding: 22px 20px; margin-bottom: 16px; box-shadow: 0 1px 2px rgba(23,32,28,0.04), 0 8px 28px rgba(23,32,28,0.06); display: flex; flex-direction: column; gap: 18px; }
.fx-hero .fx-h1 { margin: 0 0 8px; }
.fx-hero-top { display: flex; flex-direction: column; gap: 16px; }
.fx-hero-copy { max-width: 640px; }
.fx-hero-line { margin: 0 0 8px; font-size: 19px; line-height: 1.45; color: #2B3430; }
.fx-next { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 18px; background: #F6F5F1; align-self: flex-start; }
.fx-cal { width: 54px; height: 58px; border-radius: 14px; background: #fff; border: 1px solid #E6E3DC; display: flex; flex-direction: column; align-items: center; justify-content: center; flex: none; }
.fx-cal-m { font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: #0F6E56; }
.fx-cal-m.red { color: #9A2F14; }
.fx-cal-d { font-size: 19px; font-weight: 600; line-height: 1.15; }
.fx-next-text { display: flex; flex-direction: column; gap: 2px; font-size: 15px; }
.fx-next-text strong { font-weight: 600; }
.fx-ats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.fx-at { padding: 12px; border-radius: 16px; display: flex; flex-direction: column; gap: 6px; }
.fx-at-ok { background: #F1F7F4; }
.fx-at-watch { background: #FBF4E6; }
.fx-at-nc { background: #F2F1EE; }
.fx-at-icon { width: 34px; height: 34px; border-radius: 11px; background: #fff; display: flex; align-items: center; justify-content: center; color: #0F6E56; }
.fx-at-watch .fx-at-icon { color: #8A5A12; }
.fx-at-nc .fx-at-icon { color: #5E6863; }
.fx-at-name { font-size: 14px; font-weight: 600; line-height: 1.25; }
.fx-at-status { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: #0B5443; }
.fx-at-watch .fx-at-status { color: #7A4F0E; }
.fx-at-nc .fx-at-status { color: #5E6863; }
.fx-dot { width: 8px; height: 8px; border-radius: 4px; background: currentColor; flex: none; }
.fx-wk { display: flex; align-items: center; gap: 14px; padding: 13px 0; border-bottom: 1px solid #EFECE6; color: #17201C; }
.fx-wk:last-of-type { border-bottom: 0; }
.fx-wk-icon { width: 42px; height: 42px; border-radius: 13px; background: #FBF4E6; color: #8A5A12; display: flex; align-items: center; justify-content: center; flex: none; }
.fx-wk-ok { background: #E3F0EA; color: #0B5443; }
.fx-wk-red { background: #FBE9E4; color: #9A2F14; }
.fx-wk-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.fx-wk-text strong { font-size: 16px; font-weight: 600; }
.fx-wk-text > span { font-size: 14px; color: #5E6863; line-height: 1.4; }
.fx-soft-btn { margin-top: 10px; min-height: 46px; border-radius: 14px; background: #F4F2EC; color: #17201C; display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 15px; font-weight: 600; }
.fx-empty { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: 16px; border: 1.5px dashed #D9D5CD; }
.fx-icon-grey { background: #F0EEE9; color: #5E6863; }
.fx-icon-lg { width: 42px; height: 42px; border-radius: 13px; }
.fx-cta { display: flex; align-items: center; gap: 14px; padding: 20px 22px; border-radius: 22px; background: #17201C; color: #fff; }
.fx-cta-icon { width: 42px; height: 42px; border-radius: 13px; background: #2C3631; display: flex; align-items: center; justify-content: center; flex: none; }
.fx-cta-text { display: flex; flex-direction: column; gap: 2px; }
.fx-cta-text strong { font-size: 16px; font-weight: 600; }
.fx-cta-text span { font-size: 13px; color: #C9CFCB; }
.fx-row-card { display: flex; align-items: center; gap: 14px; padding: 16px 20px; border-radius: 22px; background: #fff; color: #17201C; box-shadow: 0 1px 2px rgba(23,32,28,0.04), 0 6px 20px rgba(23,32,28,0.05); }
.fx-row-card > svg { color: #9AA19D; }
.fx-row-card .fx-action-text { flex: 1; }
@media (min-width: 640px) {
  .fx-ats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 900px) {
  .fx-hero { padding: 30px 32px; gap: 24px; }
  .fx-hero-top { flex-direction: row; justify-content: space-between; align-items: flex-start; }
  .fx-hero .fx-h1 { font-size: 44px; }
  .fx-hero-line { font-size: 21px; }
  .fx-ats { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
  .fx-at { padding: 14px 12px; gap: 8px; }
}
body.fam-contrast-high .fx-hero, body.fam-contrast-high .fx-row-card, body.fam-contrast-high .fx-at { border: 2px solid #000; box-shadow: none; }
body.fam-contrast-high .fx-wk-text > span, body.fam-contrast-high .fx-greet { color: #1A1A1A; }

/* Support window banner (platform admins only) */
.ew-support-banner { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; background: #FFF4E5; border: 1px solid #F0C27B; color: #5C3B00; border-radius: 10px; padding: 10px 14px; margin-bottom: 14px; font-size: 15px; }
.ew-support-banner .btn { padding: 6px 12px; }

/* Family: choose who to see */
.fx-switch { display: flex; align-items: center; gap: 10px; font-size: 15px; color: #5b6b66; padding: 10px 20px 0; max-width: 1040px; margin: 0 auto; box-sizing: border-box; width: 100%; }
.fx-switch select { font: inherit; font-size: 16px; padding: 8px 12px; border-radius: 10px; border: 1px solid #cfd8d4; background: #fff; color: #1b2b26; flex: 0 1 auto; min-width: 0; max-width: 100%; }

/* ---------- WellCare Insight family app on its own (Build B1) ---------- */
.fx-input { width: 100%; min-height: 50px; box-sizing: border-box; padding: 12px 14px; border: 1.5px solid #D9D5CD; border-radius: 14px; font: inherit; font-size: 16px; color: #17201C; background: #fff; }
.fx-input:focus, .fx-textarea:focus { outline: 3px solid rgba(15,110,86,0.25); border-color: #0F6E56; }
.fx-optional { font-weight: 400; color: #6B736F; font-size: 14px; }
.fx-choice { display: flex; flex-direction: column; gap: 4px; width: 100%; text-align: left; padding: 18px 20px; margin: 0 0 12px; border-radius: 20px; border: 1.5px solid #E6E3DC; background: #fff; color: #17201C; font: inherit; cursor: pointer; box-shadow: 0 1px 2px rgba(23,32,28,0.04); }
.fx-choice strong { font-size: 17px; }
.fx-choice span { font-size: 14.5px; color: #5B6B66; }
.fx-choice:hover, .fx-choice:focus-visible { border-color: #0F6E56; }
.fx-logtiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.fx-logtile { display: flex; align-items: center; gap: 10px; min-height: 60px; padding: 10px 12px; border-radius: 16px; border: 1px solid #E6E3DC; background: #fff; color: #17201C; font: inherit; font-size: 15px; font-weight: 500; text-align: left; cursor: pointer; }
.fx-logtile:hover, .fx-logtile:focus-visible { border-color: #0F6E56; }
.fx-pair { display: flex; align-items: flex-end; gap: 10px; }
.fx-pair > div { flex: 1; }
.fx-pair-sep { font-size: 28px; color: #9AA19D; padding-bottom: 8px; }
.fx-cta-quiet { background: #fff; color: #17201C; box-shadow: 0 1px 2px rgba(23,32,28,0.04), 0 6px 20px rgba(23,32,28,0.05); margin-top: 12px; }
.fx-cta-quiet .fx-cta-icon { background: #E7F1ED; color: #0F6E56; }
.fx-cta-quiet .fx-cta-text span { color: #5B6B66; }
.fx-card-quiet { background: #F6F4EF; box-shadow: none; margin-top: 12px; }
.fx-log-main { font-weight: 500; }
.fx-log-note { display: block; font-size: 14.5px; line-height: 1.45; color: #2E3A35; margin: 2px 0; }
.fx-log-row .fx-feed-text { flex: 1; min-width: 0; }
.fx-icon-btn { flex: none; width: 36px; height: 36px; border-radius: 10px; border: 0; background: transparent; color: #8A928E; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.fx-icon-btn:hover { background: #F2EFE9; color: #17201C; }
.fx-checks { display: flex; flex-direction: column; gap: 8px; margin: 8px 0 12px; }
.fx-check { display: flex; align-items: center; gap: 10px; font-size: 15px; min-height: 36px; }
.fx-check input { width: 20px; height: 20px; accent-color: #0F6E56; }
.fx-check-big { font-size: 16px; font-weight: 500; }
.fx-card-alert { background: #FBE9E4; box-shadow: none; }
.fx-list { margin: 6px 0 0; padding-left: 20px; line-height: 1.55; font-size: 15px; }
.fx-list li { margin-bottom: 6px; }
.fx-simple .fx-main { max-width: 680px; }
.fx-simple .fx-top { padding: 18px 20px 4px; max-width: 680px; margin: 0 auto; }
.fx-access-row .fx-feed-text { flex: 1; min-width: 0; }
.fx-access-row .fx-link { background: none; border: 0; font: inherit; cursor: pointer; }
.fx-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.fam-contrast-high .fx-input, .fam-contrast-high .fx-choice, .fam-contrast-high .fx-logtile { border-color: #17201C; }
.fx-simple .fx-top { display: block; }
.fx-simple .fx-brand { display: inline-block; }
button.fx-link { background: none; border: 0; padding: 6px 0; font: inherit; color: #0F6E56; font-weight: 600; cursor: pointer; }
.fx-cta + .fx-card, .fx-cta + .fx-cta, .fx-card + .fx-cta, .fx-card + .fx-card { margin-top: 12px; }
.fx.fx-simple { display: block; }

/* ---------- Family app redesign (WellCare concept layout, brand fonts) ---------- */
.fx-display { font-family: 'DM Serif Display', Georgia, serif; font-weight: 400; font-size: 31px; line-height: 1.18; letter-spacing: -0.4px; margin: 0 0 8px; color: #1B3A31; }
.fx-eyebrow { font-size: 12.5px; letter-spacing: 1.2px; text-transform: uppercase; color: #5E6E67; margin: 4px 0 8px; display: block; }
.fx-sectionhead { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 26px 0 12px; }
.fx-sectionhead > span { font-size: 13px; color: #5E6E67; }
.fx-personwrap { max-width: 1100px; margin: 0 auto; padding: 4px 20px 0; box-sizing: border-box; width: 100%; }
.fx-personcard { display: flex; align-items: center; gap: 12px; background: #fff; border: 1px solid #E3E8E1; border-radius: 16px; padding: 10px 14px; max-width: 620px; }
.fx-personcard-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.fx-personcard-text .fx-eyebrow { margin: 0; font-size: 11.5px; }
.fx-personcard-text strong { font-size: 16px; font-weight: 600; color: #1B3A31; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fx-avatar-soft { width: 40px; height: 40px; border-radius: 50%; background: #E8EFE5; color: #0F6E56; display: inline-flex; align-items: center; justify-content: center; font-family: 'DM Serif Display', Georgia, serif; font-size: 17px; flex: none; }
.fx-herocheck { position: relative; isolation: isolate; overflow: hidden; border-radius: 24px; background: #1F4D40; color: #F4F6EB; padding: 22px; margin-top: 20px; }
.fx-herocheck h2 { font-family: 'DM Serif Display', Georgia, serif; font-weight: 400; font-size: 26px; line-height: 1.22; margin: 0; max-width: 320px; color: #F4F6EB; }
.fx-herocheck p { font-size: 15px; line-height: 1.55; color: #E0EADE; margin: 10px 0 0; max-width: 420px; }
.fx-herocheck-eyebrow { display: flex !important; align-items: center; gap: 6px; font-size: 12.5px !important; letter-spacing: 1.4px; text-transform: uppercase; color: #D3E4B8 !important; margin: 0 0 12px !important; }
.fx-herocheck-btn { margin-top: 18px; width: 100%; min-height: 52px; border: 0; border-radius: 14px; background: #D3E4B8; color: #1E3A2E; font: inherit; font-size: 16px; font-weight: 600; display: flex; align-items: center; justify-content: space-between; padding: 0 18px; cursor: pointer; }
.fx-herocheck-btn:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.fx-herocheck-status { display: flex !important; align-items: center; gap: 6px; font-size: 13.5px !important; color: #CFDCCB !important; margin-top: 14px !important; }
.fx-herocheck-soft { background: #E8EFE5; color: #1B3A31; }
.fx-herocheck-soft h2 { color: #1B3A31; }
.fx-herocheck-soft p { color: #3A4A43; }
.fx-herocheck-soft .fx-herocheck-eyebrow { color: #0F6E56 !important; }
.fx-orbit { position: absolute; right: -30px; top: -34px; width: 135px; height: 135px; border: 1px solid rgba(211,228,184,0.18); border-radius: 50%; z-index: -1; }
.fx-orbit::before, .fx-orbit::after { content: ''; position: absolute; border: 1px solid rgba(211,228,184,0.14); border-radius: 50%; inset: 18px; }
.fx-orbit::after { inset: 38px; }
.fx-quickgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; max-width: 620px; }
.fx-quick { display: flex; flex-direction: column; align-items: center; gap: 8px; background: none; border: 0; font: inherit; font-size: 14px; color: #1B3A31; text-align: center; cursor: pointer; padding: 0; }
.fx-quickicon { width: 58px; height: 58px; border-radius: 18px; background: #fff; border: 1px solid #E3E8E1; display: flex; align-items: center; justify-content: center; color: #0F6E56; box-shadow: 0 1px 2px rgba(23,32,28,0.04); }
.fx-quick:hover .fx-quickicon, .fx-quick:focus-visible .fx-quickicon { border-color: #0F6E56; }
.fx-attn { margin-bottom: 10px; }
.fx-attn h3 { font-size: 17px; font-weight: 600; margin: 4px 0 6px; color: #1B3A31; }
.fx-attn-eyebrow { font-size: 12px; letter-spacing: 1.2px; text-transform: uppercase; color: #765B2C; margin: 0; display: flex; align-items: center; gap: 6px; }
.fx-attn-eyebrow::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: #B8873A; }
.fx-tilepair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 22px; max-width: 620px; }
.fx-pairtile { display: flex; flex-direction: column; gap: 6px; padding: 18px; border-radius: 22px; min-height: 150px; color: #1B3A31; }
.fx-pairtile strong { font-family: 'DM Serif Display', Georgia, serif; font-weight: 400; font-size: 21px; line-height: 1.15; }
.fx-pairtile > span { font-size: 14px; color: #4F5D57; line-height: 1.45; }
.fx-pairtile .fx-meta { margin-top: auto; }
.fx-pairtile-lilac { background: #EFEDF7; }
.fx-pairtile-peach { background: #F6EBDF; }
.fx-faces { display: flex; margin-top: auto; }
.fx-face { min-width: 30px; height: 30px; padding: 0 6px; box-sizing: border-box; border-radius: 15px; background: #fff; border: 2px solid #EFEDF7; display: inline-flex; align-items: center; justify-content: center; font-size: 11.5px; font-weight: 600; margin-right: -6px; color: #1B3A31; }
.fx-careline { display: flex; align-items: center; gap: 12px; background: #fff; border: 1px solid #E3E8E1; border-radius: 18px; padding: 14px 16px; margin-top: 14px; max-width: 620px; box-sizing: border-box; color: #1B3A31; }
.fx-careline .fx-feed-text { flex: 1; display: flex; flex-direction: column; }
.fx-footnote { font-size: 13.5px; color: #5E6E67; text-align: center; margin: 22px auto 6px; max-width: 520px; line-height: 1.5; }
.fx-taskrow { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid #EFECE6; }
.fx-taskrow:last-child { border-bottom: 0; }
.fx-task-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.fx-task-text strong { font-size: 16px; font-weight: 600; color: #1B3A31; }
.fx-taskrow.is-done .fx-task-text strong { text-decoration: line-through; color: #6B736F; }
.fx-tick { flex: none; width: 28px; height: 28px; border-radius: 50%; border: 2px solid #9DB3A9; background: #fff; display: inline-flex; align-items: center; justify-content: center; color: #fff; cursor: pointer; padding: 0; }
.fx-taskrow.is-done .fx-tick { background: #0F6E56; border-color: #0F6E56; }
.fx-done summary { cursor: pointer; font-weight: 600; margin: 16px 0 10px; color: #3A4A43; }
.fx-recordrow { display: flex; align-items: center; gap: 12px; width: 100%; max-width: 620px; text-align: left; background: #fff; border: 1px solid #E3E8E1; border-radius: 18px; padding: 14px 16px; margin: 0 0 10px; font: inherit; color: #1B3A31; cursor: pointer; }
.fx-recordrow .fx-feed-text { flex: 1; display: flex; flex-direction: column; }
.fx-recordrow strong { font-size: 16px; }
.fx-recordrow:hover, .fx-recordrow:focus-visible { border-color: #0F6E56; }
.fx-answers { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 4px; }
.fx-ans { font-size: 13px; padding: 3px 9px; border-radius: 999px; background: #F2F4EF; color: #2E3A35; }
.fx-ans-worse { background: #F5E9D4; color: #6A4F22; }
.fx-ans-better { background: #E3F0EA; color: #0B5443; }
.fx-q { border: 0; padding: 0; margin: 18px 0 0; }
.fx-q legend { font-size: 17px; font-weight: 600; color: #1B3A31; margin-bottom: 10px; padding: 0; }
.fx-qopts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.fx-qopt { min-height: 56px; padding: 8px 10px; border-radius: 14px; border: 1.5px solid #D9D5CD; background: #fff; font: inherit; font-size: 15px; line-height: 1.25; color: #17201C; cursor: pointer; }
.fx-qopt.on { border-color: #1F4D40; background: #1F4D40; color: #fff; font-weight: 600; }
.fx-servicecard { display: flex; align-items: center; gap: 12px; background: #fff; border: 1px solid #E3E8E1; border-radius: 18px; padding: 16px; margin-bottom: 10px; color: #1B3A31; max-width: 620px; box-sizing: border-box; }
.fx-servicecard .fx-feed-text { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.fx-servicecard strong { font-size: 16px; }
.fx-servicecard > svg { color: #0F6E56; flex: none; }
.fx-rowbtn { width: 100%; background: none; border: 0; border-bottom: 1px solid #EFECE6; font: inherit; text-align: left; cursor: pointer; }
.fam-contrast-high .fx-quickicon, .fam-contrast-high .fx-recordrow, .fam-contrast-high .fx-servicecard, .fam-contrast-high .fx-qopt, .fam-contrast-high .fx-personcard, .fam-contrast-high .fx-careline { border-color: #17201C; }
.fam-contrast-high .fx-herocheck p, .fam-contrast-high .fx-herocheck-status { color: #fff !important; }
@media (max-width: 420px) { .fx-quickgrid { gap: 6px; } .fx-quickicon { width: 52px; height: 52px; } .fx-qopt { font-size: 14px; } .fx-display { font-size: 28px; } }
.fx-bottom { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
.fx-solo .fx-main { max-width: 760px; margin-left: 0; }
.fx-solo .fx-personwrap { max-width: 760px; margin-left: 0; }
.fx-solo .fx-personcard, .fx-solo .fx-quickgrid, .fx-solo .fx-tilepair, .fx-solo .fx-careline, .fx-solo .fx-recordrow, .fx-solo .fx-servicecard, .fx-solo .fx-narrow { max-width: none; }
@media (min-width: 900px) { .fx-solo .fx-main, .fx-solo .fx-personwrap { padding-left: 40px; padding-right: 40px; } .fx-solo .fx-quickgrid { max-width: 520px; } }

/* ---------- B2: connecting a care agency ---------- */
.fx-codecard { text-align: center; }
.fx-code { font-family: 'SFMono-Regular', Menlo, Consolas, monospace; font-size: 38px; letter-spacing: 6px; font-weight: 700; color: #1B3A31; margin: 6px 0 12px; }
.fx-codecard .fx-chips { justify-content: center; }
.fx-agency .fx-card-head { align-items: center; }
.fx-qopts-2 { grid-template-columns: repeat(2, 1fr); }
.fx-careline.is-waiting { border-color: #B8873A; background: #FFF8EC; }
.fx-pill-green { background: #E3F0EA; color: #0B5443; }

/* ---------- Fit every screen ---------- */
/* Wide screens: one centred column, with the top bar lined up to it. */
.fx-solo .fx-main, .fx-solo .fx-personwrap, .fx-solo .fx-top { max-width: 760px; margin-left: auto; margin-right: auto; }
@media (min-width: 900px) { .fx-solo .fx-top { padding-left: 40px; padding-right: 40px; } }
/* The person card: the name can wrap, the button never squeezes it. */
.fx-personcard-text strong { white-space: normal; overflow: visible; text-overflow: clip; line-height: 1.25; }
.fx-personcard .fx-link { flex: none; padding-left: 8px; }
/* Section headings wrap rather than squash. */
.fx-sectionhead { flex-wrap: wrap; row-gap: 2px; }
/* Tasks: on narrow screens the buttons sit under the task, not beside it. */
.fx-taskrow { flex-wrap: wrap; }
.fx-task-text { flex: 1 1 160px; }
@media (max-width: 460px) {
  .fx-taskrow > .fx-link { margin-left: 40px; }
  .fx-taskrow > .fx-link + .fx-icon-btn, .fx-taskrow > .fx-icon-btn { margin-left: auto; }
}
/* Small phones */
@media (max-width: 380px) {
  .fx-top { padding-left: 14px; padding-right: 14px; gap: 6px; }
  .fx-tool span:not([aria-hidden]) { display: none; }
  .fx-tool { padding: 0 10px; }
  .fx-main, .fx-personwrap { padding-left: 14px; padding-right: 14px; }
  .fx-personcard { padding: 8px 10px; gap: 10px; }
  .fx-personcard-text .fx-eyebrow { font-size: 10.5px; letter-spacing: 0.8px; }
  .fx-tilepair { grid-template-columns: 1fr; }
  .fx-pairtile { min-height: 0; }
  .fx-herocheck { padding: 18px; }
  .fx-herocheck h2 { font-size: 23px; }
  .fx-qopt { font-size: 13.5px; padding: 6px; }
  .fx-display { font-size: 26px; }
  .fx-code { font-size: 30px; letter-spacing: 4px; }
}
@media (min-width: 900px) { .fx-rail { position: sticky; top: 0; height: 100vh; box-sizing: border-box; align-self: flex-start; } }

/* ---------- Build C: over time and the GP summary ---------- */
.fx-chart { width: 100%; height: auto; display: block; margin: 8px 0 4px; }
.fx-series { margin-bottom: 12px; }
.fx-series-latest { margin: 2px 0 6px; font-size: 15px; }
.fx-series-latest strong { font-size: 20px; color: #1B3A31; }
.fx-usual { display: flex; align-items: center; gap: 8px; font-size: 14.5px; color: #2E3A35; margin: 6px 0; }
.fx-usual-swatch { width: 22px; height: 12px; border-radius: 3px; background: rgba(15,110,86,0.18); flex: none; }
.fx-facts { margin: 8px 0 0; padding-left: 20px; font-size: 15px; line-height: 1.5; color: #2E3A35; }
.fx-facts li { margin-bottom: 4px; }
.fx-table { width: 100%; border-collapse: collapse; font-size: 14.5px; margin: 8px 0; }
.fx-table th, .fx-table td { text-align: left; padding: 8px 6px; border-bottom: 1px solid #EFECE6; vertical-align: top; }
.fx-table th { font-size: 13px; color: #5E6E67; font-weight: 600; }
.fx-links { padding-top: 4px; padding-bottom: 4px; margin-top: 16px; }
.fx-links .fx-feed-row { align-items: center; }
.fx-links .fx-feed-text { flex: 1; display: flex; flex-direction: column; }
.fx-gp { background: #fff; border-radius: 20px; padding: 22px; margin-top: 16px; box-shadow: 0 1px 2px rgba(23,32,28,0.04), 0 6px 20px rgba(23,32,28,0.05); }
.fx-gp h2 { margin-top: 22px; }
.fx-gp h3 { font-size: 16px; margin: 16px 0 4px; }
.fx-gp-series { border-top: 1px solid #EFECE6; padding-top: 4px; }
.fx-gp-foot { margin-top: 24px; font-size: 13px; color: #5E6E67; line-height: 1.5; border-top: 1px solid #EFECE6; padding-top: 12px; }
@media print {
  .fx-rail, .fx-bottom, .fx-top, .fx-personwrap, .fx-noprint, .fx-panel-wrap { display: none !important; }
  .fx-body { padding: 0 !important; }
  .fx-main { max-width: none !important; padding: 0 !important; }
  .fx-gp { box-shadow: none; padding: 0; margin: 0; }
  body, .fx, .family-shell { background: #fff !important; }
  .fx-table tr { break-inside: avoid; }
}

/* ---------- Sign-in page (families and agency staff) ---------- */
body.au-page { background: #F7F6F2; }
.au { min-height: 100vh; display: grid; grid-template-columns: minmax(380px, 46%) 1fr; font-family: Inter, -apple-system, 'Segoe UI', Roboto, sans-serif; color: #17201C; }
.au-brand { position: relative; isolation: isolate; overflow: hidden; background: #1F4D40; color: #F4F6EB; padding: 40px 48px; display: flex; flex-direction: column; }
.au-orbit { position: absolute; right: -120px; top: -120px; width: 420px; height: 420px; border: 1px solid rgba(211,228,184,0.16); border-radius: 50%; z-index: -1; }
.au-orbit::before, .au-orbit::after { content: ''; position: absolute; inset: 60px; border: 1px solid rgba(211,228,184,0.13); border-radius: 50%; }
.au-orbit::after { inset: 130px; }
.au-brand-top { display: flex; align-items: center; gap: 10px; }
.au-mark { width: 36px; height: 36px; border-radius: 12px 12px 12px 4px; background: #D3E4B8; color: #1F4D40; display: grid; place-items: center; font-family: 'DM Serif Display', Georgia, serif; font-size: 20px; }
.au-name { font-size: 18px; font-weight: 600; letter-spacing: -0.2px; }
.au-brand-copy { margin: auto 0; max-width: 460px; padding: 40px 0; }
.au-headline { font-family: 'DM Serif Display', Georgia, serif; font-weight: 400; font-size: 46px; line-height: 1.08; letter-spacing: -0.5px; margin: 0 0 18px; color: #F4F6EB; }
.au-lead { font-size: 17px; line-height: 1.6; color: #DCE6DA; margin: 0 0 24px; }
.au-points { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.au-points li { position: relative; padding-left: 30px; font-size: 15.5px; line-height: 1.5; color: #E6EEE3; }
.au-points li::before { content: ''; position: absolute; left: 0; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: #D3E4B8 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231F4D40' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E") center/12px no-repeat; }
.au-brand-foot { font-size: 13.5px; color: #BFCFC4; margin: 0; }
.au-main { display: flex; align-items: center; justify-content: center; padding: 40px 24px; }
.au-card { width: 100%; max-width: 420px; }
.au-tabs { display: grid; grid-template-columns: 1fr 1fr; background: #ECEAE4; border-radius: 14px; padding: 4px; margin-bottom: 28px; }
.au-tab { min-height: 44px; border: 0; border-radius: 11px; background: transparent; font: inherit; font-size: 15px; font-weight: 600; color: #4F5D57; cursor: pointer; }
.au-tab.on { background: #fff; color: #1B3A31; box-shadow: 0 1px 2px rgba(23,32,28,0.08), 0 2px 8px rgba(23,32,28,0.06); }
.au-tab:focus-visible, .au-btn:focus-visible, .au-link:focus-visible { outline: 3px solid rgba(15,110,86,0.35); outline-offset: 2px; }
.au-title { font-family: 'DM Serif Display', Georgia, serif; font-weight: 400; font-size: 32px; line-height: 1.15; margin: 0 0 8px; color: #1B3A31; }
.au-sub { font-size: 15.5px; line-height: 1.55; color: #4F5D57; margin: 0 0 22px; }
.au-label { display: block; font-size: 14.5px; font-weight: 600; margin: 0 0 8px; color: #1B3A31; }
.au-label-row { display: flex; justify-content: space-between; align-items: baseline; margin-top: 16px; }
.au-input { width: 100%; box-sizing: border-box; min-height: 52px; padding: 12px 14px; border: 1.5px solid #D9D5CD; border-radius: 14px; background: #fff; font: inherit; font-size: 16px; color: #17201C; }
.au-input:focus { outline: 3px solid rgba(15,110,86,0.2); border-color: #0F6E56; }
.au-btn { width: 100%; min-height: 54px; margin-top: 18px; border: 0; border-radius: 14px; background: #0F6E56; color: #fff; font: inherit; font-size: 16px; font-weight: 600; cursor: pointer; }
.au-btn:hover { background: #0C5C48; }
.au-btn:disabled { opacity: 0.7; cursor: default; }
.au-btn-ghost { background: #fff; color: #0F6E56; border: 1.5px solid #CFE0D8; margin-top: 10px; }
.au-btn-ghost:hover { background: #F2F7F4; }
.au-link { background: none; border: 0; padding: 0; font: inherit; font-size: 14px; font-weight: 600; color: #0F6E56; cursor: pointer; }
.au-or { display: flex; align-items: center; gap: 12px; color: #6B736F; font-size: 13.5px; margin: 18px 0; }
.au-or::before, .au-or::after { content: ''; flex: 1; height: 1px; background: #E2DED6; }
.au-error { color: #A1301B; background: #FBE9E4; border-radius: 12px; padding: 10px 12px; font-size: 14.5px; margin: 14px 0 0; }
.au-fine { font-size: 13.5px; color: #6B736F; margin: 18px 0 0; line-height: 1.5; }
@media (max-width: 860px) {
  .au { grid-template-columns: 1fr; }
  .au-brand { padding: 22px 20px 26px; }
  .au-brand-copy { margin: 0; padding: 18px 0 0; }
  .au-headline { font-size: 30px; margin-bottom: 8px; }
  .au-lead { font-size: 15px; margin: 0; }
  .au-points, .au-brand-foot { display: none; }
  .au-orbit { width: 260px; height: 260px; right: -90px; top: -90px; }
  .au-main { align-items: flex-start; padding: 24px 20px 40px; }
  .au-title { font-size: 27px; }
}
body.au-page #app { max-width: none; margin: 0; }
@media (max-width: 860px) { .au { grid-template-rows: auto 1fr; min-height: 100vh; } }
.au-headline { margin-bottom: 26px; }
@media (max-width: 860px) { .au-headline { margin-bottom: 0; } }

/* Sign-in, second version (from the WellCare login concept) */
.au-brand-top { flex-direction: column; align-items: flex-start; gap: 2px; }
.au-name { font-size: 20px; font-weight: 600; letter-spacing: -0.3px; }
.au-name-sub { font-size: 11.5px; letter-spacing: 2.4px; text-transform: uppercase; color: #CFDCCB; }
.au-eyebrow { font-size: 12.5px; letter-spacing: 1.8px; text-transform: uppercase; color: #D3E4B8; margin: 0 0 14px; }
.au-headline { font-size: 48px; margin-bottom: 16px; max-width: 440px; }
.au-lead { font-size: 16.5px; line-height: 1.6; color: #DCE6DA; margin: 0 0 26px; max-width: 360px; }
.au-points li { padding-left: 0; display: flex; align-items: center; gap: 12px; }
.au-points li::before { display: none; }
.au-points li svg { color: #D3E4B8; flex: none; }
.au-trio { display: flex; align-items: flex-start; gap: 10px; margin-top: 30px; padding-top: 24px; border-top: 1px solid rgba(211,228,184,0.18); max-width: 360px; }
.au-trio-item { display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 13px; color: #DCE6DA; }
.au-trio-dot { width: 44px; height: 44px; border-radius: 50%; background: rgba(255,255,255,0.08); display: grid; place-items: center; color: #D3E4B8; }
.au-trio-line { flex: 1; height: 1px; background: rgba(211,228,184,0.25); margin-top: 22px; }
.au-hint { font-size: 13.5px; color: #5E6E67; text-align: center; margin: 12px 0 0; }
.au-rule { height: 1px; background: #E2DED6; margin: 24px 0 18px; }
.au-centre { text-align: center; font-size: 14.5px; color: #3A4A43; margin: 0 0 12px; }
.au-quiet { color: #6B736F; font-size: 14px; }
.au-link-u { text-decoration: underline; text-underline-offset: 3px; }
.au-pw { position: relative; }
.au-pw .au-input { padding-right: 70px; }
.au-pw-show { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); background: none; border: 0; font: inherit; font-size: 14px; font-weight: 600; color: #0F6E56; padding: 8px; cursor: pointer; }
.au-foot { display: flex; justify-content: center; gap: 18px; margin-top: 28px; }
.au-foot a { font-size: 13.5px; color: #5E6E67; }
.au-brand-foot { display: none; }
@media (max-width: 860px) {
  .au-name-sub, .au-eyebrow, .au-lead, .au-trio { display: none; }
  .au-headline { font-size: 30px; }
}

/* Family sign-in and security */
.au-optional { font-weight: 400; color: #6B736F; font-size: 13.5px; }
.fx-qs { margin-top: 14px; }
.fx-qs .fx-card-head { align-items: center; }
.fx-sec-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid #EFECE6; flex-wrap: wrap; }
.fx-sec-row .fx-feed-text { flex: 1 1 200px; display: flex; flex-direction: column; }
.fx-sec-keys { list-style: none; margin: 0; padding: 0 0 6px; }
.fx-sec-keys li { display: flex; justify-content: space-between; align-items: center; font-size: 14.5px; padding: 6px 0; color: #3A4A43; }
.fx-input + .au-pw-show, .au-pw .fx-input { padding-right: 70px; }

/* Review queue (Build D) */
.rv-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 860px) { .rv-grid { grid-template-columns: minmax(0, 1fr); } }
.sh-nav-count { display: inline-block; min-width: 20px; padding: 1px 7px; margin-left: 6px; border-radius: 10px; background: #fff; color: #0F6E56; font-size: 12px; font-weight: 700; text-align: center; }
button.sh-kpi-card.sh-kpi-link { text-align: left; font: inherit; cursor: pointer; }
button.sh-kpi-card.sh-kpi-link:hover { border-color: #0F6E56; }
button.sh-kpi-card.sh-kpi-link:focus-visible { outline: 3px solid #0F6E56; outline-offset: 2px; }

/* Assessments in parts (Build E) */
.ew-parts-intro { margin: 0 0 14px; padding: 12px 14px; border-radius: 10px; background: #EEF5F2; color: #0B4F3E; font-size: 14px; line-height: 1.5; }
.ew-parts-notice { margin: 0 0 16px; padding: 12px 14px; border-radius: 10px; background: var(--green-bg); color: var(--green-text); font-size: 14px; line-height: 1.5; }
.ew-part-mark { margin: 12px 0 0; font-size: 13.5px; color: var(--muted); }
.ew-part-mark a { color: #0F6E56; font-weight: 600; }
.rp-parts-note { margin: 10px 0 0; font-size: 12.5px; color: var(--muted); line-height: 1.5; }
@media (max-width: 480px) {
  .ew-step-card { flex-wrap: wrap; row-gap: 2px; }
  .ew-step-card .ew-step-title { flex: 1 1 calc(100% - 52px); }
  .ew-step-card .ew-step-state { flex: 1 1 100%; padding-left: 44px; }
  .ew-step-nav .btn.secondary { min-height: 40px; padding: 8px 12px; }
}

/* Build F: Today, team report, updates to the family */
.td-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; margin-top: 8px; }
@media (max-width: 860px) { .td-grid { grid-template-columns: minmax(0, 1fr); } }
.td-section { background: #fff; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; margin-bottom: 16px; }
.td-section-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.td-section-head h2 { margin: 0; font-family: Inter, sans-serif; font-size: 14px; font-weight: 600; }
.td-section-head a { font-size: 13px; color: #0F6E56; font-weight: 600; }
.td-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; padding: 12px 18px; background: none; border: 0; border-bottom: 1px solid var(--border); text-align: left; font: inherit; cursor: pointer; min-height: 56px; }
.td-row:last-child { border-bottom: 0; }
.td-row:hover { background: #F6F8F7; }
.td-row:focus-visible { outline: 3px solid #0F6E56; outline-offset: -3px; }
.td-row-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.td-row-text strong { font-size: 14.5px; }
.td-row-text span { font-size: 13px; color: var(--muted); }
.td-row .badge { flex: 0 0 auto; }
.td-empty { margin: 0; padding: 16px 18px; color: var(--muted); font-size: 14px; }
.tr-h2 { font-family: Inter, sans-serif; font-size: 15px; font-weight: 600; margin: 22px 0 10px; }
.tr-panel { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 14px 18px; font-size: 14px; }
.tr-panel p { margin: 0 0 8px; }
.tr-chip { display: inline-block; margin: 0 6px 6px 0; padding: 4px 10px; border-radius: 999px; background: #EEF5F2; font-size: 13px; }
.au-up-row { padding: 10px 0; border-top: 1px solid var(--border); font-size: 14px; }
.au-up-row p { margin: 0 0 4px; white-space: pre-wrap; }
.au-up-row span { font-size: 12px; color: var(--muted); }
.au-up-row a { color: #0F6E56; font-weight: 600; }
.au-up-row.is-withdrawn p { color: var(--muted); text-decoration: line-through; }
.fx-update-body { display: block; margin: 4px 0; font-size: 14.5px; line-height: 1.5; white-space: pre-wrap; }
@media print { .sh-sidenav, .sh-topbar, .sh-filter-bar, #tr-print { display: none !important; } }

/* Build G: email preferences */
.ep-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--border, #e5e5e0); cursor: pointer; }
.ep-row > span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ep-row strong { font-size: 15px; }
.ep-hint { display: block; font-size: 13px; color: var(--muted, #6b6b6b); line-height: 1.45; }
.ep-toggle { appearance: none; -webkit-appearance: none; flex: 0 0 auto; width: 46px; height: 28px; border-radius: 999px; background: #CFCFC8; position: relative; cursor: pointer; transition: background .15s; margin: 0; }
.ep-toggle::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: left .15s; }
.ep-toggle:checked { background: #0F6E56; }
.ep-toggle:checked::after { left: 21px; }
.ep-toggle:focus-visible { outline: 3px solid #0F6E56; outline-offset: 2px; }
.ep-quiet { padding: 12px 0 0; }
.ep-quiet strong { font-size: 15px; }
.ep-quiet-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 8px; }
.ep-quiet-row label { font-size: 14px; display: flex; align-items: center; gap: 6px; }
.ep-quiet-row select { padding: 8px 10px; border: 1px solid var(--border, #ddd); border-radius: 8px; font: inherit; font-size: 14px; background: #fff; }
.ep-saved { margin: 6px 0 0; font-size: 13px; min-height: 1em; }
.ep-saved.is-ok { color: var(--green-text, #0B4F3E); }
.ep-saved.is-error { color: var(--red-text, #A32D2D); }
.ep-staff { background: #fff; border: 0.5px solid var(--border); border-radius: 12px; padding: 4px 16px 12px; }

/* Build H1 */
.ag-bar { height: 8px; border-radius: 999px; background: #E4E7E5; overflow: hidden; min-width: 120px; }
.ag-bar span { display: block; height: 100%; background: #0F6E56; border-radius: 999px; }
.as-card { margin-bottom: 16px; }
.as-steps { list-style: none; margin: 0; padding: 6px 0; }
.as-steps li { display: flex; align-items: center; gap: 12px; padding: 10px 18px; border-top: 1px solid var(--border); }
.as-steps li:first-child { border-top: 0; }
.as-tick { flex: 0 0 auto; width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid #B9C4BF; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; color: #fff; }
.as-steps li.is-done .as-tick { background: #0F6E56; border-color: #0F6E56; }
.as-text { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.as-text strong { font-size: 14.5px; }
.as-text span { font-size: 13px; color: var(--muted); }
.as-steps li.is-done .as-text strong { color: var(--muted); }
.pm-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; margin-top: 14px; }
.pm-chart { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; }
.pm-chart p { margin: 0 0 24px; font-size: 14px; }
.pm-bars { display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; height: 110px; align-items: end; }
.pm-bar { position: relative; height: 100%; display: flex; align-items: flex-end; }
.pm-bar span { display: block; width: 100%; min-height: 2px; background: #0F6E56; border-radius: 4px 4px 0 0; }
.pm-bar em { position: absolute; top: -2px; left: 0; right: 0; text-align: center; font-style: normal; font-size: 11px; color: var(--muted); transform: translateY(-100%); }
.pm-axis { display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; margin-top: 6px; }
.pm-axis span { font-size: 10.5px; color: var(--muted); text-align: center; }
.au-foot { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.fx-readonly { margin: 0 0 14px; padding: 12px 14px; border-radius: 12px; background: #F1EFEA; border: 1px solid #DAD6CC; font-size: 14.5px; line-height: 1.5; }

/* Build H2 */
.au-code { letter-spacing: 0.3em; font-size: 20px; text-align: center; }

/* Build their baseline (kit shelf from the WellCare wellbeing kit concept) */

.blk{--blk-bg:#f6f3ed;--blk-paper:#fffef9;--blk-ink:#224c3d;--blk-muted:#68796c;--blk-sage:#e3eddb;--blk-green:#22543f;--blk-on:#fffef5;--blk-lime:#d7e8ad;--blk-line:#d8dfd1;--blk-wall:#e9e8d7;--blk-wood:#d4bb99;--blk-woodedge:#b9a17e;--blk-object:#f7f7e9;--blk-metal:#6c8b7b;--blk-shadow:#173b271a;font:16px/1.5 Inter,system-ui,sans-serif;color:var(--blk-ink);background:var(--blk-bg);max-width:760px;margin:0 auto}.blk *{box-sizing:border-box}.blk button,.blk input{font:inherit}.blk button{color:inherit}.blk button:focus-visible,.blk input:focus-visible{outline:3px solid var(--blk-green);outline-offset:4px}.blk .blk-over{font-size:11px;text-transform:uppercase;letter-spacing:2px;color:var(--blk-muted);margin-bottom:10px}.blk h1,.blk h2,.blk h3{font-family:"DM Serif Display",Georgia,serif;font-weight:400;line-height:1.15}.blk h1{font-size:38px;margin:0 0 14px;max-width:560px}.blk h2{font-size:27px;margin:0 0 12px}.blk h3{font-size:22px;margin:0 0 9px}.blk p{margin:0 0 18px}.blk .blk-muted{color:var(--blk-muted)}.blk .blk-room{border-radius:110px 110px 22px 22px;background:var(--blk-wall);position:relative;padding:40px 22px 25px;margin-top:28px;isolation:isolate;overflow:hidden}.blk .blk-room:before{content:'';position:absolute;inset:15px 16px 20px;border:1px solid var(--blk-line);border-radius:100px 100px 12px 12px;z-index:-1}.blk .blk-roomtitle{text-align:center;color:var(--blk-muted);font-size:11px;letter-spacing:2px;text-transform:uppercase;margin:0 0 20px}.blk .blk-shelf{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px 12px;position:relative;background:linear-gradient(to bottom,transparent 0%,transparent 41%,var(--blk-wood) 41%,var(--blk-wood) 44%,var(--blk-woodedge) 44%,var(--blk-woodedge) 45%,transparent 45%,transparent 91%,var(--blk-wood) 91%,var(--blk-wood) 94%,var(--blk-woodedge) 94%,var(--blk-woodedge) 95%,transparent 95%)}.blk .blk-item{position:relative;min-width:0;border:0;background:transparent;border-radius:18px;padding:10px 3px 22px;min-height:190px;display:flex;flex-direction:column;align-items:center;gap:13px;isolation:isolate}.blk .blk-item:before{content:'';position:absolute;inset:10px 0 49px;background:transparent;z-index:-1;border-radius:28px}.blk .blk-item[aria-pressed=true]:before{background:var(--blk-lime);box-shadow:0 0 28px 0 #c6e99545}.blk .blk-object{height:105px;width:120px;display:grid;place-items:center;position:relative;filter:drop-shadow(0 10px 4px var(--blk-shadow));flex-shrink:0}.blk .blk-label{font-size:13px;font-weight:700;background:var(--blk-paper);padding:6px 10px;border-radius:20px;position:relative;max-width:100%;line-height:1.3;min-height:30px;display:flex;align-items:center;justify-content:center;gap:5px;text-align:center}.blk .blk-item[aria-pressed=true] .kit-label{background:var(--blk-green);color:var(--blk-on)}.blk .blk-tick{display:none}.blk .blk-item[aria-pressed=true] .kit-tick{display:inline}.blk .blk-scale{position:relative;width:96px;height:83px;border-radius:18px;background:var(--blk-object);border:2px solid #a6b6a2;transform:rotate(-8deg);box-shadow:inset 0 -7px #adc0ad70}.blk .blk-scale:before{content:'';position:absolute;top:11px;left:29px;width:36px;height:22px;background:#b6c7a7;border:3px solid #829a7d;border-radius:5px}.blk .blk-scale:after{content:'';position:absolute;bottom:14px;left:17px;right:17px;height:18px;border-left:12px solid #b2c3b0;border-right:12px solid #b2c3b0;border-radius:5px}.blk .blk-bp{width:76px;height:65px;border:2px solid #a8b5a2;border-radius:12px 12px 18px 18px;background:var(--blk-object);transform:rotate(-7deg);position:relative;margin-left:22px}.blk .blk-bp:before{content:'';position:absolute;top:10px;left:13px;width:46px;height:26px;border-radius:4px;background:#b6c7a7;box-shadow:inset 0 0 0 3px #829a7d}.blk .blk-bp:after{content:'';width:13px;height:13px;border-radius:50%;background:var(--blk-metal);position:absolute;bottom:7px;left:31px}.blk .blk-cuff{position:absolute;width:35px;height:43px;border-radius:8px;background:var(--blk-metal);left:0;top:50px;transform:rotate(-12deg);box-shadow:inset 6px 0 #405f4f30}.blk .blk-tube{position:absolute;width:50px;height:47px;border:3px solid var(--blk-metal);border-top:0;border-radius:0 0 30px 30px;left:20px;top:54px;z-index:-1}.blk .blk-grip{width:62px;height:91px;border:9px solid var(--blk-metal);border-radius:24px 25px 16px 16px;transform:rotate(12deg);position:relative;background:transparent}.blk .blk-grip:before{content:'';position:absolute;left:0;top:20px;width:44px;height:19px;background:var(--blk-object);border:2px solid #91a78b;border-radius:5px}.blk .blk-grip:after{content:'';position:absolute;left:12px;top:-6px;width:20px;height:15px;border-radius:5px;background:#b6c7a7;border:3px solid #829a7d}.blk .blk-tape{position:relative;width:74px;height:59px;background:#d5b56b;border:3px solid #aa9358;border-radius:18px;transform:rotate(-10deg)}.blk .blk-tape:before{content:'';position:absolute;width:29px;height:29px;border-radius:50%;background:#bd9852;border:4px solid #e3ca8c;left:19px;top:11px}.blk .blk-tape:after{content:'';position:absolute;left:63px;top:37px;width:37px;height:16px;background:repeating-linear-gradient(90deg,#f4e6c5 0 7px,#9c8a66 7px 8px);border-bottom:2px solid #9c8a66;transform:rotate(7deg)}.blk .blk-phone{width:55px;height:94px;background:var(--blk-metal);border:4px solid #466653;border-radius:12px;transform:rotate(8deg);display:grid;place-items:center;color:#eaf0dc;position:relative}.blk .blk-phone:before{content:'';position:absolute;width:16px;height:3px;border-radius:3px;background:#324e3f;top:2px;left:16px}.blk-phone svg{width:30px;height:30px}.blk .blk-chair{height:94px;width:66px;position:relative}.blk .blk-chair:before{content:'';position:absolute;top:0;left:8px;right:8px;height:47px;background:#9bad87;border:5px solid #7e946c;border-radius:14px 14px 5px 5px}.blk .blk-chair:after{content:'';position:absolute;top:47px;left:0;width:66px;height:13px;background:#b6c59f;border-radius:4px;box-shadow:0 4px #7e946c}.blk .blk-legs{position:absolute;top:57px;left:8px;right:8px;height:34px;border-left:5px solid #7e946c;border-right:5px solid #7e946c;transform:perspective(60px) rotateX(8deg)}.blk .blk-inline{display:flex;flex-wrap:wrap;gap:12px;align-items:center;margin-top:17px}.blk .blk-textbutton{border:0;background:none;color:var(--blk-muted);text-decoration:underline;text-underline-offset:4px;padding:10px 0;min-height:44px;text-align:left}.blk .blk-hint{font-size:13px;min-height:42px;color:var(--blk-muted);margin:16px 0}.blk .blk-bar{display:flex;align-items:center;justify-content:space-between;gap:14px;padding-top:22px;border-top:1px solid var(--blk-line);flex-wrap:wrap}.blk .blk-count{font-size:14px;color:var(--blk-muted)}.blk .blk-primary{border:0;border-radius:14px;background:var(--blk-green);color:var(--blk-on);padding:13px 22px;min-height:48px;display:inline-flex;align-items:center;justify-content:center;gap:15px}.blk .blk-primary svg{width:18px;height:18px}.blk .blk-stage[hidden]{display:none}.blk .blk-choice{display:flex;align-items:center;gap:12px;padding:18px;border:1px solid var(--blk-line);border-radius:16px;margin:12px 0;background:var(--blk-paper)}.blk .blk-choice:has(input:checked){background:var(--blk-sage);border-color:var(--blk-green)}.blk .blk-choice input{width:20px;height:20px;accent-color:#22543f;flex-shrink:0}.blk .blk-choice small{display:block;color:var(--blk-muted);font-size:13px;margin-top:4px}.blk .blk-row{display:flex;align-items:flex-start;gap:15px;padding:19px 0;border-bottom:1px solid var(--blk-line)}.blk .blk-rowicon{padding:12px;border-radius:14px;background:var(--blk-sage);flex-shrink:0}.blk .blk-rowicon svg{width:22px;height:22px}.blk .blk-row p{font-size:14px;margin:0;color:var(--blk-muted)}.blk .blk-badge{display:inline-block;font-size:11px;padding:4px 9px;background:var(--blk-sage);border-radius:14px;margin-bottom:7px}.blk .blk-subhead{font:600 14px Inter,system-ui,sans-serif;margin:27px 0 5px}.blk .blk-box{background:var(--blk-paper);border:1px solid var(--blk-line);border-radius:18px;padding:20px;margin:18px 0}.blk .blk-helper{color:var(--blk-muted);font-size:13px}.blk .blk-progress{height:4px;background:var(--blk-sage);border-radius:4px;margin-bottom:25px;overflow:hidden}.blk .blk-progress span{display:block;height:100%;background:var(--blk-green)}.blk .blk-explain{font-size:14px;color:var(--blk-muted)}
@media(max-width:520px){.blk h1{font-size:31px}.blk .blk-room{padding:32px 12px 18px;border-radius:85px 85px 18px 18px}.blk .blk-shelf{grid-template-columns:repeat(2,minmax(0,1fr));gap:18px 10px;background:linear-gradient(to bottom,transparent 26%,var(--blk-wood) 26%,var(--blk-wood) 28%,transparent 28%,transparent 59%,var(--blk-wood) 59%,var(--blk-wood) 61%,transparent 61%,transparent 93%,var(--blk-wood) 93%,var(--blk-wood) 95%,transparent 95%)}.blk .blk-item{min-height:176px;padding-bottom:16px}.blk .blk-label{font-size:12px;padding:7px}.blk .blk-bar .kit-primary{width:100%}}

.blk-object{height:105px;width:120px;display:grid;place-items:center;position:relative;filter:drop-shadow(0 10px 4px var(--blk-shadow));flex-shrink:0}
.blk-scale{position:relative;width:96px;height:83px;border-radius:18px;background:var(--blk-object);border:2px solid #a6b6a2;transform:rotate(-8deg);box-shadow:inset 0 -7px #adc0ad70}
.blk-scale:before{content:'';position:absolute;top:11px;left:29px;width:36px;height:22px;background:#b6c7a7;border:3px solid #829a7d;border-radius:5px}
.blk-scale:after{content:'';position:absolute;bottom:14px;left:17px;right:17px;height:18px;border-left:12px solid #b2c3b0;border-right:12px solid #b2c3b0;border-radius:5px}
.blk-bp{width:76px;height:65px;border:2px solid #a8b5a2;border-radius:12px 12px 18px 18px;background:var(--blk-object);transform:rotate(-7deg);position:relative;margin-left:22px}
.blk-bp:before{content:'';position:absolute;top:10px;left:13px;width:46px;height:26px;border-radius:4px;background:#b6c7a7;box-shadow:inset 0 0 0 3px #829a7d}
.blk-bp:after{content:'';width:13px;height:13px;border-radius:50%;background:var(--blk-metal);position:absolute;bottom:7px;left:31px}
.blk-cuff{position:absolute;width:35px;height:43px;border-radius:8px;background:var(--blk-metal);left:0;top:50px;transform:rotate(-12deg);box-shadow:inset 6px 0 #405f4f30}
.blk-tube{position:absolute;width:50px;height:47px;border:3px solid var(--blk-metal);border-top:0;border-radius:0 0 30px 30px;left:20px;top:54px;z-index:-1}
.blk-grip{width:62px;height:91px;border:9px solid var(--blk-metal);border-radius:24px 25px 16px 16px;transform:rotate(12deg);position:relative;background:transparent}
.blk-grip:before{content:'';position:absolute;left:0;top:20px;width:44px;height:19px;background:var(--blk-object);border:2px solid #91a78b;border-radius:5px}
.blk-grip:after{content:'';position:absolute;left:12px;top:-6px;width:20px;height:15px;border-radius:5px;background:#b6c7a7;border:3px solid #829a7d}
.blk-tape{position:relative;width:74px;height:59px;background:#d5b56b;border:3px solid #aa9358;border-radius:18px;transform:rotate(-10deg)}
.blk-tape:before{content:'';position:absolute;width:29px;height:29px;border-radius:50%;background:#bd9852;border:4px solid #e3ca8c;left:19px;top:11px}
.blk-tape:after{content:'';position:absolute;left:63px;top:37px;width:37px;height:16px;background:repeating-linear-gradient(90deg,#f4e6c5 0 7px,#9c8a66 7px 8px);border-bottom:2px solid #9c8a66;transform:rotate(7deg)}
.blk-phone{width:55px;height:94px;background:var(--blk-metal);border:4px solid #466653;border-radius:12px;transform:rotate(8deg);display:grid;place-items:center;color:#eaf0dc;position:relative}
.blk-phone:before{content:'';position:absolute;width:16px;height:3px;border-radius:3px;background:#324e3f;top:2px;left:16px}
.blk-chair{height:94px;width:66px;position:relative}
.blk-chair:before{content:'';position:absolute;top:0;left:8px;right:8px;height:47px;background:#9bad87;border:5px solid #7e946c;border-radius:14px 14px 5px 5px}
.blk-chair:after{content:'';position:absolute;top:47px;left:0;width:66px;height:13px;background:#b6c59f;border-radius:4px;box-shadow:0 4px #7e946c}
.blk-legs{position:absolute;top:57px;left:8px;right:8px;height:34px;border-left:5px solid #7e946c;border-right:5px solid #7e946c;transform:perspective(60px) rotateX(8deg)}

.blk{background:transparent;border-radius:0}
.blk .blk-h1{font-family:"DM Serif Display",Georgia,serif;font-weight:400;font-size:34px;line-height:1.12;margin:0 0 12px;color:#123d31}
.blk .blk-muted{color:var(--blk-muted);font-size:16px}
.blk .blk-over{font-size:11px;text-transform:uppercase;letter-spacing:2px;color:var(--blk-muted);margin:14px 0 10px}
.blk .blk-textbutton{display:inline-block}
.blk .blk-subhead{font:600 15px Inter,system-ui,sans-serif;margin:22px 0 8px;color:#123d31}
.blk .blk-routine{background:var(--blk-paper);border:1px solid var(--blk-line);border-radius:16px;padding:16px;margin:12px 0}
.blk .blk-choice strong{display:block;font-size:15.5px}
.blk .blk-primary{font-weight:600;font-size:16px}
.blk .blk-primary:disabled{opacity:.6}
.blk .blk-row h3{font-family:"DM Serif Display",Georgia,serif;font-weight:400;font-size:21px;margin:0 0 4px}
.blk .blk-row .blk-mini{margin-top:2px}
.blk .blk-shelf .blk-item{cursor:pointer}
.blk-mini{position:relative;flex:0 0 auto;width:58px;height:58px;border-radius:16px;background:#E8EFE2;display:inline-grid;place-items:center;overflow:hidden;color:#22543f}
.blk-mini .blk-object{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%) scale(.44);filter:none}
.blk-mini-icon svg{width:26px;height:26px}
/* Home card */
.bl-home{position:relative;overflow:hidden;background:#FFFEF9;border:1px solid #DCE3D5;border-radius:24px;padding:20px;margin:16px 0}
.bl-home h2{font-family:"DM Serif Display",Georgia,serif;font-weight:400;font-size:24px;line-height:1.15;margin:4px 0 6px;color:#123d31}
.bl-home p{margin:0 0 12px;color:#4d5f53;font-size:15px;line-height:1.5}
.bl-home .fx-herocheck-eyebrow{color:#3f5a4b;opacity:1;font-weight:600;letter-spacing:.12em;text-transform:uppercase;font-size:12px;margin:0}
.bl-home-start{background:linear-gradient(160deg,#EEF4E6 0%,#FFFEF9 70%);display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;align-items:center}
.bl-home-shelf{display:flex;gap:4px;align-items:flex-end;transform:scale(.62);transform-origin:right center;margin-left:-40px}
.bl-home-row{display:flex;gap:16px;align-items:center}
.bl-home-actions{display:flex;flex-wrap:wrap;gap:10px;align-items:center;margin-top:6px}
.bl-home-link{font-weight:600}
@media(max-width:520px){.bl-home-start{grid-template-columns:1fr}.bl-home-shelf{display:none}}
/* progress ring */
.bl-ring{position:relative;display:inline-grid;place-items:center;flex:0 0 auto}
.bl-ring svg{transform:rotate(-90deg)}
.bl-ring-bg{fill:none;stroke:#E3EBDD;stroke-width:8}
.bl-ring-fg{fill:none;stroke:#0F6E56;stroke-width:8;stroke-linecap:round;transition:stroke-dashoffset .6s ease}
.bl-ring-n{position:absolute;font-family:"DM Serif Display",Georgia,serif;font-size:22px;color:#123d31}
.bl-ring-n small{font-size:.55em;margin-left:1px}
/* baseline page */
.bl-top{display:flex;gap:18px;align-items:center;margin:8px 0 18px}
@media(max-width:520px){.bl-top{flex-direction:column;align-items:flex-start}}
.bl-checks{display:grid;gap:12px;margin:16px 0}
.bl-check{background:#fff;border:1px solid var(--border,#e2e5df);border-radius:20px;padding:16px}
.bl-check.is-known{background:#FBFDF7;border-color:#CFE0C4}
.bl-check-head{display:flex;gap:14px;align-items:center}
.bl-check-title{flex:1;min-width:0;display:flex;justify-content:space-between;gap:8px;align-items:center;flex-wrap:wrap}
.bl-check-title h3{font-family:"DM Serif Display",Georgia,serif;font-weight:400;font-size:22px;margin:0;color:#123d31}
.bl-stage{font-size:12px;font-weight:600;padding:4px 10px;border-radius:999px;background:#EEF1EC;color:#4d5f53}
.bl-stage-learning,.bl-stage-settling{background:#E8EFE2;color:#22543f}
.bl-stage-established{background:#0F6E56;color:#fff}
.bl-bar{height:8px;border-radius:999px;background:#E9EEE5;overflow:hidden;margin:14px 0 8px}
.bl-bar span{display:block;height:100%;border-radius:999px;background:#0F6E56;transition:width .6s ease}
.bl-line{margin:0;font-size:15px;color:#25392f}
.bl-sub{margin:4px 0 0;font-size:13px;color:var(--muted,#6b6b6b)}
.bl-check-foot{display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap;margin-top:12px}
.bl-check-foot .fx-btn{width:auto;padding:10px 16px}
.bl-due{font-size:13px;color:var(--muted,#6b6b6b)}
.bl-due.is-due{color:#0F6E56;font-weight:700}
.bl-how summary{cursor:pointer;list-style:none}
.bl-how summary::-webkit-details-marker{display:none}
.bl-how summary::after{content:' +';color:#0F6E56}
.bl-how[open] summary::after{content:' –'}
.bl-how ul{margin:12px 0 0;padding-left:18px;font-size:14.5px;line-height:1.55;color:#33463b}
.bl-how li{margin-bottom:6px}
.bl-support{display:flex;gap:14px;align-items:center;padding:8px 0}
.bl-support p{margin:2px 0 0}
.bl-recordrow{border:1px solid #CFE0C4;background:#FBFDF7}
/* guided reading */
.bl-tips{list-style:none;margin:8px 0 6px;padding:0}
.bl-tips li{display:flex;gap:12px;align-items:flex-start;padding:12px 0;border-bottom:1px solid #E2E7DD;font-size:15.5px;line-height:1.45}
.bl-tip-icon{flex:0 0 auto;width:36px;height:36px;border-radius:12px;background:#E8EFE2;display:grid;place-items:center;color:#22543f}
.bl-timer{position:relative;display:grid;place-items:center;margin:18px auto 8px;width:200px;height:200px}
.bl-timer svg{transform:rotate(-90deg)}
.bl-timer .bl-ring-bg,.bl-timer .bl-ring-fg{stroke-width:10}
.bl-timer-n{position:absolute;font-family:"DM Serif Display",Georgia,serif;font-size:46px;color:#123d31;font-variant-numeric:tabular-nums}
.bl-big{font-size:26px;font-weight:600;letter-spacing:.02em;text-align:center}
.bl-done-ring{display:flex;justify-content:center;margin:16px 0 6px}

.bl-eyebrow{margin:0;color:#3f5a4b;font-weight:600;letter-spacing:.12em;text-transform:uppercase;font-size:12px}
.blk .bl-done-bar{justify-content:center;border-top:0}
.blk .bl-done-bar .blk-primary{min-width:240px}
.blk .fx-card{margin:14px 0}

.blk .bl-rest{text-align:center;padding:36px 0 8px}
.bl-rest-icon{display:inline-grid;place-items:center;width:84px;height:84px;border-radius:28px;background:#E8EFE2;color:#22543f;margin-bottom:18px}
.blk .bl-rest .blk-h1{font-size:38px;margin-bottom:8px}
.blk .bl-rest .blk-muted{max-width:340px;margin:0 auto 10px}

/* Task visibility choice */
.fx-radio-list { display: grid; gap: 8px; margin: 4px 0 6px; }
.fx-radio { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border: 1px solid var(--fx-line, #E3E8E6); border-radius: 12px; cursor: pointer; }
.fx-radio input { margin-top: 3px; accent-color: #0F6E56; flex: none; }
.fx-radio > span { display: grid; gap: 2px; }
.fx-radio:has(input:checked) { border-color: #0F6E56; background: #F1F8F5; }
.fx-helpers-tag { color: #0F6E56; font-weight: 600; }

/* More home checks: safety questions, grip goes, timers, memory */
.bl-safety-q { padding: 14px 0; border-bottom: 1px solid var(--fx-line, #E3E8E6); }
.bl-goes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 8px; }
.bl-stopwatch { display: flex; flex-direction: column; align-items: center; margin: 18px 0 8px; }
.bl-sw-n { font-family: 'DM Serif Display', Georgia, serif; font-size: 64px; line-height: 1; color: #0F6E56; font-variant-numeric: tabular-nums; }
.bl-sw-unit { color: var(--fx-muted, #5B6B66); font-size: 14px; margin-top: 4px; }
.bl-sw-btns { display: flex; justify-content: center; margin: 6px 0 18px; }
.bl-sw-btn { min-width: 180px; justify-content: center; }
.bl-mem-q { margin-bottom: 10px; }

/* ---------- Services near you ---------- */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.fx-link-btn { background: none; border: 0; padding: 10px 0; min-height: 44px; font: inherit; font-size: 15px; color: #0F6E56; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.fx-link-btn:focus-visible, .sv-card-main:focus-visible, .sv-save:focus-visible, .sv-pin:focus-visible { outline: 3px solid #0F6E56; outline-offset: 2px; border-radius: 8px; }
.sv-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.sv-savedbtn { flex: none; display: inline-flex; align-items: center; gap: 6px; }
.sv-locbar { padding: 14px 16px; }
.sv-loc-line { display: flex; align-items: center; gap: 8px; color: #0F6E56; }
.sv-loc-line span { color: var(--fx-ink, #1C1C1A); }
.sv-loc-actions { display: flex; gap: 4px 18px; flex-wrap: wrap; margin-top: 4px; }
.sv-note { margin: 8px 0 0; padding: 10px 12px; border-radius: 10px; background: #F1F8F5; font-size: 14.5px; }
.sv-note a { color: #0F6E56; font-weight: 600; }
.sv-inline { display: flex; gap: 8px; }
.sv-inline .fx-input { flex: 1; min-width: 0; text-transform: uppercase; }
.sv-search { position: relative; margin: 14px 0 10px; }
.sv-search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: #5B6B66; pointer-events: none; }
.sv-search .fx-input { padding-left: 42px; }
.sv-chips { margin-bottom: 8px; }
.sv-resulthead { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin: 14px 0 8px; }
.sv-card { display: flex; align-items: stretch; background: #fff; border: 1px solid var(--fx-line, #E3E8E6); border-radius: 16px; margin-bottom: 10px; overflow: hidden; }
.sv-card-main { flex: 1; min-width: 0; display: flex; gap: 12px; padding: 14px 16px; color: inherit; text-decoration: none; }
.sv-card-body { display: grid; gap: 4px; min-width: 0; }
.sv-card-name { font-size: 17px; line-height: 1.3; }
.sv-card-summary { font-size: 15px; color: #33413D; }
.sv-facts { display: grid; gap: 2px; font-size: 14px; color: #33413D; margin-top: 4px; }
.sv-facts span { display: inline-flex; gap: 6px; align-items: flex-start; }
.sv-facts svg { flex: none; margin-top: 3px; color: #5B6B66; }
.sv-fresh { margin-top: 2px; }
.sv-num { flex: none; width: 28px; height: 28px; border-radius: 50%; background: #0F6E56; color: #fff; display: grid; place-items: center; font-size: 13px; font-weight: 700; }
.sv-save { flex: none; width: 76px; border: 0; border-left: 1px solid var(--fx-line, #E3E8E6); background: #FAFBFA; color: #0F6E56; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.sv-save.on { background: #E3F0EA; }
.sv-save.on svg { fill: currentColor; }
.sv-badges { display: flex; gap: 6px; flex-wrap: wrap; margin: 0; }
.sv-badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600; background: #EEF1F0; color: #33413D; }
.sv-badge-healthcare { background: #E6F1FB; color: #0C447C; }
.sv-badge-regulated_care { background: #EEEDFE; color: #3C3489; }
.sv-badge-carer { background: #FBF3E6; color: #6B4510; }
.sv-sugg { padding: 14px; }
.sv-sugg .sv-card { margin-bottom: 8px; }
.sv-because { margin: 0 0 10px; font-size: 14.5px; color: #33413D; }
.sv-details { margin: 14px 0; background: #fff; border: 1px solid var(--fx-line, #E3E8E6); border-radius: 16px; padding: 4px 16px 12px; }
.sv-details summary { cursor: pointer; padding: 12px 0; font-weight: 600; min-height: 44px; }
.sv-subhead { font-weight: 600; margin: 12px 0 6px; }
.sv-disclaimer { margin: 6px 0 14px; padding: 12px 14px; border-radius: 12px; background: #F5F3EE; font-size: 14.5px; color: #33413D; }
.sv-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.sv-actions .fx-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; text-decoration: none; }
.sv-row { padding: 12px 0; border-bottom: 1px solid var(--fx-line, #E3E8E6); }
.sv-row:last-child { border-bottom: 0; }
.sv-row-label { margin: 0 0 4px; font-size: 13px; font-weight: 700; letter-spacing: .02em; color: #5B6B66; text-transform: uppercase; }
.sv-np { color: #5B6B66; font-style: italic; }
.sv-pre { white-space: pre-line; }
.sv-list { margin: 0 0 6px; padding-left: 18px; }
.sv-follow .fx-chips { margin-bottom: 4px; }
.sv-helpful { margin: 8px 0 12px; padding: 12px; border-radius: 12px; background: #F1F8F5; }
.sv-btnrow { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.sv-source { margin-top: 14px; }
.sv-status { margin: 8px 0 2px; font-size: 14px; }
.sv-saveditem .sv-card-main { padding: 0; align-items: center; justify-content: space-between; }
.sv-map { position: relative; width: 100%; aspect-ratio: 3 / 2; overflow: hidden; border-radius: 16px; border: 1px solid var(--fx-line, #E3E8E6); background: #EEF1F0; margin-bottom: 6px; }
.sv-map img { position: absolute; display: block; }
.sv-pin { position: absolute; transform: translate(-50%, -100%); min-width: 32px; height: 32px; padding: 0 6px; border-radius: 16px 16px 16px 4px; border: 2px solid #fff; background: #0F6E56; color: #fff; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.sv-home { position: absolute; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: #1C1C1A; border: 3px solid #fff; }
.sv-attrib { position: absolute; right: 0; bottom: 0; background: rgba(255,255,255,.85); font-size: 11px; padding: 2px 6px; }
@media (max-width: 420px) { .sv-save { width: 64px; } .sv-actions .fx-btn { flex: 1 1 100%; justify-content: center; } }

/* Services directory admin */
.da-kpis { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 14px; margin: 0 0 12px; }
.da-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; }
.da-tab { border: 1px solid var(--border); background: #fff; border-radius: 999px; padding: 8px 14px; font: inherit; font-size: 13px; cursor: pointer; }
.da-tab.on { background: #0F6E56; border-color: #0F6E56; color: #fff; }
.da-filters { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; margin-bottom: 10px; font-size: 13px; }
.da-filters input[type=search], .da-filters select { padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; font: inherit; }
.da-row { cursor: pointer; }
.da-row:hover, .da-row:focus { background: #F6F8F7; outline: none; }
.dl-h { font-weight: 700; font-size: 14px; margin: 14px 0 4px; }
.dl-h:first-child { margin-top: 0; }
.dl-label { display: block; font-size: 13px; font-weight: 600; margin: 10px 0 4px; }
.tr-panel input[type=text], .tr-panel input[type=url], .tr-panel input[type=email], .tr-panel input[type=search], .tr-panel textarea, .tr-panel select { width: 100%; box-sizing: border-box; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; font: inherit; font-size: 14px; }
.dl-fieldset { border: 0; padding: 0; margin: 0; }
.dl-check { display: inline-flex; align-items: center; gap: 6px; margin: 2px 14px 2px 0; font-size: 13px; }
.dl-check input { width: auto; }
.dl-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 8px; }
.dl-missing { background: #FBF3E6; color: #6B4510; padding: 10px 14px; border-radius: 8px; font-size: 14px; }
.rv-svc-list { display: grid; gap: 6px; max-height: 320px; overflow-y: auto; margin: 6px 0 10px; }
.rv-svc-opt { display: flex; gap: 8px; align-items: flex-start; padding: 8px; border: 1px solid var(--border); border-radius: 8px; cursor: pointer; }
.rv-svc-opt input { width: auto; margin-top: 3px; }
.sv-backlink { display: inline-flex; align-items: center; min-height: 44px; color: #0F6E56; font-weight: 600; text-decoration: none; font-size: 15px; }

/* Our own map (MapLibre) */
.sv-map.sv-gl { aspect-ratio: 4 / 3; }
.sv-gl-wait { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; margin: 0; text-align: center; padding: 16px; }
.sv-map .maplibregl-ctrl-attrib { font-size: 11px; }
@media (min-width: 720px) { .sv-map.sv-gl { aspect-ratio: 16 / 9; } }
/* Map strip above the list, opening on the postcode area */
.sv-map.sv-gl.sv-gl-area { aspect-ratio: 16 / 10; margin-top: 14px; }
@media (min-width: 720px) { .sv-map.sv-gl.sv-gl-area { aspect-ratio: 21 / 9; } }

/* ---------- Services: the map screen ----------
   Tapping Services opens a full-screen map. Search, area and categories
   float at the top; a sheet at the bottom pulls up into the list. */
body.svx-on { overflow: hidden; }
body.svx-on .fx-top, body.svx-on .fx-personwrap, body.svx-on .fx-body > .fx-switch, body.svx-on .fx-panel-wrap { display: none; }
body.svx-on .fx-body { padding-bottom: 0; }
body.svx-on .fx-main { padding: 0; max-width: none; }
.svx { position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 15; background: #E8ECE9; overflow: hidden; --svx-top: 180px; }
.svx-mapslot { position: absolute; inset: 0; }
.svx-map, .svx .svx-map.maplibregl-map { position: absolute; inset: 0; width: 100%; height: 100%; }
.svx-top { position: absolute; top: calc(12px + env(safe-area-inset-top)); left: 12px; right: 12px; z-index: 5; display: grid; gap: 8px; justify-items: start; pointer-events: none; }
.svx-top > * { pointer-events: auto; }
.svx-searchbar { justify-self: stretch; display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 4px 0 16px; border-radius: 999px; background: #fff; color: #17201C; box-shadow: 0 2px 10px rgba(23,32,28,.16); }
.svx-searchbar > svg { flex: none; color: #33413D; }
.svx-searchbar input { flex: 1; min-width: 0; border: 0; background: transparent; font: inherit; font-size: 16px; color: #17201C; padding: 12px 0; outline: none; }
.svx-searchbar input::placeholder { color: #5E6863; }
.svx-searchbar:focus-within { box-shadow: 0 0 0 3px #5DCAA5, 0 2px 10px rgba(23,32,28,.16); }
.svx-filterbtn { position: relative; flex: none; width: 44px; height: 44px; border-radius: 22px; border: 0; background: transparent; color: #17201C; display: grid; place-items: center; cursor: pointer; }
.svx-filterbtn.on, .svx-filterbtn[aria-expanded="true"] { background: #E3F0EA; color: #0B5443; }
.svx-filterbtn.on::after { content: ''; position: absolute; top: 8px; right: 8px; width: 9px; height: 9px; border-radius: 50%; background: #0F6E56; border: 2px solid #fff; }
.svx-place { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; min-height: 44px; padding: 0 14px; border-radius: 999px; border: 0; background: #fff; color: #17201C; font: inherit; font-size: 15px; font-weight: 600; box-shadow: 0 2px 8px rgba(23,32,28,.14); cursor: pointer; }
.svx-place svg:first-child { color: #0F6E56; flex: none; }
.svx-place span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.svx-chips { justify-self: stretch; display: flex; gap: 8px; margin: 0 -12px; padding: 2px 12px 6px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.svx-chips::-webkit-scrollbar { display: none; }
.svx-chip { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 16px; border-radius: 999px; border: 0; background: #fff; color: #17201C; font: inherit; font-size: 15px; font-weight: 500; box-shadow: 0 2px 8px rgba(23,32,28,.14); cursor: pointer; }
.svx-chip svg { color: #0F6E56; }
.svx-chip.on { background: #0F6E56; color: #fff; font-weight: 600; }
.svx-chip.on svg { color: #fff; }
.svx-filters { justify-self: stretch; background: #fff; border-radius: 20px; padding: 14px 16px; box-shadow: 0 8px 28px rgba(23,32,28,.2); }
.svx-filters-h { margin: 0 0 8px; font-weight: 600; }
.svx-filters-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 12px; }
.svx-searchbar:focus-within, .svx-place:focus-visible, .svx-chip:focus-visible, .svx-filterbtn:focus-visible, .svx-handle:focus-visible, .svx-toggle button:focus-visible, .svx-pin:focus-visible { outline: 3px solid #5DCAA5; outline-offset: 2px; }

/* Pins: one per venue, showing what kind of service it is. */
.svx-pin { display: block; width: 46px; height: 52px; padding: 0; border: 0; background: transparent; cursor: pointer; }
.svx-pin-head { position: relative; box-sizing: border-box; display: grid; place-items: center; width: 42px; height: 42px; margin: 0 auto; border-radius: 50%; background: #17473A; color: #fff; border: 2.5px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,.3); transform-origin: 50% 120%; transition: transform .15s ease; }
.svx-pin-head::after { content: ''; position: absolute; left: 50%; top: 100%; margin-top: 1px; transform: translateX(-50%); border-style: solid; border-width: 9px 7px 0; border-color: #17473A transparent transparent; }
.svx-pin.on .svx-pin-head { background: #0F6E56; transform: scale(1.2); box-shadow: 0 0 0 4px rgba(93,202,165,.6), 0 3px 8px rgba(0,0,0,.3); }
.svx-pin.on .svx-pin-head::after { border-top-color: #0F6E56; }

/* The sheet */
.svx-sheet { position: absolute; left: 0; right: 0; bottom: 0; z-index: 4; display: flex; flex-direction: column; background: #FBFAF7; border-radius: 24px 24px 0 0; box-shadow: 0 -6px 24px rgba(23,32,28,.16); transition: transform .25s ease; }
.svx-sheet.svx-dragging { transition: none; }
.svx-peek { padding: 0 16px 16px; max-height: 62%; overflow-y: auto; }
.svx-peek .fx-notice, .svx-peek .error-text { margin: 0 0 10px; }
.svx-full { top: var(--svx-top); }
.svx-grip { padding: 4px 4px 12px; cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; }
.svx-full .svx-grip { padding: 4px 16px 12px; }
.svx-handle { position: relative; display: block; width: 72px; height: 26px; margin: 0 auto 2px; border: 0; background: transparent; cursor: pointer; }
.svx-handle::before { content: ''; position: absolute; left: 16px; right: 16px; top: 10px; height: 5px; border-radius: 3px; background: #C5CBC6; }
.svx-title { margin: 0; font-family: 'DM Serif Display', Georgia, serif; font-weight: 400; font-size: 27px; line-height: 1.15; letter-spacing: -0.3px; color: #1B3A31; }
.svx-sub { margin: 4px 0 0; font-size: 14.5px; line-height: 1.45; color: #5E6863; }
.svx-feature { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 18px; background: #fff; box-shadow: 0 1px 2px rgba(23,32,28,.05), 0 4px 14px rgba(23,32,28,.07); }
.svx-feature-text { flex: 1; min-width: 0; display: grid; gap: 2px; }
.svx-feature-text strong { font-size: 16.5px; line-height: 1.25; }
.svx-view { flex: none; min-height: 44px; padding: 0 16px; border-radius: 12px; font-size: 14.5px; }
.svx-empty { padding: 14px; border-radius: 18px; background: #fff; }
.svx-fullhead { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.svx-loc { display: flex; align-items: center; gap: 6px; margin: 4px 0 12px; font-size: 14.5px; color: #5E6863; }
.svx-loc svg { flex: none; color: #0F6E56; }
.svx-toggle { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 14px; background: #ECEEEA; }
.svx-toggle button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; border: 0; border-radius: 11px; background: transparent; color: #17201C; font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; }
.svx-toggle button.on { background: #17473A; color: #fff; }
.svx-scroll { flex: 1; min-height: 0; overflow-y: auto; padding: 4px 16px 24px; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.svx-scroll > .sv-locbar { margin-bottom: 4px; }
.svx-count { margin: 12px 0 8px; }
.svx-credit { margin-top: 18px; }
.sv-ico { flex: none; width: 48px; height: 48px; border-radius: 14px; background: #E3F0EA; color: #0F6E56; display: grid; place-items: center; }
.svx-anim.svx-full { animation: svx-rise .28s ease-out; }
.svx-anim.svx-peek { animation: svx-settle .25s ease-out; }
@keyframes svx-rise { from { transform: translateY(35%); opacity: .7; } to { transform: none; opacity: 1; } }
@keyframes svx-settle { from { transform: translateY(25%); } to { transform: none; } }
@media (prefers-reduced-motion: reduce) { .svx-sheet, .svx-anim, .svx-pin-head { animation: none !important; transition: none !important; } }
.svx .maplibregl-ctrl-top-right { top: var(--svx-top); }
.svx .maplibregl-ctrl-group button { width: 40px; height: 40px; }
@media (max-width: 380px) {
  .svx-feature { flex-wrap: wrap; }
  .svx-view { width: 100%; }
  .svx-title { font-size: 24px; }
}
/* Computers: the side menu stays, the panel sits on the left of the map. */
@media (min-width: 900px) {
  .svx { left: 248px; }
  .svx-top { top: 20px; left: 20px; right: auto; width: 420px; }
  .svx-chips { margin: 0; padding: 2px 0 4px; flex-wrap: wrap; overflow: visible; }
  .svx-sheet { left: 20px; right: auto; width: 420px; bottom: 20px; border-radius: 22px; }
  .svx-peek { max-height: calc(100% - var(--svx-top) - 20px); }
  .svx .maplibregl-ctrl-top-right { top: 10px; }
}
body.fam-contrast-high .svx-searchbar, body.fam-contrast-high .svx-place, body.fam-contrast-high .svx-chip, body.fam-contrast-high .svx-feature, body.fam-contrast-high .svx-sheet { border: 2px solid #000; }

/* Service details: map strip at the top, category tag, short summary */
.sv-map.sv-gl.sv-gl-hero { aspect-ratio: 16 / 8; margin: 4px 0 16px; }
@media (min-width: 720px) { .sv-map.sv-gl.sv-gl-hero { aspect-ratio: 21 / 8; } }
.sv-tag { display: inline-block; padding: 3px 10px; border-radius: 999px; background: #E3F0EA; color: #0B5443; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.sv-lede { margin: 0 0 14px; padding: 14px 16px; border-radius: 14px; background: #E8F2EC; color: #1B3A31; font-size: 16px; line-height: 1.5; font-weight: 500; }

/* Services map screen: postcode controls folded into one line */
.sv-locfold { margin: 0 0 4px; background: #fff; border-radius: 16px; box-shadow: 0 1px 2px rgba(23,32,28,.05), 0 4px 14px rgba(23,32,28,.06); }
.sv-locfold summary { list-style: none; display: flex; align-items: center; gap: 8px; min-height: 52px; padding: 6px 14px; cursor: pointer; font-size: 15px; }
.sv-locfold summary::-webkit-details-marker { display: none; }
.sv-locfold summary > svg:first-child { flex: none; color: #0F6E56; }
.sv-locfold summary > svg:last-child { flex: none; color: #5E6863; transition: transform .2s ease; }
.sv-locfold[open] summary > svg:last-child { transform: rotate(180deg); }
.sv-locfold summary:focus-visible { outline: 3px solid #5DCAA5; outline-offset: 2px; border-radius: 16px; }
.sv-locfold-text { flex: 1; min-width: 0; line-height: 1.35; }
.sv-locfold-hint { flex: none; font-size: 14px; font-weight: 600; color: #0F6E56; }
.sv-locfold-body { padding: 0 14px 12px; border-top: 1px solid #EFECE6; }
.sv-locfold .sv-locbar { padding: 8px 0 0; background: transparent; border: 0; box-shadow: none; border-radius: 0; }
.sv-locfold .sv-loc-line { display: none; }
@media (prefers-reduced-motion: reduce) { .sv-locfold summary > svg:last-child { transition: none; } }

/* Services: compact card on the map screen */
.sv-card-c { position: relative; display: block; border: 0; border-radius: 18px; box-shadow: 0 1px 2px rgba(23,32,28,.05), 0 4px 14px rgba(23,32,28,.06); }
.sv-card-c .sv-card-main { align-items: flex-start; gap: 14px; padding: 14px 58px 14px 14px; }
.sv-card-c .sv-card-body { gap: 3px; }
.sv-card-c .sv-card-name { font-size: 17px; line-height: 1.3; color: #17201C; }
.sv-card-line { font-size: 14.5px; line-height: 1.45; color: #4A5752; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sv-pills { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.sv-pill { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 999px; background: #EEF3F0; color: #2E3D38; font-size: 13px; font-weight: 500; line-height: 1.3; }
.sv-pill svg { flex: none; color: #0F6E56; }
.sv-pill-next { background: #E3F0EA; color: #0B5443; font-weight: 600; }
.sv-pill-healthcare { background: #E6F1FB; color: #0C447C; }
.sv-pill-regulated_care { background: #EEEDFE; color: #3C3489; }
.sv-pill-carer { background: #FBF3E6; color: #6B4510; }
.sv-pill-warn { background: #FBF3E6; color: #6B4510; }
.sv-save-c { position: absolute; top: 8px; right: 8px; width: 44px; height: 44px; border: 0; border-radius: 22px; background: transparent; color: #0F6E56; display: grid; place-items: center; cursor: pointer; }
.sv-save-c:hover { background: #F1F6F3; }
.sv-save-c.on svg { fill: currentColor; }
.sv-save-c:focus-visible { outline: 3px solid #0F6E56; outline-offset: 2px; }
.sv-sugg .sv-card-c { box-shadow: none; border: 1px solid #E6E3DC; }
body.fam-contrast-high .sv-card-c, body.fam-contrast-high .sv-pill { border: 2px solid #000; }

/* Services map screen: area and text size row */
.svx-row { justify-self: stretch; display: flex; align-items: center; gap: 8px; min-width: 0; }
.svx-row .svx-place { flex: 0 1 auto; min-width: 0; }
.svx-aa { flex: none; width: 44px; height: 44px; border-radius: 22px; border: 0; background: #fff; color: #17201C; font: inherit; font-size: 16px; font-weight: 700; box-shadow: 0 2px 8px rgba(23,32,28,.14); cursor: pointer; }
.svx-aa[aria-expanded="true"] { background: #0F6E56; color: #fff; }
.svx-aa:focus-visible { outline: 3px solid #5DCAA5; outline-offset: 2px; }
.svx-aapanel { justify-self: stretch; background: #fff; border-radius: 20px; padding: 6px 12px 14px; box-shadow: 0 8px 28px rgba(23,32,28,.2); max-height: 60vh; overflow-y: auto; }
.svx-aapanel .fam-display-panel { margin: 0; border: 0; box-shadow: none; padding: 8px 4px 0; background: transparent; }
.svx-aadone { width: 100%; margin-top: 10px; }
body.fam-contrast-high .svx-aa { border: 2px solid #000; }

/* Pins that are close together */
.svx-cluster { display: block; width: 50px; height: 56px; padding: 0; border: 0; background: transparent; cursor: pointer; }
.svx-cluster .svx-pin-head { width: 46px; height: 46px; background: #0B5443; font-size: 17px; font-weight: 700; }
.svx-cluster .svx-pin-head::after { border-top-color: #0B5443; }
.svx-cluster.on .svx-pin-head { background: #0F6E56; box-shadow: 0 0 0 4px rgba(93,202,165,.6), 0 3px 8px rgba(0,0,0,.3); }
.svx-cluster.on .svx-pin-head::after { border-top-color: #0F6E56; }
.svx-cluster:focus-visible { outline: 3px solid #5DCAA5; outline-offset: 2px; }
.svx-spot { display: grid; gap: 8px; }
.svx-spot-h { margin: 0; font-weight: 600; font-size: 15px; }
.svx-spotrow { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 16px; background: #fff; color: inherit; text-decoration: none; box-shadow: 0 1px 2px rgba(23,32,28,.05), 0 4px 14px rgba(23,32,28,.06); }
.svx-spotrow .fx-meta { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.svx-spotrow:focus-visible { outline: 3px solid #0F6E56; outline-offset: 2px; }
.svx-feature .sv-pills { margin-top: 4px; }

/* "On today" */
.sv-pill-today { background: #0F6E56; color: #fff; }
.sv-pill-today svg { color: #fff; }
.sv-today { font-weight: 700; color: #0B5443; }

/* Service details */
.sv-detail-name { margin-top: 6px; }
.sv-facts-card { padding: 4px 16px; margin-bottom: 12px; }
.sv-fact { display: grid; grid-template-columns: 20px minmax(90px, auto) 1fr; gap: 4px 12px; align-items: start; padding: 14px 0; border-bottom: 1px solid #EFECE6; font-size: 15px; }
.sv-fact:last-child { border-bottom: 0; }
.sv-fact > svg { color: #0F6E56; margin-top: 1px; }
.sv-fact-label { font-weight: 600; color: #17201C; }
.sv-fact-value { text-align: right; color: #2B3430; line-height: 1.45; overflow-wrap: anywhere; }
.sv-fact-value .fx-link { display: inline-flex; align-items: center; gap: 4px; margin-top: 4px; font-weight: 600; }
@media (max-width: 420px) {
  .sv-fact { grid-template-columns: 20px 1fr; }
  .sv-fact-value { grid-column: 2; text-align: left; }
}
.sv-checknote { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 14px; padding: 12px 14px; border-radius: 14px; background: #EFEDE7; color: #33413D; font-size: 14px; line-height: 1.5; }
.sv-checknote svg { flex: none; color: #5E6863; margin-top: 1px; }
.sv-checknote p { margin: 0; }
.sv-mainbtns { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin-bottom: 10px; }
.sv-mainbtns .fx-btn { gap: 8px; min-height: 52px; text-decoration: none; }
.sv-morebtns { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 8px; margin-bottom: 16px; }
.sv-minibtn { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 12px; border: 0; border-radius: 12px; background: transparent; color: #0F6E56; font: inherit; font-size: 15px; font-weight: 600; text-decoration: none; cursor: pointer; }
.sv-minibtn:hover { background: #F1F6F3; }
.sv-minibtn.on svg { fill: currentColor; }
.sv-minibtn:focus-visible { outline: 3px solid #0F6E56; outline-offset: 2px; }
.sv-minibtn[disabled] { opacity: .6; cursor: default; }
.sv-more { margin-top: 14px; }
.sv-more .fx-h2 { margin-bottom: 0; }

/* Services map screen: the small sheet (title and tagline only) */
.svx-peek.svx-mini { padding-bottom: 6px; }
.svx-mini .svx-grip { padding-bottom: 10px; }
.svx-mini .svx-title { font-size: 24px; }
.svx-feature { position: relative; padding-right: 44px; }
.svx-close { position: absolute; top: 4px; right: 4px; width: 40px; height: 40px; border: 0; border-radius: 20px; background: transparent; color: #5E6863; display: grid; place-items: center; cursor: pointer; }
.svx-close:hover { background: #F1F6F3; }
.svx-close:focus-visible { outline: 3px solid #0F6E56; outline-offset: 2px; }
.svx-inline-btn { display: inline; min-height: 0; padding: 0; font-size: inherit; }
@media (max-width: 380px) { .svx-feature { padding-right: 12px; padding-top: 40px; } }
/* Tapped pin card: details on top, a full-width button underneath */
.svx-feature { flex-wrap: wrap; padding-right: 12px; }
.svx-feature .svx-feature-text { flex: 1 1 0; padding-right: 32px; }
.svx-feature .svx-view { flex: 1 1 100%; min-height: 48px; }
@media (max-width: 380px) { .svx-feature { padding-top: 12px; } }
/* Tapped pin: the sheet is just the handle and the card */
.svx-peek:not(.svx-mini) .svx-grip { padding-bottom: 6px; }

/* Category buttons only show once someone taps into search */
.svx-top:not(.is-searching) .svx-chips { display: none; }
.svx-top.is-searching .svx-chips { animation: svx-chips-in .18s ease-out; }
@keyframes svx-chips-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .svx-top.is-searching .svx-chips { animation: none; } }

/* ---------- Services: one sliding sheet ----------
   The sheet is always full height. When closed it is slid down so only its
   top part (the handle and "Support near…", or a tapped service) shows.
   Dragging moves it with the finger; letting go settles it open or closed. */
.svx-sheet { top: var(--svx-top); bottom: 0; padding: 0; max-height: none; overflow: hidden; transform: translateY(var(--svx-peek-y, calc(100% - 130px))); transition: transform .34s cubic-bezier(.22, .8, .24, 1); will-change: transform; }
.svx-sheet.is-full { transform: translateY(0); }
.svx-sheet.svx-dragging { transition: none; }
.svx-sheet .svx-grip { flex: none; height: 30px; padding: 0; display: flex; align-items: center; justify-content: center; touch-action: none; }
.svx-sheet .svx-handle { margin: 0; }
.svx-peekhead { position: absolute; left: 0; right: 0; top: 30px; z-index: 2; padding: 0 20px 14px; background: #FBFAF7; touch-action: none; transition: opacity .22s ease; cursor: grab; }
.svx-peekhead.has-card { padding: 0 16px 16px; }
.svx-peekhead .fx-notice, .svx-peekhead .error-text { margin: 10px 0 0; }
.svx-peekhead .svx-feature, .svx-peekhead .svx-spot { margin-top: 2px; }
.svx-sheet.is-full .svx-peekhead { opacity: 0; pointer-events: none; }
.svx-fullbody { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.svx-fullhead { flex: none; padding: 0 16px 12px; touch-action: none; cursor: grab; }
.svx-fullrow { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.svx-fullhead .svx-title { font-size: 27px; }
@media (min-width: 900px) {
  .svx-sheet { top: var(--svx-top); bottom: 20px; }
}
@media (prefers-reduced-motion: reduce) { .svx-sheet, .svx-peekhead { transition: none; } }
.svx-sheet .svx-fullhead { display: block; }
