@import url("https://fonts.googleapis.com/css2?family=Inter+Tight:wght@500;600;700&family=Inter:wght@400;500;600&display=swap");
/* ==========================================================================
   Cupertino theme — calm product-page light.
   Colors are RGB triplets without rgb() so opacity works: rgb(var(--x) / 0.5).
   The -600/-700 steps are DARKER than -500. Blue is only for actions and the
   active state; sections alternate white, light gray and black.
   ========================================================================== */
:root {
    /* Accent: action blue #0071E3 */
    --color-primary-50: 232 242 253;
    --color-primary-100: 214 232 252;
    --color-primary-200: 179 215 255;
    --color-primary-500: 0 113 227;
    --color-primary-600: 0 98 196;
    --color-primary-700: 0 88 176;
    --color-primary-900: 0 52 110;
    --color-primary-fg: 255 255 255;

    --color-sidebar: 245 245 247;
    --color-sidebar-fg: 29 29 31;

    /* page = light gray (hover fills, read-only values); the app body itself is white. */
    --color-page: 245 245 247;
    --color-page-public: 255 255 255;

    --color-surface: 255 255 255;
    --color-surface-muted: 232 232 237;
    --color-border: 210 210 215;
    --color-border-soft: 229 229 234;
    --color-border-strong: 134 134 139;
    --color-text: 29 29 31;
    --color-text-2: 66 66 69;
    --color-text-soft: 110 110 115;
    --color-text-muted: 110 110 115;

    --color-success: 0 112 60;
    --color-success-bg: 233 247 238;
    --color-danger: 196 0 0;
    --color-danger-bg: 255 242 244;
    --color-warning: 143 64 0;
    --color-warning-bg: 255 245 230;

    --color-night: 0 0 0;
    --color-night-fg: 245 245 247;
    --color-night-soft: 161 161 166;
    --color-night-line: 51 51 54;

    --radius: 1.375rem;
    --radius-lg: 1.375rem;
    --radius-tile: 1.75rem;
    --radius-control: 0.75rem;
    --radius-pill: 9999px;
    --shadow-card: 0 0 0 1px rgb(0 0 0 / 0.06), 0 18px 40px -18px rgb(0 0 0 / 0.18);
    --shadow-raised: 0 0 0 1px rgb(0 0 0 / 0.06), 0 18px 40px -18px rgb(0 0 0 / 0.18);
    --shadow-control: none;
    --shadow-menu: 0 0 0 1px rgb(0 0 0 / 0.06), 0 18px 40px -12px rgb(0 0 0 / 0.22);
    --focus-ring: 0 0 0 4px rgb(var(--color-primary-500) / 0.18);
    --ease: cubic-bezier(0.16, 1, 0.3, 1);

    --wrap: 74rem;
    --gutter: 1rem;
    --control-h: 3rem;
    --header-h: 3.25rem;
    --sidebar-w: 248px;

    /* To change the font, override only these vars (plus the @import above). */
    --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-display: "Inter Tight", "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
    --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}
@media (min-width: 768px) { :root { --gutter: 1.5rem; } }
@media (min-width: 1024px) { :root { --gutter: 2.5rem; } }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
    -webkit-text-size-adjust: 100%;
    scrollbar-color: rgb(199 199 204) rgb(var(--color-surface));
    interpolate-size: allow-keywords;
}
body {
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0;
    display: flex;
    flex-direction: column;
    background: rgb(var(--color-page-public));
    color: rgb(var(--color-text));
    font-family: var(--font-sans);
    font-size: 15px;
    line-height: 1.47;
    letter-spacing: -0.011em;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    font-variant-numeric: tabular-nums;
}
button, input, select, textarea { font-family: inherit; font-size: inherit; }
body.app--auth {
    flex-direction: row;
    background: rgb(var(--color-surface));
}
h1, h2, h3, h4 { text-wrap: balance; font-family: var(--font-display); }
p { text-wrap: pretty; }
a { color: inherit; }
img { max-width: 100%; }
::selection { background: rgb(var(--color-primary-200)); color: rgb(var(--color-text)); }
:focus-visible { outline: 2px solid rgb(var(--color-primary-500)); outline-offset: 2px; border-radius: 0.5rem; }
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgb(199 199 204); border: 3px solid rgb(var(--color-surface)); border-radius: 12px; }
::-webkit-scrollbar-thumb:hover { background: rgb(var(--color-border-strong)); }

.hidden { display: none !important; }
[x-cloak] { display: none !important; }

.overlay {
    position: fixed;
    inset: 0;
    background: rgb(0 0 0 / 0.28);
    z-index: 30;
}
@media (min-width: 1024px) { .overlay { display: none; } }

/* ---------- Sidebar ---------- */
.sidebar {
    position: fixed;
    inset-block: 0;
    left: 0;
    z-index: 40;
    width: var(--sidebar-w);
    max-width: 86vw;
    min-height: 100vh;
    background: rgb(var(--color-sidebar));
    border-right: 1px solid rgb(0 0 0 / 0.08);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    transform: translateX(-100%);
    transition: transform 0.25s var(--ease), box-shadow 0.25s;
}
.sidebar.is-open { transform: translateX(0); box-shadow: 0 0 0 1px rgb(0 0 0 / 0.08), 0 24px 60px -20px rgb(0 0 0 / 0.3); }
@media (min-width: 1024px) { .sidebar { transform: translateX(0); } }

.sidebar-logo {
    height: var(--header-h);
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0 1.25rem;
    flex-shrink: 0;
    min-width: 0;
}
.sidebar-logo img { height: 1.75rem; max-width: 7rem; object-fit: contain; }
.sidebar-brand {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 600;
    color: rgb(var(--color-sidebar-fg));
    letter-spacing: -0.02em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav {
    flex: 1;
    padding: 0.5rem 0.75rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-height: 2.75rem;
    padding: 0 0.625rem;
    border-radius: 0.625rem;
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    color: rgb(var(--color-text-2));
    transition: background-color 0.2s, color 0.2s, box-shadow 0.2s;
    cursor: pointer;
    background: none;
    border: none;
    width: 100%;
    text-align: left;
}
@media (min-width: 1024px) { .nav-link { min-height: 2.375rem; font-size: 14px; } }
.nav-link:hover { color: rgb(var(--color-text)); background: rgb(var(--color-surface-muted)); }
.nav-link.is-active, .nav-link.is-active:hover { color: rgb(var(--color-text)); font-weight: 600; background: rgb(var(--color-surface)); box-shadow: 0 0 0 1px rgb(0 0 0 / 0.05), 0 1px 2px rgb(0 0 0 / 0.06); }
.nav-link svg, .nav-link i { width: 1.25rem; height: 1.25rem; flex-shrink: 0; color: rgb(var(--color-text-muted)); transition: color 0.15s; }
.nav-link i { display: inline-grid; place-items: center; font-size: 1rem; }
.nav-link:hover svg, .nav-link:hover i { color: rgb(var(--color-text-2)); }
.nav-link.is-active svg, .nav-link.is-active i { color: rgb(var(--color-primary-500)); }

.sidebar-logout { padding: 0.75rem; border-top: 1px solid rgb(var(--color-border)); flex-shrink: 0; }
@media (min-width: 1024px) { .sidebar-logout { display: none; } }

.nav-badge {
    margin-left: auto;
    min-width: 1.25rem;
    height: 1.25rem;
    padding: 0 0.375rem;
    border-radius: var(--radius-pill);
    background: rgb(var(--color-primary-500));
    color: rgb(var(--color-primary-fg));
    font-size: 12px;
    font-weight: 600;
    line-height: 1.25rem;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

/* ---------- Main column ---------- */
.main-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}
@media (min-width: 1024px) {
    body.app--auth .main-wrapper { margin-left: var(--sidebar-w); }
}

/* ---------- Headers ---------- */
.header {
    flex-shrink: 0;
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgb(255 255 255 / 0.8);
    -webkit-backdrop-filter: saturate(1.8) blur(20px);
    backdrop-filter: saturate(1.8) blur(20px);
    border-bottom: 1px solid rgb(0 0 0 / 0.08);
}
.header--auth {
    height: var(--header-h);
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0 0.5rem 0 0.375rem;
}
@media (min-width: 768px) { .header--auth { padding: 0 var(--gutter); gap: 0.5rem; } }
.header--public { width: 100%; }
.header-inner {
    max-width: calc(var(--wrap) + 2 * var(--gutter));
    margin: 0 auto;
    width: 100%;
    height: var(--header-h);
    padding: 0 var(--gutter);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}
.header-inner > .row { min-width: 0; gap: 0.25rem; }
.header-actions { display: flex; align-items: center; gap: 0.25rem; flex-shrink: 0; }
@media (min-width: 768px) { .header-actions { gap: 0.5rem; } }
.header-brand {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    min-width: 0;
    min-height: 2.75rem;
    margin-right: 0.5rem;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 18px;
    color: rgb(var(--color-text));
    letter-spacing: -0.02em;
    text-decoration: none;
    white-space: nowrap;
}
.header-brand img { height: 1.75rem; max-width: 7rem; object-fit: contain; }

.icon-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: rgb(var(--color-text));
    display: inline-grid;
    place-items: center;
    width: 2.75rem;
    height: 2.75rem;
    flex-shrink: 0;
    border-radius: 50%;
    transition: background-color 0.2s;
    padding: 0;
}
.icon-btn:hover { background: rgb(var(--color-surface-muted)); }
.icon-btn svg { width: 1.375rem; height: 1.375rem; }
@media (min-width: 1024px) { .icon-btn--mobile { display: none; } }

/* Store name next to the menu button on phones/tablets. */
.header-mobile-brand {
    display: block;
    min-width: 0;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 17px;
    letter-spacing: -0.02em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
@media (min-width: 1024px) { .header-mobile-brand { display: none; } }

.header-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    height: 2.75rem;
    background: none;
    border: 1px solid transparent;
    cursor: pointer;
    color: rgb(var(--color-text-2));
    padding: 0 0.5rem;
    border-radius: var(--radius-pill);
    font-size: 13px;
    font-weight: 500;
    transition: background-color 0.2s, border-color 0.2s, color 0.2s;
    text-decoration: none;
    white-space: nowrap;
}
@media (min-width: 768px) {
    .header-btn { height: 2rem; padding: 0 0.75rem; }
}
.header-btn:hover { color: rgb(var(--color-text)); background: rgb(var(--color-surface-muted)); }
.header-btn svg { width: 1.125rem; height: 1.125rem; color: rgb(var(--color-text-soft)); flex-shrink: 0; }
.header-btn--balance {
    height: 2.5rem;
    padding: 0 0.75rem 0 0.625rem;
    border-radius: var(--radius-pill);
    background: rgb(var(--color-page));
    color: rgb(var(--color-text));
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}
@media (min-width: 768px) { .header-btn--balance { height: 2rem; padding: 0 0.875rem 0 0.6875rem; } }
.header-btn--balance svg { color: rgb(var(--color-text-2)); }
.header-btn--balance:hover { color: rgb(var(--color-text)); background: rgb(var(--color-surface-muted)); }
.header-btn--logout:hover { color: rgb(var(--color-danger)); background: rgb(var(--color-danger-bg)); }
.header-btn--logout:hover svg { color: rgb(var(--color-danger)); }
/* Phones: language shows only its globe, currency only its code. */
@media (max-width: 559px) {
    .header-btn--lang { width: 2.75rem; justify-content: center; padding: 0; }
    .header-btn--lang span { display: none; }
    .header-btn--currency { padding: 0 0.375rem; }
    .header-btn--currency svg { display: none; }
}
.desktop-only { display: none; }
@media (min-width: 1024px) { .desktop-only { display: flex; } }

/* Public navigation */
.pubnav { display: none; align-items: center; gap: 0.25rem; flex: 1; font-size: 13px; font-weight: 500; }
@media (min-width: 768px) { .pubnav { display: flex; } }
.pubnav-link {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    height: 2rem;
    padding: 0 0.875rem;
    border-radius: var(--radius-pill);
    border: 1px solid transparent;
    color: rgb(var(--color-text-2));
    text-decoration: none;
    white-space: nowrap;
    transition: background-color 0.2s, color 0.2s;
}
.pubnav-link:hover { color: rgb(var(--color-text)); }
.pubnav .pubnav-link--signin { order: 10; margin-left: auto; color: rgb(var(--color-text)); }
.pubnav .pubnav-link--signin:hover { background: rgb(var(--color-surface-muted)); }
.pubnav .pubnav-link--cta { order: 11; margin-left: 0.25rem; background: rgb(var(--color-primary-500)); color: rgb(var(--color-primary-fg)); }
.pubnav .pubnav-link--cta:hover { background: rgb(var(--color-primary-600)); color: rgb(var(--color-primary-fg)); }
.menu-btn { display: inline-grid; margin-right: -0.5rem; }
@media (min-width: 768px) { .menu-btn { display: none; } }

.pubmenu-mobile {
    border-top: 1px solid rgb(var(--color-border-soft));
    background: rgb(var(--color-surface));
    padding: 0.5rem var(--gutter) 0.75rem;
    position: relative;
    z-index: 50;
    display: flex;
    flex-direction: column;
    box-shadow: 0 18px 40px -24px rgb(0 0 0 / 0.25);
}
@media (min-width: 768px) { .pubmenu-mobile { display: none; } }
.pubmenu-mobile a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 2.75rem;
    padding: 0 0.5rem;
    border-radius: 0.625rem;
    font-size: 16px;
    font-weight: 500;
    color: rgb(var(--color-text-2));
    text-decoration: none;
    transition: background-color 0.15s, color 0.15s;
}
.pubmenu-mobile a:hover { color: rgb(var(--color-text)); background: rgb(var(--color-page)); }
.pubmenu-mobile .pubnav-link--cta {
    order: 20;
    margin-top: 0.5rem;
    justify-content: center;
    border-radius: var(--radius-pill);
    background: rgb(var(--color-primary-500));
    color: rgb(var(--color-primary-fg));
}
.pubmenu-mobile .pubnav-link--cta:hover { background: rgb(var(--color-primary-600)); color: rgb(var(--color-primary-fg)); }

/* ---------- Dropdowns ---------- */
.dropdown { position: relative; }
.dropdown-menu {
    position: absolute;
    top: 100%;
    margin-top: 0.375rem;
    background: rgb(var(--color-surface));
    border-radius: 0.875rem;
    box-shadow: var(--shadow-menu);
    padding: 0.375rem;
    min-width: 9rem;
    max-height: 20rem;
    overflow-y: auto;
    z-index: 50;
}
.dropdown-menu--right { right: 0; }
.dropdown-menu--left { left: 0; }
.header--auth .dropdown-menu { right: 0; }
.header--public .dropdown-menu { left: 0; }
.dropdown-menu--full { left: 0; right: 0; width: 100%; max-height: 18rem; overflow-y: auto; }
.dropdown-item {
    display: block;
    width: 100%;
    text-align: left;
    min-height: 2.5rem;
    padding: 0.5625rem 0.75rem;
    border-radius: 0.625rem;
    font-size: 14px;
    line-height: 1.4;
    color: rgb(var(--color-text-2));
    text-decoration: none;
    background: none;
    border: none;
    cursor: pointer;
    transition: background-color 0.1s, color 0.1s;
}
.dropdown-item:hover { color: rgb(var(--color-text)); background: rgb(var(--color-page)); }
.dropdown-item.is-selected { background: rgb(var(--color-page)); color: rgb(var(--color-primary-700)); font-weight: 500; }
.dropdown-item.is-selected .cell-id { color: rgb(var(--color-primary-700)); }

/* ---------- Content ---------- */
.main {
    flex: 1;
    padding: 0.75rem var(--gutter) 2rem;
    overflow-x: clip;
}
body.app--auth .main { padding-top: 1.5rem; }
@media (max-width: 559px) {
    body.app--auth .main { padding: 0.5rem 0.5rem calc(1rem + env(safe-area-inset-bottom)); }
}
.container { max-width: var(--wrap); margin: 0 auto; width: 100%; }
/* #content dims instantly while the next page loads. */
#content { transition: opacity 0.12s; }
#content.htmx-request { opacity: 0.55; }
body.app--auth .container { max-width: 88rem; }

.footer {
    flex-shrink: 0;
    border-top: 1px solid rgb(var(--color-border));
    padding: 1.25rem var(--gutter);
    font-size: 12px;
    color: rgb(var(--color-text-soft));
    text-align: center;
}

/* ---------- Floating chat buttons ---------- */
.chat-fab-stack {
    position: fixed;
    bottom: calc(1.25rem + env(safe-area-inset-bottom));
    z-index: 50;
    display: flex;
    flex-direction: column-reverse;
    align-items: center;
    gap: 0.75rem;
}
.chat-fab-stack--left { left: 1.25rem; }
.chat-fab-stack--right { right: 1.25rem; }
.chat-fab {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3.25rem;
    height: 3.25rem;
    border-radius: var(--radius-pill);
    color: #fff;
    box-shadow: 0 8px 20px -6px rgb(0 0 0 / 0.3);
    transition: transform 0.2s var(--ease), filter 0.15s;
}
.chat-fab:hover { filter: brightness(1.06); transform: translateY(-1px); }
.chat-fab--whatsapp { background: #1fa855; }
.chat-fab--telegram { background: #229ed9; }
.chat-fab--whatsapp svg { width: 1.625rem; height: 1.625rem; }
.chat-fab--telegram svg { width: 2rem; height: 2rem; }

/* ---------- Cards ---------- */
.card {
    background: rgb(var(--color-surface));
    border-radius: var(--radius);
    border: 0;
    box-shadow: var(--shadow-card);
}
.card--pad { padding: 1rem; }
@media (min-width: 768px) { .card--pad { padding: 1.5rem; } }
@media (max-width: 559px) { .card { border-radius: 1.125rem; } }
.card-title { margin: 0 0 1rem; font-family: var(--font-display); font-size: 19px; font-weight: 600; letter-spacing: -0.022em; color: rgb(var(--color-text)); }

/* ---------- Forms ---------- */
.label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: rgb(var(--color-text));
    margin: 0 0 0.375rem 0.125rem;
}
.input, .select, .textarea, .select-trigger {
    width: 100%;
    min-height: var(--control-h);
    border: 1px solid rgb(var(--color-border-strong));
    border-radius: var(--radius-control);
    background: rgb(var(--color-surface));
    padding: 0.625rem 0.875rem;
    font-size: 16px;
    line-height: 1.4;
    letter-spacing: -0.011em;
    color: rgb(var(--color-text));
    caret-color: rgb(var(--color-primary-500));
    box-shadow: var(--shadow-control);
    transition: border-color 0.15s, box-shadow 0.15s;
    font-family: inherit;
}
@media (min-width: 768px) { .input, .select, .textarea, .select-trigger { font-size: 15px; } }
.input::placeholder, .textarea::placeholder { color: rgb(var(--color-text-muted)); }
.input:hover, .select:hover, .textarea:hover, .select-trigger:hover { border-color: rgb(var(--color-text-2)); }
.input:focus, .select:focus, .textarea:focus, .select-trigger:focus {
    outline: none;
    border-color: rgb(var(--color-primary-500));
    box-shadow: var(--focus-ring);
}
.input:user-invalid, .textarea:user-invalid { border-color: rgb(var(--color-danger)); }
.select-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    text-align: left;
    cursor: pointer;
}
.select-trigger > span:first-child {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 0.5rem;
}
.select-trigger .trigger-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.select-trigger img { width: 1.125rem; height: 1.125rem; flex-shrink: 0; }
.select-trigger .chevron { width: 1.125rem; height: 1.125rem; flex-shrink: 0; color: rgb(var(--color-text-muted)); transition: transform 0.2s var(--ease); }
.select-trigger .chevron.is-open { transform: rotate(180deg); }

.search-left { position: relative; }
.search-left > svg {
    position: absolute; left: 0.875rem; top: 50%; transform: translateY(-50%);
    width: 1.125rem; height: 1.125rem; color: rgb(var(--color-text-muted)); pointer-events: none;
}
.search-left .input { padding-left: 2.5rem; }
.input:disabled, .select:disabled, .textarea:disabled {
    background: rgb(var(--color-page));
    border-color: rgb(var(--color-border-soft));
    color: rgb(var(--color-text-soft));
    cursor: not-allowed;
}
.textarea { resize: vertical; min-height: 6rem; }
/* Native arrow on purpose; base-select (Chrome/Edge) keeps our border/padding/font. */
.select {
    cursor: pointer;
    appearance: auto;
    appearance: base-select;
}
@supports (appearance: base-select) {
    .select::picker-icon {
        content: "";
        width: 1.125rem;
        height: 1.125rem;
        background: rgb(var(--color-text-muted));
        -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5.23 7.21a.75.75 0 0 1 1.06.02L10 11.17l3.71-3.94a.75.75 0 1 1 1.08 1.04l-4.25 4.5a.75.75 0 0 1-1.08 0l-4.25-4.5a.75.75 0 0 1 .02-1.06z'/%3E%3C/svg%3E") center / contain no-repeat;
        mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5.23 7.21a.75.75 0 0 1 1.06.02L10 11.17l3.71-3.94a.75.75 0 1 1 1.08 1.04l-4.25 4.5a.75.75 0 0 1-1.08 0l-4.25-4.5a.75.75 0 0 1 .02-1.06z'/%3E%3C/svg%3E") center / contain no-repeat;
        transition: rotate 0.2s var(--ease);
    }
    .select:open::picker-icon { rotate: 180deg; }
    .select::picker(select) {
        appearance: base-select;
        border: 0;
        border-radius: 0.875rem;
        box-shadow: var(--shadow-menu);
        background: rgb(var(--color-surface));
        padding: 0.375rem;
        margin-top: 0.375rem;
    }
    .select option {
        min-height: 2.5rem;
        padding: 0.5rem 0.625rem;
        border-radius: 0.625rem;
        font-size: 14px;
        color: rgb(var(--color-text-2));
    }
    .select option:hover { background: rgb(var(--color-page)); color: rgb(var(--color-text)); }
    .select option:checked { background: rgb(var(--color-page)); color: rgb(var(--color-primary-700)); }
    .select option::checkmark { color: rgb(var(--color-primary-500)); }
}
.checkbox {
    width: 1.125rem;
    height: 1.125rem;
    flex-shrink: 0;
    margin: 0;
    border-radius: 0.25rem;
    border: 1px solid rgb(var(--color-border));
    accent-color: rgb(var(--color-primary-500));
    cursor: pointer;
}
.field { margin-bottom: 0; }
.help { margin: 0.4375rem 0 0 0.125rem; font-size: 13px; color: rgb(var(--color-text-soft)); font-variant-numeric: tabular-nums; }
.error-text { font-size: 13px; color: rgb(var(--color-danger)); }

.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; }
.form-grid--wide { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.form-actions { grid-column: 1 / -1; padding-top: 0.25rem; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: var(--control-h);
    padding: 0 1.25rem;
    border-radius: var(--radius-pill);
    border: 1px solid transparent;
    font-weight: 500;
    font-size: 15px;
    line-height: 1.2;
    letter-spacing: -0.01em;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s;
}
@media (min-width: 768px) { .btn { min-height: 2.5rem; font-size: 14px; } }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn--block { width: 100%; min-height: var(--control-h); font-size: 17px; border-radius: var(--radius-control); }
.btn--sm { min-height: 2.25rem; padding: 0 0.875rem; font-size: 13px; }
.btn--primary {
    background: rgb(var(--color-primary-500));
    color: rgb(var(--color-primary-fg));
}
.btn--primary:hover:not(:disabled) { background: rgb(var(--color-primary-600)); }
.btn--primary:active:not(:disabled) { background: rgb(var(--color-primary-700)); }
.btn--outline {
    background: rgb(var(--color-page));
    color: rgb(var(--color-text));
    border-color: transparent;
    box-shadow: var(--shadow-control);
}
.btn--outline:hover:not(:disabled) { background: rgb(var(--color-surface-muted)); }
.btn--icon { padding: 0; width: var(--control-h); gap: 0; }
.btn--icon svg { width: 1.125rem; height: 1.125rem; }
.btn--xs { min-height: 1.75rem; padding: 0 0.625rem; font-size: 12px; border-radius: var(--radius-pill); }
.btn--success {
    background: rgb(var(--color-success-bg)); color: rgb(var(--color-success)); border-color: transparent;
}
.btn--success:hover:not(:disabled) { background: rgb(var(--color-success) / 0.12); }
.btn--danger {
    background: rgb(var(--color-danger-bg)); color: rgb(var(--color-danger)); border-color: transparent;
}
.btn--danger:hover:not(:disabled) { background: rgb(var(--color-danger) / 0.1); }

.link {
    font: inherit;
    font-weight: 500;
    color: rgb(0 102 204);
    text-decoration: none;
    text-underline-offset: 0.18em;
    text-decoration-thickness: 1px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
}
.link:hover { text-decoration: underline; }

/* ---------- Chips (network filter) ---------- */
.chip-row { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-width: 2.75rem;
    height: 2.75rem;
    padding: 0 0.875rem 0 0.6875rem;
    flex-shrink: 0;
    border-radius: var(--radius-pill);
    border: 0;
    background: rgb(var(--color-page));
    color: rgb(var(--color-text-2));
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
}
@media (min-width: 1024px) { .chip { height: 2.25rem; } }
.chip:hover { background: rgb(var(--color-surface-muted)); color: rgb(var(--color-text)); }
.chip img, .chip svg { width: 1.125rem; height: 1.125rem; flex-shrink: 0; }
.chip svg { color: rgb(var(--color-text-soft)); }
.chip.is-active {
    background: rgb(var(--color-text));
    color: rgb(var(--color-surface));
}
.chip.is-active svg { color: rgb(var(--color-surface)); }
/* Brand marks stay legible on the dark active pill. */
.chip.is-active img { box-sizing: content-box; padding: 3px; border-radius: 50%; background: rgb(var(--color-surface)); }

/* ---------- Read-only values ---------- */
.readout {
    width: 100%;
    min-height: var(--control-h);
    border: 1px solid transparent;
    border-radius: var(--radius-control);
    background: rgb(var(--color-page));
    padding: 0.6875rem 0.875rem;
    font-size: 15px;
    line-height: 1.55;
    color: rgb(var(--color-text-2));
    white-space: pre-line;
    overflow-wrap: anywhere;
}
.readout--value { color: rgb(var(--color-text)); font-weight: 600; font-variant-numeric: tabular-nums; }

/* Rich HTML content: block content, not pre-line. */
.readout--rich { white-space: normal; line-height: 1.55; }
.readout--rich > :first-child { margin-top: 0; }
.readout--rich > :last-child { margin-bottom: 0; }
.readout--rich p, .readout--rich ul, .readout--rich ol, .readout--rich table { margin: 0 0 0.6em; }
.readout--rich ul, .readout--rich ol { padding-left: 1.25rem; }
.readout--rich ul { list-style: disc; }
.readout--rich ol { list-style: decimal; }
.readout--rich h1, .readout--rich h2, .readout--rich h3, .readout--rich h4 {
    margin: 0.6em 0 0.3em; font-weight: 600; color: rgb(var(--color-text)); font-size: 1em;
}
.readout--rich a { color: rgb(var(--color-primary-700)); text-decoration: underline; text-underline-offset: 3px; }
.readout--rich strong { color: rgb(var(--color-text)); }
.readout--rich code {
    font-family: var(--font-mono); font-size: 0.875em;
    padding: 0.1em 0.35em; border-radius: 4px;
    background: rgb(var(--color-surface)); border: 1px solid rgb(var(--color-border-soft));
    color: rgb(var(--color-text)); user-select: all;
}
.readout--rich img { max-width: 100%; height: auto; border-radius: var(--radius-control); display: block; margin: 0.5em 0; }
.readout--rich video, .readout--rich iframe {
    display: block; max-width: 100%; width: 100%; aspect-ratio: 16 / 9; height: auto;
    border: 0; border-radius: var(--radius-control); margin: 0.5em 0; background: #000;
}
.readout--rich table { border-collapse: collapse; width: 100%; font-size: 0.9em; }
.readout--rich th, .readout--rich td { border: 1px solid rgb(var(--color-border-soft)); padding: 0.35em 0.5em; text-align: left; }
.readout--rich th { background: rgb(var(--color-surface)); color: rgb(var(--color-text)); }

/* ---------- Search with button ---------- */
.search { position: relative; width: 100%; }
@media (min-width: 640px) { .search { width: 20rem; } }
.search .input { padding-right: 3.25rem; }
.search-btn {
    position: absolute;
    top: 4px;
    bottom: 4px;
    right: 4px;
    display: grid;
    place-items: center;
    width: 2.375rem;
    padding: 0;
    border: none;
    border-radius: 0.5rem;
    background: rgb(var(--color-primary-500));
    color: rgb(var(--color-primary-fg));
    cursor: pointer;
    transition: background-color 0.15s;
}
.search-btn:hover { background: rgb(var(--color-primary-600)); }
.search-btn svg { width: 1.125rem; height: 1.125rem; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; overscroll-behavior-x: contain; }
.table { width: 100%; text-align: left; font-size: 14px; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.table thead tr { border-bottom: 1px solid rgb(var(--color-border-soft)); }
.table th {
    padding: 0.625rem 0.875rem;
    font-size: 12px;
    font-weight: 600;
    color: rgb(var(--color-text-soft));
    white-space: nowrap;
    background: transparent;
}
.table td { padding: 0.75rem 0.875rem; vertical-align: top; color: rgb(var(--color-text-2)); }
.table tbody tr { border-top: 1px solid rgb(var(--color-border-soft)); transition: background-color 0.1s; }
.table tbody tr:first-child { border-top: 0; }
.table tbody tr:hover { background: rgb(var(--color-page)); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table .cell-trunc {
    display: inline-block;
    max-width: 16rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: bottom;
}
.table-empty { padding: 2.5rem 1rem; text-align: center; font-size: 14px; color: rgb(var(--color-text-soft)); }
.table tbody tr.row--attention { background: rgb(var(--color-primary-50)); }
.table tbody tr.row--attention:hover { background: rgb(var(--color-primary-100) / 0.7); }

/* ---------- Badges ---------- */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    height: 1.5rem;
    border-radius: var(--radius-pill);
    padding: 0 0.5625rem;
    font-size: 12.5px;
    font-weight: 500;
    line-height: 1;
    white-space: nowrap;
    background: rgb(100 116 139 / 0.1);
    color: #475569;
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: 0.85; }
.badge--pending     { background: rgb(var(--color-warning-bg)); color: rgb(var(--color-warning)); }
.badge--processing  { background: rgb(var(--color-primary-50)); color: rgb(var(--color-primary-700)); }
.badge--in-progress { background: rgb(224 242 254); color: #075985; }
.badge--completed   { background: rgb(var(--color-success-bg)); color: rgb(var(--color-success)); }
.badge--partial     { background: rgb(255 237 213 / 0.8); color: #9a3412; }
.badge--canceled    { background: rgb(100 116 139 / 0.1); color: #475569; }
.badge--rejected    { background: rgb(var(--color-danger-bg)); color: rgb(var(--color-danger)); }
.badge--answered    { background: rgb(var(--color-primary-50)); color: rgb(var(--color-primary-700)); }
.badge--closed      { background: rgb(100 116 139 / 0.1); color: #475569; }
.badge--welcome     { background: rgb(124 58 237 / 0.1); color: #5b21b6; }
.badge--neutral     { background: rgb(100 116 139 / 0.1); color: #475569; }

/* ---------- Pagination ---------- */
.pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    font-size: 14px;
    color: rgb(var(--color-text-soft));
    font-variant-numeric: tabular-nums;
}
.pagination-nav { display: flex; align-items: center; gap: 0.5rem; }
.page-btn {
    display: inline-grid;
    place-items: center;
    width: var(--control-h);
    height: var(--control-h);
    border: 0;
    border-radius: 50%;
    background: rgb(var(--color-page));
    /* Buttons do not inherit color: without this the arrows vanish on dark surfaces. */
    color: rgb(var(--color-text-2));
    padding: 0;
    font-size: 1.25rem;
    line-height: 1;
    box-shadow: var(--shadow-control);
    cursor: pointer;
    transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}
@media (min-width: 768px) { .page-btn { width: 2.25rem; height: 2.25rem; } }
.page-btn:hover:not(:disabled) { background: rgb(var(--color-surface-muted)); color: rgb(var(--color-text)); }
.page-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ---------- Loading ---------- */
@keyframes pulse { 50% { opacity: 0.55; } }
.skeleton { background: rgb(var(--color-surface-muted)); border-radius: var(--radius-control); animation: pulse 1.8s cubic-bezier(0.4, 0, 0.6, 1) infinite; }
.skeleton-line { height: var(--control-h); }

@keyframes spin { to { transform: rotate(360deg); } }
.spinner { width: 1.125rem; height: 1.125rem; animation: spin 0.8s linear infinite; vertical-align: middle; }

/* ---------- Modal (bottom sheet on phones) ---------- */
.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 0;
    background: rgb(0 0 0 / 0.32);
}
.modal-box {
    position: relative;
    width: 100%;
    max-width: 32rem;
    background: rgb(var(--color-surface));
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    box-shadow: var(--shadow-menu);
    padding: 1.25rem 1rem calc(1.25rem + env(safe-area-inset-bottom));
    max-height: 88vh;
    max-height: 88dvh;
    overflow-y: auto;
    overscroll-behavior: contain;
}
@media (min-width: 640px) {
    .modal-backdrop { align-items: center; padding: 1.5rem; }
    .modal-box { border-radius: var(--radius-lg); padding: 1.5rem; max-height: 80vh; }
}
.modal-close {
    display: inline-grid;
    place-items: center;
    width: 2.25rem;
    height: 2.25rem;
    margin: -0.5rem -0.5rem -0.5rem 0;
    flex-shrink: 0;
    background: none;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    color: rgb(var(--color-text-muted));
    font-size: 1.375rem;
    line-height: 1;
    transition: background-color 0.15s, color 0.15s;
}
.modal-close:hover { color: rgb(var(--color-text)); background: rgb(var(--color-surface-muted)); }

/* ---------- Alerts & toast ---------- */
.alert {
    border-radius: var(--radius-control);
    padding: 0.625rem 0.875rem;
    font-size: 14px;
    line-height: 1.5;
}
.alert--warning { border: 1px solid rgb(245 158 11 / 0.35); background: rgb(var(--color-warning-bg)); color: rgb(var(--color-warning)); }

.toast {
    position: fixed;
    top: calc(0.75rem + env(safe-area-inset-top));
    left: 0.75rem;
    right: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    box-shadow: 0 18px 40px -12px rgb(0 0 0 / 0.35);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.45;
    z-index: 60;
    color: #fff;
    transition: opacity 0.3s;
}
@media (min-width: 640px) { .toast { left: auto; right: 1.5rem; top: 1.5rem; max-width: 26rem; } }
.toast--ok { background: rgb(var(--color-text)); color: #fff; }
.toast--error { background: rgb(var(--color-danger)); }

/* ---------- Auth pages (signup, reset, verify) ---------- */
.auth-page { display: flex; align-items: flex-start; justify-content: center; padding: 1rem 0 2rem; }
.auth-box { width: 100%; max-width: 420px; }
.auth-card { padding: 1.25rem 1rem; border-radius: 1.25rem; border: 0; box-shadow: var(--shadow-raised); }
@media (min-width: 560px) { .auth-card { padding: 1.75rem 1.75rem 1.5rem; border-radius: var(--radius-lg); } }
.auth-title { margin: 0 0 1rem; font-family: var(--font-display); font-size: 21px; line-height: 1.2; font-weight: 600; letter-spacing: -0.022em; text-align: center; color: rgb(var(--color-text)); }
.auth-alt { margin: 0; text-align: center; font-size: 15px; color: rgb(var(--color-text-soft)); padding-top: 0.25rem; }
.auth-alt .link { display: inline-block; padding: 0.625rem 0.125rem; margin: -0.625rem 0; }
.auth-hint { text-align: center; font-size: 14px; color: rgb(var(--color-text-soft)); }
@media (min-width: 768px) {
    .auth-page { align-items: center; padding: 2rem 0; min-height: 70vh; }
}

/* ---------- Money boxes, receipts, code ---------- */
.amount-box {
    text-align: center;
    border-radius: var(--radius-control);
    background: rgb(var(--color-page));
    border: 1px solid transparent;
    padding: 0.875rem;
    margin-bottom: 1rem;
}
.amount-box--copy { cursor: pointer; transition: border-color 0.15s; }
.amount-box--copy:hover { border-color: rgb(var(--color-primary-500)); }
.amount-box-label {
    font-size: 13px;
    font-weight: 500;
    color: rgb(var(--color-text-soft));
    margin-bottom: 0.125rem;
}
.amount-box-value { font-family: var(--font-display); font-size: 1.375rem; font-weight: 600; letter-spacing: -0.02em; color: rgb(var(--color-text)); font-variant-numeric: tabular-nums; }

.eyebrow {
    font-size: 13px;
    font-weight: 500;
    color: rgb(var(--color-text-soft));
}

.code-chip {
    border-radius: 0.375rem;
    background: rgb(var(--color-surface-muted));
    padding: 0.125rem 0.375rem;
    font-family: var(--font-mono);
    font-size: 13px;
    color: rgb(var(--color-text));
}

.code-block {
    background: rgb(var(--color-page));
    color: rgb(var(--color-text-2));
    padding: 0.875rem 1rem;
    border-radius: var(--radius-control);
    overflow-x: auto;
    font-family: var(--font-mono);
    font-size: 13px;
    line-height: 1.65;
    border: 1px solid transparent;
}
/* --dark is the request variant (light despite the name). */
.code-block--dark { background: rgb(var(--color-surface)); color: rgb(var(--color-text)); }

.receipt {
    padding: 0.875rem 1rem;
    border-radius: var(--radius-control);
    background: rgb(var(--color-success-bg));
    border: 1px solid transparent;
    font-size: 14px;
}
.receipt-title { margin: 0; font-weight: 600; color: rgb(var(--color-success)); }
.receipt-rows { margin-top: 0.5rem; display: flex; flex-direction: column; gap: 0.25rem; color: rgb(var(--color-text-2)); overflow-wrap: anywhere; }
.receipt-rows span { font-variant-numeric: tabular-nums; color: rgb(var(--color-text)); font-weight: 500; }

/* ---------- Layout helpers ---------- */
/* Alpine <template> siblings are skipped so the first visible child never gets a top gap. */
.stack > :not(template) ~ :not(template) { margin-top: 1rem; }
.form-stack > :not(template) ~ :not(template) { margin-top: 1rem; }
.stack-sm > :not(template) ~ :not(template) { margin-top: 0.5rem; }
.stack-lg > :not(template) ~ :not(template) { margin-top: 1.25rem; }
@media (min-width: 768px) { .stack-lg > :not(template) ~ :not(template) { margin-top: 1.5rem; } }
.field-row { display: flex; align-items: baseline; justify-content: space-between; gap: 0.5rem; margin-bottom: 0.375rem; }
.row { display: flex; align-items: center; gap: 0.5rem; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
.grow { flex: 1; }
.muted { color: rgb(var(--color-text-soft)); }
.strong { font-weight: 600; color: rgb(var(--color-text)); }
.center { text-align: center; }
.mono { font-family: var(--font-mono); }
/* Every entity id renders with .cell-id; pair with .muted (plain) or .link (clickable). */
.cell-id {
    font-family: var(--font-mono);
    font-size: 12.5px;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}
.dim { color: rgb(var(--color-text-muted)); }
.nowrap { white-space: nowrap; }
.text-sm { font-size: 14px; }
.text-xs { font-size: 13px; }
.text-2xs { font-size: 12px; }
.row-wrap { display: flex; gap: 0.75rem; flex-wrap: wrap; }

/* ==========================================================================
   New order (mobile-first)
   ========================================================================== */
.order-card { max-width: 48rem; margin-inline: auto; }
@media (min-width: 768px) { .order-card.card--pad { padding: 1.75rem 2rem 2rem; } }
@media (max-width: 1023px) {
    /* One swipeable row of icon-only chips. */
    .chip-row {
        flex-wrap: nowrap;
        gap: 0.375rem;
        overflow-x: auto;
        margin-inline: -1rem;
        padding-inline: 1rem;
        scrollbar-width: none;
        overscroll-behavior-x: contain;
        scroll-padding-inline: 1rem;
    }
    .chip-row::-webkit-scrollbar { display: none; }
    .chip-row .chip { padding: 0; width: 2.75rem; }
}
@media (min-width: 768px) and (max-width: 1023px) {
    .chip-row { margin-inline: -1.5rem; padding-inline: 1.5rem; }
    .order-card .chip-row { margin-inline: -2rem; padding-inline: 2rem; }
}
@media (max-width: 559px) {
    /* Phones: the order form runs edge to edge, no floating card. */
    .order-card { margin-inline: -0.5rem; border-radius: 0; box-shadow: none; }
    .order-card.card--pad { padding: 0.625rem 1rem 1rem; }
    .order-card.stack-lg > :not(template) ~ :not(template) { margin-top: 0.75rem; }
    .order-card .chip-row { margin-inline: -1rem; padding-inline: 1rem; }
    .order-card .label { font-size: 12px; color: rgb(var(--color-text-2)); margin-bottom: 0.25rem; }
    .order-card .input, .order-card .select-trigger { min-height: 2.875rem; }
    /* The same submit button, pinned to the bottom of the viewport. */
    .order-submit {
        position: sticky;
        bottom: calc(0.625rem + env(safe-area-inset-bottom));
        z-index: 5;
        min-height: 3rem;
        font-size: 17px;
        box-shadow: 0 0 0 0.625rem rgb(var(--color-surface));
    }
    .order-submit:disabled { opacity: 1; background: rgb(var(--color-primary-200)); color: rgb(var(--color-primary-900) / 0.75); }
}

/* ==========================================================================
   Landing (public home): centered headline + login, then alternating
   white / light gray / black sections.
   ========================================================================== */
.landing { font-size: 17px; line-height: 1.47; }
.landing :where(h1, h2, h3) { margin: 0; font-family: var(--font-display); color: rgb(var(--color-text)); }
.landing :where(p) { margin: 0; }

/* Full-bleed backgrounds without changing the content column. */
.lp-band { position: relative; isolation: isolate; }
.lp-band::before {
    content: "";
    position: absolute;
    inset-block: 0;
    left: calc(50% - 50vw);
    right: calc(50% - 50vw);
    z-index: -1;
    background: rgb(var(--color-page));
}
.lp-band--night { color: rgb(var(--color-night-fg)); }
.lp-band--night::before { background: rgb(var(--color-night)); }

/* Hero */
.hero { padding: 0.75rem 0 3rem; text-align: center; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr); justify-items: center; gap: 1.25rem; }
.hero-title {
    font-size: clamp(2.125rem, 1.4rem + 3.6vw, 4.75rem);
    line-height: 1.04;
    letter-spacing: -0.04em;
    font-weight: 700;
    max-width: 14ch;
    margin-inline: auto;
}
.hero-title em { font-style: normal; color: inherit; }
.hero-lede {
    margin: 0.625rem auto 0;
    font-family: var(--font-display);
    font-weight: 500;
    font-size: clamp(1.0625rem, 0.95rem + 0.6vw, 1.5rem);
    line-height: 1.3;
    letter-spacing: -0.02em;
    color: rgb(var(--color-text-soft));
    max-width: 32ch;
}
.hero-login { width: 100%; max-width: 420px; text-align: left; }
.hero-login .auth-card { padding: 1.25rem 1rem 1.125rem; }
.hero-login .auth-title { font-size: 20px; margin-bottom: 0.875rem; }
.hero-login .form-stack > :not(template) ~ :not(template) { margin-top: 0.75rem; }
.hero-login .label { margin-bottom: 0.25rem; }
.hero-login .link.text-xs { display: inline-block; padding: 0.625rem 0; margin: -0.625rem 0; font-size: 13px; font-weight: 400; }
.hero-login .auth-alt { font-size: 14px; }
.hero-login .auth-alt .link { font-weight: 400; }

/* Sections */
.lp-section { padding: clamp(3rem, 1.5rem + 6vw, 7rem) 0; }
.lp-head { text-align: center; margin-bottom: clamp(1.5rem, 3.4vw, 3.5rem); }
.lp-head h2 {
    font-size: clamp(1.875rem, 1.2rem + 2.6vw, 3.5rem);
    line-height: 1.06;
    letter-spacing: -0.036em;
    font-weight: 700;
    max-width: 16ch;
    margin-inline: auto;
}
.lp-head p {
    margin: clamp(0.625rem, 1.2vw, 1rem) auto 0;
    font-size: clamp(0.9375rem, 0.88rem + 0.35vw, 1.1875rem);
    line-height: 1.38;
    color: rgb(var(--color-text-soft));
    max-width: 44ch;
}
.lp-band--night .lp-head h2 { color: rgb(var(--color-night-fg)); }
.lp-band--night .lp-head p { color: rgb(var(--color-night-soft)); }

/* Headlines settle into place as they scroll in. */
@media (prefers-reduced-motion: no-preference) {
    @supports (animation-timeline: view()) {
        .lp-head h2 { animation: lp-settle linear both; animation-timeline: view(); animation-range: entry 0% cover 40%; }
    }
}
@keyframes lp-settle {
    from { transform: scale(0.92); opacity: 0.2; }
    to { transform: scale(1); opacity: 1; }
}

/* Reasons: large rounded tiles */
.lp-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.625rem; }
.lp-tile {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 1.125rem 1rem;
    border-radius: 1.375rem;
    background: rgb(var(--color-surface));
    overflow: hidden;
}
.lp-tile h3 { font-size: 1.1875rem; line-height: 1.15; letter-spacing: -0.028em; font-weight: 700; max-width: 12ch; }
.lp-tile p { margin-top: 0.375rem; font-size: 15px; line-height: 1.4; color: rgb(var(--color-text-soft)); max-width: 34ch; }
.lp-tile--night { background: rgb(var(--color-night)); }
.lp-tile--night h3 { color: rgb(var(--color-night-fg)); }
.lp-tile--night p { color: rgb(var(--color-night-soft)); }
.lp-mark { margin-top: auto; padding-top: 1.125rem; color: rgb(var(--color-text)); }
.lp-tile--night .lp-mark { color: rgb(var(--color-night-fg)); }
.lp-mark svg { display: block; width: 100%; height: auto; max-height: 3.5rem; }
.lp-mark--short svg { width: auto; height: 3.25rem; }

/* Steps: big numerals on black */
.lp-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); }
.lp-step {
    display: grid;
    grid-template-columns: 2.5rem minmax(0, 1fr);
    column-gap: 0.75rem;
    align-items: start;
    padding: 1rem 0;
    border-top: 1px solid rgb(var(--color-night-line));
}
.lp-step:first-child { border-top: 0; padding-top: 0; }
.lp-node {
    grid-row: span 2;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 2.25rem;
    line-height: 0.9;
    letter-spacing: -0.04em;
    color: rgb(var(--color-night-fg));
    font-variant-numeric: tabular-nums;
}
.lp-band--night .lp-step h3 { margin-top: 0.125rem; font-size: 19px; letter-spacing: -0.022em; font-weight: 600; color: rgb(var(--color-night-fg)); }
.lp-step p { margin-top: 0.25rem; font-size: 15px; line-height: 1.5; color: rgb(var(--color-night-soft)); }
.lp-cta { margin-top: clamp(1.75rem, 4vw, 3.5rem); text-align: center; }
.lp-more {
    display: inline-flex;
    align-items: center;
    gap: 0.3em;
    min-height: 2.75rem;
    color: rgb(41 151 255);
    font-size: 17px;
    text-decoration: none;
}
.lp-more svg { width: 0.62em; height: 0.62em; transition: transform 0.3s var(--ease); }
.lp-more:hover { text-decoration: underline; text-underline-offset: 0.18em; }
.lp-more:hover svg { transform: translateX(2px); }
.lp-band--night :focus-visible { outline-color: rgb(41 151 255); }

/* Testimonials: a swipeable row on phones, three across on desktop */
.lp-voices {
    margin: 0 calc(-1 * var(--gutter));
    padding: 0.25rem var(--gutter) 0.5rem;
    display: flex;
    gap: 0.75rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: var(--gutter);
    scrollbar-width: none;
    overscroll-behavior-x: contain;
}
.lp-voices::-webkit-scrollbar { display: none; }
.lp-quote {
    flex: 0 0 82%;
    scroll-snap-align: start;
    margin: 0;
    padding: 1.25rem;
    border-radius: 1.375rem;
    background: rgb(var(--color-surface));
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 1.25rem;
}
.lp-quote blockquote {
    margin: 0;
    font-family: var(--font-display);
    font-size: clamp(1.0625rem, 1rem + 0.5vw, 1.375rem);
    line-height: 1.35;
    letter-spacing: -0.022em;
    font-weight: 500;
    color: rgb(var(--color-text));
}
.lp-who { display: flex; align-items: center; gap: 0.75rem; font-size: 15px; font-weight: 600; color: rgb(var(--color-text)); }
.lp-avatar { width: 36px; height: 36px; flex: none; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 600; color: rgb(var(--color-text-2)); background: rgb(var(--color-surface-muted)); }
.lp-note { margin-top: 1rem; font-size: 13px; color: rgb(var(--color-text-soft)); }

/* FAQ accordion */
.lp-acc { max-width: 780px; margin: 0 auto; border-top: 1px solid rgb(var(--color-border)); }
.lp-acc details { border-bottom: 1px solid rgb(var(--color-border)); }
.lp-acc summary {
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.25rem;
    min-height: 3.25rem;
    padding: 0.875rem 0.125rem;
    cursor: pointer;
    font-family: var(--font-display);
    font-size: clamp(1.0625rem, 1rem + 0.4vw, 1.375rem);
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: -0.022em;
    color: rgb(var(--color-text));
    transition: color 0.2s;
}
.lp-acc summary::-webkit-details-marker { display: none; }
.lp-acc summary:hover { color: rgb(var(--color-text-2)); }
.lp-acc summary:focus-visible { outline-offset: -2px; }
.lp-chev { flex: none; display: grid; place-items: center; width: 1.5rem; height: 1.5rem; color: rgb(var(--color-text-soft)); transition: transform 0.35s var(--ease); }
.lp-acc details[open] .lp-chev { transform: rotate(180deg); }
.lp-acc details::details-content { block-size: 0; overflow: hidden; transition: block-size 0.4s var(--ease), content-visibility 0.4s allow-discrete; }
.lp-acc details[open]::details-content { block-size: auto; }
.lp-ans { padding: 0 0.125rem 1rem; color: rgb(var(--color-text-soft)); font-size: 15px; line-height: 1.5; max-width: 62ch; }

@media (min-width: 560px) {
    .hero { padding: 2.5rem 0 4.5rem; }
    .hero-lede { margin-top: 1rem; }
    .hero-grid { gap: 2.5rem; }
    .hero-login .auth-card { padding: 1.75rem 1.75rem 1.5rem; }
    .hero-login .auth-title { font-size: 24px; margin-bottom: 1.125rem; }
    .lp-tiles { gap: 1.25rem; }
    .lp-tile { padding: clamp(1.75rem, 3vw, 2.5rem); min-height: 300px; border-radius: var(--radius-tile); }
    .lp-tile h3 { font-size: clamp(1.625rem, 1.1rem + 1.4vw, 2.25rem); line-height: 1.08; letter-spacing: -0.032em; }
    .lp-tile p { margin-top: 0.75rem; font-size: 17px; line-height: 1.47; }
    .lp-mark { padding-top: 2rem; }
    .lp-mark svg { width: min(100%, 420px); max-height: none; }
    .lp-mark--short svg { width: min(100%, 180px); height: auto; }
    .lp-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 3rem; }
    .lp-step, .lp-step:first-child { display: block; padding: 0 1.75rem 0 0; border-top: 0; }
    .lp-step:nth-child(even) { padding-left: 1.75rem; border-left: 1px solid rgb(var(--color-night-line)); }
    .lp-node { display: block; font-size: clamp(3.25rem, 2.2rem + 3vw, 4.75rem); }
    .lp-band--night .lp-step h3 { margin-top: 1.25rem; font-size: 24px; }
    .lp-step p { margin-top: 0.5rem; font-size: 16px; max-width: 26ch; }
    .lp-quote { flex-basis: min(84vw, 440px); padding: clamp(1.25rem, 2.6vw, 2.25rem); min-height: clamp(220px, 24vw, 300px); border-radius: var(--radius-tile); }
    .lp-acc summary { padding: clamp(0.875rem, 1.6vw, 1.375rem) 0.125rem; }
    .lp-ans { padding-bottom: clamp(1rem, 1.8vw, 1.5rem); font-size: 17px; }
}
@media (min-width: 900px) {
    .hero { padding: 4rem 0 6rem; }
    .lp-tiles { grid-template-columns: repeat(6, minmax(0, 1fr)); }
    .lp-tile:nth-child(1), .lp-tile:nth-child(4) { grid-column: span 4; }
    .lp-tile:nth-child(2), .lp-tile:nth-child(3) { grid-column: span 2; }
    .lp-steps { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .lp-step:nth-child(n + 2) { padding-left: 1.75rem; border-left: 1px solid rgb(var(--color-night-line)); }
    .lp-voices { margin: 0; padding: 0.25rem 0 0.5rem; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; overflow: visible; }
}

/* The public footer: light gray band with a hairline. */
body:not(.app--auth) .footer { text-align: left; background: rgb(var(--color-page)); border-top: 0; padding: 1.5rem var(--gutter) 2rem; }
body:not(.app--auth) .footer > span { display: block; max-width: var(--wrap); margin: 0 auto; padding-top: 1.25rem; border-top: 1px solid rgb(var(--color-border)); }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
}

/* Network chips wrap onto new lines on phones so every network stays visible
   (no sideways scroll). */
@media (max-width: 1023px) {
    .chip-row, .order-card .chip-row, body.app--auth .order-card .chip-row {
        flex-wrap: wrap;
        overflow: visible;
        margin-inline: 0;
        padding-inline: 0;
    }
}
