/* ============================================================
   BORG SITES, Cart / request-to-proceed (light)
   ============================================================ */
.cart-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: clamp(1.4rem,1rem+2vw,2.6rem); align-items: start; }
@media (max-width: 900px) { .cart-grid { grid-template-columns: 1fr; } }

.cart-items { display: grid; gap: .9rem; }
.cart-item { display: grid; grid-template-columns: 1fr auto; gap: 1rem; align-items: start; padding: 1.1rem 1.2rem; }
.cart-item__main { min-width: 0; }
.cart-item__name { font-family: var(--font-display); font-weight: 700; font-size: var(--fs-md); }
.cart-item__desc { color: var(--text-faint); font-size: var(--fs-sm); margin-top: .2rem; }
.cart-item__prices { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; margin-top: .5rem; }
.cart-item__prices .chip { font-size: var(--fs-xs); }
/* the price a waived fee would have been: shown, struck, never dropped */
.cart-item__prices .was { font-size: var(--fs-xs); color: var(--text-faint); text-decoration: line-through; text-decoration-color: rgba(126,135,173,.6); }
.cart-item__right { display: flex; align-items: center; gap: .9rem; }
.cart-item__remove { width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--hairline); color: var(--text-faint); background: var(--ink-1); display: grid; place-items: center; transition: all var(--dur-2) var(--ease); }
.cart-item__remove:hover { color: #B3361A; border-color: rgba(255,107,74,.5); background: rgba(255,107,74,.08); }
.cart-mini-step { display: inline-flex; align-items: center; border: 1px solid var(--hairline); border-radius: var(--radius-pill); overflow: hidden; background: var(--ink-1); }
.cart-mini-step button { width: 32px; height: 32px; color: var(--text); }
.cart-mini-step button:hover { background: var(--grad-soft); }
.cart-mini-step span { min-width: 30px; text-align: center; font-family: var(--font-display); font-weight: 600; font-size: var(--fs-sm); }

.cart-empty { text-align: center; padding: 3rem 1rem; }
.cart-empty img { width: 80px; margin: 0 auto 1.4rem; opacity: .9; }

.cart-summary { position: sticky; top: calc(var(--header-h) + 1.4rem); }
.cart-summary h3 { font-size: var(--fs-md); margin-bottom: 1rem; }
.cart-totals { display: grid; gap: .7rem; padding-bottom: 1rem; border-bottom: 1px solid var(--hairline); margin-bottom: 1rem; }
.cart-totals .row { display: flex; justify-content: space-between; font-size: var(--fs-sm); color: var(--text-dim); }
.cart-totals .row b { font-family: var(--font-display); color: var(--text); }
.cart-totals .row.big b { font-size: var(--fs-lg); }
.cart-due { font-size: var(--fs-xs); color: var(--text-faint); margin: 0 0 1.1rem; }

.checkout-intent { display: grid; gap: .8rem; }
.checkout-intent .form-status { margin-top: .4rem; }

/* ---------- real hosted checkout (single eligible plan/build) ---------- */
.checkout-now { display: grid; gap: .55rem; margin-bottom: 1.1rem; }
/* .btn is nowrap, which is right for every short label. This button is the
   one that can carry a long one (owner test mode appends "(test: $1 per
   line)"), and a 366px unbreakable line would set the whole page min-width
   on a phone. Wrapping costs the ordinary label nothing: "Checkout securely"
   is a single line at every width from 320 up. */
.checkout-now .btn { white-space: normal; }
.checkout-now__note { font-size: var(--fs-xs); color: var(--text-dim); text-align: center; margin: 0; line-height: 1.5; }
.checkout-now .form-status:empty { display: none; }
.checkout-or { display: flex; align-items: center; gap: .8rem; color: var(--text-faint); font-size: var(--fs-xs); margin-top: .25rem; }
.checkout-or::before, .checkout-or::after { content: ""; flex: 1; height: 1px; background: var(--hairline); }
.cart-note-info { font-size: var(--fs-xs); color: var(--text-dim); background: var(--grad-soft); border: 1px solid var(--hairline-soft); border-radius: var(--radius); padding: .6rem .8rem; margin: 0 0 1rem; }

/* ---------- per-line include / exclude controls ---------- */
.cart-item__parts { margin-top: .85rem; display: grid; gap: .4rem; }
.cart-item__parts-head { font-size: var(--fs-xs); color: var(--text-faint); text-transform: uppercase; letter-spacing: .08em; font-weight: 600; margin-bottom: .15rem; }
.part-check { position: relative; display: flex; align-items: center; gap: .6rem; cursor: pointer; padding: .5rem .65rem; border: 1px solid var(--hairline); border-radius: 10px; background: var(--ink-1); transition: border-color var(--dur-2) var(--ease), background var(--dur-2) var(--ease); }
.part-check:hover { border-color: rgba(11,16,49,.2); }
.part-check input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.part-check__box { flex: none; width: 20px; height: 20px; border-radius: 6px; border: 1.5px solid var(--hairline); background: #fff; display: grid; place-items: center; color: #fff; transition: background var(--dur-2) var(--ease), border-color var(--dur-2) var(--ease); }
.part-check__box svg { width: 13px; height: 13px; opacity: 0; }
.part-check input:checked + .part-check__box { background: var(--grad-brand); border-color: transparent; }
.part-check input:checked + .part-check__box svg { opacity: 1; }
.part-check input:focus-visible + .part-check__box { outline: 2px solid var(--brand-1); outline-offset: 2px; }
.part-check__label { font-size: var(--fs-sm); color: var(--text); font-weight: 500; }
.part-check__amt { margin-left: auto; font-family: var(--font-display); font-weight: 700; font-size: var(--fs-sm); color: var(--text); white-space: nowrap; }
.part-check.is-off { background: transparent; }
.part-check.is-off .part-check__label, .part-check.is-off .part-check__amt { color: var(--text-faint); text-decoration: line-through; text-decoration-color: rgba(126,135,173,.6); }

/* ---------- billing period (Hosting & Care lines) ----------
   The same row idiom as .part-check above, with a radio dot instead of a check
   box, so both blocks in one card read as one set of controls. The chosen row
   is tinted as well as dotted: on a two-option choice the tint is what carries
   at a glance. */
.cart-item__billing { margin-top: .85rem; display: grid; gap: .4rem; }
.bill-opt { position: relative; display: flex; align-items: center; gap: .6rem; cursor: pointer; padding: .5rem .65rem; border: 1px solid var(--hairline); border-radius: 10px; background: var(--ink-1); transition: border-color var(--dur-2) var(--ease), background var(--dur-2) var(--ease); }
.bill-opt:hover { border-color: rgba(11,16,49,.2); }
.bill-opt input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.bill-opt__dot { flex: none; width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--hairline); background: #fff; display: grid; place-items: center; transition: border-color var(--dur-2) var(--ease); }
.bill-opt__dot::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--grad-brand); transform: scale(0); transition: transform var(--dur-2) var(--ease); }
.bill-opt input:checked + .bill-opt__dot { border-color: var(--brand-2); }
.bill-opt input:checked + .bill-opt__dot::after { transform: scale(1); }
.bill-opt input:focus-visible + .bill-opt__dot { outline: 2px solid var(--brand-1); outline-offset: 2px; }
.bill-opt__label { font-size: var(--fs-sm); color: var(--text); font-weight: 500; }
.bill-opt.is-on { border-color: var(--brand-2); background: var(--grad-soft); }
.bill-opt.is-on .bill-opt__label { font-weight: 600; }

/* ---------- reassurance + warnings ---------- */
.cart-reassure { font-size: var(--fs-xs); color: var(--text-dim); line-height: 1.6; margin: 0 0 1.1rem; display: grid; gap: .5rem; padding: .9rem 1rem; background: var(--grad-soft); border: 1px solid var(--hairline-soft); border-radius: var(--radius); }
.cart-reassure p { margin: 0; }
.cart-reassure strong { color: var(--text); }
.cart-note-warn { font-size: var(--fs-xs); color: #B3361A; background: rgba(255,107,74,.08); border: 1px solid rgba(255,107,74,.3); border-radius: var(--radius); padding: .6rem .8rem; margin: 0 0 1rem; }
/* owner test mode: a warm amber deliberately OUTSIDE the brand palette, so a
   test notice can never be mistaken for product UI. #5B4200 on #FFF7E6
   measures 8.86:1, and the chip inverts the same two colours for the same
   ratio. */
.cart-note-test { font-size: var(--fs-xs); color: #5B4200; background: #FFF7E6; border: 1px solid #F0C36D; border-radius: var(--radius); padding: .65rem .85rem; margin: 0 0 1rem; line-height: 1.55; display: flex; gap: .6rem; align-items: flex-start; }
.cart-test-chip { flex: none; font-weight: 700; font-size: .68rem; letter-spacing: .08em; color: #FFF7E6; background: #5B4200; border-radius: var(--radius-pill); padding: .15rem .5rem; margin-top: .1rem; }
/* the quiet yearly-switch offer: one line, one click, same block idiom as
   .cart-reassure above */
.cart-switch { display: grid; gap: .55rem; justify-items: start; }
.cart-switch p { margin: 0; }

/* ---------- "talk to a person first" disclosure (chargeable cart) ----------
   Same idiom as the pricing page's .disclosure, scoped here because the cart
   page does not load pricing.css. */
.cart-summary .disclosure { border: 1px solid var(--hairline); border-radius: var(--radius); background: var(--ink-1); overflow: hidden; }
.cart-summary .disclosure > summary { cursor: pointer; list-style: none; padding: .7rem .9rem; font-family: var(--font-display); font-weight: 600; font-size: var(--fs-sm); color: var(--text); }
.cart-summary .disclosure > summary::-webkit-details-marker { display: none; }
.cart-summary .disclosure > summary:hover { background: var(--grad-soft); }
.cart-summary .disclosure[open] > summary { border-bottom: 1px solid var(--hairline); }
.cart-summary .disclosure__body { padding: .9rem; }

/* ---------- yearly confirmation dialog ----------
   Structure + tokens mirror the pricing page's configurator modal, scoped here
   because the cart page does not load pricing.css. */
.yearly-modal-backdrop {
  position: fixed; inset: 0; z-index: var(--z-overlay);
  background: rgba(11,16,49,.42);
  -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity var(--dur-2) var(--ease), visibility 0s linear var(--dur-2);
}
.yearly-modal-backdrop.open { opacity: 1; visibility: visible; pointer-events: auto; transition: opacity var(--dur-2) var(--ease); }

.yearly-modal {
  position: fixed; z-index: var(--z-modal); left: 50%; top: 50%; transform: translate(-50%, -46%);
  width: min(460px, calc(100% - 2rem));
  background: var(--ink-1); border: 1px solid var(--hairline); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); overflow: hidden;
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity var(--dur-2) var(--ease), transform var(--dur-3) var(--ease-out), visibility 0s linear var(--dur-3);
}
.yearly-modal.open { opacity: 1; visibility: visible; pointer-events: auto; transform: translate(-50%, -50%); transition: opacity var(--dur-2) var(--ease), transform var(--dur-3) var(--ease-out); }

.yearly-modal__head { display: flex; align-items: flex-start; gap: 1rem; padding: 1.2rem 1.3rem .5rem; }
.yearly-modal__head h2 { font-size: var(--fs-md); }
.yearly-modal__close { margin-left: auto; flex: none; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--hairline); background: var(--ink-1); color: var(--text-dim); cursor: pointer; display: grid; place-items: center; transition: background var(--dur-2) var(--ease), color var(--dur-2) var(--ease); }
.yearly-modal__close:hover { background: var(--ink-2); color: var(--text); }
.yearly-modal__close svg { width: 16px; height: 16px; }
.yearly-modal__body { padding: 0 1.3rem; }
.yearly-modal__body p { margin: 0; font-size: var(--fs-sm); color: var(--text-dim); line-height: 1.65; }
.yearly-modal__actions { display: flex; gap: .6rem; flex-wrap: wrap; justify-content: flex-end; padding: 1.1rem 1.3rem 1.2rem; }

@media (max-width: 480px) {
  .yearly-modal__actions { flex-direction: column-reverse; }
  .yearly-modal__actions .btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .yearly-modal, .yearly-modal-backdrop { transition: opacity .001s var(--ease) !important; }
  .yearly-modal { transform: translate(-50%, -50%) !important; }
}

/* ---------- success state (request sent) ---------- */
.cart-grid.is-done { grid-template-columns: 1fr; }
.cart-success { text-align: center; max-width: 560px; margin: 0 auto; padding: clamp(2rem,1.4rem+3vw,3.4rem) 1.4rem; }
.cart-success__icon { width: 66px; height: 66px; margin: 0 auto 1.3rem; border-radius: 50%; display: grid; place-items: center; color: #fff; background: var(--grad-brand); box-shadow: 0 12px 30px -12px rgba(123,63,228,.5); }
.cart-success__icon svg { width: 30px; height: 30px; }
.cart-success__title { font-size: var(--fs-xl); margin-bottom: .5rem; }
.cart-success__lead { font-size: var(--fs-md); color: var(--text); font-weight: 600; margin-bottom: .7rem; }
.cart-success__sub { font-size: var(--fs-sm); color: var(--text-dim); max-width: 46ch; margin: 0 auto 1.7rem; line-height: 1.6; }
.cart-success__actions { display: flex; gap: .7rem; justify-content: center; flex-wrap: wrap; }
