[data-crp-portal] {
  --crp-portal-gutter: clamp(1rem, 4vw, 3rem);
  --crp-portal-gap: clamp(.875rem, 1.8vw, 1.5rem);
  --crp-portal-radius: 1rem;
}

body [data-crp-portal] .crp-portal-app--public .crp-portal-main > :is(.crp-dashboard, .crp-form-view, .crp-account, .crp-orders) {
  max-width: 73rem !important;
  padding: clamp(1.5rem, 4vw, 3rem) var(--crp-portal-gutter) clamp(1.5rem, 3vw, 2.75rem) !important;
}

body [data-crp-portal] .crp-portal-app--public .crp-portal-main > :is(.crp-form-view, .crp-consultation-view, .crp-review-complete) {
  max-width: 55rem !important;
}

[data-crp-portal] :is(h1, h2, h3, p, address, legend, .crp-order-number, .crp-order-date, .crp-account-row) {
  overflow-wrap: anywhere;
}

[data-crp-portal] :is(.crp-account, .crp-orders, .crp-form-view, .crp-dashboard) > h1,
[data-crp-portal] .crp-account-intro h1 {
  font-size: clamp(1.875rem, 3.6vw, 2.75rem);
  line-height: 1.12;
  text-wrap: balance;
}

[data-crp-portal] :is(.crp-home-layout, .crp-home-next-card, .crp-account-layout, .crp-question-card, .crp-booking-card, .crp-booking-embed) {
  min-inline-size: 0;
}

[data-crp-portal] .crp-home-layout { gap: var(--crp-portal-gap); }
[data-crp-portal] .crp-home-layout > .crp-home-panel { align-self: stretch; }
[data-crp-portal] .crp-home-panel h2 + :is(p, button) { margin-block-start: .75rem; }
[data-crp-portal] .crp-home-journey__list p { font-size: .875rem; }
[data-crp-portal] .crp-home-progress > p { font-size: .875rem; }

[data-crp-portal] .crp-account-intro {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .75rem 1.5rem;
  margin: 0 0 var(--crp-portal-gap);
}

[data-crp-portal] .crp-account-intro h1 { margin: 0 0 .5rem; padding: 0; border: 0; }
[data-crp-portal] .crp-account-intro p { max-width: 42rem; margin: 0; color: var(--crp-muted); line-height: 1.55; }
[data-crp-portal] [data-refresh-account] { min-height: 44px; }

[data-crp-portal] .crp-account-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  align-items: start;
  gap: var(--crp-portal-gap);
}

[data-crp-portal] .crp-account-layout .crp-account-card {
  display: grid;
  min-width: 0;
  gap: .75rem;
  padding: clamp(1rem, 2.4vw, 1.75rem);
  margin: 0;
  border-radius: var(--crp-portal-radius);
}

[data-crp-portal] .crp-account-layout h2 { margin: 0 0 .25rem; font-size: clamp(1.25rem, 2.6vw, 1.55rem); }
[data-crp-portal] .crp-account-layout p { margin: 0; }
[data-crp-portal] .crp-account-delivery address { margin: 0; color: var(--crp-muted); font-style: normal; line-height: 1.65; }
[data-crp-portal] .crp-account-delivery button { justify-self: start; min-height: 44px; color: var(--crp-dark-green); }
[data-crp-portal] [data-crr-wallet-slot]:empty { display: none; }

[data-crp-portal] .crp-account-actions .crp-account-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  width: 100%;
  min-height: 48px;
  margin: 0;
  padding: .65rem .85rem;
  border-radius: .65rem;
  font-size: .9375rem;
  line-height: 1.35;
  text-align: start;
}

[data-crp-portal] .crp-id-status {
  width: fit-content;
  padding: .55rem .75rem;
  border-radius: .5rem;
  background: #e9f6df;
  color: #2b522c;
  font-size: .9rem;
  font-weight: 650;
}

[data-crp-portal] .crp-id-status--pending { background: #f5edf8; color: #523965; }
[data-crp-portal] .crp-account .crp-login-links { display: flex; flex-wrap: wrap; gap: .5rem 1rem; margin: var(--crp-portal-gap) 0 0; }

[data-crp-portal] .crp-orders .crp-tabs { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: .5rem; }
[data-crp-portal] .crp-orders .crp-tabs button { min-width: 0; min-height: 44px; padding: .625rem .45rem; line-height: 1.3; white-space: normal; overflow-wrap: anywhere; }
[data-crp-portal] .crp-order-card header { align-items: flex-start; flex-wrap: wrap; gap: .5rem; }
[data-crp-portal] .crp-order-card header > div, [data-crp-portal] .crp-order-status { min-width: 0; max-width: 100%; }
[data-crp-portal] .crp-order-status { white-space: normal; }
[data-crp-portal] .crp-order-footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .75rem; }
[data-crp-portal] .crp-order-footer .crp-button { min-height: 44px; }

[data-crp-portal] :is(.crp-signature-box canvas, .crp-upload-box, .crp-field input, .crp-field textarea, .crp-field select, .crp-question-card input, .crp-question-card select, .crp-question-card textarea) { max-inline-size: 100%; }
[data-crp-portal] .crp-signature-box canvas { touch-action: none; }
[data-crp-portal] :is(.crp-form-view, .crp-login-card, .crp-consultation-actions) .crp-button { min-height: 44px; max-inline-size: 100%; white-space: normal; overflow-wrap: anywhere; }
[data-crp-portal] .crp-consultation-actions { display: flex; flex-wrap: wrap; gap: .75rem; }
[data-crp-portal] .crp-consultation-actions .crp-button { flex: 0 1 auto; }
[data-crp-portal] .crp-booking-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
[data-crp-portal] .crp-booking-steps span { min-width: 0; overflow-wrap: anywhere; }

[data-crp-portal] .crp-address-modal { position: fixed; max-height: calc(100dvh - 24px); width: min(694px, calc(100% - 24px)); margin: auto; padding: clamp(1rem, 4vw, 1.75rem); border: 1px solid var(--crp-line); overscroll-behavior: contain; }
[data-crp-portal] .crp-address-modal::backdrop { background: rgb(31 17 43 / .54); }
[data-crp-portal] .crp-address-feedback:empty { display: none; }
[data-crp-portal] .crp-address-feedback { color: var(--crp-muted); font-size: .9375rem; }
[data-crp-portal] .crp-address-modal h1 { margin: 0 3rem 1rem 0; font-size: clamp(1.25rem, 4vw, 1.75rem); text-align: start; }
[data-crp-portal] .crp-address-modal .crp-modal-close { width: 44px; height: 44px; top: .5rem; right: .5rem; }
[data-crp-portal] .crp-address-form :is(input, textarea) { min-height: 44px; padding: .65rem .85rem; font-size: 1rem; }
[data-crp-portal] .crp-address-form textarea { min-height: 5rem; }
[data-crp-portal] .crp-address-form .crp-button { min-height: 48px; padding: .65rem .85rem; font-size: 1rem; }

[data-crp-portal] :where(a, button):focus-visible { outline: 2px solid #8050a2; outline-offset: 3px; }

@media (max-width: 1100px) {
  body [data-crp-portal] .crp-portal-main .crp-public-split__content { grid-row: 1 !important; }
  body [data-crp-portal] .crp-portal-app--public .crp-login-visual { grid-row: 2 !important; }
}

@media (max-width: 680px) {
  [data-crp-portal] .crp-account-layout { grid-template-columns: minmax(0, 1fr); }
  [data-crp-portal] .crp-consultation-actions .crp-button { flex: 1 1 100%; }
  body [data-crp-portal] .crp-portal-main .crp-public-split__content { padding: 1.5rem var(--crp-portal-gutter) !important; }
  body [data-crp-portal] .crp-portal-app--public .crp-login-visual { padding: 1rem var(--crp-portal-gutter) !important; }
  body [data-crp-portal] .crp-portal-app--public .crp-login-visual__inner { grid-template-columns: minmax(0, 1fr) !important; max-width: 38rem; }
  body [data-crp-portal] .crp-portal-app--public .crp-login-visual__inner > :is(h2, p, .crp-feature-list, .crp-trust-badges) { display: none !important; }
  body [data-crp-portal] .crp-portal-app--public .crp-login-visual .crp-consultation-card {
    grid-column: 1 !important;
    grid-template-columns: auto minmax(0, 1fr) !important;
    gap: .65rem !important;
    min-height: 0 !important;
    padding: .65rem .85rem !important;
  }
  body [data-crp-portal] .crp-portal-app--public .crp-login-visual .crp-consultation-card__copy { font-size: .875rem !important; }
}

@media (max-width: 370px) {
  body [data-crp-portal] .crp-portal-app--public .crp-public-header__back { max-width: 42vw; white-space: normal !important; text-align: end; line-height: 1.2 !important; }
  [data-crp-portal] .crp-home-next-copy .crp-button { width: 100%; }
  [data-crp-portal] .crp-booking-steps span { padding-inline: .25rem; }
}

[data-crp-theme="patient-dark"] :is(.crp-account-intro p, .crp-account-delivery address) { color: #e2d8e7; }
[data-crp-theme="patient-dark"] .crp-id-status { background: #283c29; color: #e3f4da; }
[data-crp-theme="patient-dark"] .crp-id-status--pending { background: #41334c; color: #f2e4f8; }

/* ------------------------------------------------------------------
 * Patient workspace design layer (1.51)
 * One hierarchy for signed-in screens: plum navigation and primary actions,
 * mint for buying actions and success, white surfaces, 44px+ touch targets.
 * The core stylesheet uses !important widely, so these rules are scoped to
 * the patient app and use it where they must win.
 * ------------------------------------------------------------------ */
[data-crp-portal] {
  --crp-workspace-accent: #351750;
  --crp-workspace-line: #e4dbea;
  --pt-plum: #351750;
  --pt-plum-strong: #24103a;
  --pt-plum-soft: #f5f0f8;
  --pt-plum-tint: #ebe2f1;
  --pt-line: #e4dbea;
  --pt-mint: #cdf7b7;
  --pt-mint-strong: #b2ec95;
  --pt-mint-soft: #f0fbea;
  --pt-page: #fbf9fc;
  --pt-ink: #22152f;
  --pt-muted: #5f5569;
  --pt-ok: #24541a;
  --pt-warn: #6a4a00;
  --pt-warn-bg: #fff4d4;
  --pt-danger: #a12833;
  --pt-danger-bg: #fdecee;
  --pt-radius: 14px;
  --pt-shadow: 0 1px 2px rgb(53 23 80 / .05), 0 8px 24px rgb(53 23 80 / .06);
  --pt-font: var(--crp-brand-font, Poppins, system-ui, -apple-system, "Segoe UI", sans-serif);
}

/* Header: same height and surface on every signed-in screen. */
body [data-crp-portal] .crp-portal-app--public:is(.crp-portal-app--dashboard, .crp-portal-app--account, .crp-portal-app--orders, .crp-portal-app--consultation, .crp-portal-app--review, .crp-portal-app--booking, .crp-portal-app--onboarding, .crp-portal-app--questions, .crp-portal-app--signature) .crp-public-header {
  --crp-public-header-height: 64px;
  background: #fff !important;
  border-bottom: 1px solid var(--pt-line) !important;
  box-shadow: none !important;
  padding-inline: clamp(16px, 3vw, 40px) !important;
}
body [data-crp-portal] .crp-portal-app--public .crp-public-header .crp-public-header__logo { max-height: 36px; width: auto; }
body [data-crp-portal] .crp-portal-app--public .crp-public-header .crp-public-header__avatar {
  width: 44px !important;
  height: 44px !important;
  color: #fff !important;
  background: var(--pt-plum) !important;
}
body [data-crp-portal] .crp-portal-app--public:is(.crp-portal-app--dashboard, .crp-portal-app--account, .crp-portal-app--orders, .crp-portal-app--consultation, .crp-portal-app--review) .crp-portal-main {
  background: var(--pt-page) !important;
}

/* Page width and heading rhythm shared by Home, Account, Orders and Consults. */
body [data-crp-portal] .crp-portal-app--public .crp-portal-main > :is(.crp-workspace-home, .crp-account, .crp-orders) {
  width: 100%;
  max-width: 72rem !important;
  margin-inline: auto !important;
  padding: clamp(1.25rem, 3vw, 2.5rem) clamp(1rem, 4vw, 2rem) clamp(2rem, 4vw, 3rem) !important;
  color: var(--pt-ink);
  font-family: var(--pt-font);
}
body [data-crp-portal] .crp-portal-app--public .crp-portal-main > :is(.crp-consultation-view, .crp-review-complete) {
  padding-inline: clamp(1rem, 4vw, 2rem) !important;
}
body [data-crp-portal] .crp-portal-app--public :is(.crp-workspace-home, .crp-account, .crp-orders, .crp-consultation-view) h1 {
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  color: var(--pt-plum) !important;
  font: 700 clamp(1.75rem, 4vw, 2.25rem)/1.15 var(--pt-font) !important;
  letter-spacing: -.02em;
}
body [data-crp-portal] .crp-portal-app--public :is(.crp-workspace-home, .crp-account, .crp-orders, .crp-consultation-view) h2 {
  color: var(--pt-plum);
  font-family: var(--pt-font);
}

/* Buttons */
body [data-crp-portal] .crp-portal-app--public :is(.crp-workspace-home, .crp-account, .crp-orders, .crp-consultation-view, .crp-review-complete) .crp-button {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  min-height: 48px !important;
  padding: .7rem 1.25rem !important;
  border: 1.5px solid var(--pt-plum) !important;
  border-radius: 12px !important;
  background: var(--pt-plum) !important;
  color: #fff !important;
  box-shadow: none !important;
  font: 600 1rem/1.2 var(--pt-font) !important;
  text-decoration: none !important;
  white-space: normal;
}
body [data-crp-portal] .crp-portal-app--public :is(.crp-workspace-home, .crp-account, .crp-orders, .crp-consultation-view, .crp-review-complete) .crp-button--primary:not(:disabled):hover {
  background: var(--pt-plum-strong) !important;
  border-color: var(--pt-plum-strong) !important;
}
body [data-crp-portal] .crp-portal-app--public :is(.crp-workspace-home, .crp-account, .crp-orders, .crp-consultation-view, .crp-review-complete) .crp-button--secondary {
  background: #fff !important;
  border-color: var(--pt-line) !important;
  color: var(--pt-plum) !important;
}
body [data-crp-portal] .crp-portal-app--public :is(.crp-workspace-home, .crp-account, .crp-orders, .crp-consultation-view, .crp-review-complete) .crp-button--secondary:not(:disabled):hover {
  background: var(--pt-plum-soft) !important;
  border-color: var(--pt-plum) !important;
}
body [data-crp-portal] .crp-portal-app--public :is(a, button, input, select, textarea):focus-visible {
  outline: 3px solid var(--pt-plum) !important;
  outline-offset: 2px !important;
}

/* Status badges used by orders and ID review. */
body [data-crp-portal] .crp-order-status {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 .7rem !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: var(--pt-plum-soft) !important;
  color: var(--pt-plum) !important;
  font: 600 .8125rem/1.2 var(--pt-font) !important;
}
body [data-crp-portal] .crp-order-status:is(.crp-order-status--processing, .crp-order-status--completed) { background: var(--pt-mint-soft) !important; color: var(--pt-ok) !important; }
body [data-crp-portal] .crp-order-status:is(.crp-order-status--pending, .crp-order-status--on-hold) { background: var(--pt-warn-bg) !important; color: var(--pt-warn) !important; }
body [data-crp-portal] .crp-order-status:is(.crp-order-status--failed, .crp-order-status--cancelled, .crp-order-status--refunded) { background: var(--pt-danger-bg) !important; color: var(--pt-danger) !important; }

/* ---------- Home (activated account) ---------- */
body [data-crp-portal] .crp-workspace-home { display: grid; gap: clamp(.875rem, 2vw, 1.25rem); }
.crp-workspace-heading p { margin: .35rem 0 0; color: var(--pt-muted); }
.crp-workspace-home [data-crp-allowances-home][hidden] { display: none; }
.crp-workspace-intro {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
  padding: clamp(1.25rem, 3vw, 2rem);
  border-radius: var(--pt-radius);
  background: var(--pt-plum);
  color: #fff;
}
.crp-workspace-intro > div { flex: 1 1 18rem; min-width: 0; }
body [data-crp-portal] .crp-workspace-home .crp-workspace-intro h2 { margin: 0 0 .35rem; color: #fff; font: 700 clamp(1.25rem, 3vw, 1.625rem)/1.25 var(--pt-font); }
.crp-workspace-intro p { margin: 0; color: rgb(255 255 255 / .82); }
body [data-crp-portal] .crp-portal-app--public .crp-workspace-home .crp-workspace-intro .crp-button {
  flex: 0 1 auto;
  min-width: 12rem;
  border-color: var(--pt-mint) !important;
  background: var(--pt-mint) !important;
  color: var(--pt-plum) !important;
}
body [data-crp-portal] .crp-portal-app--public .crp-workspace-home .crp-workspace-intro .crp-button:hover { border-color: var(--pt-mint-strong) !important; background: var(--pt-mint-strong) !important; }
body [data-crp-portal] .crp-portal-app--public .crp-workspace-home .crp-workspace-intro .crp-button:focus-visible { outline-color: var(--pt-mint) !important; }
.crp-workspace-status { padding: 1rem 1.25rem; border: 1px solid var(--pt-line); border-radius: var(--pt-radius); background: #fff; }
.crp-workspace-status dl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem 1.5rem; margin: 0; }
.crp-workspace-status dt { color: var(--pt-muted); font-size: .8125rem; font-weight: 600; }
.crp-workspace-status dd { margin: .15rem 0 0; color: var(--pt-ink); font-weight: 650; overflow-wrap: anywhere; }
.crp-status-text--verified { color: var(--pt-ok) !important; }
.crp-status-text--pending { color: var(--pt-warn) !important; }
.crp-status-text--missing, .crp-status-text--resubmit { color: var(--pt-danger) !important; }
.crp-workspace-actions { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(.625rem, 2vw, 1rem); }
.crp-workspace-actions button,
.crp-workspace-rewards {
  display: flex;
  align-items: center;
  gap: .875rem;
  min-width: 0;
  min-height: 72px;
  padding: 1rem;
  border: 1px solid var(--pt-line);
  border-radius: var(--pt-radius);
  background: #fff;
  color: var(--pt-ink);
  box-shadow: var(--pt-shadow);
  font: inherit;
  line-height: 1.35;
  text-align: start;
  cursor: pointer;
}
.crp-workspace-actions button { flex-direction: column; align-items: flex-start; justify-content: flex-start; min-height: 132px; }
.crp-workspace-actions button:hover, .crp-workspace-rewards:hover { border-color: var(--pt-plum); background: var(--pt-plum-soft); }
.crp-workspace-actions strong, .crp-workspace-rewards strong { display: block; color: var(--pt-ink); font-weight: 650; overflow-wrap: anywhere; }
.crp-workspace-actions small, .crp-workspace-rewards small { display: block; margin-top: .15rem; color: var(--pt-muted); font-size: .875rem; overflow-wrap: anywhere; }
.crp-workspace-icon { display: grid; flex: none; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--pt-plum-soft); color: var(--pt-plum); }
.crp-workspace-icon .crp-icon { width: 24px; height: 24px; }
.crp-workspace-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(.625rem, 2vw, 1rem); }
.crp-workspace-rewards { width: 100%; margin: 0; }
.crp-workspace-rewards > span:nth-child(2) { flex: 1; min-width: 0; }
.crp-workspace-rewards > .crp-icon { width: 20px; height: 20px; color: var(--pt-muted); }
.crp-workspace-rewards:not(.crp-workspace-help) { border-color: #d5ecc8; background: var(--pt-mint-soft); }
.crp-workspace-rewards:not(.crp-workspace-help) .crp-workspace-icon { background: var(--pt-mint); }
.crp-workspace-order {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto auto;
  align-items: center;
  gap: .75rem 1.25rem;
  padding: 1rem 1.25rem;
  border: 1px solid var(--pt-line);
  border-radius: var(--pt-radius);
  background: #fff;
}
body [data-crp-portal] .crp-workspace-home .crp-workspace-order h2 { margin: 0; font-size: 1rem; font-weight: 650; }
.crp-workspace-order p { margin: .1rem 0 0; color: var(--pt-muted); font-size: .875rem; }
@media (max-width: 860px) {
  .crp-workspace-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .crp-workspace-order { grid-template-columns: minmax(0, 1fr) auto; }
  .crp-workspace-order > :is(div, strong) { grid-column: 1; }
  .crp-workspace-order > .crp-order-status { grid-column: 2; grid-row: 1; justify-self: end; }
  .crp-workspace-order > .crp-button { grid-column: 2; grid-row: 2; }
}
@media (max-width: 560px) {
  .crp-workspace-status { padding: .875rem 1rem; }
  .crp-workspace-status dl { gap: .5rem .75rem; }
  .crp-workspace-status dd { font-size: .9375rem; }
  .crp-workspace-actions button { min-height: 120px; padding: .875rem; }
  .crp-workspace-cards { grid-template-columns: minmax(0, 1fr); }
  body [data-crp-portal] .crp-portal-app--public .crp-workspace-home .crp-workspace-intro .crp-button { width: 100%; }
}

/* Allowances on Home */
.crpa-allowances-home { display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); gap: 1rem; padding: 1rem 1.25rem; border: 1px solid var(--pt-line); border-radius: var(--pt-radius); background: #fff; }

/* ---------- Account ---------- */
body [data-crp-portal] .crp-account-intro { align-items: flex-end !important; margin-bottom: clamp(1rem, 2.5vw, 1.5rem) !important; }
body [data-crp-portal] .crp-account-intro p { margin: .35rem 0 0 !important; color: var(--pt-muted) !important; }
body [data-crp-portal] .crp-account-intro .crp-account-state { display: inline-flex; width: fit-content; max-width: 100%; margin-top: .6rem !important; padding: .3rem .75rem; border-radius: 999px; font-size: .875rem; font-weight: 600; }
body [data-crp-portal] .crp-account-state--active { background: var(--pt-mint-soft); color: var(--pt-ok) !important; }
body [data-crp-portal] .crp-account-state--pending { border-radius: 12px !important; background: var(--pt-warn-bg); color: var(--pt-warn) !important; }
body [data-crp-portal] .crp-account-layout { gap: clamp(.875rem, 2vw, 1.25rem) !important; }
body [data-crp-portal] .crp-account-layout .crp-account-card {
  gap: .5rem !important;
  padding: clamp(1rem, 3vw, 1.5rem) !important;
  border: 1px solid var(--pt-line) !important;
  border-radius: var(--pt-radius) !important;
  background: #fff !important;
  box-shadow: var(--pt-shadow) !important;
}
body [data-crp-portal] .crp-account-layout h2 { margin: 0 0 .25rem !important; color: var(--pt-plum) !important; font: 700 1.125rem/1.3 var(--pt-font) !important; }
body [data-crp-portal] .crp-portal-app--public .crp-account-actions .crp-account-row {
  min-height: 56px !important;
  padding: .75rem 1rem !important;
  border: 1px solid var(--pt-line) !important;
  border-radius: 12px !important;
  background: #fff !important;
  color: var(--pt-ink) !important;
  box-shadow: none !important;
  font: 600 1rem/1.3 var(--pt-font) !important;
}
body [data-crp-portal] .crp-portal-app--public .crp-account-actions .crp-account-row:hover { border-color: var(--pt-plum) !important; background: var(--pt-plum-soft) !important; }
body [data-crp-portal] .crp-portal-app--public .crp-account-actions .crp-account-row > span { color: var(--pt-muted); font-size: 1.375rem; line-height: 1; }
body [data-crp-portal] .crp-id-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  width: 100% !important;
  min-height: 56px;
  margin: 0 !important;
  padding: .75rem 1rem !important;
  border: 1px solid var(--pt-line);
  border-radius: 12px !important;
  background: #fff !important;
  color: var(--pt-ink) !important;
  font: 600 1rem/1.3 var(--pt-font) !important;
}
body [data-crp-portal] .crp-id-status strong { padding: .2rem .65rem; border-radius: 999px; font-size: .8125rem; }
body [data-crp-portal] .crp-id-status--verified strong { background: var(--pt-mint-soft); color: var(--pt-ok); }
body [data-crp-portal] .crp-id-status--pending strong { background: var(--pt-warn-bg); color: var(--pt-warn); }
body [data-crp-portal] .crp-portal-app--public .crp-account-delivery button[data-edit-address] {
  min-height: 48px !important;
  padding: .6rem 1.25rem !important;
  border: 1.5px solid var(--pt-line) !important;
  border-radius: 12px !important;
  background: #fff !important;
  color: var(--pt-plum) !important;
  font: 600 1rem/1.2 var(--pt-font) !important;
}
body [data-crp-portal] .crp-portal-app--public .crp-account-delivery button[data-edit-address]:hover { border-color: var(--pt-plum) !important; background: var(--pt-plum-soft) !important; }
body [data-crp-portal] .crp-portal-app--public .crp-account [data-refresh-account] {
  border-color: var(--pt-line) !important;
  background: #fff !important;
  color: var(--pt-plum) !important;
}

/* ---------- Orders ---------- */
body [data-crp-portal] .crp-orders .crp-back {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  min-height: 44px;
  margin: 0 0 .25rem !important;
  padding: 0 .25rem !important;
  border: 0 !important;
  background: none !important;
  color: var(--pt-plum) !important;
  font: 600 .9375rem/1.2 var(--pt-font) !important;
}
body [data-crp-portal] .crp-orders .crp-tabs {
  display: grid !important;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  width: fit-content;
  max-width: 100%;
  gap: 4px !important;
  margin: clamp(1rem, 2.5vw, 1.5rem) 0 !important;
  padding: 4px;
  overflow-x: auto;
  border-radius: 999px;
  background: var(--pt-plum-tint);
}
body [data-crp-portal] .crp-portal-app--public .crp-orders .crp-tabs button {
  flex: 0 0 auto;
  min-height: 44px !important;
  padding: .5rem 1.1rem !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: transparent !important;
  color: var(--pt-plum) !important;
  box-shadow: none !important;
  font: 600 clamp(.8125rem, 3.4vw, .9375rem)/1.2 var(--pt-font) !important;
  white-space: normal !important;
}
@media (max-width: 480px) {
  body [data-crp-portal] .crp-portal-app--public .crp-orders .crp-tabs button { padding: .5rem .6rem !important; }
}
body [data-crp-portal] .crp-portal-app--public .crp-orders .crp-tabs button.is-active { background: #fff !important; box-shadow: 0 1px 4px rgb(53 23 80 / .18) !important; }
body [data-crp-portal] .crp-order-list { display: grid; gap: .75rem; }
body [data-crp-portal] .crp-portal-app--public .crp-order-card,
body [data-crp-portal] .crp-portal-app--public .crp-orders .crp-empty-state,
body [data-crp-portal] .crp-portal-app--public .crp-consultation-card {
  padding: clamp(1rem, 3vw, 1.5rem) !important;
  border: 1px solid var(--pt-line) !important;
  border-radius: var(--pt-radius) !important;
  background: #fff !important;
  box-shadow: var(--pt-shadow) !important;
}
body [data-crp-portal] .crp-order-card header { display: flex; justify-content: space-between; }
body [data-crp-portal] .crp-order-number { display: block; color: var(--pt-ink); font-weight: 700; }
body [data-crp-portal] .crp-order-date { display: block; color: var(--pt-muted); font-size: .875rem; }
body [data-crp-portal] .crp-order-card ul { margin: .75rem 0; padding: .75rem 0 0; border-top: 1px solid var(--pt-line); list-style: none; color: var(--pt-ink); }
body [data-crp-portal] .crp-order-total { color: var(--pt-ink); font-size: 1.125rem; }
body [data-crp-portal] .crp-portal-app--public .crp-orders .crp-empty-state { border-style: dashed !important; box-shadow: none !important; text-align: center; }
body [data-crp-portal] .crp-orders .crp-empty-state h2 { margin: 0 0 .35rem; font-size: 1.25rem; }
body [data-crp-portal] .crp-orders .crp-empty-state p { margin: 0 0 1rem; color: var(--pt-muted); }

/* ---------- Consults ---------- */
body [data-crp-portal] .crp-consultation-view h1 { margin-bottom: clamp(1rem, 2.5vw, 1.5rem) !important; }
body [data-crp-portal] .crp-consultation-view .crp-review-pill {
  display: inline-flex;
  padding: .3rem .75rem !important;
  border-radius: 999px !important;
  background: var(--pt-mint-soft) !important;
  color: var(--pt-ok) !important;
  font: 600 .8125rem/1.2 var(--pt-font) !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
}
body [data-crp-portal] .crp-consultation-card h2 { margin: .75rem 0 .35rem !important; color: var(--pt-ink) !important; font: 700 clamp(1.25rem, 3vw, 1.5rem)/1.3 var(--pt-font) !important; }
body [data-crp-portal] .crp-consultation-card p { color: var(--pt-muted) !important; }
body [data-crp-portal] .crp-consultation-actions { margin-top: 1.25rem; }
body [data-crp-portal] .crp-consultation-actions a.crp-button--primary { border-color: var(--pt-mint) !important; background: var(--pt-mint) !important; color: var(--pt-plum) !important; }

[data-crp-theme="patient-dark"] .crp-workspace-status,
[data-crp-theme="patient-dark"] .crp-workspace-actions button,
[data-crp-theme="patient-dark"] .crp-workspace-rewards { background: #241d29; color: #f7f2fa; border-color: #493c52; }

/* Signed-out header link: keep a full touch target on phones. */
body.crp-page-public-portal [data-crp-portal] .crp-portal-app--public .crp-public-header__back {
  display: inline-flex !important;
  align-items: center;
  min-height: 44px;
  font-size: max(13px, .8125rem) !important;
}

/* ------------------------------------------------------------------
 * Reference-flow layer (1.51): page bands, Home limits and tiles,
 * Account help and log out, Orders list and order details.
 * ------------------------------------------------------------------ */
.crp-visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
body [data-crp-portal] .crp-portal-app--public .crp-portal-main > :is(.crp-workspace-home, .crp-account, .crp-orders, .crp-consultation-view) {
  --pt-pad: clamp(1rem, 4vw, 2rem);
  padding-top: 0 !important;
}
body [data-crp-portal] .crp-page-band {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  align-items: center;
  gap: .5rem;
  margin: 0 calc(var(--pt-pad) * -1) 1rem;
  padding: 1rem var(--pt-pad) 1.25rem;
  border-radius: 0 0 22px 22px;
  background: var(--pt-plum);
  color: #fff;
}
body [data-crp-portal] .crp-portal-app--public .crp-page-band h1 {
  grid-column: 2;
  color: #fff !important;
  font-size: clamp(1.375rem, 5vw, 1.875rem) !important;
  text-align: center;
  overflow-wrap: anywhere;
}
body [data-crp-portal] .crp-page-band h1:focus { outline: none; }
body [data-crp-portal] .crp-page-band__aside { grid-column: 3; justify-self: end; color: rgb(255 255 255 / .85); font-size: .8125rem; font-weight: 600; white-space: nowrap; }
body [data-crp-portal] .crp-page-band:has(.crp-page-band__aside) { grid-template-columns: 44px minmax(0, 1fr) auto; }
body [data-crp-portal] .crp-portal-app--public .crp-band-back {
  grid-column: 1;
  grid-row: 1;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 12px !important;
  background: transparent !important;
  color: #fff !important;
  cursor: pointer;
}
body [data-crp-portal] .crp-portal-app--public .crp-band-back:hover { background: rgb(255 255 255 / .1) !important; }
body [data-crp-portal] .crp-portal-app--public .crp-band-back:focus-visible, body [data-crp-portal] .crp-portal-app--public .crp-page-band :focus-visible { outline-color: var(--pt-mint) !important; }
@media (min-width: 1024px) {
  body [data-crp-portal] .crp-portal-app--public .crp-portal-main > :is(.crp-workspace-home, .crp-account, .crp-orders, .crp-consultation-view) { padding-top: clamp(1.25rem, 3vw, 2rem) !important; }
  body [data-crp-portal] .crp-page-band { margin-inline: 0; border-radius: 22px; }
}

/* Home band: greeting and brand. */
body [data-crp-portal] .crp-page-band.crp-home-band { grid-template-columns: minmax(0, 1fr) auto; align-items: end; padding-top: 1.25rem; padding-bottom: 1.5rem; }
body [data-crp-portal] .crp-home-band p { margin: 0; color: rgb(255 255 255 / .85); font-size: .9375rem; }
body [data-crp-portal] .crp-portal-app--public .crp-home-band h1 { grid-column: auto; text-align: start; font-size: clamp(1.75rem, 7vw, 2.5rem) !important; }
body [data-crp-portal] .crp-home-band__brand { align-self: start; color: #fff; font-size: 1.125rem; font-weight: 600; letter-spacing: -.01em; }
body [data-crp-portal] .crp-workspace-home { gap: .875rem; }

/* Prescription limits. */
.crp-limits { display: grid; gap: .75rem; padding: 1rem 1.25rem 1.25rem; border: 1px solid var(--pt-line); border-radius: var(--pt-radius); background: #fff; }
body [data-crp-portal] .crp-workspace-home .crp-limits h2 { margin: 0 0 .25rem; padding-bottom: .5rem; border-bottom: 1px solid var(--pt-line); color: var(--pt-ink); font-size: 1rem; font-weight: 650; }
.crp-limit { display: grid; grid-template-columns: minmax(0, 1fr); gap: .2rem; --limit: #4f9a3a; }
.crp-limit--oil { --limit: #c4661b; }
.crp-limit--vapes { --limit: #3a63a8; }
.crp-limit--pastille { --limit: #a8326e; }
.crp-limit p { margin: 0; }
.crp-limit__name { color: var(--pt-ink); font-size: .875rem; font-weight: 600; }
.crp-limit__amount { color: var(--pt-muted); font-size: .875rem; }
.crp-limit__amount strong { color: var(--limit); }
.crp-limit progress { width: 100%; height: 6px; appearance: none; border: 0; border-radius: 999px; background: var(--pt-plum-tint); accent-color: var(--limit); }
.crp-limit progress::-webkit-progress-bar { background: var(--pt-plum-tint); border-radius: 999px; }
.crp-limit progress::-webkit-progress-value { background: var(--limit); border-radius: 999px; }
.crp-limit progress::-moz-progress-bar { background: var(--limit); border-radius: 999px; }

/* Welcome card. */
.crp-welcome-card { display: grid; gap: .4rem; padding: 1.25rem; border: 1px solid #d5ecc8; border-radius: var(--pt-radius); background: var(--pt-mint-soft); }
.crp-welcome-card p { margin: 0; color: var(--pt-muted); }
.crp-welcome-card__eyebrow { color: var(--pt-ink) !important; font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
body [data-crp-portal] .crp-workspace-home .crp-welcome-card h2 { margin: 0; color: var(--pt-ink); font-size: clamp(1.25rem, 4.5vw, 1.5rem); font-weight: 650; line-height: 1.25; }
body [data-crp-portal] .crp-portal-app--public .crp-workspace-home .crp-welcome-card .crp-button { width: 100%; margin-top: .6rem; gap: .5rem; }
.crp-welcome-card .crp-icon { width: 20px; height: 20px; }

/* Tiles: two large shortcuts, then two compact rows. */
.crp-home-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
.crp-home-tile, .crp-home-row, .crp-home-notice {
  display: flex;
  min-width: 0;
  border: 1px solid var(--pt-line);
  border-radius: var(--pt-radius);
  background: #fff;
  color: var(--pt-ink);
  font: inherit;
  text-align: start;
  text-decoration: none;
  cursor: pointer;
}
.crp-home-tile { flex-direction: column; align-items: flex-start; gap: .25rem; min-height: 132px; padding: 1rem; background: var(--pt-plum-soft); }
.crp-home-tile .crp-workspace-icon { margin-bottom: auto; background: #fff; }
.crp-home-tile strong, .crp-home-row strong { font-weight: 650; line-height: 1.25; }
.crp-home-tile small { color: var(--pt-muted); font-size: .8125rem; }
.crp-home-row { align-items: center; gap: .75rem; min-height: 64px; padding: .625rem .875rem; }
.crp-home-row .crp-workspace-icon { width: 40px; height: 40px; }
.crp-home-tile:hover, .crp-home-row:hover, .crp-home-notice:hover { border-color: var(--pt-plum); }
.crp-home-notice { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: .15rem .75rem; min-height: 64px; padding: .875rem 1rem; background: #f1edf3; }
.crp-home-notice__title { display: flex; align-items: center; gap: .5rem; }
.crp-home-notice__title .crp-icon { width: 20px; height: 20px; color: var(--pt-plum); }
.crp-home-notice small { grid-column: 1; color: var(--pt-muted); font-size: .8125rem; }
.crp-home-notice > .crp-icon:last-child { grid-column: 2; grid-row: 1 / span 2; width: 20px; height: 20px; color: var(--pt-muted); }
.crp-home-notice--rewards { background: #fff; }

/* Account summary, help and log out. */
body [data-crp-portal] .crp-account-name { color: var(--pt-ink) !important; font-size: 1.125rem; font-weight: 650; }
body [data-crp-portal] .crp-account-intro p:not(.crp-account-state):not(.crp-account-name) { margin-top: .1rem !important; }
body [data-crp-portal] .crp-portal-app--public .crp-account-actions a.crp-account-row { text-decoration: none !important; }
body [data-crp-portal] .crp-portal-app--public .crp-account-actions .crp-account-row--logout { justify-content: flex-start !important; gap: .6rem !important; color: var(--pt-danger) !important; }
body [data-crp-portal] .crp-account-row--logout .crp-icon { width: 20px; height: 20px; }
body [data-crp-portal] [data-logout-status]:empty { display: none; }
@media (min-width: 900px) {
  body [data-crp-portal] .crp-account-layout { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
}

/* Orders list. */
body [data-crp-portal] .crp-order-rows { display: grid; margin: 0; padding: 0; overflow: hidden; border: 1px solid var(--pt-line); border-radius: var(--pt-radius); background: #fff; list-style: none; }
body [data-crp-portal] .crp-order-rows li + li { border-top: 1px solid var(--pt-line); }
body [data-crp-portal] .crp-portal-app--public .crp-order-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: .15rem .75rem;
  width: 100%;
  min-height: 72px;
  padding: .875rem 1rem !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: #fff !important;
  color: var(--pt-ink) !important;
  font: inherit !important;
  text-align: start;
  cursor: pointer;
}
body [data-crp-portal] .crp-portal-app--public .crp-order-row:hover { background: var(--pt-plum-soft) !important; }
body [data-crp-portal] .crp-order-row__main { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
body [data-crp-portal] .crp-order-row strong { font-weight: 650; }
body [data-crp-portal] .crp-order-row small { grid-column: 1; color: var(--pt-muted); font-size: .8125rem; }
body [data-crp-portal] .crp-order-row__chevron { grid-column: 2; grid-row: 1 / span 2; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--pt-plum-soft); color: var(--pt-plum); }
body [data-crp-portal] .crp-order-row__chevron .crp-icon { width: 18px; height: 18px; }
body [data-crp-portal] .crp-order-row .crp-order-status { min-height: 22px; padding: 0 .5rem !important; font-size: .6875rem !important; letter-spacing: .04em; text-transform: uppercase; }

/* Order details. */
body [data-crp-portal] .crp-order-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; margin: 0 0 1rem; padding: 4px; border-radius: 999px; background: var(--pt-plum-tint); list-style: none; }
body [data-crp-portal] .crp-order-steps li { display: grid; place-items: center; min-height: 36px; border-radius: 999px; color: var(--pt-muted); font-size: .75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
body [data-crp-portal] .crp-order-steps li.is-done { color: var(--pt-plum); }
body [data-crp-portal] .crp-order-steps li[aria-current="step"] { background: var(--pt-plum); color: #fff; }
body [data-crp-portal] .crp-order-steps--status { display: block; padding: 0; background: none; }
body [data-crp-portal] .crp-order-block { padding: 1rem 0; border-bottom: 1px solid var(--pt-line); }
body [data-crp-portal] .crp-orders .crp-order-block h2 { margin: 0 0 .25rem; color: var(--pt-ink); font-size: .9375rem; font-weight: 650; }
body [data-crp-portal] .crp-order-block p { margin: 0; color: var(--pt-ink); }
body [data-crp-portal] .crp-order-items { margin: 0; padding: 0; border-bottom: 1px solid var(--pt-line); list-style: none; }
body [data-crp-portal] .crp-order-items li { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; align-items: start; gap: .75rem; padding: 1rem 0; }
body [data-crp-portal] .crp-order-item__qty { display: grid; place-items: center; width: 28px; height: 28px; border: 1px solid var(--pt-line); border-radius: 6px; font-size: .8125rem; font-weight: 600; }
body [data-crp-portal] .crp-order-item__name { color: var(--pt-ink); font-weight: 600; overflow-wrap: anywhere; }
body [data-crp-portal] .crp-order-item__price { color: var(--pt-ink); font-weight: 600; font-variant-numeric: tabular-nums; }
body [data-crp-portal] .crp-order-totals { margin: 0 0 1.5rem; }
body [data-crp-portal] .crp-order-totals > div { display: flex; justify-content: space-between; gap: 1rem; padding: .875rem 0; border-bottom: 1px solid var(--pt-line); }
body [data-crp-portal] .crp-order-totals dt { color: var(--pt-ink); }
body [data-crp-portal] .crp-order-totals dt small { display: block; color: var(--pt-muted); font-size: .8125rem; }
body [data-crp-portal] .crp-order-totals dd { margin: 0; color: var(--pt-ink); font-variant-numeric: tabular-nums; text-align: end; }
body [data-crp-portal] .crp-order-totals__total :is(dt, dd) { font-weight: 700; }
body [data-crp-portal] .crp-portal-app--public .crp-order-action { width: 100%; gap: .4rem; }
body [data-crp-portal] .crp-order-note { margin: 0; padding: .875rem 1rem; border-radius: 12px; background: var(--pt-plum-soft); color: var(--pt-muted); font-size: .875rem; }
@media (min-width: 1024px) {
  body [data-crp-portal] .crp-order-detail { max-width: 48rem !important; }
}
.crp-home-row { gap: .5rem; padding: .5rem .75rem; }
.crp-home-row strong { font-size: .9375rem; }
.crp-home-row .crp-workspace-icon { width: 36px; height: 36px; border-radius: 10px; }

/* ------------------------------------------------------------------
 * Onboarding and consults (1.51): bands on onboarding screens,
 * Action needed checklist, Consults hub, sign-in screens.
 * ------------------------------------------------------------------ */
body [data-crp-portal] .crp-portal-app--public .crp-portal-main > :is(.crp-form-view, .crp-review-complete, .crp-booking-view, .crp-dashboard--patient-home) {
  --pt-pad: clamp(1rem, 4vw, 2rem);
  padding-top: 0 !important;
  padding-inline: var(--pt-pad) !important;
}
@media (min-width: 1024px) {
  body [data-crp-portal] .crp-portal-app--public .crp-portal-main > :is(.crp-form-view, .crp-review-complete, .crp-booking-view, .crp-dashboard--patient-home) { padding-top: clamp(1.25rem, 3vw, 2rem) !important; }
}
body [data-crp-portal] .crp-portal-main > .crp-dashboard--patient-home { width: 100%; max-width: 48rem !important; margin-inline: auto !important; display: grid; gap: 1rem; }
body [data-crp-portal] .crp-portal-main > .crp-review-complete .crp-page-band, body [data-crp-portal] .crp-portal-main > .crp-dashboard--patient-home .crp-page-band { margin-bottom: 0; }

/* Action needed and the step checklist. */
.crp-action-needed { display: grid; gap: .1rem; margin: 0; padding: .875rem 1rem; border-radius: 12px; background: #8f2340; color: #fff; text-align: center; }
.crp-action-needed strong { font-size: 1rem; }
.crp-action-needed span { color: rgb(255 255 255 / .9); font-size: .875rem; }
.crp-onboarding-steps { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.crp-onboarding-steps li { position: relative; display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: .875rem; padding-bottom: 1.25rem; }
.crp-onboarding-steps li:not(:last-child)::before { content: ""; position: absolute; top: 34px; bottom: 2px; left: 15px; width: 2px; background: var(--pt-line); }
.crp-onboarding-steps__mark { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--pt-plum); color: #fff; font-size: .875rem; font-weight: 700; }
.crp-onboarding-steps li.is-complete .crp-onboarding-steps__mark { background: var(--pt-mint); color: var(--pt-plum); }
.crp-onboarding-steps__mark .crp-icon { width: 18px; height: 18px; }
.crp-onboarding-steps__body { display: grid; gap: .2rem; min-width: 0; padding: .875rem 1rem; border: 1px solid var(--pt-line); border-radius: var(--pt-radius); background: #fff; box-shadow: var(--pt-shadow); }
.crp-onboarding-steps li.is-complete .crp-onboarding-steps__body { box-shadow: none; background: transparent; border-color: transparent; padding-block: .35rem; }
.crp-onboarding-steps__body strong { color: var(--pt-ink); font-weight: 650; }
.crp-onboarding-steps__body small { color: var(--pt-muted); font-size: .875rem; }
body [data-crp-portal] .crp-portal-app--public .crp-onboarding-steps__body .crp-button { width: 100%; margin-top: .5rem; gap: .35rem; }
body [data-crp-portal] .crp-portal-app--public .crp-onboarding-steps__body .crp-button:disabled { opacity: .55; cursor: not-allowed; }

/* Patient enquiry form and signature. */
body [data-crp-portal] .crp-form-view .crp-form-kicker { margin: 0 0 .25rem !important; color: var(--pt-muted) !important; font-size: .8125rem !important; font-weight: 600; letter-spacing: 0 !important; text-transform: none !important; }
body [data-crp-portal] .crp-portal-app--public .crp-form-view .crp-form-title { margin: .75rem 0 1rem; color: var(--pt-ink); font: 650 clamp(1.25rem, 4.5vw, 1.5rem)/1.25 var(--pt-font); }
body [data-crp-portal] .crp-portal-app--public .crp-form-view .crp-progress { margin: .5rem 0 0 !important; }
body [data-crp-portal] .crp-portal-app--public .crp-step-form > .crp-button, body [data-crp-portal] .crp-portal-app--public .crp-form-view > .crp-button { width: 100%; }
body [data-crp-portal] .crp-portal-app--public .crp-form-view .crp-link-button { display: block; min-height: 44px; margin-inline: auto; }

/* Consults hub. */
body [data-crp-portal] .crp-consultation-view { display: grid; gap: 1rem; align-content: start; }
.crp-book-again { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem 1.5rem; padding: 1.25rem; border: 1px solid #d5ecc8; border-radius: var(--pt-radius); background: var(--pt-mint-soft); }
.crp-book-again > div { flex: 1 1 16rem; }
body [data-crp-portal] .crp-consultation-view .crp-book-again h2 { margin: 0 0 .2rem; color: var(--pt-ink); font-size: 1.125rem; font-weight: 650; }
.crp-book-again p { margin: 0; color: var(--pt-muted); }
body [data-crp-portal] .crp-portal-app--public .crp-book-again .crp-button { flex: 1 1 14rem; }
body [data-crp-portal] .crp-consultation-view .crp-review-pill--muted { background: var(--pt-plum-soft) !important; color: var(--pt-muted) !important; }
body [data-crp-portal] .crp-consultation-card--past { box-shadow: none !important; }

/* Account avatar. */
body [data-crp-portal] .crp-account-intro { flex-wrap: wrap; }
.crp-account-avatar { display: grid; flex: none; place-items: center; width: 64px; height: 64px; border: 3px solid var(--pt-plum); border-radius: 50%; color: var(--pt-plum); font-size: 1.375rem; font-weight: 700; }

/* Address form as a bottom sheet on phones. */
@media (max-width: 639px) {
  body [data-crp-portal] .crp-address-modal[open] { width: 100% !important; max-width: 100% !important; max-height: 92dvh !important; margin: auto 0 0 !important; border-radius: 20px 20px 0 0 !important; padding-bottom: calc(1rem + env(safe-area-inset-bottom)) !important; }
}

/* Verification code boxes. */
body [data-crp-portal] .crp-otp-form .crp-field { position: relative; }
body [data-crp-portal] .crp-otp-form .crp-otp-input { position: absolute !important; inset: auto 0 0 !important; z-index: 1; width: 100% !important; height: 64px !important; min-height: 0 !important; padding: 0 !important; border: 0 !important; background: transparent !important; color: transparent !important; caret-color: transparent; font-size: 16px !important; opacity: .01; }
body [data-crp-portal] .crp-otp-boxes { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .5rem; max-width: 22rem; }
body [data-crp-portal] .crp-otp-boxes > span { display: grid; place-items: center; height: 64px; border: 1.5px solid #cfc2d8; border-radius: 12px; background: #fff; color: var(--pt-ink); font: 600 1.5rem/1 var(--pt-font); font-variant-numeric: tabular-nums; }
body [data-crp-portal] .crp-otp-boxes > span.is-active { border-color: var(--pt-plum); box-shadow: 0 0 0 3px rgb(53 23 80 / .15); }
body [data-crp-portal] .crp-otp-form .crp-otp-input:focus-visible + .crp-otp-boxes { outline: 3px solid var(--pt-plum); outline-offset: 3px; border-radius: 12px; }

/* Sign-in, code and profile screens on phones: one plum screen. */
@media (max-width: 767px) {
  body.crp-page-public-portal [data-crp-portal] .crp-portal-app--public:is(.crp-public-split--login, .crp-public-split--otp, .crp-public-split--register) .crp-portal-main { background: linear-gradient(170deg, #351750 0%, #24103a 100%) !important; }
  body.crp-page-public-portal [data-crp-portal] .crp-portal-app--public:is(.crp-public-split--login, .crp-public-split--otp, .crp-public-split--register) :is(.crp-screening, .crp-screening-content, .crp-public-split__content, .crp-login-card) { background: transparent !important; box-shadow: none !important; border: 0 !important; }
  body.crp-page-public-portal [data-crp-portal] .crp-portal-app--public:is(.crp-public-split--login, .crp-public-split--otp, .crp-public-split--register) .crp-login-card :is(h1, p, label, span, .crp-login-links, .crp-login-links a) { color: #fff !important; }
  body.crp-page-public-portal [data-crp-portal] .crp-portal-app--public:is(.crp-public-split--login, .crp-public-split--otp, .crp-public-split--register) .crp-login-card p { color: rgb(255 255 255 / .85) !important; }
  body.crp-page-public-portal [data-crp-portal] .crp-portal-app--public:is(.crp-public-split--login, .crp-public-split--otp, .crp-public-split--register) .crp-login-card .crp-button--primary { background: var(--pt-mint) !important; border-color: var(--pt-mint) !important; color: var(--pt-plum) !important; box-shadow: none !important; }
  body.crp-page-public-portal [data-crp-portal] .crp-portal-app--public:is(.crp-public-split--login, .crp-public-split--otp, .crp-public-split--register) .crp-login-card .crp-link-button { color: #fff !important; }
  body.crp-page-public-portal [data-crp-portal] .crp-portal-app--public:is(.crp-public-split--login, .crp-public-split--otp, .crp-public-split--register) .crp-login-card .crp-otp-boxes > span { color: var(--pt-ink) !important; }
  body.crp-page-public-portal [data-crp-portal] .crp-portal-app--public:is(.crp-public-split--login, .crp-public-split--otp, .crp-public-split--register) .crp-login-card .crp-form-message--error { color: #ffd2dc !important; }
  body.crp-page-public-portal [data-crp-portal] .crp-portal-app--public:is(.crp-public-split--login, .crp-public-split--otp, .crp-public-split--register) :is(.crp-login-visual, .crp-secure-assurance, .crp-clinical-pathway, .crp-screening-panel) { display: none !important; }
  body.crp-page-public-portal [data-crp-portal] .crp-portal-app--public:is(.crp-public-split--login, .crp-public-split--otp, .crp-public-split--register) .crp-login-card b { color: #ffd2dc !important; }
}
.crp-home-notice--referral { border-color: #d5ecc8; background: var(--pt-mint-soft); }
.crp-home-notice--referral .crp-home-notice__title .crp-icon { color: var(--pt-ok); }
body [data-crp-portal] .crp-login-links a { display: inline-flex; align-items: center; min-height: 44px; }
body.crp-page-public-portal [data-crp-portal] .crp-portal-app--public .crp-public-header__brand { display: inline-flex !important; align-items: center; min-height: 44px; }
body [data-crp-portal] .crp-id-status strong { white-space: nowrap; }
@media (max-width: 400px) {
  body [data-crp-portal] .crp-page-band:has(.crp-page-band__aside) { grid-template-columns: 44px minmax(0, 1fr) 44px; }
  body [data-crp-portal] .crp-page-band__aside { grid-column: 2; grid-row: 2; justify-self: center; }
}

/* ------------------------------------------------------------------
 * Native consultation picker, address search, tracking (1.51)
 * ------------------------------------------------------------------ */
body [data-crp-portal] .crp-picker { display: grid; gap: 1rem; align-content: start; }
body [data-crp-portal] .crp-picker .crp-page-band { margin-bottom: 0; }
.crp-picker__intro { margin: 0; color: var(--pt-muted); font-size: .875rem; text-align: center; }
.crp-picker__body { display: grid; gap: 1rem; }
.crp-picker__skeleton { display: grid; gap: .75rem; }
.crp-picker__skeleton span { height: 56px; border-radius: 12px; background: linear-gradient(90deg, var(--pt-plum-soft) 25%, #fff 50%, var(--pt-plum-soft) 75%) 0 0 / 200% 100%; animation: crp-shimmer 1.2s linear infinite; }
.crp-picker__skeleton span:nth-child(2) { height: 88px; }
.crp-picker__skeleton span:nth-child(3) { height: 220px; }
@keyframes crp-shimmer { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .crp-picker__skeleton span { animation: none; } }
body [data-crp-portal] .crp-picker__practitioner select { width: 100%; min-height: 52px; padding: .6rem 1rem; border: 1px solid var(--pt-line); border-radius: 12px; background: #fff; color: var(--pt-ink); font: 600 1rem/1.2 var(--pt-font); }
.crp-picker__calendar { display: grid; gap: .875rem; padding: 1rem; border: 1px solid var(--pt-line); border-radius: var(--pt-radius); background: #fff; box-shadow: var(--pt-shadow); }
.crp-picker__month { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.crp-picker__month strong { color: var(--pt-ink); }
.crp-picker__month span { display: flex; gap: .25rem; }
body [data-crp-portal] .crp-portal-app--public .crp-picker__month button { display: grid; place-items: center; width: 44px; height: 44px; padding: 0 !important; border: 1px solid var(--pt-line) !important; border-radius: 12px !important; background: #fff !important; color: var(--pt-plum) !important; font-size: 1.375rem; }
.crp-picker__days { display: flex; gap: .5rem; margin: 0 -1rem; padding: 2px 1rem; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity; }
.crp-picker__days::-webkit-scrollbar { display: none; }
body [data-crp-portal] .crp-portal-app--public .crp-picker__days button { display: grid; flex: 0 0 64px; justify-items: center; gap: 2px; min-height: 80px; padding: .5rem .25rem !important; border: 1px solid var(--pt-line) !important; border-radius: 14px !important; background: #fff !important; color: var(--pt-ink) !important; scroll-snap-align: center; }
.crp-picker__days small { color: var(--pt-muted); font-size: .6875rem; font-weight: 600; text-transform: uppercase; }
.crp-picker__days strong { font-size: 1.25rem; line-height: 1.1; }
.crp-picker__days span { min-height: 14px; color: var(--pt-muted); font-size: .625rem; }
.crp-picker__days i { display: block; width: 6px; height: 6px; margin-top: 4px; border-radius: 50%; background: #4f9a3a; }
body [data-crp-portal] .crp-portal-app--public .crp-picker__days button[aria-pressed="true"] { border-color: var(--pt-plum) !important; background: var(--pt-plum) !important; color: #fff !important; }
.crp-picker__days button[aria-pressed="true"] small, .crp-picker__days button[aria-pressed="true"] span { color: rgb(255 255 255 / .8); }
.crp-picker__days button[aria-pressed="true"] i { background: var(--pt-mint); }
body [data-crp-portal] .crp-portal-app--public .crp-picker__days button[aria-disabled="true"] { background: var(--pt-plum-soft) !important; color: var(--pt-muted) !important; cursor: not-allowed; }
.crp-picker__times { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; }
@media (min-width: 640px) { .crp-picker__times { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
body [data-crp-portal] .crp-portal-app--public .crp-picker__times button { min-height: 48px; padding: .5rem !important; border: 1px solid var(--pt-line) !important; border-radius: 12px !important; background: var(--pt-plum-soft) !important; color: var(--pt-ink) !important; font: 600 .9375rem/1.2 var(--pt-font) !important; font-variant-numeric: tabular-nums; }
body [data-crp-portal] .crp-portal-app--public .crp-picker__times button:hover { border-color: var(--pt-plum) !important; }
body [data-crp-portal] .crp-portal-app--public .crp-picker__times button[aria-pressed="true"] { border-color: var(--pt-plum) !important; background: var(--pt-plum) !important; color: #fff !important; }
.crp-picker__none { grid-column: 1 / -1; margin: 0; padding: 1rem; border-radius: 12px; background: var(--pt-plum-soft); color: var(--pt-muted); text-align: center; }
.crp-picker__tz { margin: 0; color: var(--pt-muted); font-size: .8125rem; }
.crp-picker__footer { position: sticky; bottom: calc(var(--pt-tabbar, 64px) + 8px + env(safe-area-inset-bottom)); display: grid; gap: .5rem; padding: .75rem; border-radius: var(--pt-radius); background: rgb(255 255 255 / .96); box-shadow: 0 -4px 18px rgb(53 23 80 / .08); }
@media (min-width: 1024px) { .crp-picker__footer { bottom: 16px; } }
.crp-picker__footer .crp-form-message:empty { display: none; }
body [data-crp-portal] .crp-portal-app--public .crp-picker__footer .crp-button { width: 100%; }
body [data-crp-portal] .crp-portal-app--public .crp-picker__footer .crp-button:disabled { opacity: .45 !important; cursor: not-allowed; }
.crp-picker__confirm { width: min(28rem, calc(100% - 2rem)); padding: 1.5rem; border: 0; border-radius: 20px; box-shadow: 0 24px 64px rgb(36 16 58 / .28); }
.crp-picker__confirm::backdrop { background: rgb(36 16 58 / .5); }
.crp-picker__confirm h2 { margin: 0 0 1rem; color: var(--pt-plum); font: 700 1.25rem/1.3 var(--pt-font); }
.crp-picker__confirm dl { display: grid; gap: 0; margin: 0 0 1rem; border: 1px solid var(--pt-line); border-radius: 12px; overflow: hidden; }
.crp-picker__confirm dl div { display: flex; justify-content: space-between; gap: 1rem; padding: .75rem 1rem; }
.crp-picker__confirm dl div + div { border-top: 1px solid var(--pt-line); }
.crp-picker__confirm dt { color: var(--pt-muted); }
.crp-picker__confirm dd { margin: 0; color: var(--pt-ink); font-weight: 600; text-align: end; }
.crp-picker__confirm .crp-form-message:empty { display: none; }
.crp-picker__confirm-actions { display: grid; grid-template-columns: 1fr 1.4fr; gap: .75rem; }
body [data-crp-portal] .crp-picker__confirm .crp-button { width: 100%; min-height: 48px; border-radius: 12px; font: 600 1rem/1.2 var(--pt-font); cursor: pointer; }
body [data-crp-portal] .crp-picker__confirm .crp-button--primary { border: 1.5px solid var(--pt-plum); background: var(--pt-plum); color: #fff; }
body [data-crp-portal] .crp-picker__confirm .crp-button--secondary { border: 1.5px solid var(--pt-line); background: #fff; color: var(--pt-plum); }
@media (max-width: 639px) {
  .crp-picker__confirm[open] { width: 100%; max-width: 100%; margin: auto 0 0; border-radius: 20px 20px 0 0; padding-bottom: calc(1.5rem + env(safe-area-inset-bottom)); }
}

/* Address search */
.crp-address-search { position: relative; display: grid; gap: .35rem; margin-bottom: 1rem; padding-bottom: 1rem; border-bottom: 1px solid var(--pt-line); }
body [data-crp-portal] .crp-address-search input { width: 100%; min-height: 48px; padding: .65rem .85rem; border: 1.5px solid var(--pt-plum); border-radius: 12px; font-size: 1rem; }
.crp-address-results { position: absolute; z-index: 5; top: calc(100% - 1rem); left: 0; right: 0; max-height: 16rem; margin: 0; padding: .25rem; overflow-y: auto; border: 1px solid var(--pt-line); border-radius: 12px; background: #fff; box-shadow: 0 12px 32px rgb(36 16 58 / .18); list-style: none; }
.crp-address-results[hidden] { display: none; }
.crp-address-results li { display: flex; align-items: center; min-height: 44px; padding: .5rem .75rem; border-radius: 8px; color: var(--pt-ink); cursor: pointer; }
.crp-address-results li:hover, .crp-address-results li:focus { outline: none; background: var(--pt-plum-soft); }
.crp-address-results li:focus-visible { box-shadow: inset 0 0 0 2px var(--pt-plum); }
.crp-address-hint { margin: 0; color: var(--pt-muted); font-size: .8125rem; }

/* Order tracking and closed orders */
body [data-crp-portal] .crp-order-tracking p { font-weight: 600; }
body [data-crp-portal] .crp-order-tracking small { color: var(--pt-muted); font-weight: 400; }
body [data-crp-portal] .crp-order-note--cancelled, body [data-crp-portal] .crp-order-note--failed { background: var(--pt-danger-bg); color: var(--pt-danger); }
body [data-crp-portal] .crp-order-note--refunded { background: var(--pt-warn-bg); color: var(--pt-warn); }
body [data-crp-portal] .crp-picker__confirm .crp-button--primary { border-color: var(--pt-plum) !important; background: var(--pt-plum) !important; color: #fff !important; }
body [data-crp-portal] .crp-picker__confirm .crp-button--secondary { border-color: var(--pt-line) !important; background: #fff !important; color: var(--pt-plum) !important; }
body [data-crp-portal] .crp-picker__confirm .crp-button:disabled { opacity: .5; cursor: not-allowed; }
.crp-picker__calendar { margin-bottom: .25rem; }
.crp-picker__tz { padding-bottom: .25rem; }
.crp-picker__footer { margin-top: .25rem; }
body [data-crp-portal] .crp-success-notice { margin: 0; padding: .875rem 1rem; border-radius: 12px; background: var(--pt-mint-soft); color: var(--pt-ok); font-weight: 600; }
body [data-crp-portal] .crp-success-notice:focus { outline: none; }

.crp-account-refresh { display: grid; justify-items: end; gap: .35rem; }
[data-crp-portal] .crp-account-intro .crp-account-refresh__note { margin: 0; color: var(--pt-muted, #5f5668); font-size: .8125rem; text-align: right; }
[data-crp-portal] .crp-account-intro .crp-account-refresh__note:empty { display: none; }
@media (max-width: 639px) { .crp-account-refresh { justify-items: stretch; grid-column: 1 / -1; } [data-crp-portal] .crp-account-intro .crp-account-refresh__note { text-align: left; } }

/* Prescription ("script") view and prescriber line on order items. */
.crp-order-item__script { display: block; margin-top: .2rem; color: var(--pt-muted, #5f5668); font-size: .8125rem; font-weight: 500; }
body [data-crp-portal] .crp-order-item__script .crp-link-button { display: inline !important; width: auto !important; min-width: 0 !important; min-height: 0 !important; margin: 0 !important; padding: 0 !important; border: 0 !important; border-radius: 0 !important; background: none !important; box-shadow: none !important; color: var(--pt-plum, #351750) !important; font: inherit !important; font-weight: 700 !important; text-align: left !important; text-decoration: underline !important; cursor: pointer; }
.crp-script-items { display: grid; gap: .75rem; margin: 0; padding: 0; list-style: none; }
.crp-script-item { display: grid; gap: .15rem; padding: .875rem 1rem; border: 1px solid var(--pt-line, #e4dbea); border-radius: 12px; background: #fff; }
.crp-script-item strong { color: var(--pt-ink, #22152f); font-size: 1rem; }
.crp-script-item span, .crp-script-item small { color: var(--pt-muted, #5f5668); font-size: .875rem; }
.crp-script-item p { margin: .25rem 0 0; color: var(--pt-ink, #22152f); font-size: .875rem; }
