/* AZ Digital — checkout, payment links, payment confirmation and the two
   onboarding questionnaires. Loaded after site.css and built only from its
   tokens, so these pages read as part of the same site: fog backdrop,
   paper panels under a 2px ink rule, cobalt for actions, marigold for money. */

/* ---------- Page frame ---------- */

.co { padding-block: clamp(2rem, 1rem + 4vw, 4.5rem) var(--space); }
.co-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(24px, 5vw, 80px); align-items: start; }
@media (max-width: 860px) { .co-grid { grid-template-columns: 1fr; } }

.co h1 { font-size: clamp(2.1rem, 1.3rem + 2.6vw, 3.6rem); letter-spacing: -0.035em; line-height: 1.04; max-width: 18em; }
.co h1 + .lede { margin-top: 1.1rem; }

/* Step rail: numbered like .steps on the home page. */
.co-steps { list-style: none; display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin: 0 0 2rem; padding: 0; font-size: var(--t-sm); font-weight: 600; color: var(--slate); }
.co-steps li { display: flex; align-items: center; gap: 10px; }
.co-steps li + li::before { content: ""; width: clamp(20px, 5vw, 56px); height: 2px; background: var(--rule); }
.co-steps b {
    display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
    border: 2px solid var(--rule); font-size: 0.85rem; font-variant-numeric: tabular-nums;
}
.co-steps .is-on { color: var(--ink); }
.co-steps .is-on b { background: var(--ink); border-color: var(--ink); color: var(--fog); }
.co-steps .is-done b { background: var(--cobalt); border-color: var(--cobalt); color: #fff; }

.co-form { background: var(--paper); padding: clamp(20px, 4vw, 40px); margin-top: 2rem; }
.co-form .btn { margin-top: 6px; }
.co-who { margin: 0 0 1.25rem; padding-bottom: 1.25rem; border-bottom: 1px solid var(--rule); }
.co-who strong { font-weight: 700; }
.co-fine { margin: 14px 0 0; font-size: var(--t-sm); color: var(--slate); text-align: center; }
.co-fine svg { display: inline-block; vertical-align: -2px; margin-right: 4px; }

.co-error { margin: 6px 0 0; color: #b42318; font-size: 0.85rem; font-weight: 600; }
.co-alert { margin: 0 0 18px; padding: 14px 16px; border-left: 4px solid #b42318; background: #fdecea; color: #7a1a12; font-weight: 600; }
#payment-element { margin-bottom: 20px; min-height: 120px; }
#payment-message { display: none; }
#payment-message.is-on { display: block; }

/* ---------- Order summary ---------- */

.co-summary { position: sticky; top: 100px; background: var(--paper); border-top: 2px solid var(--ink); padding: 24px 24px 28px; }
.co-summary .co-kicker { font-size: var(--t-sm); color: var(--slate); font-weight: 600; }
.co-summary h2 { font-size: var(--t-lg); margin: 0.35rem 0 0.6rem; }
.co-summary > p { color: var(--slate); font-size: 0.97rem; }
.co-summary .tag { margin-bottom: 1rem; }
.co-summary ul { list-style: none; margin: 1.25rem 0 0; padding: 0; font-size: 0.97rem; }
.co-summary li { padding: 8px 0 8px 20px; border-top: 1px solid var(--rule); position: relative; }
.co-summary li::before { content: ""; position: absolute; left: 0; top: 0.95em; width: 8px; height: 8px; background: var(--cobalt); border-radius: 50%; }
.co-summary .co-note { margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid var(--rule); font-size: var(--t-sm); color: var(--slate); }

.co-lines { margin: 1.25rem 0 0; }
.co-line { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; border-top: 1px solid var(--rule); font-variant-numeric: tabular-nums; }
.co-line--save { color: var(--cobalt); font-weight: 600; }
.co-line--total { border-top: 2px solid var(--ink); padding-top: 12px; font-size: var(--t-md); font-weight: 800; letter-spacing: -0.01em; }
.co-line s { color: var(--slate); }
.co-period { color: var(--slate); font-weight: 500; font-size: 0.85em; }
@media (max-width: 860px) { .co-summary { position: static; order: -1; } }

/* ---------- Dead ends and confirmation ---------- */

.co-card { max-width: 42rem; padding: clamp(24px, 3.5vw, 40px); background: var(--paper); border: 1px solid var(--rule); border-left: 6px solid var(--cobalt); }
.co-card--bad { border-left-color: #b42318; }
.co-card h1, .co-card h2 { font-size: var(--t-lg); margin-bottom: 0.75rem; }
.co-card p { color: var(--slate); }

.co-done .co-ref { display: inline-block; margin-top: 1.25rem; }
.co-done .steps { margin-top: 2.5rem; }
.co-done .steps li::before { margin-bottom: 0.9rem; }

/* ---------- Questionnaires ---------- */

.q-wrap { max-width: 52rem; }
.q-meta { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 1.4rem; color: var(--slate); font-size: var(--t-sm); font-weight: 600; }
.q-meta span::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; background: var(--marigold); vertical-align: 1px; }

.q-banner { margin-bottom: 16px; padding: 18px 20px; background: var(--paper); border-left: 6px solid var(--cobalt); }
.q-banner--bad { border-left-color: #b42318; }
.q-banner h2 { font-size: var(--t-md); margin-bottom: 0.3rem; }
.q-banner p { color: var(--slate); margin: 0; }

/* Sticky progress strip, under the site header. */
.q-progress {
    position: sticky; top: 76px; z-index: 5; display: flex; align-items: center; gap: 14px;
    margin: 0 0 1.5rem; padding: 12px 0; background: var(--fog); border-bottom: 1px solid var(--rule);
    font-size: var(--t-sm); font-weight: 600;
}
.q-progress-track { flex: 1; height: 6px; background: var(--plaster); }
.q-progress-fill { width: 0; height: 100%; background: var(--cobalt); transition: width .25s ease; }
.q-progress-count { font-variant-numeric: tabular-nums; white-space: nowrap; }
.q-progress-step { white-space: nowrap; color: var(--slate); }
@media (max-width: 560px) { .q-progress-step { display: none; } }

.q-draft { display: none; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; padding: 12px 16px; background: var(--paper); border-left: 4px solid var(--marigold); font-size: var(--t-sm); }
.q-draft[data-show] { display: flex; }
.q-draft button { padding: 0; border: 0; background: none; color: var(--cobalt); font: inherit; font-weight: 700; text-decoration: underline; cursor: pointer; }

.q-step { margin-bottom: 16px; padding: clamp(20px, 4vw, 36px); background: var(--paper); border-top: 2px solid var(--ink); scroll-margin-top: 150px; }
.q-step-head { display: grid; grid-template-columns: auto 1fr; gap: 16px; margin-bottom: 1.5rem; }
.q-step-num { min-width: 1.4em; font-size: var(--t-lg); font-weight: 800; line-height: 1; color: var(--cobalt); font-variant-numeric: tabular-nums; }
.q-step[data-done] .q-step-num { color: transparent; -webkit-text-stroke: 1.5px var(--cobalt); }
.q-step-head h2 { font-size: var(--t-md); line-height: 1.2; }
.q-step-head p { margin: 0.35rem 0 0; color: var(--slate); font-size: var(--t-sm); }
.q-optional {
    display: inline-block; margin-left: 8px; padding: 2px 9px; border-radius: 999px; vertical-align: middle;
    background: var(--plaster); color: var(--slate); font-size: 0.68rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
}
.q-hint { display: block; margin-top: 6px; font-size: 0.82rem; color: var(--slate); line-height: 1.5; }
.q-label { display: block; font-weight: 600; font-size: var(--t-sm); margin-bottom: 8px; }
.q-step .field:last-child { margin-bottom: 0; }
.q-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 16px; }
@media (max-width: 720px) { .q-grid-3 { grid-template-columns: 1fr; } }

/* Click-to-pick chips: checkboxes drawn as pills, filled ink when picked. */
.q-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.q-chip { position: relative; cursor: pointer; }
.q-chip input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.q-chip span {
    display: inline-block; padding: 8px 16px; border: 1.5px solid var(--ink); border-radius: 999px;
    font-size: 0.92rem; font-weight: 600; user-select: none; transition: background-color .15s, color .15s;
}
.q-chip:hover span { background: var(--plaster); }
.q-chip input:checked + span { background: var(--ink); color: var(--fog); }
.q-chip input:focus-visible + span { outline: 3px solid var(--cobalt); outline-offset: 2px; }
.q-chips + .field, .q-chips + input { margin-top: 12px; }

/* Checkbox rows (assets, consent). */
.q-check { display: grid; grid-template-columns: 22px 1fr; gap: 12px; align-items: start; margin-bottom: 12px; cursor: pointer; }
.q-check input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--cobalt); }
.q-check span { line-height: 1.5; }
.q-check--fine span { font-size: 0.85rem; color: var(--slate); }
.q-upload { margin: -2px 0 16px 34px; }
.q-upload .field { margin-bottom: 0; }
.field input[type="file"] { padding: 10px; border-bottom-width: 1px; }

/* Logo brief: five-point style scales and colour pickers. */
.q-scale { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 14px; padding: 10px 0; border-top: 1px solid var(--rule); }
.q-scale:last-child { border-bottom: 1px solid var(--rule); }
.q-scale-end { font-size: var(--t-sm); font-weight: 600; }
.q-scale-end:last-child { text-align: right; }
.q-scale-track { display: flex; gap: 12px; }
.q-scale-dot { cursor: pointer; line-height: 0; position: relative; }
.q-scale-dot input { position: absolute; opacity: 0; pointer-events: none; }
.q-scale-dot > span[aria-hidden] { display: block; width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--ink); transition: background-color .15s, transform .15s; }
.q-scale-dot input:checked + span[aria-hidden] { background: var(--cobalt); border-color: var(--cobalt); transform: scale(1.15); }
.q-scale-dot input:focus-visible + span[aria-hidden] { outline: 3px solid var(--cobalt); outline-offset: 2px; }
@media (max-width: 560px) {
    .q-scale { grid-template-columns: 1fr; gap: 6px; }
    .q-scale-end:last-child { text-align: left; }
}
.q-color { display: grid; grid-template-columns: 52px 1fr; gap: 8px; align-items: stretch; }
.q-color input[type="color"] { width: 52px; height: 48px; padding: 3px; border: 1px solid var(--rule); border-bottom: 2px solid var(--ink); background: var(--paper); cursor: pointer; }

.q-submit { padding: 8px 0 20px; }
.q-submit .btn { min-height: 56px; font-size: 1.05rem; }
.q-submit p { margin-top: 10px; text-align: center; font-size: var(--t-sm); color: var(--slate); }
