/* =============================================
   SIGN UP (AB#4735)
   Source: design-guide.html, "Sign up — from e-mail to account" (#v2-page-sign-up) and its CSS
   (.dg2-auth*, .dg2-typecard, .dg2-pw, .dg2-planw, .dg2-agree, .dg2-auth__choice).
   The guide's tokens mapped onto this app's: --ink → --dsb-text-color, --ink-faint → --dsb-text-light,
   --text-soft/--ink-soft → --dsb-text-muted, --head → --dsb-head-color, --line → --dsb-border-color,
   --ctl-r → --dsb-radius, --surf-r → --dsb-radius-lg, --fld-* → --dsb-fld-*. The guide's green is the
   theme's action colour and its surface navy the theme's nav colour, so a white-label site signs up
   in its own colours.
   ============================================= */

.onboarding {
    --ob-accent: var(--theme-action);
    --ob-accent-deep: var(--theme-action-dark);
    --ob-navy: var(--theme-nav-bg);
}

.onboarding {
    max-width: 620px;
    margin: 48px auto 56px;
    padding: 0 16px;
}

.onboarding__card {
    background: #fff;
    border: 1px solid var(--dsb-border-color);
    border-radius: var(--dsb-radius-lg);
    padding: 29.6px 32px 32px;
    box-shadow: 0 22px 44px -34px rgba(21, 17, 12, .35);
}

@media (max-width: 560px) {
    .onboarding { margin-top: 24px; }
    .onboarding__card { padding: 22.4px 17.6px 24px; }
}

/* ---- title, lead, form ---- */

.onboarding__title {
    margin: 0;
    font-family: 'Red Hat Display', sans-serif;
    font-weight: 800;
    font-size: 24.8px;
    line-height: 1.2;
    color: var(--dsb-head-color);
    text-wrap: balance;
}

.onboarding__sub {
    margin: 8px 0 0;
    font-size: 15.2px;
    line-height: 1.55;
    color: var(--dsb-text-muted);
}

.onboarding__sub b { font-weight: 600; color: var(--dsb-text-color); }

.onboarding__form {
    display: grid;
    gap: 17.6px;
    margin-top: 21.6px;
}

.onboarding__form > * { min-width: 0; }
.onboarding__form .dsb-form-group { margin-bottom: 0; }
.onboarding__form .onboarding__submit { width: 100%; }

.onboarding__grid2 {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 17.6px;
}

.onboarding__grid2--co { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); }
.onboarding__grid2.is-single { grid-template-columns: minmax(0, 1fr); }

@media (max-width: 560px) {
    .onboarding__grid2,
    .onboarding__grid2--co { grid-template-columns: minmax(0, 1fr); }
}

/* Optional is said in the label, a step smaller and italic; required fields are never marked. */
.onboarding__opt {
    margin-left: .3em;
    font-weight: 400;
    font-style: italic;
    font-size: .88em;
    color: var(--dsb-text-light);
}

/* A field's own fault line, under it. */
.onboarding__err {
    display: block;
    margin-top: 5.6px;
    font-size: 12.8px;
    line-height: 1.4;
    color: var(--dsb-alert-danger-text);
}

.onboarding__err:empty { display: none; }

.onboarding .dsb-form-input.is-invalid { border-color: var(--dsb-alert-danger-border); }

/* The step's own message, when something went wrong that is not one field's. */
.onboarding__alert { margin: 17.6px 0 0; }

/* ---- a fact: the confirmed e-mail, the plan from the website ---- */

.onboarding__mail {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12.8px;
    min-height: var(--dsb-ctl-h);
    padding: 8.8px 16px;
    border: 1px solid var(--dsb-border-color);
    border-radius: var(--dsb-radius);
    background: var(--dsb-bg-subtle);
    font-size: 15.2px;
    color: var(--dsb-text-color);
}

.onboarding__mail > span:first-child {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.onboarding__mail a {
    flex: none;
    color: var(--ob-navy);
    font-weight: 500;
    font-size: 14.4px;
    text-decoration: underline;
    text-decoration-color: transparent;
    text-underline-offset: 2px;
}

.onboarding__mail a:hover { text-decoration-color: currentColor; }
.onboarding__ok { color: var(--ob-accent); font-size: 16.8px; }

/* ---- type cards ---- */

.onboarding__types {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

@media (max-width: 560px) {
    .onboarding__types { grid-template-columns: 1fr; }
}

/* ---- password: the eye in the field, the length rule under it ---- */

/* The eye in the field is the shared .dsb-pw (dsb.css). The rule under the password is the shared .dsb-form-rule
   (dsb.css); onboarding ticks it in its own accent. */
.dsb-form-rule.is-ok { color: var(--ob-accent-deep); }

/* ---- the terms line ---- */

.onboarding-check {
    display: inline-flex;
    align-items: center;
    gap: 10.4px;
    cursor: pointer;
    font-size: 14.4px;
    line-height: 1.45;
    color: var(--dsb-text-color);
}

.onboarding-check input {
    position: absolute;
    width: 0;
    height: 0;
    padding: 0;
    border: 0;
    margin: 0;
    opacity: 0;
    pointer-events: none;
}

.onboarding-check__box {
    flex: none;
    width: 20px;
    height: 20px;
    border: 1px solid var(--dsb-border-color);
    border-radius: 6px;
    display: grid;
    place-items: center;
    color: transparent;
    font-size: 11.2px;
    transform: translateY(-1px);
    transition: background-color .15s ease, border-color .15s ease;
}

.onboarding-check input:checked + .onboarding-check__box {
    background: var(--ob-accent);
    border-color: var(--ob-accent);
    color: #fff;
}

.onboarding-check input:focus-visible + .onboarding-check__box {
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--ob-accent) 25%, transparent);
}

.onboarding-check a {
    color: var(--ob-navy);
    font-weight: 500;
    text-decoration: underline;
    text-decoration-color: transparent;
    text-underline-offset: 2px;
}

.onboarding-check a:hover { text-decoration-color: currentColor; }

/* ---- the inbox and done steps: an icon tile over the title ---- */

.onboarding__mark {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    margin: 0 0 17.6px;
    background: rgba(29, 45, 73, .07);
    color: var(--ob-navy);
    font-size: 22px;
}

.onboarding__mark--ok {
    background: color-mix(in srgb, var(--ob-accent) 12%, #fff);
    color: var(--ob-accent-deep);
}

.onboarding__lines {
    display: grid;
    gap: 8.8px;
    margin-top: 20px;
    font-size: 14.4px;
    line-height: 1.5;
    color: var(--dsb-text-muted);
}

.onboarding__lines p { margin: 0; }

.onboarding__link {
    padding: 0;
    border: 0;
    background: none;
    color: var(--dsb-link-color);
    font: inherit;
    cursor: pointer;
    text-decoration: none;
}

.onboarding__link:hover { text-decoration: underline; }

.onboarding__ack {
    display: flex;
    align-items: center;
    gap: 7.2px;
    color: var(--ob-accent-deep);
}

.onboarding__ack i { font-size: .85em; }

/* ---- the info tip on a label ---- */

.onboarding__label-row { display: flex; align-items: center; gap: 6.4px; }

.onboarding__info {
    display: inline-grid;
    place-items: center;
    color: var(--dsb-text-light);
    font-size: 12.8px;
    cursor: help;
}

.onboarding__info:hover,
.onboarding__info:focus-visible { color: var(--dsb-text-muted); outline: none; }

/* ---- the country select ---- */

/* The select itself is dsb.css's (a block as wide as its field). What a COUNTRY select adds is the guide's
   .dg2-select--country: a flag before the name, so a row's content starts at the left instead of being spread
   to both ends, with the tick still at the right end; and a list tall enough (344px) to show more countries
   at once than an ordinary select's five and a half rows. */
.onboarding .dsb-select__option { justify-content: flex-start; }
.onboarding .dsb-select__option.dsb-is-selected::after { margin-left: auto; }
.onboarding .dsb-select__menu { max-height: 344px; }

.onboarding .fi {
    flex: none;
    margin-right: 8.8px;
    border-radius: var(--dsb-flag-r);
    box-shadow: var(--dsb-flag-shadow);
}
/* In a row the gap is the row's own. */
.onboarding .dsb-select__option .fi { margin-right: 0; }

/* ---- groups on a step: "Personal details" over "Company details" (design 2.28.0) ---- */

/* Anything the scripts hide stays hidden, whatever its display. */
.onboarding [hidden] { display: none !important; }

.onboarding__group { display: grid; gap: 17.6px; min-width: 0; }
.onboarding__group + .onboarding__group { margin-top: 5.6px; padding-top: 24px; border-top: 1px solid var(--dsb-border-color); }
.onboarding__sec { margin-bottom: -3.2px; }

.onboarding__h {
    margin: 0;
    font-family: 'Red Hat Display', sans-serif;
    font-weight: 700;
    font-size: 16.8px;
    line-height: 1.25;
    color: var(--dsb-head-color);
}

.onboarding__hsub { margin: 3.2px 0 0; font-size: 13.6px; color: var(--dsb-text-muted); }

/* The Account step's person fields, under the type cards (Personal, and before the choice). */
.onboarding__person { display: grid; gap: 17.6px; margin-top: 17.6px; }

/* ---- under the card ---- */

.onboarding__foot {
    margin: 17.6px 0 0;
    text-align: center;
    font-size: 14.4px;
    color: var(--dsb-text-muted);
}

.onboarding__foot a { color: var(--dsb-link-color); font-weight: 500; }
.onboarding__foot--in { margin-top: -4px; }

/* Read out, not shown. */
/* The plan step: the tiers and add-on cards side by side (2026-10-28); wide for now - the card lines are long. */
.onboarding--wide { max-width: 1680px; }
