@import url("https://fonts.googleapis.com/css2?family=Sora:wght@600;700;800&family=IBM+Plex+Sans:wght@400;500;600&family=JetBrains+Mono:wght@500&display=swap");
/* ==========================================================================
   Hack The Box theme — deep navy, square corners, lime only where you act.
   Colors are RGB triplets without rgb() so opacity works: rgb(var(--x) / 0.5).
   Dark world: the -600 step is the LIGHTER hover lime; -50/-100/-200 are
   dark lime tints on navy; -700 is the lime used for text.
   ========================================================================== */
:root {
    --network-icon-color: f3eee9; /* network icons (simpleicons) in one light tone for contrast */
    --brand-icon-color: #f3eee9; /* network logos (own sprite) in one light tone for contrast */
    color-scheme: dark;

    --color-primary-50: 42 26 18;
    --color-primary-100: 58 34 22;
    --color-primary-200: 112 54 28;
    --color-primary-500: 242 107 42;
    --color-primary-600: 255 133 74;
    --color-primary-700: 255 128 66;
    --color-primary-900: 255 200 166;
    --color-primary-fg: 26 14 8;
    --color-primary-press: 222 90 28;

    --color-sidebar: 20 16 15;
    --color-sidebar-fg: 247 243 240;

    --color-page: 17 14 13;
    --color-page-public: 17 14 13;
    --color-page-2: 22 18 16;

    --color-surface: 28 23 21;
    --color-surface-muted: 36 30 27;
    --color-field: 21 17 16;
    --color-border: 60 50 45;
    --color-border-soft: 44 37 33;
    --color-border-strong: 84 71 63;
    --color-text: 247 243 240;
    --color-text-2: 214 205 199;
    --color-text-soft: 172 160 152;
    --color-text-muted: 150 138 130;

    --color-success: 92 224 140;
    --color-success-bg: 16 44 36;
    --color-danger: 255 120 120;
    --color-danger-bg: 54 22 32;
    --color-warning: 250 196 70;
    --color-warning-bg: 48 38 16;
    --color-info: 125 205 255;
    --color-orange: 253 170 100;
    --color-violet: 196 181 253;
    --color-neutral: 190 200 214;
    --color-sidebar-top: 26 21 19;
    --color-hero-tint: 130 74 34;
    --color-ink: 0 0 0;
    --ink-k: 1;

    --radius: 0;
    --radius-lg: 0;
    --radius-control: 0;
    --radius-pill: 0;
    --shadow-card: 0 18px 40px -28px rgb(var(--color-ink) / calc(0.9 * var(--ink-k)));
    --shadow-raised: 0 30px 60px -30px rgb(var(--color-ink) / calc(0.85 * var(--ink-k)));
    --shadow-control: none;
    --shadow-menu: 0 0 0 1px rgb(var(--color-border-strong)), 0 24px 50px -16px rgb(var(--color-ink) / calc(0.85 * var(--ink-k)));
    --focus-ring: 0 0 0 3px rgb(var(--color-primary-500) / 0.3);
    --ease: cubic-bezier(0.16, 1, 0.3, 1);

    --wrap: 77.5rem;
    --gutter: 1rem;
    --control-h: 2.875rem;
    --header-h: 3.5rem;
    --sidebar-w: 252px;

    --font-sans: "IBM Plex Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-display: "Sora", ui-sans-serif, system-ui, sans-serif;
    --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

    --hexes: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='100' viewBox='0 0 56 100'%3E%3Cpath d='M28 66L0 50V16L28 0l28 16v34L28 66v34M0 84l28 16 28-16' fill='none' stroke='%23f26b2a' stroke-width='1'/%3E%3C/svg%3E");
}
:root[data-theme="light"] {
    --network-icon-color: 2b211c;
    --brand-icon-color: #2b211c;
    color-scheme: light;

    --color-primary-50: 255 244 236;
    --color-primary-100: 255 231 214;
    --color-primary-200: 250 198 166;
    --color-primary-500: 204 72 14;
    --color-primary-600: 182 62 10;
    --color-primary-700: 190 66 12;
    --color-primary-900: 112 38 6;
    --color-primary-fg: 255 255 255;
    --color-primary-press: 160 54 8;

    --color-sidebar: 255 255 255;
    --color-sidebar-fg: 28 20 16;
    --color-sidebar-top: 255 251 247;

    --color-page: 250 246 242;
    --color-page-public: 250 246 242;
    --color-page-2: 245 239 233;

    --color-surface: 255 255 255;
    --color-surface-muted: 252 248 244;
    --color-field: 255 255 255;
    --color-border: 231 221 212;
    --color-border-soft: 240 233 226;
    --color-border-strong: 208 194 183;
    --color-text: 28 20 16;
    --color-text-2: 66 54 47;
    --color-text-soft: 107 94 86;
    --color-text-muted: 120 107 98;

    --color-success: 18 124 70;
    --color-success-bg: 230 246 237;
    --color-danger: 196 36 48;
    --color-danger-bg: 253 236 237;
    --color-warning: 156 98 0;
    --color-warning-bg: 254 244 222;
    --color-info: 22 104 176;
    --color-orange: 176 84 12;
    --color-violet: 104 72 196;
    --color-neutral: 82 94 116;
    --color-hero-tint: 255 196 140;
    --color-ink: 60 32 18;
    --ink-k: 0.28;

    --shadow-card: 0 1px 2px rgb(60 32 18 / 0.05), 0 12px 28px -20px rgb(60 32 18 / 0.2);
    --shadow-raised: 0 1px 2px rgb(60 32 18 / 0.06), 0 30px 60px -32px rgb(60 32 18 / 0.28);
    --shadow-menu: 0 0 0 1px rgb(var(--color-border)), 0 20px 44px -18px rgb(60 32 18 / 0.28);
    --focus-ring: 0 0 0 3px rgb(var(--color-primary-500) / 0.22);
}
:root[data-theme="light"] input[type="search"]::-webkit-search-cancel-button { filter: opacity(0.6); }
:root[data-theme="light"] .chip.is-active img { filter: brightness(0) invert(1); }
:root[data-theme="light"] .header { background: rgb(var(--color-surface) / 0.85); }
:root[data-theme="light"] .hero-grid::before { opacity: 0.16; }

.header-btn--theme { width: 2.5rem; justify-content: center; padding: 0; }
.header-btn--theme .theme-icon { width: 1.25rem; height: 1.25rem; }
.header-btn--theme .theme-icon--moon { display: none; }
:root[data-theme="light"] .header-btn--theme .theme-icon--sun { display: none; }
:root[data-theme="light"] .header-btn--theme .theme-icon--moon { display: block; }
.header-btn--theme:hover .theme-icon { rotate: -20deg; }
.header-btn--theme .theme-icon { transition: color 0.15s, rotate 0.3s var(--ease); }
@media (max-width: 559px) { .header-btn--theme { width: 2.75rem; } }
html.theme-anim, html.theme-anim *, html.theme-anim *::before, html.theme-anim *::after {
    transition: background-color 0.25s, border-color 0.25s, color 0.25s, fill 0.25s !important;
}

@media (min-width: 768px) { :root { --gutter: 2rem; --header-h: 4rem; } }
@media (min-width: 1024px) { :root { --gutter: 2.5rem; } }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; border-radius: 0; }
/* Square everywhere, including inline-styled bits in the templates. */
[style*="border-radius"] { border-radius: 0 !important; }
html {
    -webkit-text-size-adjust: 100%;
    scrollbar-color: rgb(var(--color-border-strong)) rgb(var(--color-page));
    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.5;
    -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-page));
}
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-500)); color: rgb(var(--color-primary-fg)); }
:focus-visible { outline: 2px solid rgb(var(--color-primary-500)); outline-offset: 2px; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: rgb(var(--color-page)); }
::-webkit-scrollbar-thumb { background: rgb(var(--color-border)); border: 2px solid rgb(var(--color-page)); border-radius: 0; }
::-webkit-scrollbar-thumb:hover { background: rgb(var(--color-primary-500)); }

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

.overlay {
    position: fixed;
    inset: 0;
    background: rgb(4 8 15 / 0.65);
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
    z-index: 30;
}
@media (min-width: 1024px) { .overlay { display: none; } }

/* ---------- Sidebar ---------- */
.sidebar {
    position: fixed;
    inset-block: 0;
    inset-inline-start: 0;
    z-index: 40;
    width: var(--sidebar-w);
    max-width: 84vw;
    min-height: 100vh;
    background: linear-gradient(180deg, rgb(var(--color-sidebar-top)), rgb(var(--color-sidebar)) 40%);
    border-inline-end: 1px solid rgb(var(--color-border-soft));
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    transform: translateX(-100%);
    transition: transform 0.3s var(--ease), box-shadow 0.3s;
}
.sidebar.is-open { transform: translateX(0); box-shadow: 24px 0 60px -20px rgb(var(--color-ink) / calc(0.8 * var(--ink-k))); }
@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.125rem;
    flex-shrink: 0;
    min-width: 0;
    border-bottom: 1px solid rgb(var(--color-border-soft));
}
.sidebar-logo img { height: 1.75rem; max-width: 7rem; object-fit: contain; }
.sidebar-brand {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 700;
    color: rgb(var(--color-sidebar-fg));
    letter-spacing: -0.02em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav {
    flex: 1;
    padding: 0.75rem 0;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.nav-link {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-height: 2.75rem;
    padding: 0 1.25rem;
    border-radius: 0;
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    color: rgb(var(--color-text-2));
    transition: background-color 0.15s, color 0.15s;
    cursor: pointer;
    background: none;
    border: none;
    width: 100%;
    text-align: start;
}
.nav-link::before {
    content: "";
    position: absolute;
    inset-inline-start: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: rgb(var(--color-primary-500));
    scale: 1 0;
    transition: scale 0.25s var(--ease);
}
.nav-link:hover { color: rgb(var(--color-text)); background: rgb(var(--color-surface)); }
.nav-link:hover::before { scale: 1 0.5; }
.nav-link.is-active {
    color: rgb(var(--color-text));
    font-weight: 600;
    background: linear-gradient(90deg, rgb(var(--color-primary-500) / 0.16), rgb(var(--color-primary-500) / 0.02) 85%);
}
.nav-link.is-active::before { scale: 1 1; }
.nav-link svg, .nav-link i { width: 1.25rem; height: 1.25rem; flex-shrink: 0; color: rgb(var(--color-text-soft)); 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-primary-500)); }
.nav-link.is-active svg, .nav-link.is-active i { color: rgb(var(--color-primary-500)); }

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

.nav-badge {
    margin-inline-start: auto;
    min-width: 1.375rem;
    height: 1.375rem;
    padding: 0 0.375rem;
    border-radius: 0;
    background: rgb(var(--color-primary-500));
    color: rgb(var(--color-primary-fg));
    font-size: 12px;
    font-weight: 700;
    line-height: 1.375rem;
    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-inline-start: var(--sidebar-w); }
}

/* ---------- Headers ---------- */
.header {
    flex-shrink: 0;
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgb(var(--color-page) / 0.82);
    -webkit-backdrop-filter: blur(14px) saturate(1.3);
    backdrop-filter: blur(14px) saturate(1.3);
    border-bottom: 1px solid rgb(var(--color-border-soft));
}
.header--public::after {
    content: "";
    position: absolute;
    inset-inline-start: 0;
    inset-inline-end: 0;
    bottom: -1px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgb(var(--color-primary-500) / 0.45) 50%, transparent);
    opacity: 0.7;
    pointer-events: none;
}
.header--auth {
    height: var(--header-h);
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding-block: 0; padding-inline: 0.375rem 0.75rem;
}
@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.375rem; 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-inline-end: 0.5rem;
    font-family: var(--font-display);
    font-weight: 700;
    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: 0;
    transition: background-color 0.15s, color 0.15s;
    padding: 0;
}
.icon-btn:hover { background: rgb(var(--color-surface)); color: rgb(var(--color-primary-500)); }
.icon-btn svg { width: 1.375rem; height: 1.375rem; }
@media (min-width: 1024px) { .icon-btn--mobile { display: none; } }

.header-mobile-brand {
    display: block;
    min-width: 0;
    font-family: var(--font-display);
    font-weight: 700;
    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.5rem;
    background: none;
    border: 1px solid transparent;
    cursor: pointer;
    color: rgb(var(--color-text-2));
    padding: 0 0.5rem;
    border-radius: 0;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.15s, border-color 0.15s, color 0.15s;
    text-decoration: none;
    white-space: nowrap;
}
@media (min-width: 768px) {
    .header-btn { padding: 0 0.75rem; border-color: rgb(var(--color-border)); background: transparent; }
}
.header-btn:hover, .header-btn.is-active { color: rgb(var(--color-primary-500)); border-color: rgb(var(--color-primary-500)); background: rgb(var(--color-primary-500) / 0.08); }
.header-btn svg { width: 1.125rem; height: 1.125rem; color: rgb(var(--color-text-soft)); flex-shrink: 0; transition: color 0.15s; }
.header-btn:hover svg, .header-btn.is-active svg { color: rgb(var(--color-primary-500)); }
.header-btn--balance {
    height: 2.5rem;
    padding: 0 0.625rem;
    border-radius: 0;
    border-color: rgb(var(--color-border));
    border-bottom-color: rgb(var(--color-primary-500));
    background: rgb(var(--color-surface));
    color: rgb(var(--color-text));
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}
@media (min-width: 768px) { .header-btn--balance { padding-block: 0; padding-inline: 0.75rem 0.875rem; } }
.header-btn--balance svg { color: rgb(var(--color-primary-500)); }
.header-btn--balance:hover { color: rgb(var(--color-text)); }
.header-btn--logout:hover { color: rgb(var(--color-danger)); border-color: rgb(var(--color-danger) / 0.45); background: rgb(var(--color-danger-bg)); }
.header-btn--logout:hover svg { color: rgb(var(--color-danger)); }
@media (max-width: 559px) {
    .header-btn--lang { width: 2.75rem; justify-content: center; padding: 0; }
    .header-btn--lang span { display: none; }
    .header-btn--account { width: 2.75rem; justify-content: center; padding: 0; }
    .header-btn--account 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: 15px; font-weight: 500; }
@media (min-width: 768px) { .pubnav { display: flex; } }
.pubnav-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    height: 2.625rem;
    padding: 0 0.75rem;
    border-radius: 0;
    border: 1px solid transparent;
    color: rgb(var(--color-text-2));
    text-decoration: none;
    white-space: nowrap;
    transition: background-color 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.25s var(--ease);
}
.pubnav > .pubnav-link:not(.pubnav-link--signin):not(.pubnav-link--cta)::after {
    content: "";
    position: absolute;
    inset-inline-start: 0.75rem;
    inset-inline-end: 0.75rem;
    bottom: 4px;
    height: 2px;
    background: rgb(var(--color-primary-500));
    scale: 0 1;
    transition: scale 0.3s var(--ease);
}
.pubnav-link:hover { color: rgb(var(--color-text)); }
.pubnav > .pubnav-link:hover::after { scale: 1 1; }
.pubnav .pubnav-link--signin { order: 10; margin-inline-start: auto; border-color: rgb(var(--color-border-strong)); color: rgb(var(--color-text)); font-family: var(--font-display); font-weight: 600; }
.pubnav .pubnav-link--signin:hover { border-color: rgb(var(--color-primary-500)); color: rgb(var(--color-primary-500)); background: rgb(var(--color-primary-500) / 0.08); }
.pubnav .pubnav-link--cta { order: 11; margin-inline-start: 0.5rem; background: rgb(var(--color-primary-500)); color: rgb(var(--color-primary-fg)); font-family: var(--font-display); font-weight: 600; }
.pubnav .pubnav-link--cta:hover { background: rgb(var(--color-primary-600)); color: rgb(var(--color-primary-fg)); box-shadow: 0 12px 26px -12px rgb(var(--color-ink) / calc(0.8 * var(--ink-k))); }
.menu-btn { display: inline-grid; margin-inline-end: -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 24px 40px -20px rgb(var(--color-ink) / calc(0.85 * var(--ink-k)));
}
@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;
    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-surface-muted)); }
.pubmenu-mobile .pubnav-link--cta {
    order: 20;
    margin-top: 0.5rem;
    justify-content: center;
    background: rgb(var(--color-primary-500));
    color: rgb(var(--color-primary-fg));
    font-family: var(--font-display);
    font-weight: 600;
}
.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-muted));
    border-radius: 0;
    border-top: 2px solid rgb(var(--color-primary-500));
    box-shadow: var(--shadow-menu);
    padding: 0.25rem 0;
    min-width: 9rem;
    max-height: 20rem;
    overflow-y: auto;
    z-index: 50;
}
.dropdown-menu--right { inset-inline-end: 0; }
.dropdown-menu--left { inset-inline-start: 0; }
.header--auth .dropdown-menu { inset-inline-end: 0; }
.header--public .dropdown-menu { inset-inline-start: 0; }
.dropdown-menu--full { inset-inline-start: 0; inset-inline-end: 0; width: 100%; max-height: 18rem; overflow-y: auto; }
.dropdown-item {
    position: relative;
    display: block;
    width: 100%;
    text-align: start;
    min-height: 2.75rem;
    padding: 0.6875rem 0.75rem;
    border-radius: 0;
    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-surface)); }
.dropdown-item.is-selected { background: linear-gradient(90deg, rgb(var(--color-primary-500) / 0.14), transparent); color: rgb(var(--color-text)); }
.dropdown-item.is-selected::before { content: ""; position: absolute; inset-inline-start: 0; top: 0; bottom: 0; width: 3px; background: rgb(var(--color-primary-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 { position: relative; isolation: isolate; padding-top: 1.75rem; }
/* Lime glow + faint hex field behind the top of every signed-in page. */
body.app--auth .main::before,
body.app--auth .main::after {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    z-index: -1;
    pointer-events: none;
}
body.app--auth .main::before { height: 520px; background: radial-gradient(70% 90% at 50% 0%, rgb(var(--color-primary-500) / 0.11), transparent 70%); }
body.app--auth .main::after {
    height: 420px;
    background: var(--hexes) center top / 42px 75px;
    opacity: 0.12;
    -webkit-mask: radial-gradient(70% 100% at 50% 0%, #000, transparent 75%);
    mask: radial-gradient(70% 100% at 50% 0%, #000, transparent 75%);
}
@media (max-width: 559px) {
    body.app--auth .main { padding: 0.75rem 0.75rem calc(1rem + env(safe-area-inset-bottom)); }
}
@media (min-width: 1024px) { body.app--auth .main { padding-top: 2.5rem; } body.app--auth .main::before { height: 640px; } }
.container { max-width: var(--wrap); margin: 0 auto; width: 100%; }
#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-soft));
    padding: 1.25rem var(--gutter) max(1.25rem, env(safe-area-inset-bottom));
    font-size: 14px;
    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: 0;
    color: #fff;
    box-shadow: 0 12px 26px -10px rgb(var(--color-ink) / calc(0.8 * var(--ink-k)));
    transition: transform 0.2s var(--ease), filter 0.15s;
}
.chat-fab:hover { filter: brightness(1.08); transform: translateY(-2px); }
.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 {
    position: relative;
    background: rgb(var(--color-surface));
    border-radius: 0;
    border: 1px solid rgb(var(--color-border-soft));
    box-shadow: var(--shadow-card);
}
.card--pad { padding: 1rem; }
@media (min-width: 768px) { .card--pad { padding: 1.5rem; } }
.card-title { margin: 0 0 1rem; font-family: var(--font-display); font-size: 17px; font-weight: 600; letter-spacing: -0.02em; color: rgb(var(--color-text)); }

/* ---------- Forms ---------- */
.label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: rgb(var(--color-text-2));
    margin-bottom: 0.375rem;
}
.input, .select, .textarea, .select-trigger {
    width: 100%;
    min-height: var(--control-h);
    border: 1px solid rgb(var(--color-border));
    border-radius: 0;
    background: rgb(var(--color-field));
    padding: 0.6875rem 0.75rem;
    font-size: 16px;
    line-height: 1.4;
    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.2s;
    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-border-strong)); }
.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)); }
input[type="search"]::-webkit-search-cancel-button { filter: invert(1) opacity(0.6); }
.select-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    text-align: start;
    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-soft)); transition: transform 0.2s var(--ease), color 0.15s; }
.select-trigger:hover .chevron, .select-trigger .chevron.is-open { color: rgb(var(--color-primary-500)); }
.select-trigger .chevron.is-open { transform: rotate(180deg); }
/* Service ids read as small lime tags inside pickers. */
.select-trigger .cell-id, .dropdown-item .cell-id {
    display: inline-block;
    padding: 2px 5px;
    font-size: 12.5px;
    line-height: 1.2;
    color: rgb(var(--color-primary-500));
    background: rgb(var(--color-primary-500) / 0.08);
    border: 1px solid rgb(var(--color-primary-500) / 0.25);
}

.search-left { position: relative; }
.search-left > svg {
    position: absolute; inset-inline-start: 0.875rem; top: 50%; transform: translateY(-50%);
    width: 1.125rem; height: 1.125rem; color: rgb(var(--color-text-soft)); pointer-events: none;
    transition: color 0.15s;
}
.search-left:focus-within > svg { color: rgb(var(--color-primary-500)); }
.search-left .input { padding-inline-start: 2.625rem; }
.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; }
.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-soft));
        -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; background: rgb(var(--color-primary-500)); }
    .select::picker(select) {
        appearance: base-select;
        border: 0;
        border-top: 2px solid rgb(var(--color-primary-500));
        border-radius: 0;
        box-shadow: var(--shadow-menu);
        background: rgb(var(--color-surface-muted));
        padding: 0.25rem 0;
        margin-top: 0.375rem;
    }
    .select option {
        min-height: 2.75rem;
        padding: 0.625rem 0.75rem;
        border-radius: 0;
        font-size: 14px;
        color: rgb(var(--color-text-2));
    }
    .select option:hover { background: rgb(var(--color-surface)); color: rgb(var(--color-text)); }
    .select option:checked { background: rgb(var(--color-primary-500) / 0.14); color: rgb(var(--color-text)); }
    .select option::checkmark { color: rgb(var(--color-primary-500)); }
}
.checkbox {
    width: 1.125rem;
    height: 1.125rem;
    flex-shrink: 0;
    margin: 0;
    border-radius: 0;
    border: 1px solid rgb(var(--color-border));
    accent-color: rgb(var(--color-primary-500));
    cursor: pointer;
}
.field { margin-bottom: 0; }
.help { margin: 0.375rem 0 0; font-family: var(--font-mono); font-size: 12.5px; line-height: 1.4; 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 {
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: var(--control-h);
    padding: 0 1.125rem;
    border-radius: 0;
    border: 1px solid transparent;
    font-weight: 500;
    font-size: 15px;
    line-height: 1.2;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.25s var(--ease), translate 0.25s var(--ease);
}
@media (min-width: 768px) { .btn { min-height: 2.625rem; font-size: 14px; } }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn--block { width: 100%; min-height: 3rem; font-size: 16px; }
.btn--sm { min-height: 2.25rem; padding: 0 0.75rem; font-size: 13px; }
.btn--primary {
    background: rgb(var(--color-primary-500));
    color: rgb(var(--color-primary-fg));
    font-family: var(--font-display);
    font-weight: 600;
    letter-spacing: -0.005em;
}
/* One light pass across the lime on hover. */
.btn--primary::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg, transparent 35%, rgb(255 255 255 / 0.55) 50%, transparent 65%);
    translate: -120% 0;
    transition: translate 0.6s var(--ease);
    pointer-events: none;
}
.btn--primary:hover:not(:disabled) { background: rgb(var(--color-primary-600)); box-shadow: 0 12px 26px -12px rgb(var(--color-ink) / calc(0.8 * var(--ink-k))); translate: 0 -1px; }
.btn--primary:hover:not(:disabled)::after { translate: 120% 0; }
.btn--primary:active:not(:disabled) { background: rgb(var(--color-primary-press)); translate: 0 0; box-shadow: none; }
.btn--outline {
    background: transparent;
    color: rgb(var(--color-text));
    border-color: rgb(var(--color-border-strong));
    box-shadow: var(--shadow-control);
}
.btn--outline:hover:not(:disabled) { border-color: rgb(var(--color-primary-500)); color: rgb(var(--color-primary-500)); background: rgb(var(--color-primary-500) / 0.08); }
.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.5rem; font-size: 12px; border-radius: 0; }
.btn--success {
    background: rgb(var(--color-success-bg)); color: rgb(var(--color-success)); border-color: rgb(var(--color-success) / 0.35);
}
.btn--success:hover:not(:disabled) { background: rgb(var(--color-success) / 0.16); }
.btn--danger {
    background: rgb(var(--color-danger-bg)); color: rgb(var(--color-danger)); border-color: rgb(var(--color-danger) / 0.35);
}
.btn--danger:hover:not(:disabled) { background: rgb(var(--color-danger) / 0.16); }

.link {
    font: inherit;
    font-weight: 500;
    color: rgb(var(--color-primary-700));
    text-decoration: none;
    text-underline-offset: 3px;
    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.375rem; }
.chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-width: 2.75rem;
    height: 2.75rem;
    padding: 0 0.875rem;
    flex-shrink: 0;
    border-radius: 0;
    border: 1px solid rgb(var(--color-border));
    background: rgb(var(--color-field));
    color: rgb(var(--color-text-2));
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}
@media (min-width: 1024px) { .chip { height: 2.5rem; } }
.chip:hover { border-color: rgb(var(--color-primary-500) / 0.45); background: rgb(var(--color-field)); 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)); transition: color 0.15s; }
.chip:hover svg { color: rgb(var(--color-primary-500)); }
.chip.is-active {
    border-color: rgb(var(--color-primary-500));
    background: rgb(var(--color-primary-500));
    color: rgb(var(--color-primary-fg));
    font-weight: 600;
}
.chip.is-active svg { color: rgb(var(--color-primary-fg)); }
.chip.is-active img { filter: brightness(0); } /* light icon would vanish on the lime chip: render it dark */

/* ---------- Read-only values ---------- */
.readout {
    width: 100%;
    min-height: var(--control-h);
    border: 1px dashed rgb(var(--color-border));
    border-radius: 0;
    background: rgb(var(--color-page) / 0.7);
    padding: 0.6875rem 0.75rem;
    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; }

.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-inline-start: 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: 0;
    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: 0; 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: 0; 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: start; }
.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-inline-end: 3.25rem; }
.search-btn {
    position: absolute;
    top: 4px;
    bottom: 4px;
    inset-inline-end: 4px;
    display: grid;
    place-items: center;
    width: 2.375rem;
    padding: 0;
    border: none;
    border-radius: 0;
    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: start; font-size: 14px; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.table th { text-align: start; } /* th centra por defecto si hereda "start" */
.table thead tr { border-bottom: 1px solid rgb(var(--color-border)); }
.table th {
    padding: 0.6875rem 0.875rem;
    font-size: 12.5px;
    font-weight: 600;
    color: rgb(var(--color-text-soft));
    white-space: nowrap;
    background: rgb(var(--color-page) / 0.5);
}
.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-surface-muted) / 0.7); }
.table .num { text-align: end; 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-500) / 0.07); }
.table tbody tr.row--attention:hover { background: rgb(var(--color-primary-500) / 0.12); }

/* ---------- Badges ---------- */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    height: 1.5rem;
    border-radius: 0;
    padding: 0 0.5rem;
    font-size: 12.5px;
    font-weight: 500;
    line-height: 1;
    white-space: nowrap;
    border: 1px solid currentColor;
    border-color: rgb(148 163 184 / 0.3);
    background: rgb(148 163 184 / 0.1);
    color: rgb(var(--color-neutral));
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 0; background: currentColor; opacity: 0.9; }
.badge--pending     { background: rgb(var(--color-warning) / 0.1); border-color: rgb(var(--color-warning) / 0.3); color: rgb(var(--color-warning)); }
.badge--processing  { background: rgb(var(--color-primary-500) / 0.08); border-color: rgb(var(--color-primary-500) / 0.3); color: rgb(var(--color-primary-500)); }
.badge--in-progress { background: rgb(var(--color-info) / 0.1); border-color: rgb(var(--color-info) / 0.3); color: rgb(var(--color-info)); }
.badge--completed   { background: rgb(var(--color-success) / 0.1); border-color: rgb(var(--color-success) / 0.3); color: rgb(var(--color-success)); }
.badge--partial     { background: rgb(var(--color-orange) / 0.1); border-color: rgb(var(--color-orange) / 0.3); color: rgb(var(--color-orange)); }
.badge--canceled    { background: rgb(148 163 184 / 0.1); border-color: rgb(148 163 184 / 0.3); color: rgb(var(--color-neutral)); }
.badge--rejected    { background: rgb(var(--color-danger) / 0.1); border-color: rgb(var(--color-danger) / 0.3); color: rgb(var(--color-danger)); }
.badge--answered    { background: rgb(var(--color-primary-500) / 0.08); border-color: rgb(var(--color-primary-500) / 0.3); color: rgb(var(--color-primary-500)); }
.badge--closed      { background: rgb(148 163 184 / 0.1); border-color: rgb(148 163 184 / 0.3); color: rgb(var(--color-neutral)); }
.badge--welcome     { background: rgb(var(--color-violet) / 0.12); border-color: rgb(var(--color-violet) / 0.3); color: rgb(var(--color-violet)); }
.badge--neutral     { background: rgb(148 163 184 / 0.1); border-color: rgb(148 163 184 / 0.3); color: rgb(var(--color-neutral)); }

/* ---------- 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: 1px solid rgb(var(--color-border));
    border-radius: 0;
    background: rgb(var(--color-field));
    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.5rem; height: 2.5rem; } }
.page-btn:hover:not(:disabled) { border-color: rgb(var(--color-primary-500)); color: rgb(var(--color-primary-500)); }
.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: 0; 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(4 8 15 / 0.7);
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
}
.modal-box {
    position: relative;
    width: 100%;
    max-width: 32rem;
    background: rgb(var(--color-surface));
    border-radius: 0;
    border: 1px solid rgb(var(--color-border));
    border-top: 2px solid rgb(var(--color-primary-500));
    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 { padding: 1.5rem; max-height: 80vh; }
}
.modal-close {
    display: inline-grid;
    place-items: center;
    width: 2.25rem;
    height: 2.25rem;
    margin-block: -0.5rem; margin-inline: 0 -0.5rem;
    flex-shrink: 0;
    background: none;
    border: none;
    border-radius: 0;
    cursor: pointer;
    color: rgb(var(--color-text-soft));
    font-size: 1.375rem;
    line-height: 1;
    transition: background-color 0.15s, color 0.15s;
}
.modal-close:hover { color: rgb(var(--color-primary-500)); background: rgb(var(--color-surface-muted)); }

/* ---------- Alerts & toast ---------- */
.alert {
    border-radius: 0;
    padding: 0.625rem 0.875rem;
    font-size: 14px;
    line-height: 1.5;
}
.alert--warning { border: 1px solid rgb(var(--color-warning) / 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));
    inset-inline-start: 0.75rem;
    inset-inline-end: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 0;
    box-shadow: 0 24px 50px -16px rgb(var(--color-ink) / calc(0.85 * var(--ink-k)));
    font-size: 14px;
    font-weight: 500;
    line-height: 1.45;
    z-index: 60;
    color: rgb(var(--color-text));
    transition: opacity 0.3s;
}
@media (min-width: 640px) { .toast { inset-inline-start: auto; inset-inline-end: 1.5rem; top: 1.5rem; max-width: 26rem; } }
.toast--ok { background: rgb(var(--color-surface-muted)); color: rgb(var(--color-text)); border: 1px solid rgb(var(--color-border-strong)); border-top: 2px solid rgb(var(--color-primary-500)); }
.toast--error { background: rgb(var(--color-danger-bg)); color: rgb(var(--color-danger)); border: 1px solid rgb(var(--color-danger) / 0.45); }

/* ---------- 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: 440px; }
/* Raised login panel: lime edge drawn on load, one lime corner bracket. */
.auth-card {
    padding: 1.125rem 1rem 1rem;
    border-radius: 0;
    border: 1px solid rgb(var(--color-border));
    border-top-color: transparent;
    background: linear-gradient(180deg, rgb(var(--color-surface-muted) / 0.94), rgb(var(--color-surface) / 0.97));
    box-shadow: var(--shadow-raised);
}
.auth-card::before {
    content: "";
    position: absolute;
    inset-inline-start: -1px;
    inset-inline-end: -1px;
    top: -1px;
    height: 2px;
    background: rgb(var(--color-primary-500));
    transform-origin: left;
    animation: htb-edge 0.9s 0.2s var(--ease) both;
}
.auth-card::after {
    content: "";
    position: absolute;
    inset-inline-end: -1px;
    bottom: -1px;
    width: 18px;
    height: 18px;
    border-inline-end: 2px solid rgb(var(--color-primary-500));
    border-bottom: 2px solid rgb(var(--color-primary-500));
    pointer-events: none;
}
@keyframes htb-edge { from { scale: 0 1; } to { scale: 1 1; } }
@media (min-width: 560px) { .auth-card { padding: 2rem; } }
.auth-title { margin: 0 0 1rem; font-family: var(--font-display); font-size: 21px; line-height: 1.3; font-weight: 600; letter-spacing: -0.025em; 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.75rem 0.25rem; margin: -0.75rem 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: 0;
    background: rgb(var(--color-primary-500) / 0.08);
    border: 1px solid rgb(var(--color-primary-500) / 0.45);
    padding: 0.75rem;
    margin-bottom: 1rem;
}
.amount-box--copy { cursor: pointer; transition: border-color 0.15s, background-color 0.15s; }
.amount-box--copy:hover { border-color: rgb(var(--color-primary-500)); background: rgb(var(--color-primary-500) / 0.12); }
.amount-box-label {
    font-size: 13px;
    font-weight: 500;
    color: rgb(var(--color-text-2));
    margin-bottom: 0.125rem;
}
.amount-box-value { font-family: var(--font-display); font-size: 1.375rem; font-weight: 700; letter-spacing: -0.02em; color: rgb(var(--color-primary-500)); font-variant-numeric: tabular-nums; }

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

.code-chip {
    border-radius: 0;
    background: rgb(var(--color-surface-muted));
    border: 1px solid rgb(var(--color-border-soft));
    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: 0;
    overflow-x: auto;
    font-family: var(--font-mono);
    font-size: 13px;
    line-height: 1.65;
    border: 1px solid rgb(var(--color-border-soft));
}
.code-block--dark { background: rgb(var(--color-field)); color: rgb(var(--color-text)); border-color: rgb(var(--color-border)); }

.receipt {
    padding: 0.875rem 1rem;
    border-radius: 0;
    background: rgb(var(--color-success-bg));
    border: 1px solid rgb(var(--color-success) / 0.3);
    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 ---------- */
.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.375rem; } }
.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); }
.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: 55rem;
    margin-inline: auto;
    border-color: rgb(var(--color-border));
    border-top-color: transparent;
    background: linear-gradient(180deg, rgb(var(--color-surface-muted) / 0.94), rgb(var(--color-surface) / 0.97) 160px);
    box-shadow: 0 30px 70px -40px rgb(var(--color-ink) / calc(0.9 * var(--ink-k)));
}
.order-card::before {
    content: "";
    position: absolute;
    inset-inline-start: -1px;
    inset-inline-end: -1px;
    top: -1px;
    height: 2px;
    z-index: 1;
    background: rgb(var(--color-primary-500));
    transform-origin: left;
    animation: htb-edge 0.9s 0.15s var(--ease) both;
}
@media (min-width: 768px) { .order-card.card--pad { padding: 1.875rem 2.125rem 2.125rem; } }
/* The charge is the number that matters: lime, display face. */
.order-card .readout--value[x-text^="formatRate"] {
    font-family: var(--font-display);
    font-size: 19px;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.02em;
    color: rgb(var(--color-primary-500));
    border-style: solid;
    border-color: rgb(var(--color-primary-500) / 0.45);
    background: rgb(var(--color-primary-500) / 0.08);
}
@media (max-width: 1023px) {
    .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: -2.125rem; padding-inline: 2.125rem; }
}
@media (max-width: 559px) {
    .order-card.card--pad { padding: 0.875rem 0.875rem 1rem; }
    .order-card.stack-lg > :not(template) ~ :not(template) { margin-top: 0.875rem; }
    .order-card .chip-row { margin-inline: -0.875rem; padding-inline: 0.875rem; }
    .order-card .label { font-size: 13px; margin-bottom: 0.25rem; }
    .order-submit {
        position: sticky;
        bottom: calc(0.5rem + env(safe-area-inset-bottom));
        z-index: 5;
        min-height: 3.125rem;
        font-size: 17px;
        box-shadow: 0 14px 30px -10px rgb(var(--color-ink) / calc(0.9 * var(--ink-k))), 0 0 0 6px rgb(var(--color-surface) / 0.85);
    }
    .order-submit:disabled { opacity: 1; background: rgb(var(--color-primary-200)); color: rgb(var(--color-primary-900) / 0.75); }
}

/* ==========================================================================
   Landing (public home: hero + login, then sections)
   ========================================================================== */
.landing { font-size: 16px; line-height: 1.55; }
.landing :where(h1, h2, h3) { margin: 0; font-family: var(--font-display); font-weight: 600; color: rgb(var(--color-text)); }
.landing :where(p) { margin: 0; }

/* Full-bleed band: deeper navy with a faint hex field fading out. */
.lp-band { position: relative; isolation: isolate; }
.lp-band::before {
    content: "";
    position: absolute;
    inset-block: 0;
    inset-inline-start: calc(50% - 50vw);
    inset-inline-end: calc(50% - 50vw);
    z-index: -1;
    background: linear-gradient(180deg, rgb(var(--color-page-2)), rgb(var(--color-page)));
    border-block: 1px solid rgb(var(--color-border-soft));
}
.lp-band::after {
    content: "";
    position: absolute;
    inset-block: 0;
    inset-inline-start: calc(50% - 50vw);
    inset-inline-end: calc(50% - 50vw);
    z-index: -1;
    background: var(--hexes) center / 42px 75px;
    opacity: 0.07;
    -webkit-mask: linear-gradient(180deg, #000, transparent 80%);
    mask: linear-gradient(180deg, #000, transparent 80%);
    pointer-events: none;
}

/* Hero: lime glow rising behind a hex field, one scan sweep on load. */
.hero { position: relative; isolation: isolate; padding: 1.125rem 0 2.25rem; }
.hero::before {
    content: "";
    position: absolute;
    top: -0.75rem;
    bottom: 0;
    inset-inline-start: calc(50% - 50vw);
    inset-inline-end: calc(50% - 50vw);
    z-index: -2;
    border-bottom: 1px solid rgb(var(--color-border-soft));
    background:
        radial-gradient(120% 60% at 50% 78%, rgb(var(--color-primary-500) / 0.17), transparent 62%),
        radial-gradient(80% 50% at 50% 0%, rgb(var(--color-hero-tint) / 0.35), transparent 70%),
        rgb(var(--color-page));
}
.hero-grid { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.125rem; align-items: center; }
.hero-grid::before {
    content: "";
    position: absolute;
    top: -2rem;
    bottom: -3rem;
    inset-inline-start: calc(50% - 50vw);
    inset-inline-end: calc(50% - 50vw);
    z-index: -1;
    background: var(--hexes) center / 42px 75px;
    opacity: 0.22;
    -webkit-mask: radial-gradient(90% 55% at 50% 75%, #000 10%, transparent 70%);
    mask: radial-gradient(90% 55% at 50% 75%, #000 10%, transparent 70%);
    pointer-events: none;
}
.hero::after {
    content: "";
    position: absolute;
    inset-inline-start: calc(50% - 50vw);
    inset-inline-end: calc(50% - 50vw);
    top: -150px;
    height: 140px;
    z-index: 2;
    pointer-events: none;
    background: linear-gradient(180deg, transparent, rgb(var(--color-primary-500) / 0.07) 70%, rgb(var(--color-primary-500) / 0.55) 99%, rgb(var(--color-primary-500)));
    opacity: 0;
    animation: htb-sweep 1.8s 0.25s cubic-bezier(0.45, 0, 0.2, 1) 1 both;
}
@keyframes htb-sweep {
    0% { top: -150px; opacity: 1; }
    85% { opacity: 1; }
    100% { top: 100%; opacity: 0; }
}
.hero-title {
    font-size: 2.25rem;
    line-height: 1.02;
    letter-spacing: -0.04em;
    font-weight: 700;
    max-width: 12ch;
}
.hero-title em { font-style: normal; color: rgb(var(--color-primary-500)); }
.hero-lede { margin-top: 0.625rem; font-size: 16px; color: rgb(var(--color-text-2)); max-width: 38ch; line-height: 1.5; }
.hero-login { width: 100%; max-width: 460px; }
.hero-login .auth-card { padding: 1.125rem 1rem 1rem; }
.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 .link.text-xs { display: inline-block; padding: 0.75rem 0; margin: -0.75rem 0; font-size: 14px; }

.lp-showcase {
    margin-block: 0;
    margin-inline: calc(50% - 50vw);
    padding-block: 1rem 0;
    padding-inline: 0.375rem;
    width: 100vw;
    line-height: 0;
}
@media (min-width: 768px) { .lp-showcase { padding-block-start: 1.5rem; padding-inline: 0.75rem; } }
.lp-showcase img { display: block; width: 100%; height: auto; max-width: none; margin-inline: auto; }
@media (min-width: 768px) { .lp-showcase img { width: 85%; } }
@media (min-width: 960px) { .lp-showcase img { width: 67%; } }
.hero:has(+ .lp-showcase) { padding-bottom: 1rem; }
.lp-showcase + .lp-section { padding-top: 1.25rem; }
@media (min-width: 960px) {
    .hero:has(+ .lp-showcase) { padding-bottom: 1.5rem; }
    .lp-showcase + .lp-section { padding-top: 2rem; }
}

/* Sections */
.lp-section { padding: 3.5rem 0; }
.lp-head h2 { font-size: 1.875rem; line-height: 1.05; letter-spacing: -0.035em; font-weight: 700; }
.lp-head p { margin-top: 0.625rem; font-size: 15px; color: rgb(var(--color-text-soft)); max-width: 46ch; }

/* Reasons: one panel, 2x2 cells */
.lp-reasons { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.5rem; align-items: start; }
.lp-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    background: rgb(var(--color-surface));
    border: 1px solid rgb(var(--color-border));
}
.lp-reason { position: relative; padding: 1rem 0.875rem; transition: background-color 0.25s; }
.lp-reason::before {
    content: "";
    position: absolute;
    inset-inline-start: -1px;
    inset-inline-end: -1px;
    top: -1px;
    height: 2px;
    background: rgb(var(--color-primary-500));
    scale: 0 1;
    transform-origin: left;
    transition: scale 0.4s var(--ease);
}
.lp-reason:hover { background: rgb(var(--color-surface-muted)); }
.lp-reason:hover::before { scale: 1 1; }
.lp-reason:nth-child(odd) { border-inline-end: 1px solid rgb(var(--color-border-soft)); }
.lp-reason:nth-child(-n+2) { border-bottom: 1px solid rgb(var(--color-border-soft)); }
.lp-reason svg {
    display: block;
    box-sizing: content-box;
    margin-bottom: 0.75rem;
    padding: 8px;
    color: rgb(var(--color-primary-500));
    border: 1px solid rgb(var(--color-primary-500) / 0.45);
    background: rgb(var(--color-primary-500) / 0.08);
}
.lp-reason h3 { font-size: 15px; line-height: 1.3; letter-spacing: -0.015em; margin-bottom: 0.25rem; }
.lp-reason p { color: rgb(var(--color-text-soft)); font-size: 15px; line-height: 1.45; }

/* Steps: hexagon nodes on a line that runs from steel to lime */
.lp-steps {
    list-style: none;
    margin: 1.5rem 0 0;
    padding: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    max-width: 520px;
    position: relative;
    --fill: 0%;
}
.lp-steps.is-on { --fill: 100%; }
.lp-steps::before {
    content: "";
    position: absolute;
    top: 20px;
    bottom: 40px;
    inset-inline-start: 17px;
    width: 1px;
    background: linear-gradient(180deg, rgb(var(--color-border-strong)), rgb(var(--color-primary-500))) top / 100% var(--fill) no-repeat, rgb(var(--color-border-soft));
    transition: background-size 1.4s var(--ease);
}
@property --fill { syntax: "<percentage>"; inherits: true; initial-value: 0%; }
.lp-step { display: grid; grid-template-columns: 36px minmax(0, 1fr); column-gap: 0.875rem; padding: 0.5rem 0; position: relative; }
.lp-node {
    position: relative;
    z-index: 1;
    grid-row: span 2;
    display: grid;
    place-items: center;
    width: 36px;
    height: 40px;
    font-family: var(--font-mono);
    font-weight: 500;
    font-size: 13px;
    color: rgb(var(--color-text));
    background: rgb(var(--color-border-strong));
    clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
    font-variant-numeric: tabular-nums;
    transition: background-color 0.4s, color 0.4s;
}
.lp-node::before {
    content: "";
    position: absolute;
    inset: 1px;
    z-index: -1;
    background: rgb(var(--color-page-2));
    clip-path: inherit;
    transition: opacity 0.4s;
}
.lp-steps.is-on .lp-node { background: rgb(var(--color-primary-500) / 0.45); }
.lp-steps.is-on .lp-step:last-child .lp-node { background: rgb(var(--color-primary-500)); color: rgb(var(--color-primary-fg)); }
.lp-steps.is-on .lp-step:last-child .lp-node::before { opacity: 0; }
.lp-steps.is-on .lp-step:nth-child(2) .lp-node { transition-delay: 0.32s; }
.lp-steps.is-on .lp-step:nth-child(3) .lp-node { transition-delay: 0.64s; }
.lp-steps.is-on .lp-step:nth-child(4) .lp-node, .lp-steps.is-on .lp-step:nth-child(4) .lp-node::before { transition-delay: 0.96s; }
.lp-step h3 { font-size: 17px; letter-spacing: -0.015em; margin: 0.125rem 0 0.125rem; }
.lp-step p { font-size: 15px; line-height: 1.45; color: rgb(var(--color-text-soft)); }

/* Testimonials: one swipeable row on phones */
.lp-voices-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 0.625rem 2rem; }
.lp-note { font-size: 13px; color: rgb(var(--color-text-soft)); }
.lp-voices {
    margin: 1.5rem calc(-1 * var(--gutter)) 0;
    padding: 4px var(--gutter);
    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-side { display: contents; }
.lp-quote {
    position: relative;
    flex: 0 0 84%;
    scroll-snap-align: start;
    margin: 0;
    background: rgb(var(--color-surface));
    border-radius: 0;
    border: 1px solid rgb(var(--color-border));
    padding: 1.25rem 1.125rem 1.125rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 1.125rem;
    transition: border-color 0.25s, translate 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.lp-quote::before {
    content: "";
    position: absolute;
    inset-inline-start: -1px;
    top: -1px;
    width: 40px;
    height: 2px;
    background: rgb(var(--color-primary-500));
    transition: width 0.45s var(--ease);
}
.lp-quote:hover { border-color: rgb(var(--color-border-strong)); translate: 0 -3px; box-shadow: 0 22px 40px -24px rgb(var(--color-ink) / calc(0.9 * var(--ink-k))); }
.lp-quote:hover::before { width: calc(100% + 2px); }
.lp-quote blockquote { margin: 0; font-size: 15px; line-height: 1.55; color: rgb(var(--color-text-2)); }
.lp-quote--lead blockquote { font-size: 16px; line-height: 1.5; letter-spacing: -0.005em; color: rgb(var(--color-text)); font-weight: 500; }
.lp-qmark { display: block; width: 22px; height: 17px; margin-bottom: 0.75rem; color: rgb(var(--color-primary-500) / 0.45); }
.lp-who { display: flex; align-items: center; gap: 0.625rem; font-family: var(--font-display); font-size: 14px; font-weight: 600; color: rgb(var(--color-text)); }
.lp-avatar {
    width: 34px;
    height: 34px;
    border-radius: 0;
    display: grid;
    place-items: center;
    font-size: 12px;
    font-weight: 600;
    color: rgb(var(--color-primary-500));
    background: rgb(var(--color-primary-500) / 0.08);
    border: 1px solid rgb(var(--color-primary-500) / 0.45);
}

/* FAQ accordion */
.lp-faq { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.25rem; align-items: start; }
.lp-acc { border-top: 1px solid rgb(var(--color-border)); }
.lp-acc details { position: relative; border-bottom: 1px solid rgb(var(--color-border-soft)); }
.lp-acc details::before {
    content: "";
    position: absolute;
    inset-inline-start: 0;
    top: -1px;
    height: 1px;
    width: 100%;
    background: rgb(var(--color-primary-500));
    scale: 0 1;
    transform-origin: left;
    transition: scale 0.4s var(--ease);
}
.lp-acc details[open]::before { scale: 1 1; }
.lp-acc summary {
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    min-height: 3.25rem;
    padding: 0.75rem 0.125rem;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.35;
    color: rgb(var(--color-text));
    transition: color 0.15s;
}
.lp-acc summary::-webkit-details-marker { display: none; }
.lp-acc summary:hover, .lp-acc details[open] summary { color: rgb(var(--color-primary-500)); }
.lp-acc summary:focus-visible { outline-offset: -2px; }
.lp-chev {
    flex: none;
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    color: rgb(var(--color-text-soft));
    border: 1px solid rgb(var(--color-border));
    transition: color 0.2s, border-color 0.2s, background-color 0.2s;
}
.lp-chev svg { transition: transform 0.3s var(--ease); }
.lp-acc details[open] .lp-chev { color: rgb(var(--color-primary-fg)); border-color: rgb(var(--color-primary-500)); background: rgb(var(--color-primary-500)); }
.lp-acc details[open] .lp-chev svg { transform: rotate(45deg); }
.lp-acc details::details-content { block-size: 0; overflow: hidden; transition: block-size 0.3s var(--ease), content-visibility 0.3s allow-discrete; }
.lp-acc details[open]::details-content { block-size: auto; }
.lp-ans { padding-block: 0 1.125rem; padding-inline: 0.125rem 2.75rem; color: rgb(var(--color-text-2)); font-size: 15px; max-width: 62ch; }

/* Scroll reveal (progressive: everything stays visible without support) */
@keyframes htb-rise { from { opacity: 0; translate: 0 48px; } to { opacity: 1; translate: 0 0; } }
@supports (animation-timeline: view()) {
    @media (prefers-reduced-motion: no-preference) {
        .lp-head, .lp-panel, .lp-voices, .lp-acc { animation: htb-rise linear both; animation-timeline: view(); animation-range: entry 0% entry 60%; }
        .lp-step { animation: htb-rise linear both; animation-timeline: view(); animation-range: entry 10% entry 80%; }
    }
}

@media (min-width: 600px) {
    .hero-login .auth-card { padding: 1.5rem; }
    .lp-reason { padding: 1.375rem; }
    .lp-voices { margin: 1.5rem 0 0; padding: 4px 0; overflow: visible; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1rem; }
    .lp-side { display: grid; gap: 1rem; }
    .lp-quote--lead { grid-row: span 2; }
}
@media (min-width: 960px) {
    .hero { padding: 6rem 0 7rem; }
    .hero::before {
        top: calc(-1 * 0.75rem);
        background:
            radial-gradient(48% 70% at 78% 52%, rgb(var(--color-primary-500) / 0.2), transparent 65%),
            radial-gradient(60% 60% at 15% 0%, rgb(var(--color-hero-tint) / 0.4), transparent 70%),
            rgb(var(--color-page));
    }
    .hero-grid { grid-template-columns: minmax(0, 1fr) 440px; gap: 5rem; }
    .hero-grid::before {
        top: -6rem;
        bottom: -7rem;
        background-size: 56px 100px;
        opacity: 0.26;
        -webkit-mask: radial-gradient(46% 72% at 78% 52%, #000 5%, transparent 72%);
        mask: radial-gradient(46% 72% at 78% 52%, #000 5%, transparent 72%);
    }
    .hero::after { height: 220px; top: -230px; }
    .hero-title { font-size: clamp(3.25rem, 1.2rem + 4vw, 5.5rem); line-height: 0.98; letter-spacing: -0.04em; max-width: 11ch; }
    .hero-lede { margin-top: 1.75rem; font-size: 20px; }
    .hero-login { max-width: none; }
    .hero-login .auth-card { padding: 2rem; }
    .hero-login .auth-title { font-size: 24px; margin-bottom: 1.375rem; }
    .hero-login .form-stack > :not(template) ~ :not(template) { margin-top: 1rem; }
    .hero-login .btn--block { min-height: 3.125rem; }
    .lp-section { padding: 6.5rem 0; }
    .lp-head h2 { font-size: clamp(2.5rem, 1.4rem + 1.8vw, 3.25rem); line-height: 1; }
    .lp-head p { margin-top: 1rem; font-size: 17px; }
    .lp-reasons, .lp-faq { grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 4.5rem; }
    .lp-reasons .lp-head, .lp-faq .lp-head { position: sticky; top: calc(var(--header-h) + 3rem); }
    .lp-reason { padding: 2rem; }
    .lp-reason svg { margin-bottom: 1.25rem; }
    .lp-reason h3 { font-size: 19px; margin-bottom: 0.375rem; }
    .lp-steps { margin-top: 3rem; max-width: none; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2rem; }
    .lp-steps::before {
        top: 22px; bottom: auto; inset-inline-start: 20px; inset-inline-end: 12%; width: auto; height: 1px;
        background: linear-gradient(90deg, rgb(var(--color-border-strong)), rgb(var(--color-primary-500))) left / var(--fill) 100% no-repeat, rgb(var(--color-border-soft));
    }
    .lp-step { display: block; padding: 0; }
    .lp-node { width: 40px; height: 44px; font-size: 14px; margin-bottom: 1rem; }
    .lp-step h3 { font-size: 19px; margin: 0 0 0.5rem; }
    .lp-step p { max-width: 28ch; }
    .lp-voices { margin-top: 2.5rem; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
    .lp-quote { padding: 1.75rem 1.625rem 1.5rem; }
    .lp-quote blockquote { font-size: 16px; }
    .lp-quote--lead { padding: 2.5rem; }
    .lp-quote--lead blockquote { font-size: clamp(1.25rem, 1rem + 0.9vw, 1.625rem); line-height: 1.4; letter-spacing: -0.015em; max-width: 30ch; }
    .lp-qmark { width: 28px; height: 22px; margin-bottom: 1.25rem; }
    .lp-acc summary { font-size: 17px; padding: 1rem 0.25rem; min-height: 3.75rem; }
    .lp-ans { padding-block: 0 1.5rem; padding-inline: 0.25rem 3.5rem; font-size: 16px; }
}
body:not(.app--auth) .footer { text-align: start; }
body:not(.app--auth) .footer > span { display: block; max-width: var(--wrap); margin: 0 auto; }

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

/* 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;
    }
}

/* ---------- RTL (ar, fa, he, ur) ----------
   Lo direccional ya usa propiedades lógicas; aquí solo lo que estas no cubren. */
@media (max-width: 1023.98px) {
    [dir="rtl"] .sidebar:not(.is-open) { transform: translateX(100%); }
}
[dir="rtl"] .rtl-flip { transform: scaleX(-1); }
/* Código, IDs, claves y URLs se leen siempre de izquierda a derecha. */
[dir="rtl"] :is(code, kbd, samp, span.mono, span.cell-id, button.cell-id) { direction: ltr; unicode-bidi: isolate; }
[dir="rtl"] :is(pre, .code-block) { direction: ltr; text-align: left; }
[dir="rtl"] input:is([type="email"], [type="url"], [type="tel"], [type="number"], .mono) { direction: ltr; }
[dir="rtl"] .sidebar.is-open { box-shadow: -24px 0 60px -20px rgb(var(--color-ink) / calc(0.8 * var(--ink-k))); }
[dir="rtl"] .nav-link.is-active { background: linear-gradient(270deg, rgb(var(--color-primary-500) / 0.16), rgb(var(--color-primary-500) / 0.02) 85%); }
[dir="rtl"] .dropdown-item.is-selected { background: linear-gradient(270deg, rgb(var(--color-primary-500) / 0.14), transparent); }
[dir="rtl"] :is(.auth-card, .order-card, .lp-reason, .lp-acc details)::before { transform-origin: right; }
[dir="rtl"] .btn--primary::after { translate: 120% 0; }
[dir="rtl"] .btn--primary:hover:not(:disabled)::after { translate: -120% 0; }
@media (min-width: 960px) {
    [dir="rtl"] .lp-steps::before { background: linear-gradient(270deg, rgb(var(--color-border-strong)), rgb(var(--color-primary-500))) right / var(--fill) 100% no-repeat, rgb(var(--color-border-soft)); }
}

/* Icon library (own sprite, iconHtml / navIcon): an icon takes the text color;
   a network logo its brand color, or --brand-icon-color when the theme forces one tone. */
.icon-slot { display: inline-flex; flex-shrink: 0; }
.icon-slot .icon { display: block; }
.icon--brand, .nav-link .icon--brand { color: var(--brand-icon-color, var(--brand)); }
