/* The new-customer questions at /start (#243, #250, #257).
   The look is the car charger app's (CRM crm-app/src/styles/components.css, .e2-ev-*):
   black, white and grey, hairline cards, 600 for emphasis, a white "go" button, and colour
   only where it means something. The token values are copied from there, not imported: the
   website is a separate site and must not load the CRM's stylesheet. */

:root {
  --ev-bg: #0b0b0c; --ev-card: #161618; --ev-card-line: #242427;
  --ev-ink: #f5f5f7; --ev-ink-2: #a1a1a6; --ev-ink-3: #4a4a4f;
  --ev-good: #5ee39a; --ev-good-soft: rgba(61, 220, 132, 0.14);
  --ev-night: #9aa8ff; --ev-night-soft: rgba(120, 140, 255, 0.16);
  --ev-warn: #ffb458; --ev-warn-soft: rgba(255, 170, 60, 0.15); --ev-muted-soft: #1f1f22;
  --ev-brand: #ff7e31;
  --ev-btn-go: #f5f5f7; --ev-btn-go-ink: #0b0b0c; --ev-btn-quiet: #1f1f22; --ev-btn-quiet-ink: #fff; --ev-btn-quiet-ring: #34343a;
  --ev-hero: radial-gradient(90% 60% at 75% 85%, #1a1e26 0%, #0b0b0c 75%);
  --ev-bad: #ff8a80;
  --font-ev: 'Geist', 'Instrument Sans', system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --ev-bg: #ffffff; --ev-card: #f4f4f6; --ev-card-line: transparent;
    --ev-ink: #0b0b0c; --ev-ink-2: #5f5f66; --ev-ink-3: #c9c9ce;
    --ev-good: #15803d; --ev-good-soft: #e4f6ea;
    --ev-night: #4f5bd5; --ev-night-soft: #eef0ff;
    --ev-warn: #b45309; --ev-warn-soft: #fff1e3; --ev-muted-soft: #eeeef0;
    --ev-btn-go: #0b0b0c; --ev-btn-go-ink: #fff; --ev-btn-quiet: #f0f0f2; --ev-btn-quiet-ink: #0b0b0c; --ev-btn-quiet-ring: transparent;
    --ev-hero: radial-gradient(90% 60% at 75% 85%, #ffffff 0%, #eceef2 80%);
    --ev-bad: #b42318;
    color-scheme: light;
  }
}

* { box-sizing: border-box; }
/* The hidden attribute wins over a class's display (a .st-field is a grid). */
[hidden]:not(.st-back) { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body.st { margin: 0; min-height: 100dvh; background: var(--ev-bg); color: var(--ev-ink); font-family: var(--font-ev); font-size: 17px; line-height: 1.4; -webkit-font-smoothing: antialiased; }
button, a, label { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
button, input, select, textarea { font: inherit; color: inherit; }

/* One column, a phone's width even on a desktop, like the charger app's full-screen view. */
.st-app { display: flex; flex-direction: column; min-height: 100dvh; max-width: 560px; margin: 0 auto; }
.st-hero { background: var(--ev-hero); padding: calc(14px + env(safe-area-inset-top)) 22px 18px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.st-brand { display: inline-flex; align-items: center; min-height: 44px; border-radius: 8px; }
.st-wordmark { display: block; height: 26px; width: auto; }
.st-progress { display: grid; justify-items: end; gap: 8px; }
.st-step-of { margin: 0; font-size: 13px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ev-ink-2); }
.st-dots { display: flex; gap: 6px; margin: 0; padding: 0; list-style: none; }
.st-dots li { width: 22px; height: 4px; border-radius: 2px; background: var(--ev-ink-3); transition: background .3s; }
.st-dots li.is-done { background: var(--ev-ink); }
.st-dots li.is-here { background: var(--ev-brand); }

.st-form { flex: 1 1 auto; display: flex; flex-direction: column; }
.st-main { flex: 1 1 auto; padding: 8px 22px 28px; }
.st-screen { animation: st-in .35s ease-out both; }
@keyframes st-in { from { opacity: 0; transform: translateY(10px); } }
.st-title { margin: 18px 0 8px; font-size: 32px; font-weight: 500; line-height: 1.1; letter-spacing: -0.02em; outline: none; }
.st-body { margin: 0 0 22px; font-size: 18px; line-height: 1.45; color: var(--ev-ink-2); }
.st-foot { margin: 26px 0 0; font-size: 15px; line-height: 1.45; color: var(--ev-ink-2); }
.st-tel { display: inline-flex; align-items: center; min-height: 44px; color: var(--ev-ink); font-weight: 600; text-underline-offset: 3px; }

/* Fields: a card-coloured well, 60 px tall like the charger's buttons; 17 px text, so a phone
   does not zoom when one is focused. */
.st-fields { display: grid; gap: 16px; }
.st-field { display: grid; gap: 6px; }
.st-label { font-size: 15px; font-weight: 600; }
.st-input { width: 100%; min-height: 60px; padding: 0 16px; border: 1px solid var(--ev-card-line); border-radius: 12px; background: var(--ev-card); font-size: 18px; outline: none; }
.st-input::placeholder { color: var(--ev-ink-2); }
.st-input:focus { box-shadow: 0 0 0 2.5px var(--ev-ink); }
/* Second cut: the address is the whole first screen, so it is big and bold (Shaun, 2026-09-27). */
.st-input-xl { min-height: 72px; font-size: 24px; font-weight: 600; letter-spacing: -0.01em; }
.st-input-xl::placeholder { font-weight: 400; }
/* The address type-ahead: a list under the field, each row a 48 px target. */
.st-combo { position: relative; }
.st-suggest { list-style: none; margin: 6px 0 0; padding: 6px; border: 1px solid var(--ev-card-line); border-radius: 14px; background: var(--ev-card); box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18); }
.st-suggest li { display: flex; align-items: center; min-height: 48px; padding: 8px 12px; border-radius: 10px; font-size: 17px; line-height: 1.3; cursor: pointer; overflow-wrap: anywhere; }
.st-suggest li[aria-selected="true"], .st-suggest li:hover { background: var(--ev-muted-soft); }
.st-manual { display: grid; gap: 16px; }
.st-found { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: 14px; background: var(--ev-good-soft); color: var(--ev-ink); }
.st-found svg { flex: none; width: 28px; height: 28px; fill: none; stroke: var(--ev-good); stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.st-found-label { margin: 0; font-size: 18px; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.st-found-text { min-width: 0; }
.st-found-home { display: flex; flex-wrap: wrap; align-items: center; column-gap: 10px; margin: 0; font-size: 16px; color: var(--ev-ink-2); }
/* Inline beside the kind of home, still a 44 px target on a phone. */
.st-link-inline { display: inline-flex; align-items: center; min-height: 44px; padding: 0; font-size: 16px; }
.st-input[aria-invalid="true"] { box-shadow: 0 0 0 2px var(--ev-bad); }
.st-input[aria-invalid="true"]:focus { box-shadow: 0 0 0 2.5px var(--ev-ink), 0 0 0 5px var(--ev-bad); }
.st-textarea { min-height: 150px; padding: 14px 16px; line-height: 1.45; resize: vertical; }
.st-select { appearance: none; -webkit-appearance: none; padding-right: 44px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6' fill='none' stroke='%23a1a1a6' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; background-size: 20px; text-overflow: ellipsis; }
.st-hint { margin: 0; font-size: 15px; color: var(--ev-ink-2); }
.st-err { margin: 0; font-size: 15px; color: var(--ev-bad); }
.st-err:empty { display: none; }
.st-status { margin: 0; font-size: 15px; color: var(--ev-ink-2); }
.st-status:empty { display: none; }
.st-row { display: flex; gap: 10px; }
.st-postcode { flex: 1 1 auto; min-width: 0; text-transform: uppercase; }
.st-find { flex: none; width: auto; padding: 0 18px; font-size: 17px; }
.st-link { justify-self: start; min-height: 44px; padding: 0 2px; border: 0; background: none; color: var(--ev-ink); font-size: 16px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

/* Buttons: the charger's go and quiet buttons. */
.st-btn { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 60px; border: 0; border-radius: 12px; font-size: 19px; font-weight: 600; cursor: pointer; background: var(--ev-btn-quiet); color: var(--ev-btn-quiet-ink); box-shadow: inset 0 0 0 1px var(--ev-btn-quiet-ring); }
.st-btn.is-go { background: var(--ev-btn-go); color: var(--ev-btn-go-ink); box-shadow: none; }
.st-btn:disabled { opacity: 0.45; cursor: default; }
.st-btn[aria-busy="true"] { opacity: 1; cursor: progress; }

/* The pinned bar: Back and Continue, always in reach of a thumb. */
.st-bar { position: sticky; bottom: 0; z-index: 2; background: var(--ev-bg); border-top: 1px solid var(--ev-card-line); padding: 12px 22px calc(12px + env(safe-area-inset-bottom)); }
.st-bar-in { display: grid; grid-template-columns: 1fr 2fr; gap: 10px; }
.st-back[hidden] { display: flex; visibility: hidden; }
.st-spin { display: none; width: 20px; height: 20px; border-radius: 50%; border: 2.5px solid currentColor; border-right-color: transparent; animation: st-spin .8s linear infinite; }
.st-next[aria-busy="true"] .st-spin { display: block; }
@keyframes st-spin { to { transform: rotate(360deg); } }

/* A choice is a real radio button, hidden under its card, so the arrow keys, the screen
   reader's "1 of 5" and the form all work as a radio group does. */
.st-mode input, .st-opt input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
.st-modes { display: grid; gap: 10px; }
.st-mode { position: relative; display: flex; gap: 14px; align-items: center; min-height: 64px; padding: 14px 16px; border: 1px solid var(--ev-card-line); border-radius: 14px; background: var(--ev-card); cursor: pointer; }
.st-mode:has(input:checked) { box-shadow: 0 0 0 2.5px var(--ev-ink); }
.st-radio { flex: none; width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--ev-ink-3); display: grid; place-items: center; }
.st-mode:has(input:checked) .st-radio { border-color: var(--ev-ink); background: var(--ev-ink); }
.st-mode:has(input:checked) .st-radio::after { content: ""; width: 10px; height: 6px; border: solid var(--ev-bg); border-width: 0 0 2.5px 2.5px; transform: rotate(-45deg) translate(1px, -1px); }
.st-mode-title { font-size: 18px; font-weight: 600; }
.st-modes + .st-garage { margin-top: 18px; }

/* A technology: its card, then Now / Later / Not for me. Now is green and Later the
   charger's "planned" blue, both positive; only Not for me is grey, so Later never reads as No. */
.st-techs { display: grid; gap: 12px; }
.st-tech { margin: 0; padding: 14px 14px 14px; min-width: 0; border: 1px solid var(--ev-card-line); border-radius: 14px; background: var(--ev-card); }
.st-tech-name { float: left; width: 100%; display: flex; align-items: center; gap: 12px; margin: 0 0 12px; padding: 0; font-size: 18px; font-weight: 600; }
.st-tech-name svg { flex: none; width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.st-seg { clear: both; display: grid; grid-template-columns: 1fr 1fr 1.25fr; gap: 8px; }
.st-opt { position: relative; display: block; cursor: pointer; }
.st-opt span { display: flex; align-items: center; justify-content: center; min-height: 48px; padding: 6px 8px; border-radius: 12px; background: var(--ev-muted-soft); color: var(--ev-ink-2); font-size: 16px; font-weight: 600; text-align: center; line-height: 1.15; transition: background .15s, color .15s, box-shadow .15s; }
.st-opt.is-now input:checked + span { background: var(--ev-good-soft); color: var(--ev-good); box-shadow: inset 0 0 0 2px var(--ev-good); }
.st-opt.is-later input:checked + span { background: var(--ev-night-soft); color: var(--ev-night); box-shadow: inset 0 0 0 2px var(--ev-night); }
.st-opt.is-no input:checked + span { background: transparent; color: var(--ev-ink); box-shadow: inset 0 0 0 2px var(--ev-ink-3); }
.st-tech:has(.is-no input:checked) .st-tech-name { color: var(--ev-ink-2); }

/* The garage question, shown under Batteries when a battery is Now or Later. Its choices are the
   bill screen's radio cards, set on the page colour so they read as choices inside the card. */
.st-garage-hint { clear: both; margin: -4px 0 12px; }
.st-garage .st-modes { gap: 8px; }
.st-garage .st-mode { min-height: 52px; padding: 10px 14px; background: var(--ev-bg); }
.st-garage .st-mode-title { font-size: 17px; }

/* Review: one chip per answer; a tap goes back to that question. */
.st-review { display: grid; gap: 18px; }
.st-review h2 { margin: 0 0 8px; font-size: 13px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ev-ink-2); }
.st-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.st-chip { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; min-height: 44px; padding: 8px 14px; border: 1px solid var(--ev-card-line); border-radius: 999px; background: var(--ev-card); color: var(--ev-ink); font-size: 16px; text-align: left; cursor: pointer; overflow-wrap: anywhere; }
.st-chip svg { flex: none; width: 16px; height: 16px; fill: none; stroke: var(--ev-ink-2); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.st-chip i { font-style: normal; font-weight: 600; }
.st-chip i.is-now { color: var(--ev-good); } .st-chip i.is-later { color: var(--ev-night); } .st-chip i.is-no { color: var(--ev-ink-2); }
.st-chip-note { border-radius: 14px; }
.st-alert { margin: 18px 0 0; padding: 14px 16px; border-radius: 14px; background: var(--ev-warn-soft); color: var(--ev-warn); font-size: 17px; line-height: 1.4; }
.st-alert:empty { display: none; }
.st-alert a { color: inherit; font-weight: 600; }

/* The honeypot: off screen for people, in the form for bots. */
.st-hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

/* Focus: the charger's brand orange ring on every control. */
.st-btn:focus-visible, .st-link:focus-visible, .st-chip:focus-visible, .st-tel:focus-visible, .st-brand:focus-visible { outline: 2px solid var(--ev-brand); outline-offset: 2px; }
.st-mode:has(input:focus-visible) { outline: 2px solid var(--ev-brand); outline-offset: 2px; }
.st-opt input:focus-visible + span { outline: 2px solid var(--ev-brand); outline-offset: 2px; }

@media (min-width: 700px) {
  .st-hero { padding: 28px 22px 22px; }
  .st-title { margin-top: 28px; font-size: 40px; font-weight: 600; }
  .st-main { flex: none; padding-bottom: 40px; }
  .st-bar { position: static; border-top: 0; padding-top: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .st-screen { animation: none; }
  .st-dots li, .st-opt span { transition: none; }
  .st-spin { animation-duration: 2.4s; }
}
