:root {
  --navy: #264a9e;
  --navy-d: #1b3777;
  --sky: #4a9bdc;
  --sky-l: #eaf3fb;
  --ink: #1c2540;
  --muted: #5a6478;
  --line: #d9dfeb;
  --bg: #f5f7fb;
  --green: #12805c;
  --green-l: #e3f6ee;
  --amber-l: #fff6e0;
  --amber: #8a5a00;
  --danger: #b3261e;
  --radius: 14px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
.wrap { max-width: 680px; margin: 0 auto; padding: 16px 16px 32px; }
.head { text-align: center; padding: 8px 0 4px; }
.head img { max-width: 220px; height: auto; }
h1 { font-size: 1.6rem; margin: 8px 0 2px; color: var(--navy-d); }
.sub { margin: 0 0 12px; color: var(--muted); }
h2 { font-size: 1.15rem; margin: 0 0 12px; display: flex; align-items: center; gap: 10px; color: var(--navy-d); }
h3 { font-size: 1rem; margin: 18px 0 8px; }
.step-n { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--navy); color: #fff; font-size: .9rem; flex: none; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 14px; box-shadow: 0 1px 2px rgba(20,30,60,.04); }
.hint { color: var(--muted); font-size: .9rem; margin: -4px 0 12px; }
.hint:empty { display: none; }
[hidden] { display: none !important; }
.loading { text-align: center; color: var(--muted); padding: 40px 0; }

/* fields */
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field { display: flex; flex-direction: column; margin-bottom: 12px; min-width: 0; }
.field label { font-size: .85rem; font-weight: 600; margin-bottom: 4px; }
.field input, .field select {
  font: inherit; line-height: 1.5; padding: 12px; border: 1px solid #b9c2d6; border-radius: 10px; background-color: #fff; color: var(--ink); width: 100%; min-height: 50px; box-sizing: border-box;
}
.field input:focus, .field select:focus, .plan:focus-within, .role:focus-within { outline: 3px solid rgba(74,155,220,.45); outline-offset: 1px; }
.field input:invalid:not(:placeholder-shown) { border-color: var(--danger); }
.field-note { margin: -4px 0 12px; padding: 8px 12px; font-size: .88rem; color: var(--navy-d); background: var(--sky-l); border-left: 3px solid var(--sky); border-radius: 6px; }

/* roles */
.roles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.role { position: relative; border: 2px solid var(--line); border-radius: 12px; padding: 12px; cursor: pointer; display: flex; flex-direction: column; background: #fff; }
.role input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.role-t { font-weight: 700; }
.role-d { font-size: .82rem; color: var(--muted); }
.role:has(input:checked) { border-color: var(--navy); background: var(--sky-l); }

/* plans: Annual is the visual hero */
.plans { display: grid; grid-template-columns: 1.15fr 1fr; gap: 12px; align-items: stretch; margin-bottom: 8px; }
.plan { position: relative; display: flex; flex-direction: column; gap: 2px; padding: 18px 14px 14px; border: 2px solid var(--line); border-radius: 14px; cursor: pointer; background: #fff; }
.plan input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.plan-name { font-weight: 700; font-size: 1.05rem; }
.plan-price { font-size: 1.9rem; font-weight: 800; line-height: 1.1; }
.plan-price small { font-size: .9rem; font-weight: 600; color: var(--muted); margin-left: 2px; }
.plan-eq { color: var(--muted); font-size: .88rem; }
.plan-annual { border-color: var(--sky); background: linear-gradient(180deg, #f1f8ff, #fff 70%); box-shadow: 0 6px 18px rgba(38,74,158,.14); }
.plan-annual .plan-price { color: var(--navy); }
.plan:has(input:checked) { border-color: var(--navy); box-shadow: 0 0 0 3px rgba(38,74,158,.18), 0 6px 18px rgba(38,74,158,.14); }
.plan-monthly { background: #fafbfd; box-shadow: none; }
.plan-monthly:has(input:checked) { box-shadow: 0 0 0 3px rgba(38,74,158,.18); background: #fff; }
.ribbon { position: absolute; top: -12px; left: 14px; background: var(--navy); color: #fff; font-size: .72rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; padding: 3px 10px; border-radius: 999px; }
.pill { display: inline-block; align-self: flex-start; margin-top: 8px; background: var(--green-l); color: var(--green); font-weight: 800; font-size: .85rem; padding: 4px 10px; border-radius: 999px; }
.pill:empty { display: none; }
.nudge { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; background: var(--amber-l); color: var(--amber); border: 1px solid #f2d58a; border-radius: 10px; padding: 10px 12px; margin: 8px 0; font-size: .92rem; font-weight: 600; animation: slide .25s ease-out; }
@keyframes slide { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.link-btn { font: inherit; font-weight: 800; background: var(--navy); color: #fff; border: 0; border-radius: 8px; padding: 8px 12px; cursor: pointer; }
.link-btn:hover { background: var(--navy-d); }

/* checks */
.check { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; }
.check input { width: 22px; height: 22px; margin-top: 2px; flex: none; accent-color: var(--navy); }
.addon { margin-top: 14px; padding: 12px; border: 1px dashed #9fb2d6; border-radius: 12px; }
.addon em { font-style: normal; font-weight: 800; color: var(--navy); }
.addon small { color: var(--muted); }
.addon:has(input:checked) { border-style: solid; background: var(--sky-l); }
.consent { margin: 14px 0; font-size: .88rem; color: var(--muted); }

/* summary */
.summary { margin: 0 0 14px; padding: 12px 14px; background: #f7f9fd; border: 1px solid var(--line); border-radius: 12px; }
.summary .row { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; }
.summary .row dt, .summary .row dd { margin: 0; }
.summary .total { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 8px; font-weight: 800; font-size: 1.1rem; }
.summary s { color: var(--muted); font-weight: 500; margin-right: 6px; }
.summary .save { color: var(--green); font-weight: 700; }
.summary .fine { color: var(--muted); font-size: .85rem; display: block; padding-top: 4px; }
.pay-el { min-height: 120px; margin-bottom: 8px; }

.cta { width: 100%; font: inherit; font-size: 1.1rem; font-weight: 800; color: #fff; background: var(--navy); border: 0; border-radius: 12px; padding: 16px; cursor: pointer; }
.cta:hover:not(:disabled) { background: var(--navy-d); }
.cta:disabled { opacity: .6; cursor: progress; }
.secure { text-align: center; color: var(--muted); font-size: .82rem; margin: 10px 0 0; }
.alert { background: #fdecea; color: var(--danger); border: 1px solid #f3b8b3; border-radius: 10px; padding: 10px 12px; margin: 10px 0; font-weight: 600; }
.alert.info { background: #eaf3fb; color: #17466b; border-color: #b9d6ee; }

.success { text-align: center; padding: 32px 20px; }
.success h2 { justify-content: center; }
.check-big { width: 64px; height: 64px; margin: 0 auto 12px; border-radius: 50%; background: var(--green-l); color: var(--green); display: grid; place-items: center; font-size: 2rem; font-weight: 800; }

@media (max-width: 520px) {
  .grid2, .roles, .plans { grid-template-columns: 1fr; }
  .plan-annual { order: -1; }
}
@media (prefers-reduced-motion: reduce) { .nudge { animation: none; } }

/* promo code */
.promo { margin: 0 0 12px; }
.text-btn { font: inherit; font-weight: 700; color: var(--navy); background: none; border: 0; padding: 4px 0; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.text-btn:hover { color: var(--navy-d); }
.promo-row { display: flex; gap: 8px; margin-top: 6px; }
.promo-row input { flex: 1; min-width: 0; font: inherit; text-transform: uppercase; letter-spacing: .04em; padding: 11px 12px; border: 1px solid #b9c2d6; border-radius: 10px; }
.promo-row input:focus { outline: 3px solid rgba(74,155,220,.45); outline-offset: 1px; }
.secondary { font: inherit; font-weight: 800; color: var(--navy); background: #fff; border: 2px solid var(--navy); border-radius: 10px; padding: 0 18px; cursor: pointer; }
.secondary:hover:not(:disabled) { background: var(--sky-l); }
.secondary:disabled { opacity: .6; cursor: progress; }
.promo-msg { margin: 6px 0 0; font-size: .9rem; font-weight: 600; }
.promo-msg.ok { color: var(--green); }
.promo-msg.bad { color: var(--danger); }

/* billing address + tax */
.subhead { font-size: 1rem; margin: 4px 0 2px; color: var(--navy-d); }
.summary .muted { color: var(--muted); }

/* Selects look exactly like the text inputs: same box, our own chevron instead of the browser's */
.field select {
  -webkit-appearance: none; appearance: none; cursor: pointer; padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%235a6478' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; background-size: 12px 8px;
}
.field select:required:invalid { color: #6b7385; } /* "Select…" reads like a placeholder */
.field select option { color: var(--ink); }
.field input[readonly] { background-color: #f3f5fa; color: var(--muted); cursor: default; }

/* intl-tel-input: fill the column like every other field and match the input look */
.iti { width: 100%; display: block; }
.iti input.iti__tel-input { width: 100%; }

.same-home { margin: -4px 0 12px; font-size: .9rem; color: var(--muted); }
.same-home input:disabled + span { opacity: .6; }
.field input[readonly] { cursor: default; }

.addon em s { color: var(--muted); font-weight: 500; margin-right: 4px; }
.addon .pill { margin-top: 6px; }

.terms { margin: 14px 0 6px; font-size: .95rem; }
.terms a { color: var(--navy); font-weight: 700; text-underline-offset: 3px; }
.terms a:hover { color: var(--navy-d); }
.consent { margin-top: 6px; }

/* sectioned checkout: one open step at a time, finished steps collapse to a one-line summary */
.step-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.step-head h2 { margin: 0; outline: none; }
.step-body { margin-top: 14px; }
.step-sum { margin: 6px 0 0 38px; color: var(--ink); font-size: .95rem; overflow-wrap: anywhere; }
.step-card.is-locked { background: transparent; box-shadow: none; }
.step-card.is-locked h2 { color: var(--muted); font-weight: 600; }
.step-card.is-locked .step-n { background: #b9c2d6; }
.step-card.is-done .step-n { background: var(--green); }
.step-card.is-current { border-color: var(--sky); box-shadow: 0 4px 16px rgba(38,74,158,.10); }
.step-next { margin-top: 6px; }
.fine { color: var(--muted); font-size: .85rem; }
.lead-note { margin: 4px 0 12px; }
.lead-note a { color: var(--navy); }
