:root {
  --teal:      #0F6E56;
  --teal-dark: #0A4A3A;
  --ink:       #13302B;
  --slate:     #5C6660;
  --mist:      #F2EDE3;
  --line:      #DED7C8;
  --white:     #FFFFFF;
  --paper:     #FBF8F2;
  --paper-2:   #F2EDE3;
  --accent:    #0F6E56;
  --radius:    14px;
  --shadow:    0 10px 30px rgba(19, 48, 43, 0.08);
  --maxw:      1080px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  line-height: 1.6;
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

.narrow { max-width: 680px; }

h1, h2, h3 {
  font-family: "Source Serif 4", Georgia, "Times New Roman", serif;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2rem, 4vw, 3rem); margin: 0.2em 0; }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); margin: 0 0 0.6em; }

a { color: var(--teal); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(251, 248, 242, 0.92);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 66px; }
.brand {
  display: flex; align-items: center; gap: 10px;
  font-family: "Source Serif 4", serif;
  font-weight: 600; color: var(--ink);
}
.brand:hover { text-decoration: none; }
.brand-mark {
  display: inline-grid; place-items: center;
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--teal); color: #fff; font-weight: 700;
  font-family: "Inter", sans-serif;
}
.nav-links { display: flex; align-items: center; gap: 22px; }
.nav-links a { color: var(--slate); font-weight: 500; }
.nav-links .btn:not(.btn-ghost) { color: #fff; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--teal);
  color: #fff;
  padding: 12px 22px;
  border-radius: 11px;
  font-weight: 600;
  font-family: inherit;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease, transform 0.1s ease;
}
.btn:hover { background: var(--teal-dark); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-small { padding: 9px 17px; font-size: 0.9rem; border-radius: 9px; }
.btn-ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn-ghost:hover { border-color: var(--teal); color: var(--teal); background: transparent; }

/* Sections */
.section { padding: 64px 0; }
.section-alt { background: var(--paper-2); }
.cta-block { text-align: center; }
.cta-block .hero-actions { justify-content: center; }
.section-lead { color: var(--slate); max-width: 70ch; font-size: 1.05rem; }
.subhead { margin: 36px 0 18px; }

/* Card grid */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.card h4 { margin: 0 0 8px; font-size: 1.05rem; color: var(--teal-dark); font-family: "Inter", sans-serif; font-weight: 700; }
.card p { margin: 0; color: var(--slate); }

/* Spotlight */
.spotlight { display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; align-items: start; }
.spotlight p { color: var(--slate); }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.steps-4 { grid-template-columns: repeat(4, 1fr); }
.step { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; display: flex; flex-direction: column; }
.step-num {
  width: 38px; height: 38px; border-radius: 50%; background: var(--teal); color: #fff;
  display: grid; place-items: center; font-weight: 700; margin-bottom: 12px;
  font-family: "Inter", sans-serif;
}
.step h3 { margin: 0 0 8px; }
.step p { color: var(--slate); margin: 0; }
.step-link { margin-top: 14px; font-weight: 600; font-size: 0.92rem; }

.about-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 40px; align-items: start; }
.about-grid p { color: var(--slate); }
.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.checklist li { position: relative; padding-left: 30px; font-weight: 500; }
.checklist li::before {
  content: "✓"; position: absolute; left: 0; top: 0;
  width: 20px; height: 20px; border-radius: 50%; background: var(--teal); color: #fff;
  display: grid; place-items: center; font-size: 0.75rem;
}

/* Form */
.muted { color: var(--slate); }
form { margin-top: 22px; display: grid; gap: 18px; }
.field { display: grid; gap: 6px; }
.field label, .field-check label { font-weight: 600; font-size: 0.95rem; }
input, textarea {
  font: inherit; padding: 12px 14px; border: 1px solid var(--line);
  border-radius: 10px; background: var(--white); color: var(--ink); width: 100%;
}
input:focus, textarea:focus {
  outline: 2px solid var(--teal);
  outline-offset: 1px;
  border-color: var(--teal);
}
.field-check { display: flex; gap: 10px; align-items: flex-start; }
.field-check input { width: auto; margin-top: 4px; }
.field-check label { font-weight: 400; color: var(--slate); }
.form-status { font-weight: 600; margin: 6px 0 0; }
.form-status.success { color: #047857; }
.form-status.error { color: #b91c1c; }
button[disabled] { opacity: 0.6; cursor: not-allowed; }

/* Intake form */
fieldset {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 22px 6px; margin: 0; display: grid; gap: 18px;
}
legend { font-weight: 700; color: var(--teal-dark); padding: 0 8px; font-size: 1.05rem; font-family: "Inter", sans-serif; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.qlabel { display: block; font-weight: 600; font-size: 0.95rem; margin-bottom: 8px; }
select {
  font: inherit; padding: 12px 14px; border: 1px solid var(--line);
  border-radius: 10px; background: var(--white); color: var(--ink); width: 100%;
}
select:focus { outline: 2px solid var(--teal); outline-offset: 1px; border-color: var(--teal); }
.choices { display: flex; gap: 10px; flex-wrap: wrap; }
.choices label {
  display: inline-flex; align-items: center; gap: 8px; font-weight: 500;
  border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px;
  cursor: pointer; flex: 1 1 auto; min-width: 120px; background: var(--white);
}
.choices input { width: auto; margin: 0; }
.choices label:has(input:checked) { border-color: var(--teal); background: #E4F0EA; color: var(--teal-dark); }

/* Phone: country code + number */
.phone-row { display: flex; gap: 8px; }
.phone-row select { width: auto; flex: 0 0 auto; }
.phone-row input { flex: 1 1 auto; }

/* Notices */
.notice { border-radius: var(--radius); padding: 16px 18px; margin: 18px 0 8px; font-size: 0.95rem; }
.notice-info { background: #E4F0EA; border: 1px solid #A8D5BB; color: var(--teal-dark); }
.notice strong { display: block; margin-bottom: 4px; }
.notice-warn { background: #fffbeb; border: 1px solid #fcd34d; color: #92400e; }

/* Provisional result */
.result {
  margin-top: 28px; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; background: var(--white); box-shadow: var(--shadow);
}
.result h3 { margin: 18px 0 8px; font-size: 1.05rem; }
.result ul { margin: 0; padding-left: 20px; color: var(--slate); display: grid; gap: 6px; }
.result-footnote { margin-top: 16px; font-size: 0.88rem; }
.result-banner {
  border-radius: 10px; padding: 16px 18px; display: grid; gap: 4px;
}
.result-banner strong { font-size: 1.1rem; }
.result-banner.ok   { background: #ecfdf5; border: 1px solid #6ee7b7; color: #065f46; }
.result-banner.warn { background: #fffbeb; border: 1px solid #fcd34d; color: #92400e; }
.result-banner.stop { background: #fef2f2; border: 1px solid #fca5a5; color: #991b1b; }

/* Clinician dashboard */
.staff-tag {
  font-size: 0.8rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--teal-dark);
  background: #E4F0EA; border: 1px solid #A8D5BB; padding: 6px 12px; border-radius: 999px;
  font-family: "Inter", sans-serif;
}
.dash-controls {
  display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin: 18px 0;
}
.filters { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  font: inherit; font-size: 0.9rem; font-weight: 600; cursor: pointer;
  border: 1px solid var(--line); background: var(--white); color: var(--slate);
  padding: 8px 14px; border-radius: 999px;
}
.chip.is-active { background: var(--teal); color: #fff; border-color: var(--teal); }
.dash-controls #search { flex: 1 1 240px; width: auto; }

.sub-list { display: grid; gap: 10px; }
.sub-card {
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--white);
  overflow: hidden;
}
.sub-card summary {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 14px 18px; cursor: pointer; list-style: none;
}
.sub-card summary::-webkit-details-marker { display: none; }
.sub-card[open] summary { border-bottom: 1px solid var(--line); background: var(--mist); }
.sub-name { font-weight: 700; }
.sub-meta { color: var(--slate); font-size: 0.9rem; margin-left: auto; }
.badge {
  font-size: 0.78rem; font-weight: 700; padding: 4px 10px; border-radius: 999px;
  font-family: "Inter", sans-serif;
}
.badge.ok      { background: #ecfdf5; color: #065f46; border: 1px solid #6ee7b7; }
.badge.warn    { background: #fffbeb; color: #92400e; border: 1px solid #fcd34d; }
.badge.stop    { background: #fef2f2; color: #991b1b; border: 1px solid #fca5a5; }
.badge.pending { background: var(--mist); color: var(--slate); border: 1px solid var(--line); }

.toggle { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 0.9rem; color: var(--slate); }
.toggle input { width: auto; margin: 0; }

/* Clinician decision form */
.review-box {
  margin-top: 18px; padding: 16px 18px; border: 1px solid var(--line);
  border-radius: var(--radius); background: var(--mist);
}
.review-box h4 { margin: 0 0 8px; color: var(--teal-dark); font-family: "Inter", sans-serif; font-weight: 700; }
.review-meta { margin: 0 0 10px; font-size: 0.88rem; }
.review-form { margin-top: 6px; gap: 12px; }
.review-form .field span { font-weight: 600; font-size: 0.9rem; }
.review-form input, .review-form select, .review-form textarea { background: var(--white); }
.review-actions { display: flex; align-items: center; gap: 14px; }
.review-msg { font-weight: 600; font-size: 0.9rem; }
.review-msg.success { color: #047857; }
.review-msg.error { color: #b91c1c; }

.sub-detail { padding: 18px; }
.sub-detail h4 { margin: 18px 0 8px; color: var(--teal-dark); font-size: 0.95rem; font-family: "Inter", sans-serif; font-weight: 700; }
.detail-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px 24px; }
.kv { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px dotted var(--line); padding: 6px 0; font-size: 0.92rem; }
.kv span { color: var(--slate); }
.freetext { white-space: pre-wrap; color: var(--ink); background: var(--mist); border-radius: 10px; padding: 12px; margin: 0; }
.reasons { margin: 0; padding-left: 20px; color: var(--slate); display: grid; gap: 4px; }

@media (max-width: 860px) {
  .detail-grid { grid-template-columns: 1fr; }
  .sub-meta { margin-left: 0; width: 100%; }
}

/* Footer */
.site-footer {
  background: var(--ink);
  color: rgba(234, 245, 240, 0.72);
  padding: 40px 0;
  margin-top: 40px;
  font-size: 13px;
  line-height: 1.7;
}
.disclaimer { font-size: 0.88rem; max-width: 80ch; color: rgba(234, 245, 240, 0.72); }
.disclaimer strong { color: #fff; }
.copyright { font-size: 0.85rem; margin-top: 16px; color: rgba(234, 245, 240, 0.5); }
.site-footer a { color: #7FD3B7; }
.site-footer a:hover { color: #fff; text-decoration: underline; }

/* Responsive */
@media (max-width: 860px) {
  .spotlight { grid-template-columns: 1fr; }
  .steps, .steps-4, .cards { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .nav-links a:not(.btn) { display: none; }
}

@media (min-width: 861px) and (max-width: 1024px) {
  .cards, .steps-4 { grid-template-columns: repeat(2, 1fr); }
}

/* Chat assistant widget */
/* An author `display` rule overrides the [hidden] attribute, so restore it
   explicitly (higher specificity than the bare class rules below). */
.chat-launcher[hidden], .chat-panel[hidden] { display: none !important; }
.chat-launcher {
  position: fixed; bottom: 20px; right: 20px; z-index: 50;
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--teal); color: #fff; border: none; cursor: pointer;
  font: inherit; font-weight: 600; padding: 12px 18px; border-radius: 999px;
  box-shadow: var(--shadow);
}
.chat-launcher:hover { background: var(--teal-dark); }
.chat-panel {
  position: fixed; bottom: 20px; right: 20px; z-index: 50;
  width: min(380px, calc(100vw - 32px)); height: min(560px, calc(100vh - 40px));
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 20px 50px rgba(19, 48, 43, 0.2);
}
.chat-head {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--teal); color: #fff; padding: 12px 16px; font-weight: 600;
}
.chat-close {
  background: none; border: none; color: #fff; font-size: 1.4rem;
  line-height: 1; cursor: pointer; padding: 0 4px;
}
.chat-log {
  flex: 1; overflow-y: auto; padding: 16px; display: flex;
  flex-direction: column; gap: 10px; background: var(--mist);
}
.chat-msg {
  max-width: 85%; padding: 10px 13px; border-radius: 14px;
  font-size: 0.94rem; line-height: 1.5; white-space: pre-wrap; word-wrap: break-word;
}
.chat-bot  { align-self: flex-start; background: var(--white); border: 1px solid var(--line); color: var(--ink); }
.chat-user { align-self: flex-end; background: var(--teal); color: #fff; }
.chat-typing { color: var(--slate); font-style: italic; }
.chat-input { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); margin: 0; }
.chat-input input { flex: 1; padding: 10px 12px; }
.chat-disclaimer { margin: 0; padding: 0 12px 12px; font-size: 0.74rem; color: var(--slate); }

@media (max-width: 480px) {
  .chat-panel { bottom: 0; right: 0; width: 100vw; height: 100vh; border-radius: 0; }
}

/* ---- Wizard ---- */

/* Step counter */
.wiz-step-label {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--slate);
  margin-bottom: 12px;
  font-family: "Inter", sans-serif;
}

/* Outer wrapper */
.wiz-outer {
  max-width: 580px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}

/* Animated body */
.wiz-body { min-height: 400px; }

@keyframes wizInRight {
  from { opacity: 0; transform: translateX(30px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes wizInLeft {
  from { opacity: 0; transform: translateX(-30px); }
  to   { opacity: 1; transform: translateX(0); }
}
.wiz-in-right { animation: wizInRight 0.32s cubic-bezier(0.4, 0, 0.2, 1) both; }
.wiz-in-left  { animation: wizInLeft  0.32s cubic-bezier(0.4, 0, 0.2, 1) both; }

/* Mini segmented progress bar */
.wiz-mini-bar { display: flex; gap: 5px; margin-bottom: 20px; }
.wiz-seg {
  height: 4px; flex: 1; border-radius: 999px;
  background: var(--line);
  transition: background 0.3s ease;
}
.wiz-seg-done { background: var(--teal); }

/* Oncologist conditional fields */
.wiz-onc-fields { display: grid; gap: 14px; padding-top: 4px; }
.wiz-onc-fields[hidden] { display: none; }
.wiz-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 480px) { .wiz-grid-2 { grid-template-columns: 1fr; } }

/* Step title */
.wiz-step-title { font-size: clamp(1.4rem, 3vw, 1.9rem); margin: 0 0 24px; }
.wiz-intro { color: var(--slate); margin: 0 0 22px; font-size: 0.97rem; }

/* Fields */
.wiz-fields { display: grid; gap: 22px; }
.wiz-field  { display: grid; gap: 8px; }
.wiz-label  { font-weight: 700; font-size: 0.97rem; font-family: "Inter", sans-serif; }
.wiz-req    { color: var(--teal-dark); }
.wiz-hint   { margin: -4px 0 0; font-size: 0.85rem; color: var(--slate); }
.wiz-privacy-note { font-size: 0.84rem; color: var(--slate); margin: 16px 0 0; }

/* Navigation */
.wiz-nav {
  display: flex; justify-content: space-between;
  align-items: center; margin-top: 32px; gap: 12px;
}
.wiz-btn-back {
  font: inherit; font-weight: 600; font-size: 0.95rem;
  background: transparent; color: var(--slate);
  border: 1px solid var(--line); border-radius: 999px;
  padding: 12px 22px; cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.wiz-btn-back:hover { background: var(--mist); border-color: var(--slate); }
.wiz-btn-next {
  font: inherit; font-weight: 700; font-size: 1rem;
  background: var(--teal); color: #fff;
  border: none; border-radius: 11px;
  padding: 14px 32px; cursor: pointer;
  transition: background 0.15s, transform 0.05s;
  min-width: 160px;
}
.wiz-btn-next:hover   { background: var(--teal-dark); }
.wiz-btn-next:active  { transform: translateY(1px); }
.wiz-btn-next:disabled { opacity: 0.55; cursor: not-allowed; }

/* Error */
.wiz-error { color: #b91c1c; font-weight: 600; font-size: 0.9rem; margin: 8px 0 0; }

/* Pill radio group */
.wiz-pills { display: flex; gap: 10px; flex-wrap: wrap; }
.wiz-pill {
  display: inline-flex; align-items: center; gap: 8px;
  border: 2px solid var(--line); border-radius: 999px;
  padding: 10px 20px; cursor: pointer; font-weight: 600;
  font-size: 0.95rem; background: var(--white);
  transition: border-color 0.15s, background 0.15s, color 0.15s;
  user-select: none;
}
.wiz-pill input { display: none; }
.wiz-pill:hover { border-color: var(--teal); background: #EBF5F0; }
.wiz-pill.is-sel { border-color: var(--teal); background: #E4F0EA; color: var(--teal-dark); }

/* Card radio group */
.wiz-cards { display: grid; gap: 10px; }
.wiz-card {
  display: flex; align-items: center; gap: 14px;
  border: 2px solid var(--line); border-radius: var(--radius);
  padding: 14px 16px; cursor: pointer; background: var(--white);
  transition: border-color 0.15s, background 0.15s;
  user-select: none;
}
.wiz-card input { display: none; }
.wiz-card:hover { border-color: var(--teal); background: #EBF5F0; }
.wiz-card.is-sel { border-color: var(--teal); background: #E4F0EA; }
.wiz-card-icon {
  font-size: 1.5rem; width: 44px; height: 44px; border-radius: 12px;
  background: var(--mist); display: grid; place-items: center; flex-shrink: 0;
  transition: background 0.15s;
}
.wiz-card.is-sel .wiz-card-icon { background: #B8DCC8; }
.wiz-card-body { flex: 1; }
.wiz-card-label { font-weight: 700; font-size: 0.97rem; display: block; font-family: "Inter", sans-serif; }
.wiz-card-sub   { font-size: 0.84rem; color: var(--slate); display: block; margin-top: 2px; }
.wiz-card-tick {
  width: 22px; height: 22px; border-radius: 50%;
  border: 2px solid var(--line); display: grid; place-items: center;
  font-size: 0.75rem; color: transparent; flex-shrink: 0;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.wiz-card.is-sel .wiz-card-tick { background: var(--teal); border-color: var(--teal); color: #fff; }

/* Consent */
.wiz-consent-box {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; display: grid; gap: 16px; margin-bottom: 24px; background: var(--white);
}
.wiz-consent-row { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; }
.wiz-consent-row input[type="checkbox"] { flex-shrink: 0; margin-top: 4px; width: 18px; height: 18px; cursor: pointer; accent-color: var(--teal); }
.wiz-consent-row span { font-size: 0.95rem; color: var(--ink); line-height: 1.55; }

/* What happens summary */
.wiz-summary { background: var(--mist); border-radius: var(--radius); padding: 18px 20px; }
.wiz-summary-title { font-weight: 700; margin: 0 0 10px; font-size: 0.97rem; color: var(--teal-dark); font-family: "Inter", sans-serif; }
.wiz-summary-steps { margin: 0; padding-left: 22px; display: grid; gap: 8px; color: var(--slate); font-size: 0.95rem; }

/* Welcome screen */
.wiz-welcome { text-align: center; padding: 24px 0 8px; }
.wiz-welcome-mark {
  width: 72px; height: 72px; border-radius: 22px;
  background: var(--teal);
  color: #fff; font-size: 2rem; font-weight: 700;
  display: grid; place-items: center; margin: 0 auto 28px;
  box-shadow: 0 8px 24px rgba(15, 110, 86, 0.25);
}
.wiz-welcome-h1 { font-size: clamp(1.7rem, 4vw, 2.5rem); margin: 0 0 16px; line-height: 1.2; }
.wiz-welcome-sub {
  color: var(--slate); font-size: 1.05rem; max-width: 42ch;
  margin: 0 auto 28px; line-height: 1.6;
}
.wiz-trust { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 32px; }
.trust-pill {
  display: inline-flex; align-items: center; gap: 6px;
  background: #E4F0EA; border: 1px solid #A8D5BB; color: var(--teal-dark);
  padding: 7px 14px; border-radius: 999px; font-size: 0.87rem; font-weight: 600;
  font-family: "Inter", sans-serif;
}
.wiz-start-btn { font-size: 1.05rem; padding: 16px 36px; border-radius: 11px; }
.wiz-how {
  display: flex; align-items: flex-start; gap: 12px;
  margin: 40px 0 0; text-align: left; flex-wrap: wrap; justify-content: center;
}
.wiz-how-step {
  flex: 1 1 160px; max-width: 200px; display: flex;
  flex-direction: column; align-items: center; text-align: center; gap: 10px;
}
.wiz-how-num {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--teal); color: #fff; font-weight: 700;
  display: grid; place-items: center; flex-shrink: 0;
  font-family: "Inter", sans-serif;
}
.wiz-how-step p { margin: 0; font-size: 0.9rem; color: var(--slate); }
.wiz-how-arrow { font-size: 1.3rem; color: var(--line); margin-top: 10px; }

/* Result screen */
@keyframes resultReveal {
  from { opacity: 0; transform: scale(0.96) translateY(16px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
.wiz-result { animation: resultReveal 0.45s cubic-bezier(0.4, 0, 0.2, 1) both; text-align: center; }
.wiz-result-icon {
  width: 72px; height: 72px; border-radius: 50%;
  font-size: 2rem; font-weight: 700;
  display: grid; place-items: center; margin: 0 auto 20px;
}
.wiz-result-ok   { background: #ecfdf5; color: #065f46; border: 2px solid #6ee7b7; }
.wiz-result-warn { background: #fffbeb; color: #92400e; border: 2px solid #fcd34d; }
.wiz-result-stop { background: #fef2f2; color: #991b1b; border: 2px solid #fca5a5; }
.wiz-result-h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin: 0 0 12px; }
.wiz-result-sub { color: var(--slate); font-size: 1rem; max-width: 44ch; margin: 0 auto 24px; line-height: 1.6; }
.wiz-result-card { text-align: left; border-radius: var(--radius); padding: 18px 22px; margin: 0 0 20px; }
.wiz-result-card.wiz-result-ok   { background: #ecfdf5; border: 1px solid #6ee7b7; }
.wiz-result-card.wiz-result-warn { background: #fffbeb; border: 1px solid #fcd34d; }
.wiz-result-card.wiz-result-stop { background: #fef2f2; border: 1px solid #fca5a5; }
.wiz-result-card-title { font-weight: 700; margin: 0 0 10px; font-size: 0.95rem; font-family: "Inter", sans-serif; }
.wiz-result-reasons { margin: 0; padding-left: 20px; display: grid; gap: 6px; color: var(--slate); font-size: 0.93rem; }
.wiz-next { background: var(--mist); border-radius: var(--radius); padding: 18px 22px; text-align: left; margin: 0 0 24px; }
.wiz-next-title { font-weight: 700; margin: 0 0 10px; font-size: 0.95rem; color: var(--teal-dark); font-family: "Inter", sans-serif; }
.wiz-next-steps { margin: 0; padding-left: 22px; display: grid; gap: 8px; color: var(--slate); font-size: 0.93rem; }
.wiz-disclaimer {
  font-size: 0.82rem; color: var(--slate); line-height: 1.6;
  border-top: 1px solid var(--line); padding-top: 16px; margin: 0;
}

@media (max-width: 560px) {
  .wiz-outer { padding: 28px 16px 60px; }
  .wiz-how-arrow { display: none; }
  .wiz-how-step { max-width: 100%; flex-direction: row; text-align: left; }
  .wiz-pills { gap: 8px; }
  .wiz-pill { flex: 1 1 auto; justify-content: center; }
}

/* ---- Clinician tabs ---- */
.clin-tabs-bar {
  border-bottom: 2px solid var(--line);
  background: var(--white);
  position: sticky; top: 0; z-index: 10;
}
.clin-tabs-bar .container { display: flex; gap: 0; }
.clin-tab {
  font: inherit; font-size: 0.95rem; font-weight: 600;
  padding: 14px 24px; border: none; background: none; cursor: pointer;
  color: var(--slate); border-bottom: 3px solid transparent; margin-bottom: -2px;
  transition: color 0.15s, border-color 0.15s;
}
.clin-tab:hover    { color: var(--ink); }
.clin-tab.is-active { color: var(--teal-dark); border-bottom-color: var(--teal); }

.rx-card .sub-detail { padding: 20px 22px; }
.rx-sign-box { background: #f0fdf4; border-color: #6ee7b7; }
.rx-sign-box h4 { color: #065f46; }
.rx-signed-banner {
  padding: 16px 22px; border-radius: var(--radius);
  background: #ecfdf5; border: 1px solid #6ee7b7;
  color: #065f46; font-weight: 600;
}

/* ---- Wizard signup box ---- */
.wiz-signup-box {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px 22px; margin: 24px 0 0; background: var(--white);
}
.wiz-signup-title { font-size: 1.05rem; font-weight: 700; margin: 0 0 4px; font-family: "Inter", sans-serif; }
.wiz-signup-sub   { font-size: 0.9rem; color: var(--slate); margin: 0 0 18px; }
.wiz-signup-login { font-size: 0.88rem; color: var(--slate); margin: 14px 0 0; text-align: center; }
.wiz-signup-login a { color: var(--teal-dark); }
.wiz-signup-success {
  text-align: center; padding: 16px 0;
  color: #065f46; background: #ecfdf5; border-radius: var(--radius); font-weight: 600;
}
.wiz-restore-banner {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px;
  background: #E4F0EA; border: 1px solid #A8D5BB; border-radius: 8px;
  padding: 10px 14px; font-size: 0.88rem; color: var(--teal-dark); margin-bottom: 20px;
}
.wiz-restore-banner button {
  background: none; border: none; padding: 0; cursor: pointer;
  font-size: 0.88rem; color: var(--teal-dark); font-family: inherit;
  text-decoration: underline; text-underline-offset: 2px; white-space: nowrap;
}

/* ---- Auth pages ---- */
.auth-outer {
  min-height: calc(100vh - 140px);
  display: flex; align-items: center; justify-content: center;
  padding: 48px 20px;
}
.auth-card {
  background: var(--white); border-radius: var(--radius); border: 1px solid var(--line);
  box-shadow: 0 4px 24px rgba(19, 48, 43, 0.08);
  padding: 40px 36px; width: 100%; max-width: 420px; text-align: center;
}
.auth-logo  { font-size: 2rem; color: var(--teal); display: block; margin: 0 auto 16px; }
.auth-title { font-size: 1.4rem; font-weight: 700; margin: 0 0 6px; font-family: "Inter", sans-serif; }
.auth-sub   { font-size: 0.92rem; color: var(--slate); margin: 0 0 24px; }
.auth-switch{ font-size: 0.88rem; color: var(--slate); margin: 18px 0 0; }
.auth-switch a { color: var(--teal-dark); }

/* ---- Dashboard ---- */
.dash-outer { max-width: 680px; margin: 0 auto; padding: 40px 20px 80px; }
.dash-header { margin: 0 0 28px; }
.dash-greeting { font-size: clamp(1.4rem, 3vw, 1.9rem); font-weight: 700; margin: 0 0 4px; font-family: "Inter", sans-serif; }
.dash-email { font-size: 0.9rem; color: var(--slate); margin: 0; }

.pd-card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 24px; margin: 0 0 18px;
}
.pd-section-title { font-size: 1rem; font-weight: 700; margin: 0 0 16px; color: var(--ink); font-family: "Inter", sans-serif; }
.pd-grid { display: grid; gap: 0; }
.pd-row {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 10px 0; border-bottom: 1px solid var(--line); gap: 16px; font-size: 0.92rem;
}
.pd-row:last-child { border-bottom: none; }
.pd-label { color: var(--slate); flex-shrink: 0; }
.pd-value  { font-weight: 500; text-align: right; word-break: break-word; }

.dash-status-card { display: flex; gap: 18px; align-items: flex-start; }
.dash-status-ok      { background: #ecfdf5; border-color: #6ee7b7; }
.dash-status-warn    { background: #fffbeb; border-color: #fcd34d; }
.dash-status-stop    { background: #fef2f2; border-color: #fca5a5; }
.dash-status-neutral { background: var(--paper-2); border-color: var(--line); }
.dash-status-icon {
  font-size: 1.4rem; font-weight: 900; flex-shrink: 0;
  width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.dash-status-ok      .dash-status-icon { background: #d1fae5; color: #065f46; }
.dash-status-warn    .dash-status-icon { background: #fef3c7; color: #92400e; }
.dash-status-stop    .dash-status-icon { background: #fee2e2; color: #991b1b; }
.dash-status-neutral .dash-status-icon { background: var(--mist); color: var(--slate); }
.dash-status-label { font-size: 0.82rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--slate); margin: 0 0 2px; font-family: "Inter", sans-serif; }
.dash-status-value { font-size: 1.05rem; font-weight: 700; margin: 0 0 4px; font-family: "Inter", sans-serif; }
.dash-status-meta  { font-size: 0.85rem; color: var(--slate); margin: 0; }

.dash-reasons    { padding-left: 20px; display: grid; gap: 6px; color: var(--slate); font-size: 0.93rem; margin: 0; }
.dash-next-steps { padding-left: 22px; display: grid; gap: 8px; color: var(--slate); font-size: 0.93rem; margin: 0; }

.dash-loading {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; padding: 80px 0; gap: 16px; color: var(--slate);
}
.dash-spinner {
  width: 36px; height: 36px; border-radius: 50%;
  border: 3px solid var(--line); border-top-color: var(--teal);
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.dash-error { text-align: center; padding: 60px 20px; color: var(--slate); }
.dash-disclaimer {
  font-size: 0.82rem; color: var(--slate); line-height: 1.6;
  border-top: 1px solid var(--line); padding-top: 16px; margin: 8px 0 0;
}

/* ---- Prescription rows ---- */
.rx-row { padding: 12px 0; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; }
.rx-row:last-child { border-bottom: none; }
.rx-row-left   { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rx-row-date   { font-size: 0.9rem; color: var(--slate); }
.rx-row-signed { font-size: 0.85rem; color: var(--slate); }
.rx-badge      { font-size: 0.78rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; display: inline-block; font-family: "Inter", sans-serif; }
.rx-badge-ok   { background: #ecfdf5; color: #065f46; border: 1px solid #6ee7b7; }
.rx-badge-warn { background: #fffbeb; color: #92400e; border: 1px solid #fcd34d; }

/* ---- Call transcripts ---- */
.tx-card {
  border: 1px solid var(--line); border-radius: 10px;
  overflow: hidden; margin-top: 8px;
}
.tx-card > summary {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; cursor: pointer; list-style: none;
  background: var(--mist); font-size: 0.88rem; font-weight: 600;
  color: var(--ink); user-select: none;
}
.tx-card > summary::-webkit-details-marker { display: none; }
.tx-card[open] > summary { border-bottom: 1px solid var(--line); }
.tx-date { flex: 1; }
.tx-chevron { font-size: 0.7rem; color: var(--slate); transition: transform 0.15s; }
.tx-card[open] .tx-chevron { transform: rotate(180deg); }

.tx-body { padding: 14px; background: var(--white); display: grid; gap: 12px; }

.tx-summary-box {
  background: var(--mist); border-left: 3px solid var(--teal);
  border-radius: 6px; padding: 10px 14px;
}
.tx-summary-label {
  font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.07em; color: var(--teal-dark);
  font-family: "Inter", sans-serif; margin-bottom: 6px;
}
.tx-summary-text {
  font-size: 0.85rem; line-height: 1.7; color: var(--ink); white-space: pre-wrap;
}

.tx-transcript-toggle {
  border: none; background: none; padding: 0; cursor: pointer;
  font-size: 0.82rem; color: var(--slate); font-family: inherit;
  text-decoration: underline; text-underline-offset: 2px; text-align: left;
}
.tx-transcript-toggle:hover { color: var(--ink); }
.tx-transcript-pre {
  white-space: pre-wrap; font-size: 0.8rem; line-height: 1.7;
  color: var(--ink); background: var(--mist); border-radius: 6px;
  padding: 10px 14px; margin: 8px 0 0; overflow-x: auto; display: none;
}
.tx-transcript-pre.is-open { display: block; }

/* ---- Calendly booking card ---- */
.cal-card { padding-bottom: 0; overflow: hidden; }
.cal-intro { font-size: 0.93rem; color: var(--slate); margin: -4px 0 20px; line-height: 1.6; }
#calendly-container iframe { border: none; border-radius: 0 0 var(--radius) var(--radius); }

.cal-booked { padding-bottom: 8px; }
.cal-booked-header {
  display: flex; align-items: center; gap: 14px;
  padding-bottom: 20px; border-bottom: 1px solid var(--line); margin-bottom: 20px;
}
.cal-booked-tick {
  flex-shrink: 0; width: 44px; height: 44px; border-radius: 50%;
  background: #16a34a; color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem; font-weight: 700;
}
.cal-booked-label {
  font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--slate); margin: 0 0 3px;
  font-family: "Inter", sans-serif;
}
.cal-booked-status   { font-size: 1.05rem; font-weight: 700; color: #16a34a; margin: 0; font-family: "Inter", sans-serif; }
.cal-booked-datetime { font-size: 1.35rem; font-weight: 700; color: var(--ink); margin: 0 0 18px; line-height: 1.3; font-family: "Inter", sans-serif; }
.cal-join-btn { margin-bottom: 24px; }
.cal-no-link  { font-size: 0.9rem; color: var(--slate); margin: 0 0 24px; }
.cal-booked-footer { display: flex; align-items: center; gap: 10px; padding-top: 16px; border-top: 1px solid var(--line); }
.cal-action-link {
  background: none; border: none; padding: 0; cursor: pointer;
  font-size: 0.88rem; color: var(--slate); font-family: inherit;
  text-decoration: underline; text-underline-offset: 2px;
}
.cal-action-link:hover { color: var(--ink); }
.cal-action-sep { color: var(--line); user-select: none; }
.cal-saving { padding: 40px 20px; text-align: center; color: var(--slate); }
.cal-saving p { margin: 12px 0 0; }
.cal-error { padding: 12px 0 20px; color: #92400e; font-size: 0.93rem; }

@media (max-width: 480px) {
  .auth-card { padding: 28px 20px; }
  .pd-card   { padding: 16px 16px; }
  .dash-status-card { flex-direction: column; gap: 12px; }
  #calendly-container { height: 900px !important; }
}
