/* FixMyCar driver flow: app design. Navy + amber, one typeface, soft depth. Light and dark. */
:root {
  color-scheme: light dark;
  --bg: #F5F1EA; --bg-glass: rgba(245, 241, 234, .84); --surface: #FFFFFF; --sunken: #EFE9DF; --raised: #FAF7F2;
  --ink: #12151A; --ink-2: #454B55; --muted: #6A6F78; --line: #E1D9CC; --control: #8A8F98;
  --amber: #FFB627; --amber-2: #FF9A0F; --amber-soft: #FFF4DC; --amber-ink: #A35F00; --on-amber: #1A1206;
  --hero: #12151A; --hero-2: #1F242C; --me: linear-gradient(135deg, #2A3039 0%, #12151A 100%); --on-me: #FFFFFF;
  --focus: #2E6BE6; --on-tone: #FFFFFF;
  --success: #067647; --success-bg: #ECFDF3; --warning: #B54708; --warning-bg: #FFF6ED;
  --danger: #D92D20; --danger-bg: #FEF3F2; --info: #175CD3; --info-bg: #EFF8FF; --unknown: #475467; --unknown-bg: #F2F4F7;
  --ai: #344054; --ai-bg: #F2F4F7; --user: #93370D; --user-bg: #FEF6EE; --plate: #F7D117; --plate-blue: #003399;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .05);
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 6px 20px rgba(16, 24, 40, .06);
  --shadow-lg: 0 2px 4px rgba(16, 24, 40, .04), 0 18px 40px rgba(16, 24, 40, .12);
  --card-border: transparent;
  --sans: "Instrument Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --chrome: #F5F1EA;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0A0F1A; --bg-glass: rgba(10, 15, 26, .78); --surface: #121A2A; --sunken: #18223A; --raised: #162036;
    --ink: #F5F7FA; --ink-2: #C8CFDA; --muted: #98A2B3; --line: #222C40; --control: #6B778C;
    --amber-soft: #2E2410; --amber-ink: #FFC95C; --hero: #070B14; --hero-2: #121D33;
    --me: linear-gradient(135deg, #34507F 0%, #22355A 100%); --focus: #6EA8FE; --on-tone: #0A0F1A;
    --success: #47CD89; --success-bg: #0C2A1D; --warning: #F7A042; --warning-bg: #2E1F0C;
    --danger: #F97066; --danger-bg: #301515; --info: #6EB5FF; --info-bg: #0C2239; --unknown: #A9B3C2; --unknown-bg: #1A2337;
    --ai: #D0D5DD; --ai-bg: #1A2337; --user: #F7B27A; --user-bg: #2E1C10;
    --shadow-sm: none; --shadow: none; --shadow-lg: 0 18px 40px rgba(0, 0, 0, .45);
    --card-border: #222C40; --chrome: #0A0F1A;
  }
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; overscroll-behavior-y: contain; }
body { margin: 0; overflow-x: clip; background: var(--bg); color: var(--ink); font: 16px/1.5 var(--sans); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
button, input, textarea { font: inherit; color: inherit; }
button { touch-action: manipulation; -webkit-user-select: none; user-select: none; }
a { color: var(--info); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
h1:focus { outline: none; }

.fx { max-width: 600px; margin: 0 auto; min-height: 100vh; min-height: 100dvh; overflow-x: clip; }
.fx-screen { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
.fx-screen--home { --chrome: var(--hero); }
.fx-body { flex: 1; padding: 16px 20px 32px; display: flex; flex-direction: column; }
.fx-loading { align-items: center; justify-content: center; gap: 14px; color: var(--muted); }
.fx-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.fx-hidden { display: none !important; }
.fx-grow { flex: 1; }
.fx-center { text-align: center; }

/* ---------- top bar */
.fx-bar { position: sticky; top: 0; z-index: 20; padding-top: env(safe-area-inset-top); background: var(--bg-glass); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); box-shadow: 0 1px 0 transparent; transition: box-shadow .2s; }
.fx-scrolled .fx-bar { box-shadow: 0 1px 0 var(--line); }
.fx-bar__row { height: 56px; padding: 0 16px; display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 8px; }
.fx-bar__side { display: flex; align-items: center; min-width: 0; }
.fx-bar__side--end { justify-content: flex-end; }
.fx-bar__title { margin: 0; font-size: 16px; font-weight: 600; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fx-word { display: inline-flex; align-items: center; gap: 9px; font-size: 19px; font-weight: 700; letter-spacing: -.03em; color: var(--ink); text-decoration: none; }
.fx-toplink { background: none; border: 0; padding: 10px 0; font-size: 15px; font-weight: 600; color: var(--info); text-decoration: none; cursor: pointer; white-space: nowrap; }
.fx-icon-btn { width: 40px; height: 40px; margin-left: -8px; display: inline-flex; align-items: center; justify-content: center; border: 0; background: var(--surface); box-shadow: var(--shadow-sm), 0 0 0 1px var(--line); border-radius: 50%; color: var(--ink); cursor: pointer; transition: transform .12s var(--ease); }
.fx-icon-btn:active { transform: scale(.92); }
.fx-progress { height: 3px; margin: 0 16px; border-radius: 3px; background: var(--line); overflow: hidden; }
.fx-progress span { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, var(--amber), var(--amber-2)); transition: width .6s var(--ease); }

.fx-mark { flex: none; width: 30px; height: 30px; border-radius: 10px; background: linear-gradient(140deg, #FFC85A, var(--amber-2)); color: var(--on-amber); display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 2px 6px rgba(255, 154, 15, .35), inset 0 1px 0 rgba(255, 255, 255, .45); }

/* ---------- home: navy hero */
.fx-screen--home .fx-bar { position: absolute; left: 0; right: 0; background: transparent; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
.fx-screen--home { position: relative; }
.fx-screen--home .fx-word { color: #fff; }
.fx-screen--home .fx-toplink { color: #FFD27A; }
.fx-hero { position: relative; overflow: hidden; border-radius: 0 0 28px 28px; padding: calc(74px + env(safe-area-inset-top)) 20px 76px; color: #fff; background:
  radial-gradient(90% 70% at 100% 0%, rgba(255, 182, 39, .28) 0%, rgba(255, 182, 39, 0) 60%),
  radial-gradient(70% 60% at 0% 100%, rgba(46, 107, 230, .22) 0%, rgba(46, 107, 230, 0) 60%),
  linear-gradient(180deg, var(--hero) 0%, var(--hero-2) 100%);
  display: flex; flex-direction: column; gap: 14px; }
.fx-kicker { align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 10px; border-radius: 999px; background: rgba(255, 255, 255, .08); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12); font-size: 13px; font-weight: 600; color: rgba(255, 255, 255, .86); }
.fx-kicker__dot { width: 8px; height: 8px; border-radius: 50%; background: #47CD89; box-shadow: 0 0 0 4px rgba(71, 205, 137, .2); }
.fx-display { font-size: 40px; line-height: 44px; font-weight: 700; letter-spacing: -.04em; margin: 0; text-wrap: balance; }
.fx-display--md { font-size: 30px; line-height: 36px; letter-spacing: -.03em; }
.fx-accent { background: linear-gradient(90deg, #FFC85A, var(--amber-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.fx-hero .fx-lead { color: rgba(255, 255, 255, .74); max-width: 34em; }
.fx-trust { list-style: none; margin: 2px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.fx-trust li { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: rgba(255, 255, 255, .07); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1); font-size: 13px; font-weight: 600; color: #fff; }
.fx-trust svg { color: #FFC85A; }
.fx-body--home { margin-top: -48px; position: relative; z-index: 2; padding-top: 0; gap: 16px; }
.fx-sheet { background: var(--surface); border-radius: 28px; padding: 20px 16px 16px; box-shadow: var(--shadow-lg), 0 0 0 1px var(--card-border); }
.fx-sheet__title { margin: 0 4px 14px; font-size: 13px; line-height: 18px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.fx-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.fx-tile { display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 10px; min-height: 104px; padding: 16px 6px 12px; border: 0; border-radius: 20px; background: var(--raised); text-align: center; cursor: pointer; transition: transform .15s var(--ease), background .15s; }
.fx-tile:hover { background: var(--sunken); }
.fx-tile:active { transform: scale(.95); }
.fx-tile__icon { width: 46px; height: 46px; border-radius: 15px; display: inline-flex; align-items: center; justify-content: center; }
.fx-tile__label { font-size: 13px; line-height: 17px; font-weight: 600; color: var(--ink); }
.fx-tone--danger { background: var(--danger-bg); color: var(--danger); }
.fx-tone--warn { background: var(--warning-bg); color: var(--warning); }
.fx-tone--info { background: var(--info-bg); color: var(--info); }
.fx-tone--ai { background: #F4F3FF; color: #5925DC; }
.fx-tone--unknown { background: var(--unknown-bg); color: var(--unknown); }
@media (prefers-color-scheme: dark) { .fx-tone--ai { background: #1F1A3A; color: #BDB4FE; } }
.fx-how { padding: 4px 4px 0; }
.fx-how .fx-sheet__title { margin-left: 0; }
.fx-how__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.fx-how__list li { display: flex; gap: 14px; align-items: flex-start; }
.fx-how__list li > span:last-child { display: flex; flex-direction: column; gap: 1px; font-size: 14px; line-height: 20px; color: var(--muted); }
.fx-how__list strong { font-size: 15px; color: var(--ink); font-weight: 600; }
.fx-how__n { flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--amber-soft); color: var(--amber-ink); font-size: 14px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.fx-safety-note { margin: 0 10px; display: flex; justify-content: center; gap: 6px; font-size: 12px; line-height: 17px; text-align: left; color: var(--danger); font-weight: 500; }
.fx-safety-note svg { flex: none; margin-top: 1px; }

/* ---------- bottom dock */
.fx-dock { position: sticky; bottom: 0; z-index: 15; margin-top: auto; padding: 12px 16px calc(18px + env(safe-area-inset-bottom)); background: var(--bg-glass); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); box-shadow: 0 -1px 0 var(--line); }
.fx-dock__inner { display: flex; flex-direction: column; gap: 8px; }
.fx-dock--composer { padding: 26px 14px calc(14px + env(safe-area-inset-bottom)); background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0, var(--bg) 26px); -webkit-backdrop-filter: none; backdrop-filter: none; box-shadow: none; }
.fx-dock--composer .fx-dock__inner { gap: 10px; }
.fx-dock__hint { margin: 0; text-align: center; font-size: 13px; line-height: 18px; color: var(--muted); }
.fx-dock .fx-fine { margin: 0; }

/* composer */
@property --fx-angle { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
.fx-composer { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 14px 12px 10px 18px; border: 2px solid transparent; border-radius: 26px; cursor: text;
  background: linear-gradient(var(--surface), var(--surface)) padding-box,
    conic-gradient(from var(--fx-angle), #FFB627 0%, #FF7A00 12%, #FFE08A 24%, #FFB627 34%, rgba(255, 182, 39, .38) 50%, rgba(255, 182, 39, .38) 84%, #FFB627 100%) border-box;
  box-shadow: 0 10px 30px rgba(255, 154, 15, .16), 0 2px 6px rgba(16, 24, 40, .06);
  animation: fx-orbit 4s linear infinite; transition: box-shadow .25s; }
.fx-composer:focus-within, .fx-composer.is-filled {
  background: linear-gradient(var(--surface), var(--surface)) padding-box,
    conic-gradient(from var(--fx-angle), #FFB627, #FF7A00, #FFE08A, #FFB627) border-box;
  box-shadow: 0 0 0 5px rgba(255, 182, 39, .16), 0 14px 34px rgba(255, 154, 15, .22); animation-duration: 2.6s; }
.fx-composer textarea { display: block; width: 100%; min-height: 48px; border: 0; resize: none; padding: 0 6px 0 0; font-size: 17px; line-height: 24px; background: transparent; overflow-y: hidden; scrollbar-width: thin; }
.fx-composer textarea:focus { outline: none; }
.fx-composer textarea::placeholder { color: var(--muted); }
.fx-composer__bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.fx-composer__hint { font-size: 13px; line-height: 18px; color: var(--muted); }
.fx-send { flex: none; width: 40px; height: 40px; border: 0; border-radius: 13px; background: linear-gradient(140deg, #FFC85A, var(--amber-2)); color: var(--on-amber); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 4px 12px rgba(255, 154, 15, .4); transition: transform .15s var(--ease), opacity .15s, box-shadow .15s, background .15s; }
.fx-send:active { transform: scale(.9); }
.fx-send:disabled { background: var(--sunken); color: var(--muted); box-shadow: none; cursor: default; }
@keyframes fx-orbit { to { --fx-angle: 360deg; } }

/* ---------- type */
.fx-h1 { font-size: 28px; line-height: 34px; font-weight: 700; letter-spacing: -.035em; margin: 6px 0 6px; text-wrap: balance; }
.fx-lead { font-size: 17px; line-height: 25px; color: var(--ink-2); margin: 0 0 6px; }
.fx-overline { font-size: 13px; line-height: 18px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); margin: 26px 4px 10px; }
.fx-muted { color: var(--muted); font-size: 14px; line-height: 20px; }
.fx-fine { color: var(--muted); font-size: 13px; line-height: 18px; margin: 10px 0 0; }
.fx-fine a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.fx-strong { font-size: 19px; line-height: 26px; font-weight: 700; letter-spacing: -.02em; margin: 0; }
.fx-hint { font-size: 13px; color: var(--muted); }
.fx-dist { flex: none; font-size: 14px; line-height: 23px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---------- chat */
.fx-thread { display: flex; flex-direction: column; padding-top: 8px; }
.fx-msg { display: flex; align-items: flex-end; gap: 8px; margin-top: 16px; }
.fx-msg--cont { margin-top: 4px; }
.fx-msg--grouped .fx-mark { visibility: hidden; }
.fx-msg--me { justify-content: flex-end; }
.fx-msg .fx-mark { width: 30px; height: 30px; border-radius: 50%; }
.fx-bubble { max-width: 82%; padding: 11px 15px; border-radius: 22px; font-size: 16px; line-height: 23px; overflow-wrap: anywhere; display: flex; flex-direction: column; gap: 3px; }
.fx-msg--bot .fx-bubble { background: var(--surface); border-bottom-left-radius: 8px; box-shadow: var(--shadow), 0 0 0 1px var(--card-border); }
.fx-msg--bot.fx-msg--grouped .fx-bubble { border-bottom-left-radius: 22px; }
.fx-msg--me .fx-bubble { background: var(--me); color: var(--on-me); border-bottom-right-radius: 8px; box-shadow: 0 4px 14px rgba(11, 18, 32, .18); }
.fx-bubble__label { font-size: 12px; line-height: 16px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: var(--amber-ink); }
.fx-bubble--error { background: var(--danger-bg) !important; box-shadow: none !important; color: var(--danger); font-weight: 500; }
.fx-bubble--typing { flex-direction: row; align-items: center; gap: 10px; padding: 14px 16px; }
.fx-typing__label { font-size: 14px; line-height: 18px; color: var(--muted); }
.fx-dots { display: inline-flex; gap: 4px; }
.fx-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--amber-2); animation: fx-bounce 1.2s infinite ease-in-out; }
.fx-dots i:nth-child(2) { animation-delay: .15s; }
.fx-dots i:nth-child(3) { animation-delay: .3s; }
.fx-replies { display: flex; flex-direction: column; gap: 8px; }
.fx-reply-chip { display: flex; align-items: center; min-height: 52px; padding: 12px 18px; border: 0; border-radius: 18px; background: var(--surface); box-shadow: var(--shadow-sm), 0 0 0 1px var(--line); font-size: 16px; line-height: 22px; font-weight: 500; text-align: left; cursor: pointer; transition: transform .12s var(--ease), box-shadow .15s, background .15s; }
.fx-reply-chip:hover { box-shadow: var(--shadow-sm), 0 0 0 1.5px var(--amber); }
.fx-reply-chip:active { transform: scale(.98); background: var(--amber-soft); box-shadow: 0 0 0 2px var(--amber); }
.fx-thread--recap { padding-top: 0; margin-bottom: 4px; }
.fx-recap { margin: 6px 0 0; align-self: flex-end; max-width: 82%; text-align: right; font-size: 13px; line-height: 18px; color: var(--muted); }

/* ---------- safety */
.fx-screen--danger { --chrome: var(--danger-bg); }
.fx-screen--danger .fx-bar { background: color-mix(in srgb, var(--danger-bg) 90%, transparent); }
.fx-alert { margin: -16px -20px 0; padding: 18px 20px 28px; background: linear-gradient(180deg, var(--danger-bg) 0%, var(--danger-bg) 70%, var(--bg) 100%); display: flex; flex-direction: column; gap: 12px; }
.fx-alert__icon { width: 60px; height: 60px; border-radius: 20px; background: linear-gradient(140deg, #F04438, #B42318); color: #fff; display: flex; align-items: center; justify-content: center; box-shadow: 0 8px 20px rgba(217, 45, 32, .35); }
.fx-alert__title { margin: 0; font-size: 32px; line-height: 37px; font-weight: 700; letter-spacing: -.035em; color: var(--danger); text-wrap: balance; }
.fx-alert__text { margin: 0; font-size: 17px; line-height: 25px; }
.fx-steps { margin: 0; padding: 2px 0; list-style: none; display: flex; flex-direction: column; gap: 14px; }
.fx-steps li { display: flex; gap: 12px; line-height: 23px; }
.fx-steps li > span { flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--amber-soft); color: var(--amber-ink); font-weight: 700; font-size: 14px; display: flex; align-items: center; justify-content: center; }
.fx-note { margin: 16px 0 0; padding: 14px 16px; border-radius: 18px; background: var(--unknown-bg); font-size: 14px; line-height: 20px; color: var(--ink-2); display: flex; gap: 10px; }
.fx-note svg { flex: none; margin-top: 2px; }
.fx-note--clock { background: var(--info-bg); color: var(--ink); font-size: 15px; line-height: 22px; }
.fx-note--clock svg { color: var(--info); }

/* ---------- answer */
.fx-verdict { position: relative; overflow: hidden; margin-top: 18px; padding: 20px; border-radius: 26px; display: flex; gap: 14px; align-items: flex-start; background: linear-gradient(160deg, var(--tone-bg) 0%, var(--surface) 140%); box-shadow: var(--shadow), 0 0 0 1px var(--card-border); }
.fx-verdict--ok { --tone: var(--success); --tone-bg: var(--success-bg); --tone-a: #17B26A; --tone-b: #067647; }
.fx-verdict--warn { --tone: var(--warning); --tone-bg: var(--warning-bg); --tone-a: #F79009; --tone-b: #B54708; }
.fx-verdict--danger { --tone: var(--danger); --tone-bg: var(--danger-bg); --tone-a: #F04438; --tone-b: #B42318; }
.fx-verdict--unknown { --tone: var(--unknown); --tone-bg: var(--unknown-bg); --tone-a: #667085; --tone-b: #344054; }
.fx-verdict__icon { flex: none; width: 48px; height: 48px; border-radius: 16px; background: linear-gradient(140deg, var(--tone-a), var(--tone-b)); color: #fff; display: flex; align-items: center; justify-content: center; box-shadow: 0 6px 16px color-mix(in srgb, var(--tone-a) 35%, transparent); }
.fx-verdict__body { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 0; }
.fx-verdict__q { margin: 0; font-size: 12px; line-height: 16px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.fx-verdict__a { margin: 0; font-size: 26px; line-height: 31px; font-weight: 700; letter-spacing: -.035em; color: var(--tone); }
.fx-verdict__note { margin: 0; font-size: 15px; line-height: 21px; color: var(--ink-2); }
.fx-card { background: var(--surface); border-radius: 24px; padding: 18px 20px; margin-top: 12px; box-shadow: var(--shadow), 0 0 0 1px var(--card-border); display: flex; flex-direction: column; gap: 8px; }
.fx-card p { margin: 0; }
.fx-card .fx-fine { margin-top: 4px; }
.fx-card__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.fx-card__title { margin: 0; display: inline-flex; align-items: center; gap: 6px; font-size: 12px; line-height: 16px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.fx-cost { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.fx-cost__range { margin: 0; font-size: 36px; line-height: 42px; font-weight: 700; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.fx-cost__unit { font-size: 16px; font-weight: 500; letter-spacing: 0; color: var(--muted); }
.fx-cost__labour { margin: 0 0 6px !important; font-size: 15px; color: var(--ink-2); }
.fx-cause { display: flex; flex-direction: column; gap: 4px; padding: 14px 0; }
.fx-cause + .fx-cause { border-top: 1px solid var(--line); }
.fx-cause__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.fx-todo { margin-top: 20px; padding: 18px 20px; border-radius: 24px; background: var(--success-bg); }
.fx-todo__title { margin: 0 0 8px; display: flex; align-items: center; gap: 6px; font-size: 16px; color: var(--success); }
.fx-todo ul { margin: 0; padding-left: 20px; font-size: 15px; line-height: 23px; }
.fx-todo li + li { margin-top: 4px; }

/* ---------- grouped sections */
.fx-group { margin-top: 22px; }
.fx-group__title { margin: 0 6px 8px; display: flex; align-items: center; gap: 6px; font-size: 12px; line-height: 16px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.fx-group__body { background: var(--surface); border-radius: 24px; padding: 16px 18px; box-shadow: var(--shadow), 0 0 0 1px var(--card-border); }
.fx-group__body > .fx-cause:first-child { padding-top: 0; }
.fx-group__body > .fx-cause:last-child { padding-bottom: 0; }

/* ---------- pills */
.fx-pill { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 999px; font-size: 12px; line-height: 16px; font-weight: 600; white-space: nowrap; }
.fx-pill--ai { background: var(--ai-bg); color: var(--ai); }
.fx-pill--ink { background: var(--ink); color: var(--surface); }
.fx-pill--user { background: var(--user-bg); color: var(--user); }
.fx-pill--info { background: var(--info-bg); color: var(--info); }
.fx-pill--ok { background: var(--success-bg); color: var(--success); }
.fx-pill--warn { background: var(--warning-bg); color: var(--warning); }
.fx-pill--danger { background: var(--danger-bg); color: var(--danger); }
.fx-pill--unknown { background: var(--unknown-bg); color: var(--unknown); }
.fx-screen--danger .fx-bar .fx-pill--danger { background: var(--danger); color: var(--on-tone); }
.fx-pills { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.fx-pills:empty { display: none; }

/* ---------- forms */
.fx-form { display: flex; flex-direction: column; }
.fx-field { display: flex; flex-direction: column; gap: 7px; margin-top: 16px; }
.fx-group__body > .fx-field:first-child, .fx-field--first { margin-top: 0; }
.fx-field label { font-size: 14px; font-weight: 600; color: var(--ink-2); }
.fx-input { height: 52px; padding: 0 16px; border: 1px solid var(--control); border-radius: 14px; background: var(--surface); font-size: 16px; transition: border-color .15s, box-shadow .15s; }
.fx-input:focus { border-color: var(--amber-2); outline: none; box-shadow: 0 0 0 4px rgba(255, 182, 39, .2); }
.fx-input::placeholder { color: var(--muted); }
.fx-grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.fx-q { margin: 20px 0 10px; font-size: 15px; font-weight: 600; }
.fx-q--first { margin-top: 0; }
.fx-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.fx-chip { min-height: 42px; padding: 0 16px; border: 0; border-radius: 999px; background: var(--sunken); font-size: 15px; font-weight: 500; color: var(--ink); cursor: pointer; transition: transform .12s var(--ease), background .15s, color .15s, box-shadow .15s; }
.fx-chip:hover { box-shadow: inset 0 0 0 1px var(--control); }
.fx-chip:active { transform: scale(.95); }
.fx-chip.is-on { background: var(--ink); color: var(--surface); box-shadow: 0 4px 10px rgba(11, 18, 32, .18); }
.fx-seg { display: flex; gap: 2px; padding: 4px; border-radius: 14px; background: var(--sunken); }
.fx-seg button { flex: 1; min-height: 40px; border: 0; border-radius: 11px; background: transparent; font-size: 14px; font-weight: 600; color: var(--muted); cursor: pointer; transition: background .2s, box-shadow .2s, color .2s; }
.fx-seg button.is-on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(16, 24, 40, .12), 0 1px 2px rgba(16, 24, 40, .06); }
.fx-check { display: flex; gap: 12px; align-items: flex-start; margin-top: 14px; padding: 16px 18px; border-radius: 20px; background: var(--surface); box-shadow: var(--shadow-sm), 0 0 0 1px var(--line); cursor: pointer; }
.fx-check input { width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--amber-2); flex: none; }
.fx-check > span { display: flex; flex-direction: column; gap: 2px; }
.fx-plate { display: flex; height: 64px; border-radius: 12px; overflow: hidden; border: 2px solid #15191E; background: linear-gradient(180deg, #FADB3A, var(--plate)); box-shadow: 0 6px 16px rgba(247, 209, 23, .25); }
.fx-plate__band { width: 42px; background: var(--plate-blue); color: var(--plate); display: flex; align-items: flex-end; justify-content: center; padding-bottom: 8px; font-size: 12px; font-weight: 700; }
.fx-plate__input { flex: 1; min-width: 0; border: 0; background: transparent; color: #15191E; font-size: 30px; font-weight: 700; letter-spacing: .08em; text-align: center; text-transform: uppercase; }
.fx-plate__input::placeholder { color: rgba(21, 25, 30, .3); }
.fx-plate__input:focus { outline: none; }
.fx-plate:focus-within { box-shadow: 0 0 0 4px rgba(255, 182, 39, .35); }
.fx-found:empty { display: none; }
.fx-found { margin-top: 12px; }
.fx-found__loading { display: flex; align-items: center; gap: 8px; margin: 0; }
.fx-found__card { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; background: var(--success-bg); }
.fx-found__icon { flex: none; width: 38px; height: 38px; border-radius: 12px; background: linear-gradient(140deg, #17B26A, #067647); color: #fff; display: flex; align-items: center; justify-content: center; }
.fx-found__text { display: flex; flex-direction: column; min-width: 0; }
.fx-found__card .fx-pill { margin-left: auto; }
.fx-text-link { align-self: flex-start; background: none; border: 0; padding: 12px 0 0; font-size: 14px; font-weight: 600; color: var(--info); cursor: pointer; }
.fx-quiet-link { align-self: center; background: none; border: 0; padding: 10px 14px; font-size: 15px; font-weight: 600; color: var(--ink-2); cursor: pointer; }
.fx-quiet-link:active { opacity: .6; }

/* ---------- garages */
.fx-near { margin-top: 14px; display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-radius: 18px; background: var(--surface); box-shadow: var(--shadow-sm), 0 0 0 1px var(--line); }
.fx-near svg { color: var(--amber-2); flex: none; }
.fx-near .fx-text-link { margin-left: auto; padding: 0; }
.fx-garages { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.fx-garage { display: flex; gap: 14px; align-items: flex-start; width: 100%; padding: 16px; border: 0; border-radius: 24px; background: var(--surface); box-shadow: var(--shadow), 0 0 0 1px var(--card-border); text-align: left; cursor: pointer; transition: transform .12s var(--ease), box-shadow .2s, opacity .2s; }
.fx-garage:active { transform: scale(.985); }
.fx-garage.is-on { box-shadow: var(--shadow), 0 0 0 2px var(--amber-2); }
.fx-garage.is-full { opacity: .5; }
.fx-garage__avatar { flex: none; width: 46px; height: 46px; border-radius: 15px; background: linear-gradient(140deg, #22304B, #0B1220); color: #FFC85A; display: flex; align-items: center; justify-content: center; font-size: 19px; font-weight: 700; }
.fx-garage__avatar--sm { width: 36px; height: 36px; border-radius: 12px; font-size: 16px; }
.fx-garage__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.fx-garage__head { display: flex; justify-content: space-between; gap: 8px; font-size: 17px; line-height: 23px; letter-spacing: -.01em; }
.fx-garage__track { display: inline-flex; align-items: flex-start; gap: 6px; font-size: 14px; line-height: 20px; color: var(--ink-2); margin-top: 2px; }
.fx-garage__track svg { flex: none; margin-top: 3px; color: var(--muted); }
.fx-tick { flex: none; width: 26px; height: 26px; margin-top: 10px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--control); display: flex; align-items: center; justify-content: center; color: var(--on-amber); transition: background .2s, box-shadow .2s; }
.fx-garage.is-on .fx-tick { background: linear-gradient(140deg, #FFC85A, var(--amber-2)); box-shadow: 0 3px 8px rgba(255, 154, 15, .4); }
.fx-empty { margin-top: 18px; padding: 28px 20px; border-radius: 26px; background: var(--surface); box-shadow: var(--shadow), 0 0 0 1px var(--card-border); display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; }
.fx-empty__icon { width: 60px; height: 60px; border-radius: 20px; background: var(--amber-soft); color: var(--amber-ink); display: flex; align-items: center; justify-content: center; }
.fx-empty h2 { margin: 0; font-size: 19px; letter-spacing: -.02em; }

/* ---------- send + sent */
.fx-to { display: flex; align-items: center; gap: 12px; padding: 6px 0; }
.fx-to + .fx-to { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 6px; }
.fx-to strong { flex: 1; min-width: 0; }
.fx-see { display: flex; align-items: flex-start; gap: 10px; padding: 11px 0; font-size: 15px; line-height: 22px; }
.fx-see + .fx-see { border-top: 1px solid var(--line); }
.fx-see:first-child { padding-top: 0; }
.fx-see__icon { flex: none; width: 22px; height: 22px; margin-top: 0; border-radius: 50%; background: var(--success-bg); color: var(--success); display: flex; align-items: center; justify-content: center; }
.fx-see__icon svg { width: 13px; height: 13px; }
.fx-see__icon.is-off { background: var(--unknown-bg); color: var(--unknown); }
.fx-see--toggle { align-items: center; }
.fx-see__fine { padding-top: 12px; border-top: 1px solid var(--line); }
.fx-switch { flex: none; width: 51px; height: 31px; border-radius: 999px; border: 0; padding: 0; background: var(--control); cursor: pointer; transition: background .25s; position: relative; }
.fx-switch.is-on { background: #17B26A; }
.fx-switch span { position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; box-shadow: 0 2px 4px rgba(0, 0, 0, .2); transition: transform .25s var(--ease); }
.fx-switch.is-on span { transform: translateX(20px); }
.fx-done { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; padding: 28px 8px 4px; }
.fx-done .fx-lead { max-width: 26em; }
.fx-done__icon { width: 76px; height: 76px; border-radius: 50%; background: linear-gradient(140deg, #17B26A, #067647); color: #fff; display: flex; align-items: center; justify-content: center; box-shadow: 0 0 0 10px var(--success-bg), 0 12px 28px rgba(6, 118, 71, .3); margin-bottom: 8px; }
.fx-done__icon--draw { animation: fx-pop .55s var(--ease) both; }
.fx-done__icon--draw path { stroke-dasharray: 26; stroke-dashoffset: 26; animation: fx-draw .45s .3s var(--ease) forwards; }

/* ---------- buttons */
.fx-btn { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 56px; padding: 0 22px; border: 0; border-radius: 18px; background: linear-gradient(180deg, #FFC247 0%, var(--amber-2) 100%); color: var(--on-amber); font-size: 17px; font-weight: 700; letter-spacing: -.01em; text-decoration: none; cursor: pointer; width: 100%; box-shadow: 0 8px 20px rgba(255, 154, 15, .3), inset 0 1px 0 rgba(255, 255, 255, .45); transition: transform .12s var(--ease), filter .15s, opacity .15s, box-shadow .15s; }
.fx-btn:hover { filter: brightness(1.03); }
.fx-btn:active { transform: scale(.98); box-shadow: 0 4px 10px rgba(255, 154, 15, .3), inset 0 1px 0 rgba(255, 255, 255, .45); }
.fx-btn:disabled { background: var(--sunken); color: var(--muted); box-shadow: none; cursor: not-allowed; transform: none; }
.fx-btn--quiet { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm), 0 0 0 1px var(--line); }
.fx-spin { width: 18px; height: 18px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: fx-spin .7s linear infinite; flex: none; }
.fx-spin--ink { color: var(--muted); }
.fx-error { margin: 0 0 12px; padding: 12px 14px; border-radius: 16px; background: var(--danger-bg); color: var(--danger); font-size: 15px; line-height: 22px; font-weight: 500; display: flex; gap: 8px; }
.fx-error svg { flex: none; margin-top: 3px; }
.fx-form > .fx-error { margin-top: 14px; }

/* ---------- motion */
.fx-enter-fwd .fx-body { animation: fx-in-fwd .38s var(--ease) both; }
.fx-enter-back .fx-body { animation: fx-in-back .38s var(--ease) both; }
.fx-enter-fade .fx-body, .fx-enter-fade .fx-hero { animation: fx-fade .3s ease both; }
.fx-enter-fwd .fx-dock, .fx-enter-back .fx-dock { animation: fx-fade .3s ease both; }
.fx-new { animation: fx-pop .34s var(--ease) both; }
.fx-msg--me.fx-new { transform-origin: bottom right; }
.fx-msg--bot.fx-new { transform-origin: bottom left; }
.fx-stagger > * { animation: fx-rise .45s var(--ease) both; }
.fx-stagger > :nth-child(2) { animation-delay: .06s; }
.fx-stagger > :nth-child(3) { animation-delay: .12s; }
.fx-stagger > :nth-child(4) { animation-delay: .18s; }
.fx-stagger > :nth-child(5) { animation-delay: .24s; }
.fx-stagger > :nth-child(6) { animation-delay: .3s; }
.fx-stagger > :nth-child(n+7) { animation-delay: .34s; }
@keyframes fx-in-fwd { from { opacity: 0; transform: translateX(28px); } to { opacity: 1; transform: none; } }
@keyframes fx-in-back { from { opacity: 0; transform: translateX(-28px); } to { opacity: 1; transform: none; } }
@keyframes fx-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes fx-pop { from { opacity: 0; transform: translateY(8px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes fx-rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes fx-bounce { 0%, 80%, 100% { transform: translateY(0); opacity: .5; } 40% { transform: translateY(-4px); opacity: 1; } }
@keyframes fx-spin { to { transform: rotate(360deg); } }
@keyframes fx-draw { to { stroke-dashoffset: 0; } }

@media (min-width: 760px) {
  .fx-body { padding-left: 28px; padding-right: 28px; }
  .fx-hero { padding-left: 28px; padding-right: 28px; border-radius: 0 0 32px 32px; }
  .fx-alert { margin-left: -28px; margin-right: -28px; padding-left: 28px; padding-right: 28px; }
  .fx-display { font-size: 52px; line-height: 56px; }
  .fx-dock { border-radius: 24px 24px 0 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .fx-done__icon--draw path { stroke-dashoffset: 0; }
}

/* ---------- links to the company pages (home) */
.fx-site { padding: 8px 4px 4px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.fx-site__links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.fx-site__links a { display: inline-block; padding: 8px 12px; border-radius: 999px; background: var(--surface); box-shadow: var(--shadow-sm), 0 0 0 1px var(--line); font-size: 14px; font-weight: 600; color: var(--ink-2); text-decoration: none; }
.fx-site__links a:active { transform: scale(.96); }
.fx-site__legal { margin: 0; font-size: 13px; color: var(--muted); }
.fx-site__legal a { color: inherit; }

/* ---------- AI website theme: always dark, matching fixmycar.uk */
html[data-fx-theme="ai"] {
  color-scheme: dark;
  --bg: #07080B; --bg-glass: rgba(7, 8, 11, .8); --surface: #111319; --sunken: #181B22; --raised: #14161C;
  --ink: #F3F4F6; --ink-2: #B3B8C2; --muted: #80868F; --line: #23262E; --control: #5C626C;
  --amber-soft: #2A1F0A; --amber-ink: #FFC95C; --hero: #07080B; --hero-2: #11131A;
  --me: linear-gradient(135deg, #2B2F3A 0%, #1C1F27 100%); --focus: #FFB21A; --on-tone: #07080B;
  --success: #5EE2C6; --success-bg: #0C2620; --warning: #FFA24C; --warning-bg: #2A1C0C;
  --danger: #FF6B5E; --danger-bg: #2E1312; --info: #8B9CFF; --info-bg: #151A33; --unknown: #A9B0BA; --unknown-bg: #171A21;
  --ai: #D0D5DD; --ai-bg: #171A21; --user: #F7B27A; --user-bg: #2A1C10;
  --shadow-sm: none; --shadow: none; --shadow-lg: 0 18px 40px rgba(0, 0, 0, .6);
  --card-border: #23262E; --chrome: #07080B;
  --sans: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
}
html[data-fx-theme="ai"] .fx-tone--ai { background: #1D1A33; color: #BDB4FE; }
html[data-fx-theme="ai"] .fx-screen--home .fx-hero { background: radial-gradient(70% 60% at 100% 0%, rgba(255, 122, 0, .25), transparent 60%), radial-gradient(60% 60% at 0% 100%, rgba(139, 124, 255, .22), transparent 60%), #07080B; }

/* ---------- thinking bubble (real steps while the AI works) */
.fx-bubble--think { flex-direction: column; align-items: flex-start; gap: 10px; padding: 14px 16px; min-width: 240px; }
.fx-think__title { display: inline-flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 600; letter-spacing: .02em; color: var(--muted); }
.fx-think { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.fx-think li { display: flex; align-items: center; gap: 10px; font-size: 14px; line-height: 20px; color: var(--muted); opacity: .45; transition: opacity .3s, color .3s; }
.fx-think li.is-run, .fx-think li.is-done { opacity: 1; color: var(--ink); }
.fx-think__dot { flex: none; width: 18px; height: 18px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; box-shadow: inset 0 0 0 1.5px var(--line); color: transparent; transition: background .3s, color .3s, box-shadow .3s; }
.fx-think li.is-run .fx-think__dot { box-shadow: inset 0 0 0 2px var(--amber); animation: fx-think-pulse 1s ease-in-out infinite; }
.fx-think li.is-done .fx-think__dot { background: var(--success); box-shadow: none; color: var(--surface); }
@keyframes fx-think-pulse { 50% { box-shadow: inset 0 0 0 2px var(--amber), 0 0 0 5px rgba(255, 178, 26, .18); } }
