/* fx-home — polish pass 2026-10-07 (interactive showcases). Homepage only: every rule is scoped to
   .hero-home, #how-it-works, #learn-more or an .hx-* component (lib/homefx.mjs, fx-home.js). */

/* ---------- Copy layout ---------- */
.hero-home .hero-sub { max-width: 900px; margin-left: auto; margin-right: auto; }
#how-it-works .section-head h2 { margin: 0; }
#how-it-works .jr-pts em.is-soon { flex-wrap: wrap; }

/* ---------- Shared: an interactive tile fills its well; the try bar under it ---------- */
.hx { flex: 1; width: 100%; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.hx > .ui-card { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.hx button { font-family: var(--font); }
.hx-try { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 7px 7px 7px 13px; border-radius: 12px; background: #fff; box-shadow: var(--shadow-control), inset 0 0 0 1px var(--border); font-size: 13px; line-height: 1.3; color: var(--body); }
.hx-try-msg { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.hx-try-msg .ic { color: #7c5cff; flex: none; }
.hx-try-btn { flex: none; height: 32px; padding: 0 13px; border: 0; border-radius: 9px; background: var(--grad-brand); color: #fff; font: 600 12.5px/1 var(--font); cursor: pointer; }
.hx-try-btn:focus-visible, .hx-tabs button:focus-visible, .hx-lv-btn:focus-visible, .hx-qb-go:focus-visible { outline: 2px solid #a78bfa; outline-offset: 2px; }
.hx:not(.hx-on) .hx-try-btn { display: none; }
@keyframes hx-pop { from { opacity: 0; transform: translateY(6px) scale(.98); } }
@keyframes hx-spin { to { transform: rotate(360deg); } }
@keyframes hx-flash { 0% { background: #ecfdf3; } 100% { background: transparent; } }

/* ---------- Brokering (static): the card fills its well ---------- */
#learn-more:has([data-hx]) .bento-well > div > .bk { flex: 1; display: flex; flex-direction: column; }
#learn-more:has([data-hx]) .bento-well > div > .bk > .route-body { flex: 1; }

/* ---------- AI text-back: the thread plays ---------- */
.hx-ai-end { display: inline-flex; align-items: center; gap: 6px; }
.hx-replay { display: none; width: 24px; height: 24px; place-items: center; padding: 0; border: 0; border-radius: 7px; background: #f1f2f6; color: #6b6f7a; cursor: pointer; }
.hx-replay:hover { color: var(--ink); background: #e9eaf0; }
.hx-replay:focus-visible { outline: 2px solid #a78bfa; outline-offset: 2px; }
.hx-ai.hx-on .hx-replay { display: grid; }
.hx-ai .chat { margin-bottom: 14px; }
.hx-ai .hx-draft { margin-top: auto; }
.hx-ai.hx-run .hx-m:not(.is-in) { display: none; }
.hx-ai.hx-run .hx-m.is-in { animation: hx-pop .32s ease-out both; }
.hx-typing { display: inline-flex; gap: 4px; align-self: flex-start; padding: 12px 13px; border-radius: 14px 14px 14px 4px; background: #f1f2f6; animation: hx-pop .2s ease-out both; }
.hx-typing.is-us { align-self: flex-end; border-radius: 14px 14px 4px 14px; background: #ece6ff; }
.hx-typing i { width: 6px; height: 6px; border-radius: 50%; background: #9a9ea8; animation: hx-dot 1s infinite; }
.hx-typing.is-us i { background: #8b6cff; }
.hx-typing i:nth-child(2) { animation-delay: .15s; }
.hx-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes hx-dot { 0%, 60%, 100% { opacity: .35; transform: none; } 30% { opacity: 1; transform: translateY(-2px); } }

/* ---------- Live updates: driver → dispatch → customer ---------- */
.hx-live { --hx-c: #16a34a; }
.hx-live .live-trio { align-items: stretch; }
.hx-live .live-step:nth-child(2) { gap: 12px; }
.ps > .lv.hx-lv-drv .lv-arrive { flex: none; justify-content: flex-start; }
.hx-lv-drv .hx-steps { margin-top: auto; }
.hx-photos { display: flex; align-items: center; min-height: 52px; padding: 8px 10px; border-radius: 12px; background: #fff; box-shadow: var(--shadow-panel); font-size: 11.5px; }
.hx-photos > span { display: none; align-items: center; gap: 7px; width: 100%; }
.hx-photos b { font-weight: 600; }
.hx-photos em { font-style: normal; color: var(--muted); }
.hx-photos .ic { color: #7c5cff; }
.hx-photos img { width: 44px; height: 34px; border-radius: 7px; object-fit: cover; }
.hx-photos .hx-ph-b em { margin-left: auto; display: inline-flex; align-items: center; gap: 3px; color: var(--success-text); font-weight: 500; }
.hx-live:not([data-state="3"]) .hx-ph-a, .hx-live[data-state="3"] .hx-ph-b { display: inline-flex; }
.hx-live .live-step:nth-child(2) .lvd { flex: 1; }
.hx-steps { display: flex; align-items: center; gap: 6px; padding: 10px 12px; white-space: nowrap; border-radius: 12px; background: #fff; box-shadow: var(--shadow-panel); font: 500 11px/1 var(--font); color: #9a9ea8; }
.hx-steps i { flex: 1; height: 2px; border-radius: 2px; background: #e6e7ee; }
.hx-steps span { display: inline-flex; align-items: center; gap: 4px; transition: color .3s; }
.hx-steps span .ic { display: none; }
.hx-steps .is-done { color: var(--success-text); }
.hx-steps .is-done .ic { display: inline; }
.hx-lv-btn { position: relative; display: flex; align-items: center; justify-content: center; gap: 7px; width: 100%; height: 46px; border: 0; border-radius: 13px; background: #18181c; color: #fff; font: 600 14px/1 var(--font); cursor: pointer; box-shadow: 0 8px 18px -8px rgb(0 0 0 / .45); transition: transform .15s, background .3s; }
.hx-live[data-state="3"] .hx-lv-btn { background: #15803d; }
.hx-lv-btn.is-press { transform: scale(.96); }
.hx-tap { position: absolute; right: 16px; top: 50%; width: 26px; height: 26px; margin-top: -13px; border-radius: 50%; border: 2px solid rgb(255 255 255 / .6); opacity: 0; pointer-events: none; }
.hx-live.is-auto .hx-tap { animation: hx-tap 2.6s ease-out infinite; }
@keyframes hx-tap { 0%, 55% { transform: scale(.6); opacity: 0; } 70% { opacity: 1; } 100% { transform: scale(1.5); opacity: 0; } }
.hx-over { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.hx-route { transition: opacity .5s; opacity: .9; }
.hx-live[data-state="3"] .hx-route { opacity: 0; }
.hx-truck .hx-dot, .hx-truck .hx-pulse, .hx-tag rect { fill: var(--hx-c); transition: fill .3s; }
.hx-toast { transition: opacity .3s, transform .3s; }
.hx-live[data-state="0"] .hx-toast { opacity: 0; transform: translateY(6px); }
.hx-toast.is-pop { animation: hx-pop .35s ease-out both; }
.hx-row { transition: box-shadow .3s, background .3s; }
.hx-live:not([data-state="0"]) .hx-row { box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--hx-c) 50%, #fff), 0 0 0 3px color-mix(in srgb, var(--hx-c) 10%, transparent); }
.hx-dchip { flex: none; }
/* the customer's phone: the on-my-way text, over the tracking page */
.hx-trk { position: relative; flex: 1; display: flex; flex-direction: column; gap: 8px; padding: 2px 12px 10px; }
.hx-sms { margin: 0 -4px; max-height: 120px; overflow: hidden; transition: max-height .45s ease, opacity .3s, margin .45s, padding .45s; }
.hx-live.hx-on .hx-sms:not(.is-in) { max-height: 0; opacity: 0; padding-top: 0; padding-bottom: 0; margin-bottom: -8px; }
.hx-live.hx-on .hx-sms.is-in { animation: hx-pop .4s ease-out both; }
.hx-trk-brand { display: flex; align-items: center; gap: 9px; padding: 4px 2px 2px; }
.hx-trk-brand > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.hx-trk-brand b { font: 700 13px/1.2 var(--font); }
.hx-trk-brand span { font-size: 10.5px; color: var(--muted); }
.hx-trk-card { display: flex; flex-direction: column; gap: 6px; padding: 11px 12px; border-radius: 13px; background: #fff; box-shadow: var(--shadow-panel), inset 0 0 0 1px rgb(0 0 0 / .04); }
.hx-trk-card > small { font: 700 9.5px/1 var(--font); letter-spacing: .08em; text-transform: uppercase; color: #9a9ea8; }
.hx-trk-status > small { color: #ea580c; }
.hx-trk-st { font: 750 17px/1.15 var(--font); letter-spacing: -.02em; }
.hx-trk-bar { height: 6px; border-radius: 999px; background: #eceef3; overflow: hidden; }
.hx-trk-bar i { display: block; height: 100%; border-radius: inherit; background: #f97316; transition: width .6s ease; }
.hx-trk-lbl { display: flex; justify-content: space-between; font: 700 7.5px/1 var(--font); letter-spacing: .04em; text-transform: uppercase; color: #9a9ea8; }
.hx-trk-lbl em { font-style: normal; }
.hx-trk-det > div { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 11.5px; }
.hx-trk-det span { color: var(--muted); }
.hx-trk-det b { display: inline-flex; align-items: center; gap: 5px; font-weight: 600; }
.hx-trk-det .atag { height: 17px; padding: 0 5px; font-size: 10px; }
.hx-trk-tl > div { display: grid; grid-template-columns: 14px minmax(0, 1fr) auto; align-items: center; gap: 8px; font-size: 11.5px; color: #9a9ea8; }
.hx-trk-tl > div > i { width: 14px; height: 14px; border-radius: 50%; display: grid; place-items: center; background: #e5e7eb; color: transparent; transition: background .3s, color .3s; }
.hx-trk-tl em { font-style: normal; font-size: 10.5px; visibility: hidden; }
.hx-trk-tl .is-done { color: var(--ink); }
.hx-trk-tl .is-done > i { background: #f97316; color: #fff; }
.hx-trk-tl .is-done em { visibility: visible; color: var(--muted); }
.hx-trk-url { margin-top: auto; display: flex; align-items: center; justify-content: center; gap: 5px; padding: 7px; border-radius: 10px; background: #e9eaf0; font-size: 10.5px; color: #6b6f7a; }

/* ---------- Tabs (CRM, Reports) ---------- */
.hx-tabs { display: inline-flex; gap: 2px; padding: 3px; border-radius: 9px; background: #f1f2f6; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.hx-tabs button { flex: none; border: 0; background: none; padding: 6px 10px; border-radius: 7px; font: 500 12px/1 var(--font); color: #6b6f7a; cursor: pointer; white-space: nowrap; transition: background .2s, color .2s; }
.hx-tabs button b { font-weight: 500; color: #9a9ea8; margin-left: 3px; }
.hx-tabs button.is-on { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgb(30 30 60 / .08), 0 0 0 1px rgb(30 30 60 / .04); }
.hx-tabs button:hover:not(.is-on) { color: var(--ink); }
.hx-panes { display: grid; }
.hx-pane { grid-area: 1 / 1; min-width: 0; display: flex; flex-direction: column; visibility: hidden; opacity: 0; transition: opacity .25s, visibility 0s .25s; }
.hx-pane.is-on { visibility: visible; opacity: 1; transition: opacity .25s; }

/* CRM record */
.hx-crm .hx-tabs { align-self: flex-start; }
.hx-crm .hx-panes { margin-top: 8px; }
.hx-r { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid #f1f2f6; }
.hx-crm .hx-pane:first-child .hx-r { grid-template-columns: 68px minmax(0, 1fr) auto; }
.hx-r .atag { justify-self: start; }
.hx-r > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.hx-r b { font: 600 12.5px/1.25 var(--font); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hx-r span { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hx-r > em { font-style: normal; font-size: 11px; color: #9a9ea8; }
.hx-bal { display: flex; justify-content: space-between; padding: 10px 0 0; font-size: 12.5px; color: var(--muted); }
.hx-bal b { color: var(--ink); font-weight: 600; }
.hx-crm .crm-note { margin-top: auto; }
.hx-crm .hx-panes { margin-bottom: 12px; }

/* Reports: margin by month, customer or hauler */
.hx-rep { gap: 12px; }
.hx-rep > .ui-card { gap: 10px; }
.hx-rep-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.hx-rep-h > b { font: 600 13px/1 var(--font); }
.hx-br { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid #f1f2f6; }
.hx-bn { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.hx-bn b { font: 600 12.5px/1.2 var(--font); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hx-bn small { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hx-bt { height: 8px; border-radius: 999px; background: #f1f2f6; overflow: hidden; }
.hx-bt i { display: block; height: 100%; width: var(--w); border-radius: inherit; background: var(--grad-brand); transition: width .6s cubic-bezier(.2, .8, .2, 1); }
.hx-pane:not(.is-on) .hx-bt i { width: 0; }
.hx-bv { min-width: 62px; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; font-variant-numeric: tabular-nums; }
.hx-bv b { font: 600 13px/1.2 var(--font); }
.hx-bv small { font-size: 10.5px; color: var(--success-text); }
.hx-rep .rep-basis { margin-top: auto; padding-top: 4px; }

/* ---------- QuickBooks: press Sync ---------- */
.hx-qb-st { display: grid; }
.hx-qb-st > .chip { grid-area: 1 / 1; justify-self: end; }
.hx-qb.is-ready .hx-qb-ok, .hx-qb.is-going .hx-qb-ok, .hx-qb:not(.is-ready):not(.is-going) .hx-qb-wait { visibility: hidden; }
.hx-qb-rows { margin-top: 10px; display: flex; flex-direction: column; }
.hx-qr { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto 20px; align-items: center; gap: 10px; padding: 9px 4px; margin: 0 -4px; border-radius: 8px; }
.hx-qr + .hx-qr { box-shadow: 0 -1px 0 #f1f2f6; }
.hx-qr.is-sent { animation: hx-flash 1s ease-out; }
.hx-qi { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: #ecfdf3; color: #15803d; }
.hx-qi.is-void { background: #fef2f2; color: #b91c1c; }
.hx-qm { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.hx-qm b { font: 600 12.5px/1.25 var(--font); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hx-qm small { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hx-qm small em { margin-right: 6px; font: 500 10.5px/1 var(--mono); font-style: normal; color: #8a8e98; }
.hx-qa { font: 600 12.5px/1 var(--font); font-variant-numeric: tabular-nums; }
.hx-qs { display: grid; place-items: center; width: 20px; height: 20px; }
.hx-qs > i { grid-area: 1 / 1; display: grid; place-items: center; transition: opacity .25s, transform .25s; }
.hx-qs-wait { width: 13px; height: 13px; border-radius: 50%; border: 2px solid #d9dbe3; opacity: 0; }
.hx-qs-ok { width: 20px; height: 20px; border-radius: 50%; background: var(--success-soft); color: var(--success-text); }
.hx-qb.is-ready .hx-qs-wait, .hx-qb.is-going .hx-qr:not(.is-sent) .hx-qs-wait { opacity: 1; }
.hx-qb.is-ready .hx-qs-ok, .hx-qb.is-going .hx-qr:not(.is-sent) .hx-qs-ok { opacity: 0; transform: scale(.4); }
.hx-qr.is-busy .hx-qs-wait { border-color: #e6e0ff; border-top-color: #7c5cff; animation: hx-spin .6s linear infinite; }
.hx-qb.is-ready .hx-qa, .hx-qb.is-going .hx-qr:not(.is-sent) .hx-qa { color: var(--muted); }
.hx-qb-foot { margin-top: auto; padding-top: 14px; display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.hx-qb-foot .bento-chips { margin: 0; }
.hx-qb-go { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 14px; border: 0; border-radius: 9px; background: #18181c; color: #fff; font: 600 12.5px/1 var(--font); cursor: pointer; transition: transform .15s, opacity .2s; }
.hx-qb-go.is-press { transform: scale(.95); }
.hx-qb-go:disabled { cursor: default; opacity: .75; }
.hx-qb.is-going .hx-qb-go .ic { animation: hx-spin .8s linear infinite; }

/* ---------- Moving over: drop a spreadsheet, columns matched ---------- */
.hx-im > .ui-card { gap: 12px; }
.hx-im-steps { display: flex; align-items: center; gap: 6px; font: 500 11px/1 var(--font); color: #9a9ea8; white-space: nowrap; }
.hx-im-steps i { flex: 1; height: 2px; min-width: 8px; border-radius: 2px; background: #eceef3; }
.hx-im-steps .is-done { color: var(--success-text); }
.hx-im-steps .is-on { color: var(--ink); font-weight: 600; }
.hx-im-top { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; }
.hx-im-file { position: relative; z-index: 2; display: flex; align-items: center; gap: 8px; padding: 8px 12px 8px 8px; border-radius: 12px; background: #fff; box-shadow: var(--shadow-panel), inset 0 0 0 1px rgb(0 0 0 / .05); cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; }
.hx-im-file.is-fly { transition: transform .65s cubic-bezier(.3, .7, .2, 1), opacity .25s .5s; }
.hx-im-file.is-drag { cursor: grabbing; box-shadow: var(--shadow-float); }
.hx-im-file > span { display: flex; flex-direction: column; gap: 2px; }
.hx-im-file b { font: 600 12.5px/1.2 var(--font); }
.hx-im-file small { font-size: 11px; color: var(--muted); }
.hx-im-drop { min-height: 50px; display: flex; align-items: center; justify-content: center; padding: 8px 12px; border: 1.5px dashed #c9bdfd; border-radius: 12px; background: #faf8ff; color: #6d5bd0; font: 600 12.5px/1.2 var(--font); text-align: center; transition: background .2s, border-color .2s, color .2s; }
.hx-im-drop.is-over { background: #efe9ff; border-style: solid; }
.hx-im-drop > span { display: inline-flex; align-items: center; gap: 7px; min-width: 0; }
.hx-im-d1 { display: none !important; }
.hx-im-d1 em { font-style: normal; font-weight: 500; color: var(--muted); }
.hx-im-dn { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hx-im.is-done .hx-im-file { display: none; }
.hx-im.is-done .hx-im-top { grid-template-columns: minmax(0, 1fr); }
.hx-im.is-done .hx-im-drop { border-style: solid; border-color: #bbf7d0; background: #f0fdf4; color: var(--success-text); }
.hx-im.is-done .hx-im-d0 { display: none; }
.hx-im.is-done .hx-im-d1 { display: inline-flex !important; }
.hx-im-map { display: flex; flex-direction: column; }
.hx-im-h { display: grid; grid-template-columns: minmax(0, 1fr) 14px minmax(0, 1.25fr); gap: 8px; padding-bottom: 6px; font: 600 10px/1 var(--font); letter-spacing: .06em; text-transform: uppercase; color: #9a9ea8; }
.hx-im-r { display: grid; grid-template-columns: minmax(0, 1fr) 14px minmax(0, 1.25fr); align-items: center; gap: 8px; padding: 7px 0; border-top: 1px solid #f1f2f6; transition: opacity .3s, transform .3s; transition-delay: calc(var(--i) * 160ms + 100ms); }
.hx-im-r .ic { color: #9a9ea8; }
.hx-im-a { justify-self: start; max-width: 100%; padding: 3px 7px; border-radius: 6px; background: #f6f6fa; font: 500 11.5px/1.3 var(--mono); color: #3f434c; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hx-im-b { font: 600 12.5px/1.3 var(--font); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: color .3s, background .3s; transition-delay: inherit; }
.hx-im-r.is-skip .hx-im-b { font-weight: 500; color: #9a9ea8; }
.hx-im-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 12.5px; color: var(--body); transition: opacity .3s .9s; }
.hx-im-foot b { color: var(--ink); font-weight: 600; }
.hx-im:not(.is-done) .hx-im-r { opacity: .3; transition-delay: 0s; }
.hx-im:not(.is-done) .hx-im-b { color: transparent; background: #eceef3; border-radius: 5px; }
.hx-im:not(.is-done) .hx-im-foot { opacity: 0; transition-delay: 0s; }

/* ---------- Phone widths ---------- */
@media (max-width: 620px) {
  .hx-try { font-size: 12.5px; }
  .hx-br { grid-template-columns: minmax(0, 1fr) 64px auto; gap: 10px; }
  .hx-crm .hx-pane:first-child .hx-r { grid-template-columns: 62px minmax(0, 1fr) auto; }
  .hx-qb-foot .bento-chips { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .hx *, .hx *::before, .hx *::after { animation: none !important; transition: none !important; }
}
