/* Pre-checkout launch options — landing-adjacent public purchase flow */

.checkout-options-page {
  min-height: 100vh;
  background:
    radial-gradient(ellipse 80% 50% at 10% -10%, rgb(222 28 96 / 0.06), transparent 55%),
    radial-gradient(ellipse 60% 40% at 100% 0%, rgb(31 121 200 / 0.07), transparent 50%),
    var(--surface-soft);
}

.co-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgb(255 255 255 / 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-soft);
}

.co-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 68px;
}

.co-header-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.co-secure {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--flavor-green-ink);
  font-size: 0.8125rem;
  font-weight: 700;
}

.co-back {
  color: var(--navy-700);
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
}

.co-back:hover {
  color: var(--berry-600);
}

.co-main {
  padding: clamp(28px, 4vw, 48px) 0 clamp(64px, 8vw, 96px);
}

.co-alert {
  margin-bottom: 20px;
  padding: 12px 14px;
  border-radius: var(--radius);
  border: 1px solid #fecaca;
  background: #fef2f2;
  color: #991b1b;
  font-size: 0.9rem;
}

.co-alert.is-info {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1e3a8a;
}

.co-progress {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin-bottom: 28px;
}

.co-step {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-mute);
  font-size: 0.8125rem;
  font-weight: 700;
}

.co-step span {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: var(--line);
  color: var(--ink-mute);
  font-size: 0.75rem;
}

.co-step.is-active {
  color: var(--navy-800);
}

.co-step.is-active span {
  background: var(--berry-500);
  color: #fff;
}

.co-step.is-done {
  color: var(--flavor-green-ink);
}

.co-step.is-done span {
  background: var(--flavor-green-soft);
  color: var(--flavor-green-ink);
}

.co-hero {
  max-width: 640px;
  margin-bottom: clamp(24px, 3vw, 36px);
}

.co-hero h1 {
  margin: 0;
  color: var(--navy-800);
  font-size: clamp(1.6rem, 2.4vw, 2.15rem);
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.co-lede {
  margin: 12px 0 0;
  color: var(--ink-soft);
  font-size: 1.05rem;
  line-height: 1.55;
  max-width: 58ch;
}

.co-loading {
  padding: 48px 0;
  color: var(--ink-mute);
  font-weight: 600;
}

.co-layout {
  display: grid;
  gap: 28px;
  align-items: start;
}

.co-primary {
  display: grid;
  gap: 1.35rem;
  min-width: 0;
}

.co-card {
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.co-card h2 {
  margin: 0 0 16px;
  color: var(--navy-800);
  font-size: 1.05rem;
}

.co-plan-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.co-plan-top h2 {
  margin: 0;
}

.co-plan-change {
  flex: none;
  color: var(--berry-600);
  font-size: 0.875rem;
  font-weight: 700;
  text-decoration: none;
}

.co-plan-price {
  margin: 8px 0 0;
  color: var(--navy-800);
  font-size: 1.35rem;
  font-weight: 800;
}

.co-plan-price span {
  color: var(--ink-mute);
  font-size: 0.9rem;
  font-weight: 600;
}

.co-plan-trial {
  margin: 6px 0 0;
  color: var(--flavor-green-ink);
  font-size: 0.875rem;
  font-weight: 700;
}

.co-plan-features {
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 6px;
}

.co-plan-features li {
  color: var(--ink-soft);
  font-size: 0.875rem;
}

.co-options {
  display: grid;
  gap: 1.15rem;
}

.co-option {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.85rem;
  align-items: start;
  cursor: pointer;
  border: 2px solid var(--line);
  border-radius: var(--radius-lg);
  background: #fff;
  padding: 0.85rem;
  overflow: hidden;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.co-option:hover {
  border-color: color-mix(in srgb, var(--berry-500) 35%, var(--line));
}

.co-option:has(input:checked) {
  border-color: var(--berry-500);
  box-shadow: 0 0 0 3px rgb(222 28 96 / 0.12);
}

.co-option:has(input:focus-visible) {
  outline: 2px solid var(--navy-700);
  outline-offset: 2px;
}

.co-option:has(input:disabled) {
  opacity: 0.62;
  cursor: not-allowed;
}

.co-option input[type='radio'] {
  position: static;
  opacity: 1;
  pointer-events: auto;
  width: 1.15rem;
  height: 1.15rem;
  margin: 0.35rem 0 0;
  accent-color: var(--berry-500);
  flex: none;
  cursor: inherit;
}

.co-option-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin: 0 0 10px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--berry-500);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.co-option-body {
  display: grid;
  gap: 0;
  min-width: 0;
}

.co-option-body--plain {
  padding: 0.15rem 0.15rem 0.25rem 0;
}

.co-option-img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 200px;
  object-fit: cover;
  object-position: center top;
  background: var(--surface-soft);
  border-radius: 10px;
  pointer-events: none;
}

.co-option-copy {
  padding: 14px 4px 4px;
}

.co-option-body--plain .co-option-copy {
  padding: 0;
}

.co-option-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 10px;
}

.co-option-head strong {
  color: var(--navy-800);
  font-size: 1.05rem;
  line-height: 1.3;
  min-width: 0;
}

.co-option-price {
  flex: none;
  color: var(--berry-600);
  font-size: 0.9rem;
  font-weight: 800;
  white-space: nowrap;
  text-align: right;
}

.co-option-price.is-included {
  color: var(--flavor-green-ink);
}

.co-option-copy > p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.9rem;
  line-height: 1.5;
}

.co-include {
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 4px;
}

.co-include li {
  position: relative;
  padding-left: 16px;
  color: var(--navy-800);
  font-size: 0.82rem;
  font-weight: 600;
}

.co-include li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.45em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--flavor-blue);
}

.co-option-note {
  margin: 12px 0 0 !important;
  color: var(--ink-mute) !important;
  font-size: 0.8rem !important;
  font-weight: 600;
}

.co-option-fine {
  margin: 8px 0 0 !important;
  color: var(--ink-mute) !important;
  font-size: 0.78rem !important;
}

.co-option-warn {
  margin: 10px 0 0;
  color: #991b1b;
  font-size: 0.82rem;
  font-weight: 600;
}

.co-pharmacy-name {
  margin-top: 18px;
  display: grid;
  gap: 8px;
}

.co-pharmacy-name label {
  color: var(--navy-800);
  font-size: 0.875rem;
  font-weight: 700;
}

.co-field-hint {
  display: block;
  margin-top: 2px;
  color: var(--ink-mute);
  font-size: 0.75rem;
  font-weight: 500;
}

.co-pharmacy-name input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font: inherit;
  color: var(--ink);
  background: #fff;
}

.co-pharmacy-name input:focus {
  outline: 2px solid var(--berry-500);
  outline-offset: 1px;
  border-color: transparent;
}

.co-summary {
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.co-summary h3 {
  margin: 0 0 14px;
  color: var(--navy-800);
  font-size: 0.95rem;
}

.co-summary-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 10px;
  color: var(--ink-soft);
  font-size: 0.875rem;
}

.co-summary-row strong {
  color: var(--navy-800);
  font-weight: 700;
  text-align: right;
}

.co-summary-block + .co-summary-block {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line-soft);
}

.co-summary-label {
  margin: 0 0 4px;
  color: var(--navy-800);
  font-size: 0.875rem;
  font-weight: 800;
}

.co-summary-total {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.co-summary-total .co-summary-row {
  color: var(--navy-800);
  font-size: 1rem;
  font-weight: 800;
}

.co-summary-hint {
  margin: 8px 0 0;
  color: var(--ink-mute);
  font-size: 0.75rem;
}

.co-summary--desktop {
  display: none;
}

.co-actions {
  margin-top: 8px;
}

.co-actions .btn {
  width: 100%;
}

.co-actions .btn[disabled] {
  opacity: 0.7;
  cursor: wait;
}

.co-stripe-note {
  margin: 10px 0 0;
  text-align: center;
  color: var(--ink-mute);
  font-size: 0.8rem;
}

.co-addons-lede {
  margin: 0 0 14px;
  color: var(--ink-soft);
  font-size: 0.9rem;
  line-height: 1.5;
}

.co-addons-grid {
  display: grid;
  gap: 10px;
}

.co-addon {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
}

.co-addon__copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.co-addon__copy strong {
  color: var(--navy-800);
  font-size: 0.92rem;
}

.co-addon__copy span {
  color: var(--berry-600);
  font-size: 0.82rem;
  font-weight: 700;
}

.co-addon input[type='number'] {
  width: 4.25rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.4rem 0.45rem;
  font: inherit;
}

.co-billing-disclose h2 {
  margin: 0 0 10px;
  font-size: 1.05rem;
}

.co-disclose-list {
  margin: 0 0 14px;
  padding-left: 1.15rem;
  color: var(--ink-soft);
  font-size: 0.9rem;
  display: grid;
  gap: 6px;
}

.co-accept {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 0.9rem;
  color: var(--navy-800);
  cursor: pointer;
}

.co-accept input {
  margin-top: 0.2rem;
  width: 1.05rem;
  height: 1.05rem;
  accent-color: var(--berry-500);
  flex: none;
}

.co-accept a {
  color: var(--berry-600);
  font-weight: 700;
}

@media (min-width: 960px) {
  .co-layout {
    grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.75fr);
    gap: 36px;
  }

  .co-primary {
    gap: 1.5rem;
  }

  .co-summary--mobile {
    display: none;
  }

  .co-summary--desktop {
    display: block;
    position: sticky;
    top: 92px;
  }

  .co-option-body:not(.co-option-body--plain) {
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
    align-items: stretch;
  }

  .co-option-img {
    max-height: none;
    height: 100%;
    min-height: 220px;
  }

  .co-option-copy {
    padding: 4px 8px 4px 4px;
  }

  .co-option-body--plain .co-option-copy {
    padding: 0;
  }
}

/* ---- Signup funnel shared polish ---- */

.co-narrow {
  max-width: 34rem;
}

.signup-start-form,
.signup-field {
  display: grid;
  gap: 0.45rem;
}

.signup-start-form {
  gap: 1.1rem;
  padding: 1.35rem 1.4rem 1.45rem;
}

.signup-field label {
  font-size: 0.82rem;
  font-weight: 750;
  color: var(--navy-900, #042e58);
}

.signup-field input {
  width: 100%;
  min-height: 2.75rem;
  border: 1px solid var(--line, #dde4ee);
  border-radius: 10px;
  padding: 0.65rem 0.85rem;
  font: inherit;
  color: var(--ink, #10243f);
  background: #fff;
}

.signup-field input:focus {
  outline: none;
  border-color: var(--berry-500, #de1c60);
  box-shadow: 0 0 0 3px rgb(222 28 96 / 0.18);
}

.signup-error {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 600;
  color: #991b1b;
}

.signup-start-actions {
  margin-top: 0.25rem;
}

.signup-lead-chip {
  display: inline-flex;
  margin: 0.75rem 0 0;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: rgb(4 46 88 / 0.06);
  color: var(--navy-700, #0a3d70);
  font-size: 0.82rem;
  font-weight: 650;
}

.signup-price-grid {
  margin-top: 0.5rem;
}

.price-card.is-selected-plan {
  border-color: var(--berry-500, #de1c60);
  box-shadow: 0 0 0 1px var(--berry-500, #de1c60);
}

.co-option-badge--soft {
  background: var(--flavor-green-soft, #e9f7ee);
  color: var(--flavor-green-ink, #15803d);
}

.co-option-badge--optional {
  background: rgb(4 46 88 / 0.06);
  color: var(--navy-700, #0a3d70);
}

.co-reassure {
  margin: 0.85rem 0 0;
  max-width: 36rem;
  color: var(--ink-mute, #5d6c80);
  font-size: 0.86rem;
  line-height: 1.45;
}

.co-option.is-default {
  border-color: rgb(222 28 96 / 0.28);
}

/* Plan radios on launch-options */
.co-plan-trial-note {
  margin: 0 0 0.85rem;
  color: var(--ink-mute, #5d6c80);
  font-size: 0.9rem;
}

.co-plan-options {
  display: grid;
  gap: 0.65rem;
}

.co-plan-option {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.75rem;
  align-items: center;
  margin: 0;
  padding: 0.9rem 1rem;
  border: 1px solid var(--line, #dde4ee);
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.co-plan-option:hover {
  border-color: rgb(222 28 96 / 0.45);
}

.co-plan-option:has(input:checked) {
  border-color: var(--berry-500, #de1c60);
  background: rgb(222 28 96 / 0.04);
  box-shadow: 0 0 0 1px var(--berry-500, #de1c60);
}

.co-plan-option input {
  width: 1.1rem;
  height: 1.1rem;
  accent-color: var(--berry-500, #de1c60);
  margin: 0;
}

.co-plan-option__body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-width: 0;
}

.co-plan-option__body strong {
  font-size: 0.98rem;
  font-weight: 750;
  color: var(--navy-900, #042e58);
}

.co-plan-option__price {
  font-size: 0.98rem;
  font-weight: 800;
  color: var(--navy-900, #042e58);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.co-plan-option__price em {
  font-style: normal;
  font-weight: 650;
  font-size: 0.82rem;
  color: var(--ink-mute, #5d6c80);
}

/* ── Checkout error ── */

.checkout-error-page .co-error-hero {
  max-width: 36rem;
}

.checkout-error-page .co-error-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.25rem;
}

.checkout-error-page .co-error-status {
  margin: 1rem 0 0;
  color: var(--ink-mute, #5d6c80);
  font-weight: 600;
  font-size: 0.92rem;
}
