/* Signup wizard, next steps and "How it works". Loaded only on those pages; uses the tokens of site.css. */
.wiz { padding: 40px 20px 80px; max-width: 880px; }
.wiz-head { text-align: center; margin-bottom: 28px; }
.wiz-head h1 { font-size: clamp(2rem, 5vw, 3rem); }
.wiz-lead { color: var(--text-soft); font-size: 1.08rem; max-width: 40rem; margin: 0 auto; overflow-wrap: anywhere; }

/* Progress */
.wiz-progress { list-style: none; margin: 0 0 24px; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; counter-reset: none; }
.wiz-progress li { position: relative; min-width: 0; }
.wiz-progress li::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; border-radius: 4px; background: var(--line); }
.wiz-progress li.is-done::before, .wiz-progress li.is-current::before { background: var(--primary); }
.wiz-dot { display: flex; align-items: center; gap: 8px; padding: 12px 2px 4px; min-height: 44px; color: var(--muted); font-weight: 600; font-size: .92rem; text-decoration: none; min-width: 0; }
.wiz-dot > span:not(.sr-only) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.wiz-dot b { flex: none; display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--line-strong); font-size: .85rem; color: var(--text-soft); }
.is-current .wiz-dot { color: var(--text); }
.is-current .wiz-dot b { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.is-done .wiz-dot b { background: var(--primary-soft); border-color: var(--primary); color: var(--brand-text); }
a.wiz-dot:hover span { text-decoration: underline; }
a.wiz-dot { color: var(--text-soft); }

/* Cards */
.wiz-body { display: grid; gap: 20px; }
.wiz-card { background: var(--bg-elev); border: 1px solid var(--line); border-radius: 24px; padding: 22px; box-shadow: var(--shadow); min-width: 0; }
.wiz-step-h { font-size: clamp(1.4rem, 3vw, 1.8rem); margin-bottom: 18px; outline: none; }
.wiz-kicker { display: block; font-size: .85rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--brand-text); margin-bottom: 4px; }
.wiz-card h3 { font-size: 1.1rem; margin: 18px 0 8px; display: flex; align-items: center; gap: 8px; }
.err-list { margin: 8px 0 0; padding-left: 20px; font-weight: 500; }
.err-list a { color: var(--text); }
.wiz-notice { display: flex; gap: 8px; align-items: center; padding: 12px 14px; border-radius: 12px; background: var(--primary-soft); color: var(--text); font-weight: 600; margin: 0 0 18px; }

/* Step 1: choice cards (radios). Panels switch with :has(), so it works without JS. */
.wiz-choice { border: 0; padding: 0; margin: 0 0 20px; min-width: 0; }
.wiz-choice legend { font-weight: 650; margin-bottom: 10px; padding: 0; }
.choice-grid { display: grid; gap: 12px; }
.choice { position: relative; display: grid; grid-template-columns: auto 1fr; grid-template-areas: "ic t" "ic d"; gap: 2px 14px; align-items: center; padding: 16px 18px 16px 50px; border: 2px solid var(--line-strong); border-radius: 16px; background: var(--bg); cursor: pointer; transition: border-color .2s ease, box-shadow .2s ease; min-width: 0; }
.choice input { position: absolute; left: 18px; top: 50%; width: 20px; height: 20px; margin: -10px 0 0; accent-color: var(--primary); }
.choice-ic { grid-area: ic; color: var(--brand-text); display: grid; }
.choice-t { grid-area: t; font-weight: 700; font-size: 1.06rem; }
.choice-d { grid-area: d; color: var(--muted); font-size: .92rem; }
.choice:has(input:checked) { border-color: var(--primary); box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 16%, transparent); }
.choice:has(input:focus-visible) { outline: 3px solid var(--primary); outline-offset: 2px; }
.wiz-body:has(#c-need:checked) .p-have, .wiz-body:has(#c-have:checked) .p-need { display: none; }

.dns-preview { margin-top: 8px; }
.dns-preview .table-wrap { margin-top: 10px; }
.dns-preview code, .dns-rec code { overflow-wrap: anywhere; word-break: break-all; }
.dns-preview em { color: var(--muted); }
.reg-list { padding-left: 20px; display: grid; gap: 8px; margin: 0 0 16px; }
.reg-list a { font-weight: 650; }
.wiz-tip { background: var(--bg-soft); border: 1px solid var(--line); border-radius: 16px; padding: 4px 16px 12px; margin-bottom: 16px; }
.wiz-tip ul { margin: 0; padding-left: 20px; display: grid; gap: 4px; color: var(--text-soft); }
.wiz-note { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; background: var(--bg-soft); border: 1px solid var(--line); color: var(--text-soft); margin: 4px 0 18px; }
.wiz-note .ic { flex: none; color: var(--brand-text); margin-top: 2px; }

/* Step 3 */
.wiz-summary { display: grid; gap: 8px; margin: 0 0 20px; padding: 14px 16px; border-radius: 14px; background: var(--bg-soft); border: 1px solid var(--line); }
.wiz-summary div { display: grid; gap: 2px; min-width: 0; }
.wiz-summary dt { font-size: .8rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.wiz-summary dd { margin: 0; overflow-wrap: anywhere; }
.wiz-summary dd a { margin-left: 6px; font-size: .9rem; }
.wiz-fs { border: 0; padding: 0; margin: 0 0 8px; min-width: 0; }
.wiz-fs legend { font-size: 1.15rem; font-weight: 650; padding: 0; margin-bottom: 4px; }
.wiz-fs > .help { margin: 0 0 12px; }
.opt { font-weight: 400; color: var(--muted); font-size: .88rem; }
.wiz-plan, .wiz-pay { border: 1px solid var(--line); border-radius: 16px; padding: 4px 16px 14px; margin: 0 0 16px; }
.wiz-pay { background: color-mix(in srgb, var(--primary) 6%, var(--bg-elev)); border-color: color-mix(in srgb, var(--primary) 30%, var(--line)); }
.wiz-pay p { margin: 0; color: var(--text-soft); }
.plan-line { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 12px; margin: 0; }
.plan-price { font-size: 1.5rem; font-weight: 700; }
.plan-price small { font-size: .9rem; font-weight: 500; color: var(--muted); }
.pay-cur { border: 0; padding: 0; margin: 12px 0 0; min-width: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.pay-cur legend { font-weight: 650; padding: 0; margin-bottom: 6px; }
.pay-cur .field-error { flex-basis: 100%; }
.pay-opt { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 14px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--bg-elev); cursor: pointer; }
.pay-opt:has(input:checked) { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); }
.pay-opt small { color: var(--muted); }
/* Coupon (details/summary: opens without JS) + discounted total */
.coupon { margin: 12px 0 0; }
.coupon summary { cursor: pointer; color: var(--primary); font-size: .95rem; min-height: 44px; display: inline-flex; align-items: center; }
.coupon-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: stretch; margin-top: 4px; }
.coupon-row input { flex: 1 1 12rem; min-width: 0; max-width: 100%; min-height: 44px; padding: 8px 14px; font: inherit; color: var(--text); background: var(--bg);
  border: 1px solid var(--field-line); border-radius: 12px; text-transform: uppercase; }
.coupon-row input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 22%, transparent); }
.coupon .field-error { margin-top: 6px; }
.pay-total { display: grid; gap: 4px; margin: 12px 0 0; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg-elev); }
.pay-total > div { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; }
.pay-total dt, .pay-total dd { margin: 0; }
.pay-total-final { font-weight: 700; font-size: 1.1rem; border-top: 1px solid var(--line); padding-top: 4px; }
.pay-box { display: grid; gap: 8px; margin: 10px 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg-elev); min-width: 0; }
.pay-box .dns-kv + .dns-kv { border-top: 1px solid var(--line); padding-top: 8px; }
.pay-box .pay-ref code { font-size: 1.1rem; font-weight: 700; letter-spacing: .04em; }

.wiz-actions { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin-top: 8px; }
.wiz-actions .btn-lg { margin-left: auto; }

/* Next steps + How it works: timeline */
.timeline { list-style: none; margin: 0 0 24px; padding: 0; display: grid; gap: 0; }
.timeline > li { position: relative; display: grid; grid-template-columns: 44px 1fr; gap: 14px; padding-bottom: 22px; min-width: 0; }
.timeline > li::before { content: ""; position: absolute; left: 21px; top: 44px; bottom: 0; width: 2px; background: var(--line); }
.timeline > li:last-child::before { display: none; }
.tl-dot { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--bg-elev); border: 2px solid var(--line-strong); color: var(--brand-text); font-weight: 700; }
.timeline > li.is-current .tl-dot { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.tl-body { min-width: 0; padding-top: 8px; }
.tl-body h2, .tl-body h3 { font-size: 1.15rem; margin: 0 0 6px; letter-spacing: -.01em; }
.tl-body p { margin: 0 0 8px; color: var(--text-soft); }
.dns-cards { list-style: none; padding: 0; margin: 10px 0; display: grid; gap: 10px; }
.dns-rec { display: grid; gap: 8px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg-elev); min-width: 0; }
/* Label row, then the value with its copy button beside it (button collapses while hidden) */
.dns-kv { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 4px 8px; min-width: 0; }
.dns-kv .k { grid-column: 1 / -1; font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; }
.dns-kv code { min-width: 0; overflow-wrap: anywhere; padding: 6px 8px; border-radius: 8px; background: var(--bg-soft); }
.dns-type code { font-weight: 700; }
.btn.copy.is-done { border-color: var(--primary); background: var(--primary); color: var(--primary-ink); }
/* Status page: import file, "checking" state and the notice after a check */
.dns-import { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 14px 0 0; }
.dns-import .help { flex: 1 1 260px; margin: 0; }
.btn.is-busy { cursor: progress; opacity: .85; }
.btn.is-busy::before { content: ""; width: 1em; height: 1em; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; display: inline-block; }
@media (prefers-reduced-motion: no-preference) {
  .copy.is-done { animation: copy-pop .32s ease-out; }
  .btn.is-busy::before { animation: spin .8s linear infinite; }
  .notice-flash { animation: notice-in .6s ease-out; }
  @keyframes copy-pop { 0% { transform: scale(.94); } 60% { transform: scale(1.05); } 100% { transform: scale(1); } }
  @keyframes spin { to { transform: rotate(360deg); } }
  @keyframes notice-in { 0% { opacity: 0; transform: translateY(-6px); box-shadow: 0 0 0 0 var(--primary); } 40% { opacity: 1; transform: none; box-shadow: 0 0 0 4px var(--primary-soft); } 100% { box-shadow: 0 0 0 0 transparent; } }
}
.wiz-foot { text-align: center; color: var(--muted); }
.wiz-next .next-card { text-align: center; }

.how { padding-bottom: 72px; }
.how > section { margin: 40px 0; }
.how-steps { margin-top: 20px; max-width: 760px; }
.how-grid { display: grid; gap: 16px; }
.how-grid h2 { font-size: 1.2rem; display: flex; align-items: center; gap: 8px; }
.how-grid .ic { color: var(--brand-text); }
.how-q { border: 1px solid var(--line); border-radius: 14px; background: var(--bg-elev); margin-bottom: 10px; }
.how-q summary { cursor: pointer; padding: 14px 18px; font-weight: 650; min-height: 44px; }
.how-q p { margin: 0; padding: 0 18px 16px; color: var(--text-soft); }
.how-cta { text-align: center; }

@media (min-width: 640px) {
  .wiz-card { padding: 32px; }
  .choice-grid { grid-template-columns: 1fr 1fr; }
  .choice { grid-template-columns: 1fr; grid-template-areas: "ic" "t" "d"; padding: 18px 18px 18px 50px; align-items: start; }
  .choice input { top: 28px; margin-top: 0; }
  .dns-rec { grid-template-columns: 4.5rem 1fr; align-items: start; }
  .dns-rec .dns-kv { grid-column: 2; }
  .dns-rec .dns-type { grid-row: 1 / span 2; padding-top: 6px; }
  .dns-kv { grid-template-columns: 4rem minmax(0, 1fr) auto; }
  .dns-kv .k { grid-column: auto; }
  .pay-box .dns-kv { grid-template-columns: 9.5rem minmax(0, 1fr) auto; }
  .wiz-summary { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 900px) { .how-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 420px) { .wiz-dot { flex-direction: column; align-items: flex-start; gap: 4px; } .wiz-dot > span:not(.sr-only) { white-space: normal; font-size: .8rem; } }

/* Signup status page (§64.12) */
.timeline > li.is-done .tl-dot { background: var(--primary-soft); border-color: var(--primary); color: var(--brand-text); }
.status-steps { max-width: 760px; margin-inline: auto; }
.status-steps .tl-body p { font-size: .92rem; display: flex; align-items: center; gap: 8px; }
/* Step in progress: a ring around the dot and three dots after "In progress"; static when motion is reduced */
.status-steps > li.is-current .tl-dot { position: relative; }
.status-steps > li.is-current .tl-dot::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 2px dashed color-mix(in srgb, var(--primary) 55%, transparent); }
.status-steps > li.is-current .tl-body p { color: var(--brand-text); font-weight: 600; }
.tl-live { display: inline-flex; gap: 3px; }
.tl-live i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: .6; }
.status-steps > li.is-failed .tl-dot { border-color: var(--danger); color: var(--danger); }
/* Step waiting for the customer (pay, confirm email, add DNS): highlighted dot, no spinner */
.status-steps > li.is-action .tl-dot { border-color: var(--primary); color: var(--brand-text); background: var(--bg-elev); box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 18%, transparent); }
.status-steps > li.is-action .tl-state { color: var(--brand-text); font-weight: 600; }
.status-steps > li .tl-body p.tl-hint { display: block; color: var(--text-soft); font-weight: 400; overflow-wrap: anywhere; }
.status-steps > li:not(.is-done):not(.is-action):not(.is-current):not(.is-failed) .tl-body h3 { color: var(--text-soft); }
.status-live { max-width: 760px; margin: -8px auto 20px; text-align: center; }
@media (prefers-reduced-motion: no-preference) {
  .status-steps > li.is-current .tl-dot::after { border-style: solid; border-color: var(--primary) transparent color-mix(in srgb, var(--primary) 30%, transparent) transparent; animation: tl-spin 1.4s linear infinite; }
  .tl-live i { animation: tl-blink 1.2s ease-in-out infinite; }
  .tl-live i:nth-child(2) { animation-delay: .2s; }
  .tl-live i:nth-child(3) { animation-delay: .4s; }
  @keyframes tl-spin { to { transform: rotate(360deg); } }
  @keyframes tl-blink { 0%, 80%, 100% { opacity: .25; transform: scale(.8); } 40% { opacity: 1; transform: scale(1); } }
}
.status-block { margin: 0 auto 20px; max-width: 760px; min-width: 0; }
.status-block h2 { font-size: 1.25rem; margin: 0 0 8px; }
.status-block > p { color: var(--text-soft); }
.wiz-next > .notice { max-width: 760px; margin: 0 auto 24px; display: flex; gap: 10px; align-items: flex-start; }
.wiz-next > .notice > .ic { flex: none; margin-top: 3px; color: var(--brand-text); }
.wiz-next > .notice > span { min-width: 0; }
.next-card form { margin: 8px 0 20px; }
.pay-text strong { white-space: nowrap; color: var(--text); }
/* DNS block: import line, Cloudflare callout, notes and the check action */
.dns-import .btn { white-space: normal; text-align: left; max-width: 100%; }
.dns-import .btn .ic { flex: none; }
.callout { display: flex; gap: 12px; align-items: flex-start; margin: 18px 0 0; padding: 14px 16px; border-radius: 14px; min-width: 0;
  background: color-mix(in srgb, var(--primary) 7%, var(--bg-elev)); border: 1px solid color-mix(in srgb, var(--primary) 35%, var(--line)); border-left-width: 4px; }
.callout-ic { flex: none; display: grid; color: var(--brand-text); margin-top: 1px; }
.callout p { margin: 0; min-width: 0; color: var(--text-soft); font-size: .94rem; line-height: 1.55; overflow-wrap: anywhere; }
.callout strong { display: block; color: var(--text); margin-bottom: 2px; }
.status-notes { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 8px; }
.status-notes .help { margin: 0; line-height: 1.55; overflow-wrap: anywhere; }
.status-check { display: flex; justify-content: center; margin: 24px 0 0; padding-top: 22px; border-top: 1px solid var(--line); }
.status-check .btn { white-space: normal; text-align: center; max-width: 100%; }
.status-check .btn .ic { flex: none; }
details.dns-done > summary { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; min-height: 44px; cursor: pointer; list-style: none; font-weight: 600; }
details.dns-done > summary::-webkit-details-marker { display: none; }
details.dns-done > summary .ic { flex: none; color: var(--brand-text); }
details.dns-done > summary > span { flex: 1 1 14rem; min-width: 0; }
details.dns-done > summary small { font-weight: 500; color: var(--link); text-decoration: underline; text-underline-offset: 3px; }
details.dns-done[open] > summary { margin-bottom: 14px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
details.dns-done > summary:focus-visible { outline: 3px solid var(--primary); outline-offset: 4px; border-radius: 8px; }
.wiz-next .wiz-foot { max-width: 760px; margin: 28px auto 0; font-size: .94rem; overflow-wrap: anywhere; }
/* Domain Connect: "set up DNS automatically" box above the manual records */
.dns-auto { border: 1px solid color-mix(in srgb, var(--primary) 30%, var(--line)); background: color-mix(in srgb, var(--primary) 6%, var(--bg-elev)); border-radius: 16px; padding: 4px 16px 12px; margin: 0 0 20px; }
.dns-auto h2 { margin-top: 12px; }
.dns-auto .btn { white-space: normal; text-align: center; }
