/* Platform v3 Apply to Join - Champagne (layouts.apply, ap-*).
   The provider application for both markets: UK braiders (/braiders/join) and
   Nigeria providers (/nigeria/providers/apply), behind enable_public_v3.
   Tokens follow the provider app (provider.css, pv-*) and the console; a dark
   espresso set takes over when the device asks for it. Its own small reset,
   like site.css: business-os.css and app.css are not loaded here.
   One column, 720px at most; small below 640px. */

/* Reset -------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; min-width: 0; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body, h1, h2, h3, p, ol, ul, fieldset, figure { margin: 0; }
ol[class], ul[class] { padding: 0; list-style: none; }
fieldset { padding: 0; border: 0; }
legend { padding: 0; }
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }

/* Tokens ------------------------------------------------------------------- */
:root {
    color-scheme: light;
    --ap-page: #f3ede2;
    --ap-card: #fffdf8;
    --ap-soft: #f6f0e5;
    --ap-line: #e6dccb;
    --ap-line-2: #ece3d4;
    --ap-line-3: #f3ece0;
    --ap-input: #e0d4c0;
    --ap-dash: #d8ccb8;
    --ap-ink: #2b231a;
    --ap-muted: #5e5040;
    --ap-subtle: #6f604c;
    --ap-placeholder: #8a7b66;
    --ap-gold: #b8914a;
    --ap-gold-text: #86642a;
    --ap-gold-hover: #5a4214;
    --ap-sel: #f7efe0;
    --ap-ring: rgba(201, 164, 92, 0.22);
    --ap-focus: #b8914a;
    --ap-btn: #2b231a;
    --ap-on-btn: #fbf6ec;
    --ap-step-tint: #efe3cb;
    --ap-step-tint-ink: #5a4214;
    --ap-disabled: #e6dccb;
    --ap-good: #386427;
    --ap-good-bg: #e1ecd8;
    --ap-good-soft: #f1f6ec;
    --ap-good-line: #7c9a5c;
    --ap-warn: #77500f;
    --ap-warn-bg: #f5e3c1;
    --ap-bad: #a3361e;
    --ap-bad-bg: #f6dcd4;
    --ap-mark-bg: #2a221a;
    --ap-mark-ink: #e8cc94;
    --ap-font: 'Onest', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --ap-mono: 'Spline Sans Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* Dark: espresso Champagne. Same roles, same contrast intent. */
@media (prefers-color-scheme: dark) {
    :root {
        color-scheme: dark;
        --ap-page: #16120e;
        --ap-card: #201a14;
        --ap-soft: #2a221a;
        --ap-line: #3a3026;
        --ap-line-2: #342b22;
        --ap-line-3: #2d251d;
        --ap-input: #4d4032;
        --ap-dash: #5c4e3c;
        --ap-ink: #f3ede2;
        --ap-muted: #cbbea9;
        --ap-subtle: #b3a58f;
        --ap-placeholder: #92846f;
        --ap-gold: #c9a45c;
        --ap-gold-text: #e3c68a;
        --ap-gold-hover: #f0dcae;
        --ap-sel: #30271b;
        --ap-ring: rgba(201, 164, 92, 0.3);
        --ap-focus: #e3c68a;
        --ap-btn: #f3ede2;
        --ap-on-btn: #17120a;
        --ap-step-tint: #3a2f20;
        --ap-step-tint-ink: #e8cc94;
        --ap-disabled: #2e2620;
        --ap-good: #b4dc9c;
        --ap-good-bg: #263820;
        --ap-good-soft: #1e2a18;
        --ap-good-line: #7c9a5c;
        --ap-warn: #ecba75;
        --ap-warn-bg: #3b2c14;
        --ap-bad: #f2a891;
        --ap-bad-bg: #3d1e15;
        --ap-mark-bg: #0b0a09;
        --ap-mark-ink: #e8cc94;
    }
}

body.ap { min-height: 100vh; background: var(--ap-page); color: var(--ap-ink); font-family: var(--ap-font); font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
.ap a { color: var(--ap-gold-text); text-decoration: none; }
.ap a:hover { color: var(--ap-gold-hover); text-decoration: underline; }
.ap :focus-visible { outline: 3px solid var(--ap-focus); outline-offset: 2px; }
.ap ::placeholder { color: var(--ap-placeholder); opacity: 1; }
.ap-sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.ap-mono { font-family: var(--ap-mono); }

.ap-skip { position: absolute; left: 12px; top: -60px; z-index: 20; padding: 10px 14px; border-radius: 10px; background: var(--ap-btn); color: var(--ap-on-btn) !important; font-weight: 600; }
.ap-skip:focus { top: 12px; }

/* Top bar ------------------------------------------------------------------ */
.ap-top { max-width: 720px; margin: 0 auto; padding: 16px 16px 4px; display: flex; align-items: center; gap: 10px; }
.ap-brand { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; color: var(--ap-ink) !important; text-decoration: none !important; }
.ap-brand__word { display: grid; line-height: 1.15; }
.ap-brand__word b { font-size: 15px; font-weight: 600; }
.ap-brand__word small { font-size: 12.5px; color: var(--ap-muted); }
.ap-mark { position: relative; flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 999px; background: var(--ap-mark-bg); color: var(--ap-mark-ink); font-size: 16px; font-weight: 600; line-height: 1; }
.ap-mark::before { content: ""; position: absolute; inset: 3px; border: 1.5px solid #c9a45c; border-radius: inherit; opacity: 0.85; }
.ap-mark > span { position: relative; }
.ap-top__link { margin-left: auto; display: inline-flex; align-items: center; min-height: 44px; padding: 0 4px; font-size: 14px; font-weight: 600; }

/* Page --------------------------------------------------------------------- */
.ap-main { max-width: 720px; margin: 0 auto; padding: 14px 16px 48px; display: grid; gap: 18px; }
.ap-intro { display: grid; gap: 8px; }
.ap-kicker { font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ap-gold-text); }
.ap-intro h1, .ap-done h1 { font-size: 28px; font-weight: 600; letter-spacing: -0.03em; line-height: 1.1; text-wrap: balance; }
.ap-lede { font-size: 15.5px; line-height: 1.6; color: var(--ap-muted); text-wrap: pretty; }
.ap-foot { max-width: 720px; margin: 0 auto; padding: 0 16px 32px; font-size: 12.5px; color: var(--ap-subtle); }

@media (min-width: 640px) {
    .ap-top { padding: 24px 24px 4px; }
    .ap-main { padding: 22px 24px 56px; }
    .ap-intro h1, .ap-done h1 { font-size: 36px; }
    .ap-foot { padding: 0 24px 40px; }
}

/* Server errors, at the top ------------------------------------------------ */
.ap-alert { display: grid; gap: 8px; padding: 14px 16px; border: 1px solid color-mix(in srgb, var(--ap-bad) 35%, transparent); border-radius: 16px; background: var(--ap-bad-bg); color: var(--ap-bad); font-size: 14px; line-height: 1.5; }
.ap-alert h2 { font-size: 15px; font-weight: 600; }
.ap-alert ul { margin: 0; padding-left: 18px; }
.ap-alert a { color: inherit !important; text-decoration: underline; }
.ap-alert:focus { outline: 3px solid var(--ap-focus); outline-offset: 2px; }

/* Progress (scripts only) -------------------------------------------------- */
.ap-progress { display: grid; gap: 8px; }
.ap-progress__bars { display: grid; grid-template-columns: repeat(var(--ap-steps, 5), minmax(0, 1fr)); gap: 4px; }
.ap-progress__bars i { display: block; height: 5px; border-radius: 99px; background: var(--ap-line); transition: background 0.2s ease; }
.ap-progress__bars i.is-done { background: var(--ap-gold); }
.ap-progress__label { font-size: 13px; color: var(--ap-muted); }

/* Steps -------------------------------------------------------------------- */
.ap-form { display: grid; gap: 22px; }
.ap-form.is-stepped { gap: 18px; }
.ap-form.is-stepped .ap-step:not(.is-current) { display: none; }
.ap-step { display: grid; gap: 14px; }
.ap-step__head { display: grid; gap: 4px; }
.ap-step__title { display: flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.2; }
/* Scripts move focus here on each step so a screen reader starts from its name;
   a heading is not a control, so it takes no ring. */
.ap .ap-step__title:focus, .ap .ap-step__title:focus-visible { outline: none; }
.ap-step__num { width: 28px; height: 28px; flex: none; display: grid; place-items: center; border-radius: 99px; background: var(--ap-step-tint); color: var(--ap-step-tint-ink); font-size: 13px; font-weight: 700; }
.ap-step__tag { display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: 99px; background: var(--ap-soft); color: var(--ap-subtle); font-size: 12px; font-weight: 600; letter-spacing: 0; }
.ap-step__help { font-size: 14px; line-height: 1.55; color: var(--ap-muted); }
.ap-form.is-stepped .ap-step__num { display: none; }

.ap-card { display: grid; gap: 16px; padding: 18px; border: 1px solid var(--ap-line); border-radius: 22px; background: var(--ap-card); }
@media (min-width: 640px) { .ap-card { padding: 22px; } }
.ap-card__label { font-weight: 600; }

.ap-step__alert { padding: 10px 14px; border-radius: 12px; background: var(--ap-bad-bg); color: var(--ap-bad); font-size: 14px; line-height: 1.5; }
.ap-step__alert:empty { display: none; }

/* Fields ------------------------------------------------------------------- */
.ap-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px 12px; }
@media (min-width: 640px) { .ap-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ap-span { grid-column: 1 / -1; }
.ap-field { display: grid; gap: 6px; align-content: start; }
.ap-field__label { font-size: 13.5px; font-weight: 500; color: var(--ap-muted); }
.ap-opt { font-size: 12.5px; font-weight: 400; color: var(--ap-subtle); }
.ap-input { width: 100%; min-height: 50px; padding: 0 14px; border: 1px solid var(--ap-input); border-radius: 12px; background: var(--ap-card); color: var(--ap-ink); font-size: 16px; }
textarea.ap-input { min-height: 96px; padding: 12px 14px; line-height: 1.5; resize: vertical; }
select.ap-input { appearance: none; -webkit-appearance: none; padding-right: 40px; background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
.ap-input:focus-visible { outline: 3px solid var(--ap-focus); outline-offset: 1px; border-color: var(--ap-gold); }
.ap-input[aria-invalid="true"] { border-color: var(--ap-bad); }
.ap-help { font-size: 13px; line-height: 1.5; color: var(--ap-muted); }
.ap-err { font-size: 13.5px; font-weight: 500; line-height: 1.45; color: var(--ap-bad); }
.ap-err:empty { display: none; }

/* Chips: a real checkbox, the span is what you see. */
.ap-group { display: grid; gap: 10px; }
.ap-group > legend { margin-bottom: 10px; font-weight: 600; }
.ap-group__sub { font-size: 13px; font-weight: 600; color: var(--ap-subtle); }
.ap-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.ap-chip { position: relative; display: inline-flex; }
.ap-chip input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.ap-chip span { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 14px; border: 1px solid var(--ap-input); border-radius: 11px; background: var(--ap-card); color: var(--ap-ink); font-size: 14px; font-weight: 600; line-height: 1.25; transition: border-color 0.2s ease, background 0.2s ease; }
.ap-chip span::before { content: ""; width: 16px; height: 16px; flex: none; border: 1.5px solid var(--ap-dash); border-radius: 5px; background: var(--ap-card); }
.ap-chip input:checked + span { border-color: var(--ap-gold); background: var(--ap-sel); box-shadow: 0 0 0 3px var(--ap-ring); }
.ap-chip input:checked + span::before { border-color: var(--ap-gold); background: var(--ap-gold) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 12px no-repeat; }
.ap-chip input:focus-visible + span { outline: 3px solid var(--ap-focus); outline-offset: 2px; }
.ap-chip input:hover + span { border-color: var(--ap-gold); }
.ap-group[aria-invalid="true"] .ap-chip span { border-color: var(--ap-bad); }

/* A yes/no on its own line (terms, trial). */
.ap-check { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 12px; align-items: start; padding: 12px 14px; border: 1px solid var(--ap-input); border-radius: 14px; background: var(--ap-card); font-size: 14.5px; line-height: 1.55; cursor: pointer; }
.ap-check input { width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--ap-gold); cursor: pointer; }
.ap-check:has(input:checked) { border-color: var(--ap-gold); background: var(--ap-sel); }
.ap-check[aria-invalid="true"], .ap-check:has(input[aria-invalid="true"]) { border-color: var(--ap-bad); }

/* Notes -------------------------------------------------------------------- */
.ap-note { display: flex; gap: 10px; padding: 12px 14px; border-radius: 14px; background: var(--ap-page); color: var(--ap-muted); font-size: 13.5px; line-height: 1.55; }
.ap-note svg { width: 18px; height: 18px; flex: none; margin-top: 1px; color: var(--ap-gold-text); }

/* Uploads ------------------------------------------------------------------ */
.ap-drop { position: relative; display: flex; align-items: center; gap: 14px; min-height: 72px; padding: 12px 14px; border: 1.5px dashed var(--ap-dash); border-radius: 16px; background: var(--ap-card); color: var(--ap-ink); cursor: pointer; }
.ap-drop:hover { border-color: var(--ap-gold); }
.ap-drop:focus-within { outline: 3px solid var(--ap-focus); outline-offset: 2px; }
.ap-drop__icon { position: relative; width: 44px; height: 44px; flex: none; display: grid; place-items: center; overflow: hidden; border-radius: 12px; background: var(--ap-page); color: var(--ap-gold-text); }
.ap-drop__icon svg { width: 20px; height: 20px; }
.ap-drop__icon img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ap-drop__text { display: grid; flex: 1; gap: 2px; }
.ap-drop__title { font-weight: 600; }
.ap-drop__note { font-size: 13px; color: var(--ap-muted); overflow-wrap: anywhere; }
.ap-drop.is-filled { border-style: solid; border-color: var(--ap-good-line); background: var(--ap-good-soft); }
.ap-drop.is-filled .ap-drop__icon { background: var(--ap-good-bg); color: var(--ap-good); }
.ap-drop[aria-invalid="true"], .ap-drop:has(input[aria-invalid="true"]) { border-color: var(--ap-bad); }
/* With scripts, the tile is the control; without, the browser's own picker shows. */
.js .ap-drop input[type="file"] { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); border: 0; opacity: 0; }
html:not(.js) .ap-drop { flex-wrap: wrap; }
html:not(.js) .ap-drop input[type="file"] { flex-basis: 100%; font-size: 14px; }

.ap-thumbs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
@media (min-width: 640px) { .ap-thumbs { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.ap-thumbs li { position: relative; aspect-ratio: 1 / 1; overflow: hidden; border-radius: 14px; background: var(--ap-soft); }
.ap-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.ap-thumbs li.is-file { display: grid; place-items: center; padding: 8px; font-size: 12px; color: var(--ap-muted); text-align: center; overflow-wrap: anywhere; }
.ap-count { font-size: 13.5px; color: var(--ap-muted); }
.ap-count.is-good { color: var(--ap-good); }
.ap-count.is-bad { color: var(--ap-bad); }

/* Check and send ----------------------------------------------------------- */
.ap-review { display: grid; }
.ap-review__row { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 8px 0; border-bottom: 1px solid var(--ap-line-3); }
.ap-review__row:last-child { border-bottom: 0; }
.ap-review__icon { width: 26px; height: 26px; flex: none; display: grid; place-items: center; border-radius: 99px; background: var(--ap-good-bg); color: var(--ap-good); }
.ap-review__icon svg { width: 13px; height: 13px; }
.ap-review__row.is-optional .ap-review__icon { background: var(--ap-soft); color: var(--ap-subtle); }
.ap-review__row.is-missing .ap-review__icon { background: var(--ap-warn-bg); color: var(--ap-warn); }
.ap-review__text { display: grid; flex: 1; gap: 1px; }
.ap-review__text b { font-weight: 600; }
.ap-review__text span { font-size: 13px; color: var(--ap-muted); overflow-wrap: anywhere; }
.ap-review__edit { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 0 6px; font-size: 14px; font-weight: 600; }

/* What happens next -------------------------------------------------------- */
.ap-next { display: grid; gap: 12px; }
.ap-next > h2, .ap-next > h3 { font-size: 15px; font-weight: 600; }
.ap-done .ap-next > h2 { font-size: 17px; }
.ap-next ol { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.ap-next li { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 12px; }
.ap-next__num { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 99px; background: var(--ap-step-tint); color: var(--ap-step-tint-ink); font-size: 13px; font-weight: 700; }
.ap-next li:first-child .ap-next__num { background: var(--ap-btn); color: var(--ap-on-btn); }
.ap-next__text { display: grid; gap: 1px; }
.ap-next__text b { font-weight: 600; }
.ap-next__text span { font-size: 13.5px; line-height: 1.5; color: var(--ap-muted); }

/* Buttons ------------------------------------------------------------------ */
.ap-nav { display: flex; gap: 10px; }
.ap-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 20px; border: 1px solid transparent; border-radius: 14px; background: var(--ap-btn); color: var(--ap-on-btn) !important; font-size: 15px; font-weight: 600; line-height: 1.2; text-align: center; text-decoration: none !important; transition: background 0.2s ease, opacity 0.2s ease; }
.ap-btn--grow { flex: 1; }
.ap-btn--ghost { border-color: var(--ap-input); background: var(--ap-card); color: var(--ap-ink) !important; }
.ap-btn[aria-disabled="true"] { background: var(--ap-disabled); color: var(--ap-subtle) !important; cursor: not-allowed; }
.ap-btn:disabled { opacity: 0.6; cursor: progress; }
.ap-btn--fit { width: fit-content; }

/* Thank you ---------------------------------------------------------------- */
.ap-done { display: grid; gap: 16px; padding: 22px 18px; border: 1px solid var(--ap-line); border-radius: 22px; background: var(--ap-card); }
@media (min-width: 640px) { .ap-done { padding: 28px; } }
.ap-done__tick { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 99px; background: var(--ap-btn); color: var(--ap-on-btn); }
.ap-done__tick svg { width: 22px; height: 22px; }
.ap-done p { font-size: 15px; line-height: 1.6; color: var(--ap-muted); }
.ap-done p strong { color: var(--ap-ink); font-weight: 600; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* Annel's own gold logo in the mark (22 Oct): it brings its own ring. */
.ap-mark { background: #0e0c0a; overflow: hidden; }
.ap-mark::before { display: none; }
.ap-mark > img { width: 100%; height: 100%; display: block; object-fit: contain; }
.ap-mark { width: 46px; height: 46px; }
