/*
 * Demo host theme — the copyable reference theme for integrators.
 *
 * This file is the ENTIRE styling surface a host owns (decision 0005): set
 * --tla-* custom properties anywhere above the embed (typically :root). They
 * inherit across the shadow boundary and the library stylesheet consumes
 * them. There is nothing to target inside the form — layout/structure is
 * library-owned, and host selectors cannot reach it.
 *
 * Grouped tokens don't auto-derive: overriding --tla-color-accent means also
 * setting its -hover / -tint / -focus-ring (and usually progress) mates.
 * Full token reference: docs/embedding.md §4.
 *
 * PROVENANCE (DEV-1935). Every value below was read from the LIVE
 * https://www.askaprice.com/ (home and /deals/audi/a3) on 2026-09-10 via
 * getComputedStyle, or is one of the site's own declared custom properties.
 * It previously carried values sampled from LEGACY drive.askaprice.com — a
 * blue accent, a green progress bar, Lato and a #444 dark band — none of which
 * exists on the current site. Values the live site has no rule for (hover,
 * error, disabled, hint, info/testimonial panels) are marked CHOSEN; they are
 * decisions awaiting sign-off, not measurements.
 *
 * There is no askaprice stylesheet variant and there should not be one — a
 * variant exists only when a flow needs a genuinely different layout, not when
 * a brand needs to look like itself.
 */
:root {
  /* YOUR site's font stack — paste the same value your own CSS already uses.
     Name the families exactly as your @font-face rules name them: this site
     registers `Poppins-Regular` (a family per weight), so that is what goes
     here, not plain `Poppins`.

     We ship no font files and host nothing. Your page already loads its faces,
     and the form picks them up across the shadow boundary.

     If your faces are separate families per weight rather than weights of one,
     the form's semibold headings will synthesise rather than use a real
     semibold face. Registering one family at 400/500/600 avoids that. */
  --tla-font-body: "Poppins-Regular", Arial, Helvetica, sans-serif;

  /* Text — the site runs pure black body copy (measured: body and every label
     are rgb(0,0,0)), with #212121 where a secondary tone appears. NOT in step
     with body{} in page.css, which is still the legacy #444444 until DEV-1879
     rebuilds the host page against the current site. */
  --tla-color-text: #000000;
  --tla-color-text-muted: #212121;
  --tla-color-heading: #000000;
  /* CHOSEN — the site has no microcopy/hint style to copy. A mid grey that
     still clears 4.5:1 on both the white control surface and the cream page. */
  --tla-color-hint: #5f5f5f;

  /* Surfaces — white controls and option rows on the page's cream panel.

     The form SHELL is transparent, so the host page's cream shows through and
     the form reads as part of the page rather than a white card dropped on it
     (`form` on the live site carries no background of its own — the panel
     behind it is `main.bg-background`, i.e. the page's). Inputs and option rows
     stay white via --tla-color-surface below. */
  --tla-color-form-surface: transparent;

  /* Top and bottom padding zeroed. Side padding is 1rem, the library default
     the live UK form uses: this host page has no side padding of its own, so
     at 0 the form runs to the screen edge on mobile. Set per axis rather than as one
     shorthand — the full-bleed bands cancel exactly --tla-form-padding-x, and
     while a shorthand hid that value from them the accordion and testimonials
     overhung the form by 24px each side and pushed mobile into horizontal
     scroll. */
  --tla-form-padding-x: 1rem;
  --tla-form-padding-top: 0;
  --tla-form-padding-bottom: 0;

  --tla-color-surface: #ffffff;
  /* The RECESSED surface, not the page. It reaches the loading skeleton, the
     fallback panel, the address-suggestion hover, the valuation guide/note
     panels, the secondary-button hover and the testimonial avatars — every one
     of which needs to read as distinct from what it sits on.

     An earlier draft set this to the page cream #fff5e8 on the reasoning that
     "the muted surface is the page and white is the raised element". That was
     wrong, and visibly so: with the form shell transparent, the loading
     skeleton rendered cream-on-cream at 1.00:1 and a loading step was a blank
     rectangle, and hovering "Start again" did nothing at all.

     #efe4d6 is the site's own --color-progress-bar. It scores only 1.16:1
     against the cream, but that exact pairing is PROVEN legible on the live
     site — it is the progress track, on this ground, and it reads clearly.
     Large blocks of colour do not need the 3:1 that a 1px indicator does. */
  --tla-color-surface-muted: #efe4d6;

  /* Borders — the site's --color-neutral-beige, the 1px edge on every option
     row. The site's inputs are borderless (measured `border-width: 0px`); ours
     carry this 1px edge, because --tla-color-border is shared by inputs and
     option rows and the two cannot differ from a host declaration. */
  --tla-color-border: #ede1d2;

  /* Banded content section (the accordion). The legacy #444 dark band is gone
     — the current site keeps everything inside the 800px column and uses
     pastel cards. CHOSEN: a white card on the cream page, which is the
     dominant pattern on the live page, rather than picking one of its five
     pastels arbitrarily. Set together: a surface without a matching text
     colour is how you get dark-on-dark. */
  --tla-color-section-surface: #ffffff;
  --tla-color-section-text: #000000;
  --tla-color-section-border: #ede1d2;

  /* Accent — the site's --color-primary-500, the yellow on every primary
     button. THE TRAP IS THE CONTRAST TOKEN: black on yellow, not the default
     white, which would be unreadable. It also drives the selected option
     marker's tick, so check it everywhere the accent carries text or a glyph,
     not just on Next.
     The site's selected marker is amber-400 #fdc700 against these #ffc300
     buttons; one accent token covers both — the difference is imperceptible
     and 0005 keeps the token surface deliberately small.
     -hover and -tint are CHOSEN: the site declares no :hover rule on
     .primary-button at all. */
  --tla-color-accent: #ffc300;
  --tla-color-accent-hover: #e6b000;
  --tla-color-accent-contrast: #000000;
  --tla-color-accent-tint: rgba(255, 195, 0, 0.1);
  /* INK — the selected option's label and the option-row hover border. These
     read the accent by default, which on a yellow brand colour means a
     1.61:1 label on the white row: unreadable the moment anything is chosen.
     Black is the site's own answer — on askaprice.com selecting an option
     fills the marker #fdc700 and leaves the label black (measured on
     /deals/audi/a1, 2026-09-14). The border and glow keep the accent, so the
     highlight is still yellow; only the text darkens. */
  --tla-color-accent-ink: #000000;

  /* Progress — the fill is ORANGE (the site's orange-500), not the accent
     yellow, on a #efe4d6 beige track. Both measured. */
  --tla-color-progress: #ff6900;
  --tla-color-progress-track: #efe4d6;

  /* The back/next circles beside the bar. All four are CHOSEN — the live site
     has no equivalent control, because its bar stands alone with no nav and no
     step counter.

     These three are read from COMPONENT MARKUP, not from default.css
     (ProgressBar.tsx paints the SVG's circle fill/stroke and the chevron via
     var() in attributes), so they do not appear in a scan of the stylesheet and
     were missed on the first pass. Left unset, the circle renders the library's
     cold greys — a #dde1e5 stroke and a #444 chevron — against a warm cream
     page. Matched to the page's own family instead: white disc, the same
     neutral-beige edge every option row carries, black chevron. */
  --tla-progress-nav-bg: #ffffff;
  --tla-progress-nav-border: #ede1d2;
  --tla-progress-nav-chevron: #000000;
  /* Disabled fills the disc (default.css drops the chevron to 0.5 opacity on
     top); matched to the track so a spent control reads as part of the bar. */
  --tla-progress-nav-disabled-bg: #efe4d6;

  /* Standalone icon fill (rating stars) — follows the brand yellow. */
  --tla-color-ui-icon: #ffc300;

  /* States — the site's red-500 #fb2c36 is the colour of the required-field
     asterisk, which is the only error signal it exposes without submitting a
     real enquiry. It must never follow the accent: a yellow "error" border is
     indistinguishable from the brand.

     The two split, because they are held to different bars:
       - error-BORDER keeps the site's exact #fb2c36. A border is a UI
         indicator, so WCAG 1.4.11 asks 3:1, and it scores 3.81 on white /
         3.53 on the cream. Passes, and stays faithful to the site.
       - error-TEXT darkens to #c10007. `.tla-field-error` is 0.85rem body
         copy, so WCAG 1.4.3 asks 4.5:1, and the site's red-500 scores
         3.81 / 3.53 — a FAIL. An earlier draft used it anyway, which was also
         a regression on the #cc0000 it replaced (5.89 / 5.46).
         #c10007 is Tailwind red-700, the same ramp the site's own red-500
         comes from, and scores 6.42 / 5.96.
     All ratios here are sRGB relative luminance per WCAG 2.2, measured
     2026-09-14 against #ffffff (the control surface) and #fff5e8 (the page).

     focus-ring takes the site's GEOMETRY in a colour that passes. Resolved
     2026-09-14 from rendered comparisons, not from ratios alone; five
     candidates were drawn as the real library controls over both the white
     control surface and the cream page. Ratios below are white / cream.

       A  3px outline, offset 1px, rgba(0,0,0,.6)   5.74 / 5.33
          The previous value. Legible, but a heavy dark box that frames the
          yellow Next button in near-black.
       B  2px ring, #ffc300, tight                  1.61 / 1.49   REJECTED
          What the site itself renders (`--tw-ring-color:
          var(--color-primary-500)`, source read 2026-09-14). Beyond failing
          1.4.11, it is COMPLETELY INVISIBLE on the primary button — a yellow
          ring on a yellow button leaves the main CTA with no focus indicator
          at all. Seen on screen; the strongest argument against copying the
          site here.
       C  2px ring, #854d0e, tight                  6.85 / 6.35   CHOSEN
          The site's shape and weight in a dark amber from the same family.
          Visible on white, on cream, and on the yellow button.
       D  2px outline, rgba(0,0,0,.6), offset 0     5.74 / 5.33
          Smallest change from A, but still reads grey-on-brand.
       E  2px #ffc300 + 1px #854d0e halo            halo 6.85 / 6.35
          Better than C: brand yellow inner ring, thin dark outer edge
          carrying 1.4.11 (satisfied when ANY part of the indicator clears
          3:1). Not adopted only because it needs a second ring colour in the
          library. Open for Ed, not dropped.

     This was only decidable once --tla-focus-ring-width / -offset existed:
     width and offset were hard-coded, so colour was the sole lever and the
     ring could never be the right SHAPE. That was the real constraint.

     CORRECTION of record: an earlier draft of this comment said the site
     "ships no visible focus indicator at all", generalised from one
     programmatic .focus() on one select that computed `box-shadow: none`.
     Wrong — Tailwind's `ring-<color>` only sets the colour variable and needs
     a width utility to draw anything, so that reading showed an element where
     no ring rendered. The site does specify a ring. The conclusion held; the
     reason for it did not.
  */
  --tla-color-error-text: #c10007;
  --tla-color-error-border: #fb2c36;
  --tla-color-focus-ring: #854d0e;
  --tla-focus-ring-width: 2px;
  --tla-focus-ring-offset: 0;

  /* Info panel (block-body's `info` variant) — CHOSEN from the site's own
     declared palette (--color-accent-yellow over --color-accent-primary)
     rather than invented, since the live page has no equivalent panel inside
     its form. Surface and text set together. */
  --tla-color-info-surface: #ffecbb;
  --tla-color-info-text: #000000;
  --tla-color-info-border: #facc92;

  /* Testimonials — CHOSEN, and the pairing is the opposite way round to most
     panels: a white card on the cream page band, matching how every other
     raised element on the live site sits. */
  --tla-color-testimonials-surface: #fff5e8;
  --tla-color-testimonials-card: #ffffff;

  /* The form column — 800px on the live site (`form.max-w-[800px]`, measured
     2026-09-10), against the library default of 700px. */
  --tla-form-max-width: 800px;

  /* Corner rounding. The site runs TWO radii — 8px on inputs (`rounded-lg`) and
     12px on option rows and buttons (`rounded-xl`), both measured 2026-09-10 —
     and the token surface cannot express that: default.css drives inputs, option
     rows, buttons AND panels off --_radius-md (19 uses), while --_radius-sm
     reaches only 4 incidental places (a focus offset, the tick badge, a card
     border, one table corner). So one value has to cover all four.
     --tla-radius-input now provides exactly that seam, so both are correct:
     12px on rows, buttons and panels via -md, 8px on text entry via -input. */
  --tla-radius-sm: 0.5rem;
  --tla-radius-md: 0.75rem;
  --tla-radius-input: 0.5rem;

  /* NOT SET, deliberately:
     --tla-space-1..6      — the library's 4px scale already matches the site's.
     --tla-bleed and its   — the legacy full-bleed dark band is GONE. Nothing on
     per-component mates     the current site escapes the 800px column, so the
                             bands stop at the form edge (the library default)
                             and there is nothing left for a bleed to serve. */
}
