/* Fleet Solutions public pages, redesign v1.5. Fully responsive: phone stack first (360), then 600, 840, 1200. NO page width cap:
   wide screens get real two-column layouts (promo panel beside the form, hero beside the two doors), same markup.
   Every colour is a token (the amber/crimson working palette from the prototype); the brand refresh is a token swap.
   Light, dark and SYSTEM (default) themes: theme.js sets data-theme on <html> before first paint. No inline styles anywhere.
   Contrast pairs are checked by tests\ux\Check-UxMarkup.ps1 (WCAG AA) for both themes. */

/* Self-hosted fonts (licences: OFL-Archivo.txt and OFL-HankenGrotesk.txt beside the files). Latin subset, one variable file per family.
   No request leaves this site; the UX markup check fails on any outside font URL. */
@font-face {
    font-family: "Archivo";
    font-style: normal;
    font-weight: 600 900;
    font-display: swap;
    src: url("fonts/Archivo-latin-variable.woff2") format("woff2-variations"), url("fonts/Archivo-latin-variable.woff2") format("woff2");
}
@font-face {
    font-family: "Hanken Grotesk";
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url("fonts/HankenGrotesk-latin-variable.woff2") format("woff2-variations"), url("fonts/HankenGrotesk-latin-variable.woff2") format("woff2");
}

:root {
    --ux-bg: #fbf7f1;
    --ux-surface: #ffffff;
    --ux-surface-2: #f3ede3;
    --ux-text: #1c1a22;
    --ux-muted: #5c5560;
    --ux-border: #857e72;
    --ux-line: #e7dfd2;
    --ux-accent: #b8420a;
    --ux-on-accent: #ffffff;
    --ux-brand: #cf1f3c;
    --ux-focus: #0b57d0;
    --ux-error: #b00020;
    --ux-ok: #0c7a4c;
    --ux-on-ok: #ffffff;
    --ux-disabled-bg: #e4ddd0;
    --ux-disabled-text: #5a5348;
    --ux-overlay: rgba(28, 26, 34, 0.55);
    --ux-glow: rgba(184, 66, 10, 0.12);
    --ux-shadow: 0 1px 2px rgba(28, 26, 34, 0.05), 0 12px 30px -12px rgba(28, 26, 34, 0.18);
    --ux-radius: 12px;
    --ux-radius-lg: 18px;
    --ux-field-h: 50px;
    --ux-bar-h: 56px;
    --ux-tap: 48px;
    --ux-appbar-h: 64px;
    /* font roles: the self-hosted faces first (display for headings, ui for the rest), the system fonts as fallback */
    --dsp: "Archivo", "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
    --ui: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    /* aliases for the names ux-photos.css reads (they follow the active theme because var() resolves on the same element) */
    --ux-fg: var(--ux-text);
    --ux-danger: var(--ux-error);
    --ux-scrim: var(--ux-overlay);
    color-scheme: light;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --ux-bg: #131118;
        --ux-surface: #1c1922;
        --ux-surface-2: #262231;
        --ux-text: #f6f1e9;
        --ux-muted: #aaa2b0;
        --ux-border: #7e7889;
        --ux-line: #312b3a;
        --ux-accent: #ff8c40;
        --ux-on-accent: #1a1206;
        --ux-brand: #ff5468;
        --ux-focus: #8ab4f8;
        --ux-error: #ff8f8f;
        --ux-ok: #36d29a;
        --ux-on-ok: #06231a;
        --ux-disabled-bg: #2c2733;
        --ux-disabled-text: #b0a9b8;
        --ux-overlay: rgba(0, 0, 0, 0.6);
        --ux-glow: rgba(255, 140, 64, 0.2);
        --ux-shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 14px 34px -14px rgba(0, 0, 0, 0.6);
        color-scheme: dark;
    }
}

:root[data-theme="dark"] {
    --ux-bg: #131118;
    --ux-surface: #1c1922;
    --ux-surface-2: #262231;
    --ux-text: #f6f1e9;
    --ux-muted: #aaa2b0;
    --ux-border: #7e7889;
    --ux-line: #312b3a;
    --ux-accent: #ff8c40;
    --ux-on-accent: #1a1206;
    --ux-brand: #ff5468;
    --ux-focus: #8ab4f8;
    --ux-error: #ff8f8f;
    --ux-ok: #36d29a;
    --ux-on-ok: #06231a;
    --ux-disabled-bg: #2c2733;
    --ux-disabled-text: #b0a9b8;
    --ux-overlay: rgba(0, 0, 0, 0.6);
    --ux-glow: rgba(255, 140, 64, 0.2);
    --ux-shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 14px 34px -14px rgba(0, 0, 0, 0.6);
    color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

.ux-body {
    margin: 0;
    padding: 0;
    background: var(--ux-bg);
    color: var(--ux-text);
    font: 16px/1.5 var(--ui);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

.ux-ic { width: 20px; height: 20px; flex: none; }

/* ---------------------------------------------------------------- app bar (every screen) */
.ux-appbar { position: sticky; top: 0; z-index: 8; background: var(--ux-surface); border-bottom: 1px solid var(--ux-line); }
.ux-appbar-in { display: flex; align-items: center; gap: 4px; max-width: 1180px; min-height: var(--ux-appbar-h); margin: 0 auto; padding: 8px 12px; }
.ux-brand { display: inline-flex; align-items: center; gap: 8px; min-height: var(--ux-tap); padding-right: 6px; color: var(--ux-text); text-decoration: none; font-family: var(--dsp); font-weight: 800; font-size: 15px; letter-spacing: -0.02em; }
.ux-brand em { font-style: normal; color: var(--ux-muted); font-weight: 700; }
.ux-mark { display: block; width: 58px; height: 32px; flex: none; }   /* cropped mark, ratio 1.82:1 (scripts/Derive-Mark.ps1) */
/* Two derived files of the owner's mark (scripts/Derive-Mark.ps1); exactly one shows, chosen by the APP's theme, not by the operating system:
   light theme -> light file; dark theme -> dark file; system (or no data-theme) -> follows the device, mirroring the token rules above. */
.ux-mark-dark { display: none; }
:root[data-theme="dark"] .ux-mark-light { display: none; }
:root[data-theme="dark"] .ux-mark-dark { display: block; }
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]):not([data-theme="dark"]) .ux-mark-light { display: none; }
    :root:not([data-theme="light"]):not([data-theme="dark"]) .ux-mark-dark { display: block; }
}
.ux-spacer { flex: 1 1 auto; }
.ux-appbar-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    min-width: var(--ux-tap); min-height: var(--ux-tap); padding: 0 12px;
    font: inherit; font-size: 14px; font-weight: 600; color: var(--ux-muted);
    background: transparent; border: 0; border-radius: 999px; text-decoration: none; cursor: pointer;
}
.ux-appbar-btn:hover { color: var(--ux-text); background: var(--ux-surface-2); }
.ux-appbar-lbl { display: none; }
.ux-appbar-help { display: none; }
/* the theme control shows the icon and the word of the current state; theme.js sets data-theme (system is the default) */
.ux-theme .ux-ic { display: none; }
.ux-theme .ux-appbar-lbl { display: none; }
:root:not([data-theme="light"]):not([data-theme="dark"]) .ux-theme .ux-ic-system { display: block; }
:root[data-theme="light"] .ux-theme .ux-ic-light { display: block; }
:root[data-theme="dark"] .ux-theme .ux-ic-dark { display: block; }

@media (min-width: 600px) {
    .ux-appbar-in { padding: 8px 24px; gap: 6px; }
    .ux-brand { font-size: 17px; gap: 11px; }
    .ux-appbar-lbl { display: inline; }
    .ux-appbar-help { display: inline-flex; }
    .ux-theme .ux-appbar-lbl { display: none; }
    :root:not([data-theme="light"]):not([data-theme="dark"]) .ux-theme .ux-theme-system { display: inline; }
    :root[data-theme="light"] .ux-theme .ux-theme-light { display: inline; }
    :root[data-theme="dark"] .ux-theme .ux-theme-dark { display: inline; }
}
@media (min-width: 840px) { .ux-appbar-in { padding: 10px 32px; } }

/* ---------------------------------------------------------------- headings, text, kicker */
.ux-h1 { font-family: var(--dsp); font-size: clamp(1.625rem, 4vw, 2.0625rem); font-weight: 900; letter-spacing: -0.03em; line-height: 1.08; margin: 6px 0 8px; text-wrap: balance; }
.ux-h2 { font-family: var(--dsp); font-size: 1.2rem; font-weight: 800; margin: 0 0 8px; }
.ux-lead { margin: 0 0 18px; color: var(--ux-muted); font-weight: 500; }
.ux-lead-phone { display: none; }   /* the one-line phone text under "Snap the truck"; the phone block below swaps it for the full text */
.ux-detail { margin: 4px 0; color: var(--ux-muted); }
.ux-kicker { display: inline-flex; align-items: center; gap: 8px; width: fit-content; margin: 0 0 10px; padding: 6px 12px; border-radius: 999px; background: var(--ux-glow); color: var(--ux-accent); font-size: 13px; font-weight: 700; }
.ux-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ux-accent); }

/* ---------------------------------------------------------------- page frames */
.ux-page { max-width: 46rem; margin: 0 auto; padding: 20px 16px 150px; outline: none; }
.ux-col { width: 100%; max-width: 30rem; margin: 0 auto; }
.ux-col .ux-page { max-width: none; }
.ux-promo { display: none; }

/* two-column screens: promo panel beside the form (wide), one-thumb stack (phone) */
@media (min-width: 840px) {
    .ux-split { display: grid; grid-template-columns: 0.9fr 1.1fr; max-width: 1180px; min-height: calc(100vh - var(--ux-appbar-h)); margin: 0 auto; }
    .ux-promo {
        display: flex; flex-direction: column; justify-content: center; padding: 56px 48px;
        background: radial-gradient(120% 90% at 100% 0%, var(--ux-glow), transparent 55%), linear-gradient(180deg, var(--ux-surface), var(--ux-surface-2));
        border-right: 1px solid var(--ux-line);
    }
    .ux-col { max-width: none; display: flex; flex-direction: column; justify-content: center; padding: 48px 32px; }
    .ux-col > * { width: 100%; max-width: 28rem; margin-left: auto; margin-right: auto; }
    .ux-page { padding-bottom: 8px; }
}
@media (min-width: 1200px) {
    .ux-promo { padding: 72px 64px; }
}
.ux-promo-h { font-family: var(--dsp); font-size: clamp(2rem, 3.4vw, 2.75rem); font-weight: 900; letter-spacing: -0.035em; line-height: 1.02; margin: 14px 0 0; }
.ux-promo-h em { font-style: normal; color: var(--ux-accent); }
.ux-promo-lede { margin: 16px 0 0; max-width: 32ch; color: var(--ux-muted); font-size: 1.0625rem; font-weight: 500; }
.ux-meta { display: flex; flex-wrap: wrap; gap: 20px; margin-top: 26px; }
.ux-meta div { display: flex; flex-direction: column; gap: 1px; }
.ux-meta b { font-family: var(--dsp); font-size: 1.375rem; font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.ux-meta span { font-size: 13px; color: var(--ux-muted); font-weight: 600; }
.ux-points { list-style: none; margin: 26px 0 0; padding: 0; display: flex; flex-direction: column; gap: 13px; }
.ux-points li { display: flex; align-items: center; gap: 11px; font-weight: 600; }
.ux-pin { display: grid; place-items: center; width: 26px; height: 26px; flex: none; border-radius: 8px; background: var(--ux-glow); color: var(--ux-accent); }
.ux-pin .ux-ic { width: 15px; height: 15px; }

/* ---------------------------------------------------------------- home: hero and the two doors */
.ux-home { display: grid; max-width: 1180px; margin: 0 auto; outline: none; }
.ux-hero { padding: 24px 20px 8px; }
.ux-hero-h { font-family: var(--dsp); font-size: clamp(2.125rem, 7vw, 3.75rem); font-weight: 900; letter-spacing: -0.035em; line-height: 1.02; margin: 16px 0 0; text-wrap: balance; }
.ux-hero-h em { font-style: normal; color: var(--ux-accent); }
.ux-hero-lede { margin: 16px 0 0; max-width: 34ch; color: var(--ux-muted); font-size: clamp(1rem, 2.2vw, 1.125rem); font-weight: 500; }
.ux-doors { display: flex; flex-direction: column; gap: 14px; padding: 20px 16px 40px; }
.ux-door {
    position: relative; display: block; padding: 22px; overflow: hidden; color: var(--ux-text); text-decoration: none;
    background: var(--ux-surface); border: 1px solid var(--ux-line); border-radius: var(--ux-radius-lg); box-shadow: var(--ux-shadow);
}
.ux-door-ic { display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: 16px; border-radius: 14px; }
.ux-door-ic .ux-ic { width: 25px; height: 25px; }
.ux-door-title { display: block; font-family: var(--dsp); font-size: 1.375rem; font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; padding-right: 44px; }
.ux-door-sub { display: block; max-width: 34ch; margin-top: 6px; color: var(--ux-muted); font-size: 0.9375rem; }
.ux-go { position: absolute; top: 22px; right: 20px; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--ux-surface-2); color: var(--ux-muted); }
.ux-door-crew { border-color: var(--ux-accent); }
.ux-door-crew .ux-door-ic { background: var(--ux-accent); color: var(--ux-on-accent); }
.ux-door-biz .ux-door-ic { background: var(--ux-surface-2); color: var(--ux-brand); }
.ux-pill { display: inline-flex; align-items: center; gap: 6px; margin-top: 14px; padding: 5px 10px; border-radius: 999px; background: var(--ux-glow); color: var(--ux-accent); font-size: 13px; font-weight: 700; }
.ux-pill .ux-ic { width: 13px; height: 13px; fill: currentColor; }
.ux-door:hover .ux-go { background: var(--ux-accent); color: var(--ux-on-accent); }

@media (min-width: 840px) {
    .ux-home { grid-template-columns: 1.05fr 0.95fr; min-height: calc(100vh - var(--ux-appbar-h)); }
    .ux-hero { display: flex; flex-direction: column; justify-content: center; align-items: flex-start; padding: 72px 56px; background: radial-gradient(120% 90% at 0% 0%, var(--ux-glow), transparent 55%), linear-gradient(180deg, var(--ux-surface), var(--ux-surface-2)); }
    .ux-doors { justify-content: center; gap: 16px; padding: 40px 48px; }
}

/* ---------------------------------------------------------------- identity, welcome back, Not you? */
.ux-identity { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-height: var(--ux-tap); margin-bottom: 8px; }
.ux-id-text { margin: 0; flex: 1 1 12rem; min-width: 0; color: var(--ux-muted); font-weight: 600; }
.ux-id-text strong { color: var(--ux-text); }
.ux-id-actions { display: inline-flex; align-items: center; gap: 4px; }
.ux-avatar { display: grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 50%; background: var(--ux-accent); color: var(--ux-on-accent); font-family: var(--dsp); font-weight: 800; }
.ux-whoami { display: flex; align-items: center; gap: 12px; margin: 16px 0 6px; padding: 12px 14px; background: var(--ux-surface-2); border: 1px solid var(--ux-line); border-radius: var(--ux-radius-lg); }
.ux-wa-t { flex: 1 1 auto; min-width: 0; }
.ux-wa-t b { display: block; font-weight: 700; }
.ux-wa-t span { display: block; color: var(--ux-muted); font-size: 0.8125rem; font-weight: 600; }
.ux-memory-wrap { max-width: 1180px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 840px) { .ux-memory-wrap { padding: 0 32px; } }
.ux-leave-actions { display: grid; gap: 10px; margin-top: 16px; }
.ux-notyou { min-height: var(--ux-tap); padding: 0 14px; font: inherit; font-size: 0.875rem; font-weight: 700; color: var(--ux-accent); background: var(--ux-glow); border: 0; border-radius: 999px; white-space: nowrap; cursor: pointer; }

/* ---------------------------------------------------------------- fields */
.ux-field { margin: 0 0 14px; scroll-margin-bottom: 160px; }
.ux-label { display: block; font-size: 0.875rem; font-weight: 700; margin: 0 0 6px; }
.ux-input {
    display: block; width: 100%; min-height: var(--ux-field-h); padding: 8px 14px;
    font: inherit; font-size: 16px; color: var(--ux-text); background: var(--ux-surface);
    border: 2px solid var(--ux-border); border-radius: var(--ux-radius);
}
.ux-input:focus { border-color: var(--ux-accent); }
.ux-input::placeholder { color: var(--ux-muted); }
.ux-textarea { min-height: 96px; resize: vertical; }
.ux-input[aria-invalid="true"] { border-color: var(--ux-error); }
.ux-help, .ux-micro { margin: 6px 0 0; font-size: 0.875rem; color: var(--ux-muted); }
.ux-micro { text-align: center; font-weight: 600; }
.ux-error { margin: 6px 0 0; font-size: 0.875rem; color: var(--ux-error); font-weight: 600; }
.ux-banner { margin: 8px 0 16px; padding: 12px 14px; border: 2px solid var(--ux-border); border-radius: var(--ux-radius); background: var(--ux-surface-2); font-weight: 600; }
.ux-banner-error { border-color: var(--ux-error); }

.ux-check { display: flex; align-items: flex-start; gap: 12px; min-height: var(--ux-tap); margin: 18px 0 8px; padding: 14px; background: var(--ux-surface-2); border: 1px solid var(--ux-line); border-radius: var(--ux-radius); cursor: pointer; }
.ux-check input { flex: none; width: 24px; height: 24px; margin: 1px 0 0; accent-color: var(--ux-accent); }
.ux-check-t b { display: block; font-weight: 700; }
.ux-check-t span { display: block; color: var(--ux-muted); font-size: 0.875rem; font-weight: 500; }

/* the photo area: the existing tile (photos.js) restyled as the "Snap the truck" moment */
.ux-photos { margin: 0 0 16px; min-height: 96px; }
.ux-photos .ux-ph-row { flex-direction: column; align-items: stretch; gap: 10px; }
.ux-photos .ux-ph-take {
    flex: none; width: 100%; height: auto; min-height: 150px; padding: 26px 20px; gap: 8px;
    border: 2px dashed var(--ux-border); border-radius: var(--ux-radius-lg); background: var(--ux-surface-2); color: var(--ux-text);
}
.ux-photos .ux-ph-take:hover { border-color: var(--ux-accent); background: var(--ux-glow); }
.ux-photos .ux-ph-take-icon { box-sizing: content-box; width: 30px; height: 30px; padding: 14px; border-radius: 50%; background: var(--ux-accent); color: var(--ux-on-accent); }
.ux-photos .ux-ph-take-main { font-family: var(--dsp); font-size: 1.125rem; font-weight: 800; }
.ux-photos .ux-ph-take-sub { font-size: 0.875rem; color: var(--ux-muted); }

/* chips and segmented choices */
.ux-chips, .ux-seg { display: flex; flex-wrap: wrap; gap: 8px; }
.ux-chip { position: relative; }
.ux-chip input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.ux-chip span {
    display: inline-flex; align-items: center; justify-content: center; min-width: var(--ux-tap); min-height: var(--ux-tap); padding: 0 16px;
    border: 2px solid var(--ux-border); border-radius: 999px; background: var(--ux-surface); font-weight: 600; color: var(--ux-text);
}
.ux-chip input:checked + span { background: var(--ux-accent); color: var(--ux-on-accent); border-color: var(--ux-accent); font-weight: 700; }
.ux-chip input:focus-visible + span { outline: 3px solid var(--ux-focus); outline-offset: 2px; }

/* expander and text buttons */
.ux-details-wrap { margin: 6px 0 12px; border-top: 1px solid var(--ux-line); padding-top: 2px; }
.ux-link-btn { min-height: var(--ux-tap); padding: 0 10px; font: inherit; font-weight: 700; color: var(--ux-text); background: transparent; border: 0; text-decoration: underline; cursor: pointer; }
a.ux-link-btn { display: inline-flex; align-items: center; justify-content: center; }
.ux-expander::before { content: "+ "; }
.ux-expander[aria-expanded="true"]::before { content: "\2212  "; }
.ux-danger { color: var(--ux-error); }
.ux-details { padding-top: 8px; }
.ux-apply { color: var(--ux-accent); text-decoration: none; }
.ux-apply::after { content: " \2192"; }

/* ---------------------------------------------------------------- the primary bar: thumb zone on phones, plain block on wide screens */
.ux-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 6; background: var(--ux-surface); border-top: 1px solid var(--ux-line); padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px)); }
.ux-bar-in { max-width: 30rem; margin: 0 auto; text-align: center; }
.ux-bar-in > * + * { margin-top: 8px; }
@media (min-width: 840px) {
    .ux-bar { position: static; background: transparent; border: 0; padding: 0 16px 8px; }
    .ux-bar-in { max-width: none; padding: 0; }
    .ux-col > .ux-bar { max-width: 28rem; }
}
.ux-btn {
    display: flex; align-items: center; justify-content: center; gap: 9px; width: 100%; min-height: var(--ux-bar-h); padding: 0 16px;
    font-family: var(--dsp); font-size: 1.0625rem; font-weight: 800; letter-spacing: -0.01em;
    color: var(--ux-on-accent); background: var(--ux-accent); border: 0; border-radius: 14px; text-decoration: none; cursor: pointer;
}
.ux-btn[aria-disabled="true"] { background: var(--ux-disabled-bg); color: var(--ux-disabled-text); cursor: not-allowed; }
.ux-btn[aria-busy="true"]::before { content: ""; width: 18px; height: 18px; margin-right: 10px; border: 3px solid currentColor; border-right-color: transparent; border-radius: 50%; }
.ux-btn-secondary { background: var(--ux-surface); color: var(--ux-text); border: 2px solid var(--ux-border); }

/* the Change sheet */
.ux-sheet { position: fixed; inset: 0; z-index: 10; display: flex; align-items: flex-end; background: var(--ux-overlay); }
.ux-sheet-in { width: 100%; max-width: 30rem; margin: 0 auto; padding: 20px 16px; background: var(--ux-surface); border-radius: var(--ux-radius-lg) var(--ux-radius-lg) 0 0; max-height: 90vh; overflow-y: auto; }
@media (min-width: 840px) {
    .ux-sheet { align-items: center; }
    .ux-sheet-in { border-radius: var(--ux-radius-lg); box-shadow: var(--ux-shadow); }
}

/* ---------------------------------------------------------------- sent screens (employee and customer) */
.ux-sent-frame .ux-page { max-width: 28rem; padding-top: 36px; }
.ux-sent { text-align: center; }
.ux-sent-frame .ux-bar-in { max-width: 28rem; }
.ux-burst { position: relative; display: grid; place-items: center; width: 88px; height: 88px; margin: 0 auto 22px; border-radius: 50%; background: var(--ux-ok); color: var(--ux-on-ok); }
.ux-burst .ux-ic { width: 44px; height: 44px; stroke-width: 2.6; }
.ux-burst::before, .ux-burst::after { content: ""; position: absolute; inset: -9px; border-radius: 50%; border: 2px solid var(--ux-ok); opacity: 0.3; }
.ux-tally { display: inline-flex; flex-direction: column; align-items: center; gap: 3px; margin: 8px 0 4px; padding: 16px 26px; background: var(--ux-surface-2); border: 1px solid var(--ux-line); border-radius: var(--ux-radius-lg); }
.ux-tally b { font-family: var(--dsp); font-size: 1.0625rem; font-weight: 800; }
.ux-tally i { font-style: normal; color: var(--ux-accent); }
.ux-ref { font-size: 0.8125rem; font-weight: 600; margin-top: 16px; }
.ux-thumbs { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.ux-thumb { width: 72px; height: 72px; object-fit: cover; border-radius: 8px; border: 1px solid var(--ux-border); }

/* visible focus everywhere */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, [tabindex]:focus-visible {
    outline: 3px solid var(--ux-focus);
    outline-offset: 2px;
}

.ux-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* wire lane: weak-signal choice, devices list */
.ux-weak { margin: 0 0 16px; padding: 12px; border: 2px solid var(--ux-error); border-radius: var(--ux-radius); background: var(--ux-surface-2); }
.ux-weak p { margin: 0 0 12px; font-weight: 600; }
.ux-weak .ux-btn + .ux-btn { margin-top: 8px; }
.ux-phones { margin: 16px 0; }
.ux-phones ul { list-style: none; margin: 0; padding: 0; }
.ux-phones li { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: var(--ux-tap); border-bottom: 1px solid var(--ux-line); }

/* the honeypot field is for bots: off screen, not display:none (some bots skip hidden fields) */
.ux-hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* /stores: the 13 store buttons, same buttons and targets as before, in a grid that grows with the screen */
.ux-stores { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr; gap: 10px; }
.ux-stores li { margin: 0; }
.ux-stores .button {
    width: 100%; min-height: var(--ux-bar-h); padding: 0 16px; font: inherit; font-weight: 800; text-align: left;
    color: var(--ux-text); background: var(--ux-surface); border: 2px solid var(--ux-border); border-radius: var(--ux-radius); cursor: pointer;
}
.ux-stores .button:hover { border-color: var(--ux-accent); }
@media (min-width: 600px) { .ux-stores { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 840px) { .ux-stores { grid-template-columns: repeat(3, 1fr); } .ux-page { padding-top: 40px; } }
.ux-contact { max-width: 1180px; margin: 0 auto; padding: 24px 20px 48px; color: var(--ux-muted); }
.ux-contact a { color: var(--ux-text); }

/* ---------------------------------------------------------------- PHONE FIT (lane phonefit, 10 Nov): phones only, up to 599px. Nothing here applies from 600px up.
   Home: the hero shrinks and the three stats move under the two doors, so the crew door is in the first screen at 360x800.
   Lead screen: identity on one row, one-line sub text, a short photo tile (a slim row once a photo is added), tighter field rhythm, so Phone sits above the Send bar.
   No target goes under 48px, no label or field is hidden, the field order is untouched. tests/ux/Check-UxMarkup.ps1 asserts that this block is the only place these rules live. */
/* phonefit:begin */
@media (max-width: 599px) {
    .ux-page { padding-top: 12px; }

    /* home */
    .ux-hero { display: contents; }
    .ux-home .ux-kicker { margin: 14px 20px 8px; }
    .ux-home .ux-hero-h { margin: 4px 20px 0; }
    .ux-home .ux-hero-lede { margin: 8px 20px 0; }
    .ux-home .ux-doors { order: 2; gap: 12px; padding: 14px 16px 8px; }
    .ux-home .ux-meta { order: 3; gap: 8px 20px; margin: 8px 20px 28px; }
    .ux-door { padding: 16px; }
    .ux-door-ic { width: 40px; height: 40px; margin-bottom: 10px; }
    .ux-door-ic .ux-ic { width: 22px; height: 22px; }
    .ux-door-title { font-size: 1.25rem; }
    .ux-go { top: 16px; right: 16px; }
    .ux-pill { margin-top: 10px; }

    /* lead screen: heading and the one-line sub text */
    .ux-page .ux-h1 { margin: 2px 0 4px; }
    .ux-lead { margin-bottom: 10px; }
    .ux-lead-wide { display: none; }
    .ux-lead-phone { display: inline; }

    /* identity: avatar, "Sending as <name> . Store <s>", Change and Not you? on ONE row; the buttons drop under only when the row cannot hold them (about 320px) */
    .ux-identity { gap: 8px; margin-bottom: 4px; }
    .ux-identity .ux-avatar { width: 28px; height: 28px; font-size: 0.875rem; }
    .ux-id-text { flex: 1 1 8.5rem; font-size: 0.875rem; line-height: 1.25; }
    .ux-id-actions { gap: 2px; }
    .ux-id-actions .ux-link-btn { min-width: var(--ux-tap); padding: 0 6px; font-size: 0.875rem; }
    .ux-id-actions .ux-notyou { padding: 0 10px; }

    /* photo tile: about 100px, icon beside the words, dashed look kept; with a photo it becomes a slim "Add another photo" row (photos.js sets data-has-photo) */
    .ux-photos { min-height: 0; margin-bottom: 8px; }
    .ux-photos .ux-ph-row { gap: 8px; }
    .ux-photos .ux-ph-tiles:empty { display: none; }
    .ux-photos .ux-ph-take { flex-direction: row; justify-content: center; min-height: 100px; padding: 12px 16px; gap: 14px; text-align: left; }
    .ux-photos .ux-ph-take-icon { width: 24px; height: 24px; padding: 11px; }
    .ux-photos .ux-ph-take-main { font-size: 1.0625rem; }
    .ux-photos .ux-ph-library { display: block; margin-top: 2px; }
    .ux-photos[data-has-photo="1"] .ux-ph-take { min-height: 56px; padding: 6px 16px; }
    .ux-photos[data-has-photo="1"] .ux-ph-take-icon { width: 20px; height: 20px; padding: 8px; }
    .ux-photos[data-has-photo="1"] .ux-ph-take-sub { display: none; }

    /* field rhythm: about 80px from one field to the next (label 18 + 4, input 48, gap 10); labels stay, targets stay 48px */
    .ux-field { margin-bottom: 10px; }
    .ux-label { margin-bottom: 4px; line-height: 1.3; }
    .ux-input:not(.ux-textarea) { min-height: var(--ux-tap); }
}
/* phonefit:end */

/* motion only when the person has not asked for less */
@media (prefers-reduced-motion: no-preference) {
    .ux-btn, .ux-door, .ux-go, .ux-brand .ux-mark, .ux-ph-take { transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.15s ease, border-color 0.15s ease; }
    .ux-door:hover { transform: translateY(-3px); }
    .ux-door:active, .ux-btn:active { transform: translateY(1px) scale(0.995); }
    .ux-door:hover .ux-go { transform: translateX(3px); }
    .ux-brand:hover .ux-mark { transform: rotate(-6deg) scale(1.04); }
    .ux-btn[aria-busy="true"]::before { animation: ux-spin 0.8s linear infinite; }
    .ux-sent .ux-burst { animation: ux-pop 0.5s cubic-bezier(0.2, 1.4, 0.4, 1) both; }
    .ux-sent .ux-burst::before { animation: ux-ring 0.8s ease-out 0.05s both; }
    .ux-sent .ux-burst::after { animation: ux-ring 1s ease-out 0.15s both; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}
@keyframes ux-spin { to { transform: rotate(360deg); } }
@keyframes ux-pop { from { transform: scale(0.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes ux-ring { to { transform: scale(1.7); opacity: 0; } }
