/* ============================================================
   Affiliate storefront — Checkout
   Multi-step: details → prescription → review → confirmation.
   Editorial palette inherited from editorial.css.
   ============================================================ */

.checkout-main { padding: calc(var(--am-nav-h) + 40px) 0 100px; }
.checkout-grid { display: grid; grid-template-columns: 1fr 392px; gap: 56px; align-items: start; }

/* ---------- stepper ---------- */
.co-steps { display: flex; align-items: center; gap: 0; margin: 6px 0 44px; }
.co-step { display: flex; align-items: center; gap: 13px; }
.co-step .dot {
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  font-size: 14px; font-weight: 650; flex-shrink: 0;
  border: 1px solid var(--ll-border-2); background: var(--ll-surface); color: var(--ll-muted);
  transition: all .25s var(--am-ease);
}
.co-step .dot svg { width: 16px; height: 16px; }
.co-step .lbl { font-size: 13px; font-weight: 600; letter-spacing: .02em; color: var(--ll-muted); white-space: nowrap; }
.co-step.active .dot { background: var(--ll-brand); border-color: var(--ll-brand); color: #fff; }
.co-step.active .lbl { color: var(--ll-ink); }
.co-step.done .dot { background: var(--ll-accent); border-color: var(--ll-accent); color: #fff; }
.co-step.done .lbl { color: var(--ll-ink-2); }
.co-line { flex: 1; height: 1px; background: var(--am-line); margin: 0 16px; min-width: 24px; }
.co-line.done { background: var(--ll-accent); }

/* ---------- panel ---------- */
.co-panel { display: none; }
.co-panel.active { display: block; animation: coFade .4s var(--am-ease); }
@keyframes coFade { from { transform: translateY(12px); } to { transform: none; } }
@media (prefers-reduced-motion: reduce) { .co-panel.active { animation: none; } }
.co-h { font-family: var(--ll-font-serif); font-weight: 500; letter-spacing: -.025em; font-size: 30px; color: var(--ll-ink); margin: 0 0 6px; line-height: 1.05; }
.co-sub { font-size: 15px; color: var(--ll-muted); margin: 0 0 28px; line-height: 1.6; max-width: 56ch; }

/* ---------- form fields ---------- */
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.db-height-fields {
  grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px;
}
.db-height-fields.has-height-part-two { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.db-height-fields [hidden] { display: none; }
.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 18px; }
.field.col-2 { grid-column: span 2; }
.address-lookup input[aria-invalid="true"] { border-color: var(--ll-danger); }
.address-lookup [role="alert"], [data-address-validation-result][role="alert"] { color: var(--ll-danger); }
.address-lookup-menu { border: 1px solid var(--ll-border-2); border-radius: var(--ll-r-3); background: #fff; overflow: hidden; }
.address-lookup-results { max-height: 240px; overflow-y: auto; overscroll-behavior: contain; }
.address-lookup-menu[hidden], .address-lookup-results[hidden] { display: none; }
.address-lookup-option {
  display: block; width: 100%; padding: 11px 13px; border: 0; border-bottom: 1px solid var(--ll-border);
  background: #fff; color: var(--ll-ink); font: 13px var(--ll-font-sans); text-align: left; cursor: pointer;
}
.address-lookup-option:hover, .address-lookup-option:focus-visible, .address-lookup-option[aria-selected="true"] { background: var(--ll-brand-weak); outline: none; }
.address-lookup-attribution { display: block; height: 18px; width: auto; margin: 10px 12px 6px auto; }
.field label { font-size: 12.5px; font-weight: 600; color: var(--ll-ink-2); letter-spacing: .01em; }
.field label .req { color: var(--ll-accent); }
.field input, .field select, .field textarea {
  font-family: var(--ll-font-sans); font-size: 14.5px; color: var(--ll-ink);
  padding: 13px 14px; border: 1px solid var(--ll-border-2); border-radius: var(--ll-r-3);
  background: var(--ll-surface); outline: none; transition: border-color .15s, box-shadow .15s; width: 100%;
}
.field textarea { resize: vertical; min-height: 84px; line-height: 1.5; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--ll-accent); box-shadow: 0 0 0 3px var(--ll-accent-weak); }
.field input::placeholder, .field textarea::placeholder { color: var(--ll-muted-2); }
.field.err input, .field.err select, .field.err textarea { border-color: var(--ll-danger); box-shadow: 0 0 0 3px var(--ll-danger-weak); }
.state-picker { position: relative; }
.state-picker-trigger {
  width: 100%; min-height: 46px; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 11px 13px; font: inherit; color: var(--ll-ink); text-align: left; background: var(--ll-surface);
  border: 1px solid var(--ll-border-2); border-radius: var(--ll-r-3); cursor: pointer;
}
.state-picker-trigger:focus { outline: none; border-color: var(--ll-accent); box-shadow: 0 0 0 3px var(--ll-accent-weak); }
.state-picker-trigger .placeholder { color: var(--ll-muted-2); }
.state-picker-chevron { color: var(--ll-muted); font-size: 18px; line-height: 1; }
.field.err .state-picker-trigger { border-color: var(--ll-danger); box-shadow: 0 0 0 3px var(--ll-danger-weak); }
.state-picker-menu {
  position: absolute; z-index: 80; top: calc(100% + 7px); left: 0; right: 0; padding: 10px;
  background: var(--ll-surface); border: 1px solid var(--ll-border); border-radius: var(--ll-r-4);
  box-shadow: 0 18px 42px -14px rgba(4, 68, 133, .34);
}
.state-picker-menu[hidden] { display: none; }
.state-picker-search-label { display: block; margin: 0 2px 7px; font-size: 11px !important; color: var(--ll-muted) !important; }
.field .state-picker-search { width: 100%; margin-bottom: 8px; padding: 9px 11px; }
.state-picker-options { max-height: 220px; overflow-y: auto; overscroll-behavior: contain; padding-right: 3px; }
.state-picker-option {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 9px 10px; font: inherit; font-size: 13.5px; color: var(--ll-ink-2); text-align: left;
  background: transparent; border: 0; border-radius: var(--ll-r-2); cursor: pointer;
}
.state-picker-option:hover, .state-picker-option:focus { outline: none; background: var(--ll-brand-weak); color: var(--ll-brand); }
.state-picker-option[aria-selected="true"] { font-weight: 650; color: var(--ll-brand); }
.state-picker-option small { color: var(--ll-muted); font-size: 11.5px; font-weight: 650; }
.state-picker-empty { padding: 14px 10px; color: var(--ll-muted); font-size: 13px; text-align: center; }
.state-picker-empty[hidden], .state-picker-option[hidden] { display: none; }
.address-picker-selection { display: flex; align-items: center; gap: 12px; min-width: 0; flex: 1; }
.address-picker-copy { display: flex; flex-direction: column; gap: 4px; min-width: 0; overflow-wrap: anywhere; }
.address-picker-copy strong { font-size: 14px; font-weight: 600; }
.address-picker-copy > span { font-size: 12px; font-weight: 400; line-height: 1.5; color: var(--ll-muted); }
.address-picker .state-picker-trigger { min-height: 68px; }
.address-picker .state-picker-options { max-height: 280px; }
.address-picker .state-picker-option { min-height: 62px; padding: 12px; }
.address-picker .state-picker-option[aria-selected="true"] { background: var(--ll-brand-weak); }
.address-picker .address-picker-badge { flex-shrink: 0; padding: 3px 7px; border-radius: var(--ll-r-2); background: var(--ll-brand-weak); color: var(--ll-brand); font-size: 11px; }
.address-picker [data-picker-pinned] { position: sticky; bottom: 0; margin-top: 6px; border-top: 1px solid var(--ll-border); border-radius: 0; background: var(--ll-surface); color: var(--ll-brand); }
.address-picker [data-picker-pinned]:hover, .address-picker [data-picker-pinned]:focus { background: var(--ll-brand-weak); }
.field .hint { font-size: 11.5px; color: var(--ll-muted-2); }
.field .errmsg { font-size: 11.5px; color: var(--ll-danger); font-weight: 550; display: none; }
.field.err .errmsg { display: block; }

.co-section-label { font-size: 11.5px; letter-spacing: .18em; text-transform: uppercase; font-weight: 700; color: var(--ll-muted-2); margin: 30px 0 16px; padding-top: 24px; border-top: 1px solid var(--am-line); }
.co-section-label:first-child { margin-top: 0; padding-top: 0; border-top: none; }

/* ---------- medication safety intake ---------- */
.clinical-intake { display: grid; gap: 14px; }
.clinical-intake-intro { margin: -4px 0 16px; color: var(--ll-muted); font-size: 13.5px; line-height: 1.6; max-width: 62ch; }
.clinical-hint { margin: -3px 0 14px; color: var(--ll-muted); font-size: 13px; line-height: 1.55; max-width: 62ch; }
[data-pregnancy-section] { margin-top: 30px; padding-top: 24px; border-top: 1px solid var(--am-line); }
[data-pregnancy-section][hidden], .clinical-details[hidden] { display: none !important; }
.clinical-question {
  min-width: 0; margin: 0; padding: 19px 20px; border: 1px solid var(--ll-border);
  border-radius: var(--ll-r-4); background: var(--ll-surface);
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.clinical-question:focus-within { border-color: color-mix(in srgb, var(--ll-accent) 58%, var(--ll-border)); }
.clinical-question.err { border-color: var(--ll-danger); box-shadow: 0 0 0 3px var(--ll-danger-weak); }
/* Keep the accessible legend inside the card instead of straddling its border. */
.clinical-question > legend { float: left; width: 100%; padding: 0; }
.clinical-question-title { display: block; margin: 0 0 13px; color: var(--ll-ink); font-size: 14.5px; font-weight: 650; line-height: 1.45; }
.clinical-required { color: var(--ll-accent); }
.clinical-choices { clear: both; display: grid; grid-template-columns: repeat(2, minmax(0, 118px)); gap: 9px; }
.clinical-choice {
  display: flex; align-items: center; gap: 9px; min-height: 43px; padding: 10px 13px;
  border: 1px solid var(--ll-border-2); border-radius: var(--ll-r-3); background: var(--ll-surface);
  color: var(--ll-ink-2); cursor: pointer; font-size: 14px; font-weight: 600; line-height: 1.3;
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.clinical-choice:hover { border-color: var(--ll-accent); }
.clinical-choice:has(input:checked) { border-color: var(--ll-accent); background: var(--ll-accent-weak); color: var(--ll-ink); box-shadow: 0 0 0 1px var(--ll-accent) inset; }
.clinical-choice input {
  width: 18px; height: 18px; margin: 0; flex: 0 0 auto; accent-color: var(--ll-accent); cursor: pointer;
}
.clinical-choice:has(input:focus-visible) { outline: 2px solid var(--ll-accent); outline-offset: 2px; }
.clinical-choice input:focus-visible { outline: none; }
.clinical-details { margin-top: 17px; }
.clinical-details .field { margin-bottom: 0; }
.clinical-details .field textarea { min-height: 102px; }
.clinical-error { display: none; margin: 11px 0 0; color: var(--ll-danger); font-size: 11.5px; font-weight: 550; line-height: 1.45; }
.clinical-question.err .clinical-error { display: block; }
.clinical-review-list { display: grid; gap: 0; }
.clinical-review-row { display: grid; grid-template-columns: minmax(145px, .65fr) minmax(0, 1.35fr); gap: 18px; padding: 11px 0; border-bottom: 1px solid var(--ll-hair); }
.clinical-review-row:first-child { padding-top: 0; }
.clinical-review-row:last-child { padding-bottom: 0; border-bottom: none; }
.clinical-review-row > :first-child { color: var(--ll-muted); font-size: 12.5px; font-weight: 600; line-height: 1.5; }
.clinical-review-row > :last-child { min-width: 0; color: var(--ll-ink); font-size: 14px; line-height: 1.55; overflow-wrap: anywhere; }

@media (max-width: 640px) {
  .clinical-question-title, .clinical-choice, .clinical-hint, .clinical-intake-intro { font-size: 16px; }
  .clinical-details .field input, .clinical-details .field textarea { font-size: 16px; }
  .clinical-choice { min-height: 48px; }
  .clinical-choice input { width: 20px; height: 20px; }
  .clinical-review-row > :last-child { font-size: 16px; }
}

/* ---------- Rx required banner ---------- */
.rx-banner {
  display: flex; gap: 16px; align-items: flex-start;
  background: var(--ll-brand); color: #fff; border-radius: var(--ll-r-4);
  padding: 20px 22px; margin-bottom: 30px; position: relative; overflow: hidden;
}
.rx-banner .rb-ic { width: 42px; height: 42px; border-radius: 11px; background: rgba(255,255,255,.13); display: grid; place-items: center; flex-shrink: 0; color: color-mix(in srgb, var(--ll-accent) 55%, #fff); }
.rx-banner .rb-ic svg { width: 22px; height: 22px; }
.rx-banner h4 { margin: 1px 0 5px; font-size: 15.5px; font-weight: 650; letter-spacing: -.01em; }
.rx-banner p { margin: 0; font-size: 13.5px; color: rgba(255,255,255,.76); line-height: 1.55; }

/* ---------- Rx method cards ---------- */
.rx-methods { display: grid; gap: 12px; margin-bottom: 8px; }
.rx-method {
  display: grid; grid-template-columns: auto 1fr auto; gap: 16px; align-items: center;
  padding: 18px 20px; border: 1px solid var(--ll-border-2); border-radius: var(--ll-r-4);
  background: var(--ll-surface); cursor: pointer; transition: border-color .15s, box-shadow .15s, background .15s;
}
.rx-method:hover { border-color: var(--ll-accent); }
.rx-method.active { border-color: var(--ll-accent); box-shadow: 0 0 0 1px var(--ll-accent) inset; background: var(--ll-accent-weak); }
.rx-method .rm-ic { width: 44px; height: 44px; border-radius: 11px; background: var(--am-ice); color: var(--ll-accent); display: grid; place-items: center; flex-shrink: 0; }
.rx-method.active .rm-ic { background: var(--ll-surface); }
.rx-method .rm-ic svg { width: 22px; height: 22px; }
.rx-method .rm-title { font-size: 15.5px; font-weight: 650; color: var(--ll-ink); letter-spacing: -.01em; }
.rx-method .rm-desc { font-size: 13px; color: var(--ll-muted); margin-top: 2px; line-height: 1.45; }
.rx-method .rm-radio { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--ll-border-2); display: grid; place-items: center; transition: all .15s; }
.rx-method .rm-radio::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: #fff; transform: scale(0); transition: transform .15s var(--am-ease); }
.rx-method.active .rm-radio { background: var(--ll-accent); border-color: var(--ll-accent); }
.rx-method.active .rm-radio::after { transform: scale(1); }

/* method detail (revealed) */
.rm-detail { display: none; margin: -2px 0 8px; padding: 22px; border: 1px dashed var(--ll-border-2); border-radius: var(--ll-r-4); background: var(--am-frost); }
.rm-detail.show { display: block; animation: coFade .35s var(--am-ease); }
.rm-detail .rd-title { font-size: 14px; font-weight: 650; color: var(--ll-ink); margin: 0 0 14px; display: flex; align-items: center; gap: 8px; }
.rm-detail .rd-title svg { width: 17px; height: 17px; color: var(--ll-accent); }

/* dropzone */
.dropzone { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; padding: 34px 24px; border: 1.5px dashed var(--ll-border-2); border-radius: var(--ll-r-4); background: var(--ll-surface); cursor: pointer; transition: border-color .15s, background .15s; }
.dropzone:hover, .dropzone.drag { border-color: var(--ll-accent); background: var(--ll-accent-weak); }
.dropzone .dz-ic { width: 50px; height: 50px; border-radius: 13px; background: var(--am-ice); color: var(--ll-accent); display: grid; place-items: center; }
.dropzone .dz-ic svg { width: 25px; height: 25px; }
.dropzone .dz-main { font-size: 14.5px; font-weight: 600; color: var(--ll-ink); }
.dropzone .dz-main b { color: var(--ll-accent); }
.dropzone .dz-sub { font-size: 12px; color: var(--ll-muted); }
.dz-files { display: flex; flex-direction: column; gap: 9px; margin-top: 14px; }
.dz-file { display: flex; align-items: center; gap: 11px; padding: 11px 14px; background: var(--ll-surface); border: 1px solid var(--ll-border); border-radius: var(--ll-r-3); }
.dz-file .ff-ic { width: 32px; height: 32px; border-radius: 8px; background: var(--ll-success-weak); color: var(--ll-success); display: grid; place-items: center; flex-shrink: 0; }
.dz-file .ff-ic svg { width: 17px; height: 17px; }
.dz-file .ff-name { font-size: 13.5px; font-weight: 600; color: var(--ll-ink); flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dz-file .ff-size { font-size: 12px; color: var(--ll-muted); }
.dz-file .ff-rm { background: none; border: none; cursor: pointer; color: var(--ll-muted-2); padding: 4px; display: grid; place-items: center; }
.dz-file .ff-rm:hover { color: var(--ll-danger); }

/* contact info chips (fax/email later) */
.rd-channel { display: flex; align-items: center; gap: 14px; padding: 16px 18px; background: var(--ll-surface); border: 1px solid var(--ll-border); border-radius: var(--ll-r-3); margin-bottom: 12px; }
.rd-channel .rc-ic { width: 40px; height: 40px; border-radius: 10px; background: var(--ll-accent-weak); color: var(--ll-accent); display: grid; place-items: center; flex-shrink: 0; }
.rd-channel .rc-ic svg { width: 20px; height: 20px; }
.rd-channel .rc-lbl { font-size: 12px; color: var(--ll-muted); letter-spacing: .04em; text-transform: uppercase; font-weight: 600; }
.rd-channel .rc-val { font-family: var(--ll-font-mono); font-size: 16px; font-weight: 500; color: var(--ll-ink); margin-top: 2px; }
.rd-note { font-size: 13px; color: var(--ll-ink-2); line-height: 1.6; margin: 14px 0 0; }
.rd-note b { font-weight: 650; }

/* ---------- review ---------- */
.review-block { border: 1px solid var(--ll-border); border-radius: var(--ll-r-4); background: var(--ll-surface); padding: 22px 24px; margin-bottom: 16px; }
.review-block .rv-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.review-block h4 { font-size: 14px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--ll-muted-2); margin: 0; }
.review-block .rv-edit { font-size: 13px; font-weight: 600; color: var(--ll-accent); background: none; border: none; cursor: pointer; }
.review-block .rv-edit:hover { text-decoration: underline; }
.review-block .rv-body { font-size: 14.5px; color: var(--ll-ink-2); line-height: 1.65; }
.review-block .rv-body b { color: var(--ll-ink); font-weight: 600; }
.rv-line { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--ll-hair); }
.rv-line:last-child { border-bottom: none; }
.rv-line .rl-name { flex: 1; font-size: 14px; color: var(--ll-ink); }
.rv-line .rl-name small { color: var(--ll-muted); }
.rv-line .rl-price { font-weight: 650; color: var(--ll-ink); }

/* Coupon savings are confirmed before the order or card is submitted. */
.coupon-block .rv-head { margin-bottom: 8px; }
.coupon-intro { margin: 0 0 16px; color: var(--ll-muted); font-size: 14px; line-height: 1.55; max-width: 60ch; }
.coupon-controls { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.coupon-controls input {
  flex: 1 1 190px; min-width: 0; width: 100%; min-height: 44px; padding: 11px 13px;
  border: 1px solid var(--ll-border-2); border-radius: var(--ll-r-3);
  background: var(--ll-surface); color: var(--ll-ink); font: inherit; font-size: 14px;
}
.coupon-controls input:focus { outline: 2px solid var(--ll-accent); outline-offset: -1px; }
.coupon-controls input[aria-invalid="true"] { border-color: var(--ll-danger); }
.coupon-controls input:read-only { background: var(--ll-success-weak); }
.coupon-controls input:disabled { opacity: .65; }
.coupon-apply { flex-shrink: 0; min-height: 38px; padding: 8px 14px; font-size: 14px; }
.coupon-remove {
  position: relative; flex-shrink: 0; padding: 8px 2px; border: none; background: none;
  color: var(--ll-brand); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
}
.coupon-remove:hover { text-decoration: underline; }
.coupon-remove:focus-visible, .coupon-apply:focus-visible { outline: 2px solid var(--ll-accent); outline-offset: 3px; }
.coupon-remove:disabled, .coupon-apply:disabled { opacity: .55; cursor: not-allowed; }
.coupon-status { margin: 12px 0 0; color: var(--ll-muted); font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
.coupon-status:empty { display: none; }
.coupon-status.is-error { color: var(--ll-danger); }
.coupon-status.is-applied, .coupon-summary, .db-oi-coupon .db-oi-name, .db-oi-coupon .db-oi-price { color: var(--ll-success); }
.coupon-summary { font-variant-numeric: tabular-nums; }
.coupon-summary > span { min-width: 0; overflow-wrap: anywhere; }
.coupon-summary > b { flex-shrink: 0; }
.coupon-summary[hidden], .coupon-controls [hidden] { display: none !important; }
@media (pointer: coarse) {
  .coupon-touch-target { position: absolute; top: 50%; left: 50%; width: max(100%, 48px); height: max(100%, 48px); transform: translate(-50%, -50%); }
  .coupon-apply { min-height: 48px; }
}
@media (max-width: 640px) {
  .coupon-controls { gap: 12px; }
  .coupon-controls input { flex-basis: 100%; font-size: 16px; min-height: 48px; }
  .coupon-intro, .coupon-status, .coupon-apply, .coupon-remove { font-size: 16px; }
  .coupon-apply { flex: 1 1 auto; min-height: 48px; }
  .coupon-remove { min-height: 48px; padding-inline: 12px; }
}

/* payment card stays inside the final review step */
.payment-block { padding: 24px; }
.payment-block .rv-head { margin-bottom: 10px; }
.card-secure { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 650; color: var(--ll-success); }
.card-secure svg { flex-shrink: 0; }
.card-intro { margin: 0 0 18px; color: var(--ll-muted); font-size: 13.5px; line-height: 1.55; max-width: 62ch; }
.card-sandbox { border: 1px solid color-mix(in srgb, var(--ll-warning) 28%, var(--ll-border)); background: var(--ll-warning-weak); color: var(--ll-ink-2); border-radius: var(--ll-r-3); padding: 11px 13px; margin-bottom: 16px; font-size: 12.5px; line-height: 1.5; }
.card-sandbox b { color: var(--ll-warning); margin-right: 4px; }
.card-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 18px; }
.card-choices[hidden], .new-card-form[hidden] { display: none; }
.card-choice { position: relative; display: grid; grid-template-columns: auto 1fr; gap: 11px; align-items: center; min-height: 76px; padding: 14px 15px; border: 1px solid var(--ll-border-2); border-radius: var(--ll-r-3); background: var(--ll-surface); cursor: pointer; transition: border-color .15s, box-shadow .15s, background .15s; }
.card-choice:hover { border-color: var(--ll-accent); }
.card-choice.active { border-color: var(--ll-accent); box-shadow: 0 0 0 1px var(--ll-accent) inset; background: var(--ll-accent-weak); }
.card-choice.disabled { opacity: .55; cursor: not-allowed; border-color: var(--ll-border); background: var(--ll-surface-2); }
.card-choice.disabled:hover { border-color: var(--ll-border); }
.card-choice input { position: absolute; inline-size: 1px; block-size: 1px; opacity: 0; pointer-events: none; }
.card-choice-mark { width: 20px; height: 20px; border: 1.5px solid var(--ll-border-2); border-radius: 50%; background: var(--ll-surface); display: grid; place-items: center; }
.card-choice-mark::after { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--ll-accent); transform: scale(0); transition: transform .15s var(--am-ease); }
.card-choice.active .card-choice-mark { border-color: var(--ll-accent); }
.card-choice.active .card-choice-mark::after { transform: scale(1); }
.card-choice input:focus-visible + .card-choice-mark { outline: 3px solid var(--ll-accent-weak); outline-offset: 2px; }
.card-choice b, .card-choice small { display: block; }
.card-choice b { color: var(--ll-ink); font-size: 13.5px; line-height: 1.35; }
.card-choice small { color: var(--ll-muted); font-size: 11.5px; line-height: 1.4; margin-top: 3px; }
.new-card-form { padding-top: 2px; }
.card-field-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.card-field { min-width: 0; display: flex; flex-direction: column; gap: 7px; margin-bottom: 3px; }
.card-field-wide { grid-column: span 3; }
.card-field label { color: var(--ll-ink-2); font-size: 12.5px; font-weight: 600; letter-spacing: .01em; }
.card-field .req { color: var(--ll-accent); }
.card-field input { width: 100%; padding: 13px 14px; border: 1px solid var(--ll-border-2); border-radius: var(--ll-r-3); background: var(--ll-surface); color: var(--ll-ink); outline: none; font: 14.5px var(--ll-font-sans); transition: border-color .15s, box-shadow .15s; }
.card-field input:focus { border-color: var(--ll-accent); box-shadow: 0 0 0 3px var(--ll-accent-weak); }
.card-field input::placeholder { color: var(--ll-muted-2); }
.card-field.err input { border-color: var(--ll-danger); box-shadow: 0 0 0 3px var(--ll-danger-weak); }
.card-hint, .card-error { min-height: 15px; font-size: 11.5px; line-height: 1.35; }
.card-hint { color: var(--ll-muted-2); }
.card-error { display: none; color: var(--ll-danger); font-weight: 550; }
.card-field.err .card-hint { display: none; }
.card-field.err .card-error { display: block; }
.card-default-note { margin: 17px 0 0; padding: 12px 14px; border-radius: var(--ll-r-3); background: var(--am-frost); color: var(--ll-muted); font-size: 12px; line-height: 1.55; }
.card-submit-error { margin-top: 16px; padding: 13px 14px; border: 1px solid color-mix(in srgb, var(--ll-danger) 35%, var(--ll-border)); border-radius: var(--ll-r-3); background: var(--ll-danger-weak); color: var(--ll-danger); font-size: 12.5px; line-height: 1.55; outline: none; }
.card-submit-error[hidden] { display: none; }
.card-submit-error b { font-weight: 700; }
.card-saved-confirmed { display: flex; align-items: flex-start; gap: 12px; padding: 14px 15px; border: 1px solid color-mix(in srgb, var(--ll-success) 28%, var(--ll-border)); border-radius: var(--ll-r-3); background: var(--ll-success-weak); color: var(--ll-success); }
.card-saved-confirmed > svg { flex-shrink: 0; margin-top: 1px; }
.card-saved-confirmed b, .card-saved-confirmed span { display: block; }
.card-saved-confirmed b { color: var(--ll-ink); font-size: 13.5px; }
.card-saved-confirmed span { margin-top: 3px; color: var(--ll-ink-2); font-size: 12px; line-height: 1.5; }

.consent { display: flex; align-items: flex-start; gap: 12px; padding: 18px 20px; background: var(--am-frost); border: 1px solid var(--am-line); border-radius: var(--ll-r-4); margin: 4px 0 8px; cursor: pointer; }
.consent input { width: 19px; height: 19px; margin-top: 1px; flex-shrink: 0; accent-color: var(--ll-accent); cursor: pointer; }
.consent label { font-size: 13.5px; color: var(--ll-ink-2); line-height: 1.55; cursor: pointer; }
.consent label a { color: var(--ll-accent); text-decoration: underline; text-underline-offset: 2px; }
.consent.err { border-color: var(--ll-danger); }
.insurance-intro { margin: 0; color: var(--ll-muted); font-size: 13.5px; line-height: 1.55; }
.insurance-optional { color: var(--ll-muted); font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.insurance-options { display: grid; gap: 10px; margin: 18px 0 10px; }
.insurance-option { display: grid; grid-template-columns: auto 1fr auto auto; gap: 14px; align-items: center; border: 1px solid var(--ll-border); border-radius: var(--ll-r-4); padding: 15px 17px; margin: 0; background: var(--ll-surface); cursor: pointer; transition: border-color .16s var(--am-ease), background .16s var(--am-ease), box-shadow .16s var(--am-ease); }
.insurance-option:hover { border-color: var(--ll-accent); }
.insurance-option.active { border-color: var(--ll-accent); background: color-mix(in srgb, var(--ll-accent) 5%, var(--ll-surface)); box-shadow: 0 0 0 1px color-mix(in srgb, var(--ll-accent) 24%, transparent); }
.insurance-icon { width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; color: var(--ll-brand); background: var(--ll-brand-weak); }
.insurance-copy { display: flex; flex-direction: column; gap: 3px; }
.insurance-copy b { color: var(--ll-ink); font-size: 14px; }
.insurance-copy small { color: var(--ll-muted); font-size: 12px; line-height: 1.45; }
.insurance-price { color: var(--ll-ink); font-weight: 700; }
.insurance-option input { width: 18px; height: 18px; accent-color: var(--ll-accent); }
.insurance-note { margin: 0; color: var(--ll-muted-2); font-size: 12px; line-height: 1.5; }

/* ---------- nav buttons ---------- */
.co-actions { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 30px; }
.co-actions .co-back { background: none; border: none; cursor: pointer; font-family: var(--ll-font-sans); font-size: 14.5px; font-weight: 600; color: var(--ll-muted); display: inline-flex; align-items: center; gap: 8px; padding: 8px 4px; }
.co-actions .co-back:hover { color: var(--ll-ink); }
.co-actions .co-back svg { width: 16px; height: 16px; transform: rotate(180deg); }
.co-actions .co-back:disabled { opacity: 0; pointer-events: none; }

/* ---------- summary sidebar ---------- */
.co-summary { position: sticky; top: calc(var(--am-nav-h) + 24px); border: 1px solid var(--ll-border); border-radius: var(--ll-r-5); background: var(--ll-surface); overflow: hidden; box-shadow: var(--ll-sh-1); }
.cs-head { padding: 20px 24px; border-bottom: 1px solid var(--ll-hair); display: flex; align-items: center; justify-content: space-between; }
.cs-head h3 { font-family: var(--ll-font-serif); font-weight: 500; font-size: 19px; letter-spacing: -.02em; margin: 0; color: var(--ll-ink); }
.cs-head a { font-size: 12.5px; font-weight: 600; color: var(--ll-accent); }
.cs-body { padding: 8px 24px; max-height: 320px; overflow-y: auto; }
.cs-line { display: grid; grid-template-columns: 42px 1fr auto; gap: 13px; padding: 15px 0; border-bottom: 1px solid var(--ll-hair); }
.cs-line:last-child { border-bottom: none; }
.cs-line .csl-name { font-size: 14px; font-weight: 600; color: var(--ll-ink); }
.cs-line .csl-meta { font-size: 12px; color: var(--ll-muted); margin-top: 2px; }
.cs-line .csl-price { text-align: right; font-size: 14px; font-weight: 650; color: var(--ll-ink); }
.cs-line .csl-price s { display: block; font-size: 11.5px; font-weight: 500; color: var(--ll-muted-2); }
.cs-foot { padding: 18px 24px 22px; border-top: 1px solid var(--ll-border); background: var(--am-frost); }
.cs-row { display: flex; align-items: center; justify-content: space-between; font-size: 13.5px; color: var(--ll-muted); margin-bottom: 8px; }
.cs-row b { color: var(--ll-ink-2); font-weight: 600; }
.cs-row.total { font-size: 17px; color: var(--ll-ink); margin: 12px 0 0; padding-top: 12px; border-top: 1px solid var(--am-line); }
.cs-row.total .tval { font-family: var(--ll-font-serif); font-weight: 500; font-size: 26px; letter-spacing: -.02em; }
.cs-saved { display: flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 650; color: var(--ll-success); background: var(--ll-success-weak); padding: 8px 12px; border-radius: 999px; margin: 14px 0 0; justify-content: center; }
.cs-saved svg { flex-shrink: 0; }
.cs-rxnote { display: flex; gap: 9px; align-items: flex-start; font-size: 11.5px; color: var(--ll-muted); margin-top: 16px; line-height: 1.5; }
.cs-rxnote svg { color: var(--ll-accent); flex-shrink: 0; margin-top: 1px; }

/* ---------- confirmation ---------- */
.co-confirm { max-width: 660px; margin: 0 auto; text-align: center; padding: 20px 0; }
.cc-badge { width: 84px; height: 84px; border-radius: 50%; background: var(--ll-success-weak); color: var(--ll-success); display: grid; place-items: center; margin: 0 auto 26px; }
.cc-badge svg { width: 42px; height: 42px; }
.co-confirm h1 { font-family: var(--ll-font-serif); font-weight: 500; letter-spacing: -.03em; font-size: clamp(32px, 4.4vw, 46px); margin: 0 0 12px; color: var(--ll-ink); line-height: 1.04; }
.co-confirm .cc-lead { font-size: 17px; color: var(--ll-muted); margin: 0 0 8px; line-height: 1.6; }
.cc-order { display: inline-flex; align-items: center; gap: 10px; font-family: var(--ll-font-mono); font-size: 14px; font-weight: 500; color: var(--ll-ink-2); background: var(--ll-surface); border: 1px solid var(--ll-border); border-radius: 999px; padding: 9px 18px; margin: 18px 0 6px; }
.cc-order b { color: var(--ll-accent); }
.cc-card-confirmation { display: flex; width: fit-content; max-width: 100%; align-items: center; justify-content: center; gap: 8px; margin: 10px auto 0; padding: 9px 14px; border: 1px solid color-mix(in srgb, var(--ll-success) 28%, var(--ll-border)); border-radius: 999px; background: var(--ll-success-weak); color: var(--ll-success); font-size: 12.5px; line-height: 1.4; }
.cc-card-confirmation svg { flex-shrink: 0; }
.cc-card-confirmation b { color: var(--ll-ink); }

.cc-rxalert { display: flex; gap: 16px; align-items: flex-start; text-align: left; background: var(--ll-brand); color: #fff; border-radius: var(--ll-r-5); padding: 26px 28px; margin: 34px 0; }
.cc-rxalert .ca-ic { width: 48px; height: 48px; border-radius: 13px; background: rgba(255,255,255,.13); color: color-mix(in srgb, var(--ll-accent) 55%, #fff); display: grid; place-items: center; flex-shrink: 0; }
.cc-rxalert .ca-ic svg { width: 24px; height: 24px; }
.cc-rxalert h3 { margin: 2px 0 7px; font-size: 18px; font-weight: 650; letter-spacing: -.015em; }
.cc-rxalert p { margin: 0; font-size: 14px; color: rgba(255,255,255,.78); line-height: 1.6; }
.cc-rxalert p + p { margin-top: 8px; }

.cc-next { text-align: left; border: 1px solid var(--ll-border); border-radius: var(--ll-r-5); background: var(--ll-surface); padding: 28px 30px; margin-bottom: 30px; }
.cc-next h4 { font-family: var(--ll-font-serif); font-weight: 500; font-size: 20px; letter-spacing: -.02em; margin: 0 0 18px; color: var(--ll-ink); }
.cc-timeline { display: grid; gap: 0; }
.cc-tl { display: grid; grid-template-columns: 38px 1fr; gap: 16px; padding-bottom: 22px; position: relative; }
.cc-tl:not(:last-child)::before { content: ""; position: absolute; left: 18px; top: 38px; bottom: 0; width: 1px; background: var(--am-line); }
.cc-tl:last-child { padding-bottom: 0; }
.cc-tl .tl-dot { width: 37px; height: 37px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; font-size: 14px; font-weight: 700; background: var(--ll-surface); border: 1px solid var(--ll-border-2); color: var(--ll-muted); z-index: 1; }
.cc-tl.cur .tl-dot { background: var(--ll-accent); border-color: var(--ll-accent); color: #fff; }
.cc-tl .tl-body h5 { font-size: 15px; font-weight: 650; color: var(--ll-ink); margin: 7px 0 4px; letter-spacing: -.01em; }
.cc-tl .tl-body p { font-size: 13.5px; color: var(--ll-muted); margin: 0; line-height: 1.55; }
.cc-tl.cur .tl-body h5 { color: var(--ll-accent); }
.cc-confirm-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ---------- empty ---------- */
.co-empty { text-align: center; padding: 90px 20px; max-width: 460px; margin: 0 auto; }
.co-empty .ce-ic { width: 64px; height: 64px; border-radius: 50%; background: var(--ll-surface-2); color: var(--ll-muted-2); display: grid; place-items: center; margin: 0 auto 18px; }
.co-empty h2 { font-family: var(--ll-font-serif); font-weight: 500; font-size: 26px; letter-spacing: -.02em; color: var(--ll-ink); margin: 0 0 8px; }
.co-empty p { font-size: 15px; color: var(--ll-muted); margin: 0 0 22px; line-height: 1.6; }

/* ---------- responsive ---------- */
@media (max-width: 920px){
  .checkout-grid { grid-template-columns: 1fr; gap: 40px; }
  .co-summary { position: static; order: -1; }
  .cs-body { max-height: none; }
}
@media (max-width: 620px){
  .field-grid { grid-template-columns: 1fr; }
  .db-height-fields, .db-height-fields.has-height-part-two { grid-template-columns: 1fr; }
  .field.col-2 { grid-column: span 1; }
  .co-step .lbl { display: none; }
  .co-steps { gap: 0; }
  .co-line { margin: 0 8px; }
  .card-choices, .card-field-grid { grid-template-columns: 1fr; }
  .card-field-wide { grid-column: span 1; }
  .payment-block { padding: 20px; }
  .payment-block .rv-head { align-items: flex-start; gap: 12px; }
  .co-actions { align-items: stretch; }
  .co-actions [data-place] { flex: 1; justify-content: center; white-space: normal; text-align: center; line-height: 1.3; }
  .rx-method { grid-template-columns: auto 1fr; }
  .rx-method .rm-radio { display: none; }
  .cc-rxalert { flex-direction: column; }
  .insurance-option { grid-template-columns: auto 1fr auto; }
  .insurance-price { grid-column: 2; }
  .insurance-option input { grid-column: 3; grid-row: 1 / span 2; }
  .clinical-question { padding: 17px 16px; }
  .clinical-question-title { font-size: 16px; }
  .clinical-review-row { grid-template-columns: 1fr; gap: 4px; }
}

/* ============================================================
   ACCOUNT — sign in / create account
   ============================================================ */
.auth-main { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; }
.auth-aside { position: relative; background: var(--ll-brand); color: #fff; padding: 56px 60px; display: flex; flex-direction: column; overflow: hidden; }
.auth-aside::after { content: ""; position: absolute; inset: 0; background: radial-gradient(120% 90% at 85% 15%, rgba(251,159,8,.22), transparent 60%); pointer-events: none; }
.auth-aside .aa-brand { display: inline-flex; align-items: center; gap: 11px; position: relative; z-index: 1; }
.auth-aside .aa-brand img { height: 30px; width: auto; }
.auth-aside .aa-brand .name { font-family: var(--ll-font-serif); font-size: 20px; font-weight: 500; letter-spacing: -.01em; }
.auth-aside .aa-brand .name b { color: var(--ll-accent); font-weight: 600; }
.auth-aside .aa-body { margin-top: auto; position: relative; z-index: 1; }
.auth-aside .aa-eyebrow { font-size: 12px; letter-spacing: .18em; text-transform: uppercase; font-weight: 700; color: color-mix(in srgb, var(--ll-accent) 70%, #fff); }
.auth-aside h2 { font-family: var(--ll-font-serif); font-weight: 500; letter-spacing: -.025em; font-size: 38px; line-height: 1.08; margin: 14px 0 18px; }
.auth-aside p { font-size: 15.5px; color: rgba(255,255,255,.78); line-height: 1.65; max-width: 40ch; margin: 0; }
.auth-trust { display: flex; flex-direction: column; gap: 13px; margin-top: 30px; position: relative; z-index: 1; }
.auth-trust .at-row { display: flex; align-items: center; gap: 12px; font-size: 14px; color: rgba(255,255,255,.88); }
.auth-trust .at-ic { width: 34px; height: 34px; border-radius: 9px; background: rgba(255,255,255,.13); color: color-mix(in srgb, var(--ll-accent) 55%, #fff); display: grid; place-items: center; flex-shrink: 0; }
.auth-trust .at-ic svg { width: 18px; height: 18px; }

.auth-panel { display: flex; align-items: center; justify-content: center; padding: 48px 40px; overflow-y: auto; }
.auth-card { width: 100%; max-width: 440px; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; background: var(--ll-surface-2); border: 1px solid var(--ll-border); border-radius: 999px; padding: 4px; margin-bottom: 30px; }
.auth-tab { font-family: var(--ll-font-sans); font-size: 14px; font-weight: 600; color: var(--ll-muted); background: none; border: none; cursor: pointer; padding: 11px; border-radius: 999px; transition: all .18s var(--am-ease); }
.auth-tab.active { background: var(--ll-surface); color: var(--ll-ink); box-shadow: var(--ll-sh-1); }
.auth-form { display: none; }
.auth-form.active { display: block; animation: coFade .35s var(--am-ease); }
.auth-h { font-family: var(--ll-font-serif); font-weight: 500; letter-spacing: -.025em; font-size: 27px; color: var(--ll-ink); margin: 0 0 5px; }
.auth-sub { font-size: 14.5px; color: var(--ll-muted); margin: 0 0 26px; line-height: 1.55; }
.auth-card .field-grid { margin-bottom: 4px; }
.auth-row-between { display: flex; align-items: center; justify-content: space-between; margin: -4px 0 20px; }
.auth-check { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ll-ink-2); cursor: pointer; }
.auth-check input { width: 16px; height: 16px; accent-color: var(--ll-accent); cursor: pointer; }
.auth-link { font-size: 13px; font-weight: 600; color: var(--ll-accent); background: none; border: none; cursor: pointer; }
.auth-link:hover { text-decoration: underline; }
.auth-form .btn { width: 100%; justify-content: center; }
.auth-alt { text-align: center; font-size: 13.5px; color: var(--ll-muted); margin: 22px 0 0; }
.auth-alt button { font-weight: 650; color: var(--ll-accent); background: none; border: none; cursor: pointer; font-size: 13.5px; }
.auth-alt button:hover { text-decoration: underline; }
.auth-legal { font-size: 12px; color: var(--ll-muted-2); line-height: 1.55; margin: 18px 0 0; text-align: center; }
.auth-back { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; color: var(--ll-muted); margin-bottom: 26px; }
.auth-back svg { width: 15px; height: 15px; transform: rotate(180deg); }
.auth-back:hover { color: var(--ll-ink); }
.auth-formerr { display: none; align-items: center; gap: 9px; font-size: 13px; font-weight: 550; color: var(--ll-danger); background: var(--ll-danger-weak); border-radius: var(--ll-r-3); padding: 11px 14px; margin-bottom: 18px; }
.auth-formerr.show { display: flex; }
.auth-formerr svg { width: 16px; height: 16px; flex-shrink: 0; }
.pw-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); background: none; border: none; cursor: pointer; color: var(--ll-muted-2); padding: 8px; display: grid; place-items: center; border-radius: 8px; }
.pw-toggle:hover { color: var(--ll-ink-2); }
.pw-toggle svg { width: 18px; height: 18px; }
.pw-toggle.on { color: var(--ll-accent); }

@media (max-width: 860px){
  .auth-main { grid-template-columns: 1fr; }
  .auth-aside { display: none; }
  .auth-panel { padding: 40px 24px; min-height: 100vh; }
}

/* ============================================================
   ACCOUNT DASHBOARD (signed-in)
   ============================================================ */
body.has-dashnav { padding-top: 0; }
.auth-main[hidden], .dash-main[hidden], #acct-nav[hidden] { display: none !important; }
.dash-main { max-width: 1180px; margin: 0 auto; padding: 108px 32px 80px; }
.db-wrap { display: grid; grid-template-columns: 248px 1fr; gap: 34px; align-items: start; }

/* sidebar */
.db-aside { position: sticky; top: 96px; background: var(--ll-surface); border: 1px solid var(--ll-border); border-radius: var(--ll-r-5); padding: 20px; box-shadow: var(--ll-sh-1); }
.db-id { display: flex; align-items: center; gap: 12px; padding: 6px 6px 18px; border-bottom: 1px solid var(--ll-hair); }
.db-avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--ll-brand); color: #fff; display: grid; place-items: center; font-size: 18px; font-weight: 650; flex-shrink: 0; }
.db-idmeta { display: flex; flex-direction: column; min-width: 0; }
.db-idmeta b { font-size: 15px; color: var(--ll-ink); letter-spacing: -.01em; }
.db-idmeta span { font-size: 12.5px; color: var(--ll-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.db-nav { display: flex; flex-direction: column; gap: 3px; margin: 14px 0; }
.db-navitem { display: flex; align-items: center; gap: 11px; font-family: var(--ll-font-sans); font-size: 14.5px; font-weight: 550; color: var(--ll-ink-2); background: none; border: none; cursor: pointer; padding: 11px 12px; border-radius: var(--ll-r-3); text-align: left; transition: all .15s var(--am-ease); }
.db-navitem svg { color: var(--ll-muted); flex-shrink: 0; }
.db-navitem:hover { background: var(--ll-surface-2); }
.db-navitem.active { background: var(--ll-brand); color: #fff; }
.db-navitem.active svg { color: #fff; }
.db-signout { display: flex; align-items: center; gap: 8px; width: 100%; font-family: var(--ll-font-sans); font-size: 14px; font-weight: 600; color: var(--ll-danger); background: none; border: 1px solid var(--ll-border); border-radius: var(--ll-r-3); padding: 10px 12px; cursor: pointer; transition: all .15s var(--am-ease); }
.db-signout svg { transform: rotate(180deg); }
.db-signout:hover { background: var(--ll-danger-weak); border-color: color-mix(in srgb, var(--ll-danger) 30%, transparent); }

/* content */
.db-head { margin-bottom: 24px; }
.db-head h1 { font-family: var(--ll-font-serif); font-weight: 500; letter-spacing: -.025em; font-size: 32px; color: var(--ll-ink); margin: 0 0 6px; }
.db-head p { font-size: 15px; color: var(--ll-muted); margin: 0; }

.db-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 22px; }
.db-stat { display: flex; align-items: center; gap: 14px; background: var(--ll-surface); border: 1px solid var(--ll-border); border-radius: var(--ll-r-4); padding: 18px 20px; box-shadow: var(--ll-sh-1); }
.db-stat .ds-ic { width: 42px; height: 42px; border-radius: 11px; background: var(--ll-brand-weak); color: var(--ll-brand); display: grid; place-items: center; flex-shrink: 0; }
.db-stat b { display: block; font-family: var(--ll-font-serif); font-size: 26px; font-weight: 600; color: var(--ll-ink); line-height: 1; letter-spacing: -.02em; }
.db-stat span { font-size: 13px; color: var(--ll-muted); }

.db-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.db-card { background: var(--ll-surface); border: 1px solid var(--ll-border); border-radius: var(--ll-r-5); padding: 22px; box-shadow: var(--ll-sh-1); }
.db-card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.db-card-head h3 { font-size: 16px; font-weight: 650; color: var(--ll-ink); margin: 0; letter-spacing: -.01em; }
.db-link { display: inline-flex; align-items: center; gap: 5px; font-family: var(--ll-font-sans); font-size: 13px; font-weight: 600; color: var(--ll-accent); background: none; border: none; cursor: pointer; }
.db-link:hover { text-decoration: underline; }

.db-list { display: flex; flex-direction: column; gap: 16px; }

/* status badge */
.db-badge { display: inline-flex; align-items: center; font-size: 12px; font-weight: 650; padding: 5px 11px; border-radius: 999px; white-space: nowrap; }
.db-badge.tone-amber { background: var(--ll-warning-weak); color: var(--ll-warning); }
.db-badge.tone-blue  { background: var(--ll-info-weak); color: var(--ll-info); }
.db-badge.tone-green { background: var(--ll-success-weak); color: var(--ll-success); }
.db-badge.tone-red   { background: var(--ll-danger-weak); color: var(--ll-danger); }

/* order */
.db-order { border: 1px solid var(--ll-border); border-radius: var(--ll-r-4); padding: 18px; background: var(--ll-surface); }
.db-card .db-order { border: none; padding: 0; }
.db-order-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.db-order-no { font-size: 15px; font-weight: 650; color: var(--ll-ink); }
.db-order-date { font-size: 12.5px; color: var(--ll-muted); margin-top: 2px; }
.db-order-items { display: flex; flex-direction: column; gap: 8px; padding: 14px 0; border-top: 1px solid var(--ll-hair); border-bottom: 1px solid var(--ll-hair); }
.db-oi { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; font-size: 14px; }
.db-oi-name { color: var(--ll-ink-2); }
.db-oi-name small { color: var(--ll-muted); font-size: 12.5px; }
.db-oi-price { font-weight: 600; color: var(--ll-ink); font-variant-numeric: tabular-nums; }
.db-order-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; }
.db-order-tot { font-size: 14px; color: var(--ll-muted); }
.db-order-tot b { font-size: 17px; color: var(--ll-ink); margin-left: 4px; }
.db-order-saved { color: var(--ll-success); font-weight: 600; font-size: 12.5px; margin-left: 6px; }
.db-order-controls { display: grid; grid-template-columns: minmax(220px, 1fr) auto; align-items: end; gap: 12px; margin-bottom: 14px; }
.db-order-controls label { display: flex; flex-direction: column; gap: 6px; color: var(--ll-ink-2); font-size: 12.5px; font-weight: 600; }
.db-order-controls input { width: 100%; min-height: 42px; padding: 9px 12px; border: 1px solid var(--ll-border-2); border-radius: 9px; background: var(--ll-surface); color: var(--ll-ink); font: inherit; font-size: 14px; }
.db-order-controls small { padding-bottom: 12px; color: var(--ll-muted); white-space: nowrap; }
.db-order-no-results { padding: 28px; text-align: center; color: var(--ll-muted); }
.db-order-pagination { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin-top: 14px; }
.db-order-pagination span { color: var(--ll-muted); font-size: 13px; }
.db-order-pagination button:disabled { cursor: not-allowed; opacity: .5; }
.db-order-table-wrap { overflow-x: auto; border: 1px solid var(--ll-border); border-radius: var(--ll-r-4); background: var(--ll-surface); }
.db-order-table { width: 100%; min-width: 720px; border-collapse: collapse; text-align: left; }
.db-order-table th, .db-order-table td { padding: 15px; border-bottom: 1px solid var(--ll-hair); vertical-align: top; font-size: 13.5px; }
.db-order-table tbody tr:last-child td { border-bottom: 0; }
.db-order-table th { background: var(--ll-surface-2); color: var(--ll-muted); font-size: 12px; font-weight: 650; white-space: nowrap; }
.db-order-table th button { display: inline-flex; align-items: center; gap: 6px; padding: 0; border: 0; background: none; color: inherit; font: inherit; cursor: pointer; }
.db-order-table th button:hover, .db-order-table th[aria-sort]:not([aria-sort="none"]) button { color: var(--ll-brand); }
.db-order-table th button:focus-visible, .db-order-reorder:focus-visible { outline: 2px solid var(--ll-brand); outline-offset: 3px; border-radius: 2px; }
.db-order-table th button span { font-size: 14px; line-height: 1; }
.db-order-table td:first-child { min-width: 260px; width: 48%; }
.db-order-table td:nth-child(2), .db-order-table td:nth-child(3) { color: var(--ll-ink-2); white-space: nowrap; }
.db-order-table td:nth-child(4) { white-space: nowrap; }
.db-order-table .db-order-no-results { padding: 28px; text-align: center; color: var(--ll-muted); }
.db-order-cell-detail { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.db-order-cell-detail > b { color: var(--ll-ink); font-size: 14px; }
.db-order-breakdown { width: 100%; display: flex; flex-direction: column; gap: 7px; padding: 9px 0; border-top: 1px solid var(--ll-hair); border-bottom: 1px solid var(--ll-hair); }
.db-order-breakdown-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 12px; color: var(--ll-ink-2); }
.db-order-line-label { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.db-order-line-label small, .db-order-tracking { color: var(--ll-muted); font-size: 12px; }
.db-order-line-price { color: var(--ll-ink); font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.db-order-breakdown-subtotal { padding-top: 7px; border-top: 1px solid var(--ll-hair); font-weight: 600; }
.db-order-cost { font-weight: 650; font-variant-numeric: tabular-nums; }
.db-order-reorder { display: inline-flex; align-items: center; gap: 5px; margin-top: 3px; padding: 0; border: 0; background: none; color: var(--ll-accent); font: inherit; font-weight: 600; cursor: pointer; }
.db-order-reorder:hover { text-decoration: underline; }

.btn-sm { padding: 8px 14px; font-size: 13px; }

/* upload CTA */
.db-upcta { display: flex; flex-direction: column; justify-content: center; gap: 16px; background: var(--ll-brand-weak); border-color: color-mix(in srgb, var(--ll-brand) 18%, transparent); }
.db-upcta-txt h3 { font-size: 17px; font-weight: 650; color: var(--ll-brand); margin: 0 0 5px; }
.db-upcta-txt p { font-size: 14px; color: var(--ll-ink-2); margin: 0; line-height: 1.55; }
.db-upcta .btn { align-self: flex-start; }

/* empty */
.db-empty { text-align: center; padding: 44px 24px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.db-empty svg { color: var(--ll-muted-2); margin-bottom: 6px; }
.db-empty h3 { font-size: 17px; font-weight: 650; color: var(--ll-ink); margin: 0; }
.db-empty p { font-size: 14px; color: var(--ll-muted); margin: 0 0 12px; max-width: 34ch; }

/* prescriptions */
.db-upload { margin-bottom: 20px; }
.db-rx-controls { display: grid; grid-template-columns: minmax(220px, 1fr) minmax(170px, 220px) auto; align-items: end; gap: 12px; margin-bottom: 14px; }
.db-rx-controls label { display: flex; flex-direction: column; gap: 6px; color: var(--ll-ink-2); font-size: 12.5px; font-weight: 600; }
.db-rx-controls input, .db-rx-controls select { width: 100%; min-height: 42px; padding: 9px 12px; border: 1px solid var(--ll-border-2); border-radius: 9px; background: var(--ll-surface); color: var(--ll-ink); font: inherit; font-size: 14px; }
.db-rx-controls small { padding-bottom: 12px; color: var(--ll-muted); white-space: nowrap; }
.db-rx-table-wrap { overflow-x: auto; border: 1px solid var(--ll-border); border-radius: var(--ll-r-4); background: var(--ll-surface); }
.db-rx-table { width: 100%; min-width: 680px; border-collapse: collapse; text-align: left; }
.db-rx-table th, .db-rx-table td { padding: 13px 15px; border-bottom: 1px solid var(--ll-hair); vertical-align: middle; font-size: 13.5px; }
.db-rx-table tbody tr:last-child td { border-bottom: 0; }
.db-rx-table th { background: var(--ll-surface-2); color: var(--ll-muted); font-size: 12px; font-weight: 650; white-space: nowrap; }
.db-rx-table th button { display: inline-flex; align-items: center; gap: 5px; padding: 0; border: 0; background: none; color: inherit; font: inherit; cursor: pointer; }
.db-rx-table th button:hover { color: var(--ll-ink); }
.db-rx-table th[aria-sort]:not([aria-sort="none"]) button { color: var(--ll-brand); }
.db-rx-table td:first-child { max-width: 320px; }
.db-rx-table td:nth-child(2), .db-rx-table td:nth-child(4) { color: var(--ll-muted); white-space: nowrap; }
.db-rx-table td:last-child { width: 48px; padding-inline: 8px; }
.db-rx-file { max-width: 100%; display: inline-flex; align-items: center; gap: 8px; appearance: none; border: 0; padding: 0; background: none; color: var(--ll-accent); font: inherit; font-weight: 600; cursor: pointer; }
.db-rx-file span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.db-rx-file svg { flex: 0 0 auto; }
.db-rx-file:hover { text-decoration: underline; }
.db-rx-file:focus-visible { outline: 2px solid var(--ll-brand); outline-offset: 2px; border-radius: 2px; }
.db-rx-no-results { padding-block: 28px !important; text-align: center; color: var(--ll-muted); }
.db-rx-pagination { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin-top: 14px; }
.db-rx-pagination span { color: var(--ll-muted); font-size: 13px; }
.db-rx-pagination button:disabled { cursor: not-allowed; opacity: .5; }
.db-icbtn { background: none; border: none; cursor: pointer; color: var(--ll-muted-2); padding: 8px; border-radius: 8px; display: grid; place-items: center; }
.db-icbtn:hover { background: var(--ll-danger-weak); color: var(--ll-danger); }

.rx-preview-drawer { box-sizing: border-box; inset: 0 0 0 auto; width: min(680px, 94vw); height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; overflow: hidden; border: 0; background: var(--ll-bg); color: var(--ll-ink); box-shadow: -30px 0 80px -30px rgba(24,20,13,.45); }
.rx-preview-drawer[open] { display: flex; flex-direction: column; animation: rx-preview-in .24s var(--am-ease); }
.rx-preview-drawer::backdrop { background: rgba(10,22,36,.42); backdrop-filter: blur(2px); }
.rx-preview-head { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 20px; border-bottom: 1px solid var(--ll-border); }
.rx-preview-head h2 { min-width: 0; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 17px; font-weight: 650; }
.rx-preview-body { flex: 1; min-width: 0; min-height: 0; overflow: hidden; display: grid; place-items: stretch; background: var(--ll-surface-2); }
.rx-preview-frame, .rx-preview-image { grid-area: 1 / 1; box-sizing: border-box; width: 100%; height: 100%; min-width: 0; max-width: 100%; max-height: 100%; border: 0; }
.rx-preview-image { padding: 16px; object-fit: contain; }
.rx-preview-frame[hidden], .rx-preview-image[hidden] { display: none; }
.rx-preview-foot { display: flex; justify-content: flex-end; padding: 14px 20px; border-top: 1px solid var(--ll-border); background: var(--ll-surface); }
@keyframes rx-preview-in { from { transform: translateX(100%); } to { transform: none; } }
@media (prefers-reduced-motion: reduce) { .rx-preview-drawer[open] { animation: none; } }

/* account settings */
.db-settings-shell, .db-settings-card { max-width: 720px; }
.db-address-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; margin-bottom: 18px; padding: 4px; border: 1px solid var(--ll-border); border-radius: 12px; background: var(--ll-surface-2); }
.db-address-tab { min-height: 42px; padding: 9px 16px; border: 0; border-radius: 8px; background: transparent; color: var(--ll-muted); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; transition: background .18s ease, color .18s ease, box-shadow .18s ease; }
.db-address-tab:hover { color: var(--ll-ink); }
.db-address-tab.active { background: var(--ll-surface); color: var(--ll-brand); box-shadow: 0 1px 3px rgba(25, 38, 47, .12); }
.db-address-tab:focus-visible { outline: 2px solid var(--ll-brand); outline-offset: 2px; }
.db-address-panel:focus { outline: none; }
.db-address-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.db-address-actions > span { color: var(--ll-muted); font-size: 13px; }
.db-address-list { display: grid; gap: 14px; }
.db-addr-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.db-addr-buttons { display: flex; align-items: center; gap: 6px; }
.db-addr-tag { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 650; letter-spacing: .02em; text-transform: uppercase; color: var(--ll-brand); }
.db-addr-body { display: flex; flex-direction: column; gap: 3px; }
.db-addr-body b { font-size: 15px; color: var(--ll-ink); margin-bottom: 3px; }
.db-addr-body span { font-size: 14px; color: var(--ll-ink-2); }
.db-form-head { margin-bottom: 22px; padding-bottom: 18px; border-bottom: 1px solid var(--ll-hair); }
.db-form-head h3 { font-size: 18px; font-weight: 650; color: var(--ll-ink); margin: 0 0 4px; letter-spacing: -.01em; }
.db-form-head p { font-size: 13.5px; color: var(--ll-muted); margin: 0; line-height: 1.5; }
.db-profileform .db-form-head + .co-section-label { margin-top: 0; padding-top: 0; border-top: none; }
.db-form-actions { display: flex; align-items: center; gap: 10px; margin-top: 22px; }
.db-form-actions .btn { margin-top: 0; }
/* Shared pending state for profile and address saves. */
.db-form-actions .btn.is-saving { cursor: wait; opacity: .82; pointer-events: none; transform: none; }
.db-form-actions .btn.is-saving::before {
  content: ""; width: 13px; height: 13px; border: 2px solid currentColor; border-right-color: transparent;
  border-radius: 50%; animation: db-save-spin .7s linear infinite;
}
@keyframes db-save-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .db-form-actions .btn.is-saving::before { animation-duration: 1.4s; } }
.db-summary-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding-bottom: 18px; margin-bottom: 20px; border-bottom: 1px solid var(--ll-hair); }
.db-summary-head h3 { font-size: 19px; font-weight: 650; color: var(--ll-ink); margin: 3px 0 0; letter-spacing: -.015em; }
.db-summary-eyebrow { display: block; color: var(--ll-brand); font-size: 11.5px; line-height: 1.2; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; }
.db-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 24px; }
.db-detail { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.db-detail.wide { grid-column: 1 / -1; }
.db-detail span { color: var(--ll-muted); font-size: 12px; font-weight: 600; letter-spacing: .02em; }
.db-detail b { color: var(--ll-ink); font-size: 14.5px; font-weight: 550; overflow-wrap: anywhere; }

@media (max-width: 900px){
  .db-wrap { grid-template-columns: 1fr; }
  .db-aside { position: static; }
  .db-nav { flex-direction: row; flex-wrap: wrap; }
  .db-navitem { flex: 1 1 auto; }
}
@media (max-width: 680px){
  .dash-main { padding: 96px 18px 60px; }
  .db-stats, .db-grid2, .db-detail-grid { grid-template-columns: 1fr; }
  .db-detail.wide { grid-column: auto; }
  .db-addr-top, .db-summary-head { align-items: flex-start; }
  .db-form-actions { align-items: stretch; flex-direction: column; }
  .db-form-actions .btn { justify-content: center; width: 100%; }
  .db-order-controls, .db-rx-controls { grid-template-columns: 1fr; align-items: stretch; }
  .db-order-controls small, .db-rx-controls small { padding-bottom: 0; }
}
