:root {
    color-scheme: light;
    --bg: #eef2f7;
    --surface: #ffffff;
    --surface-soft: #f7f9fc;
    --text: #18232f;
    --muted: #657282;
    --line: #dce4ed;
    --accent: #4f46e5;
    --accent-dark: #3730a3;
    --danger: #b42318;
    --success: #087443;
    --warning: #a15c00;
    --shadow: 0 20px 55px rgba(29, 48, 74, 0.1);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    min-width: 320px;
    margin: 0;
    background:
        radial-gradient(circle at 10% 0%, #e5e7ff 0, transparent 28rem),
        radial-gradient(circle at 90% 15%, #dff8ef 0, transparent 24rem),
        var(--bg);
    color: var(--text);
    font: 15px/1.55 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select {
    font: inherit;
}

.app-shell {
    width: min(1240px, 100%);
    margin: 0 auto;
    padding: 18px;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 12px;
    padding: 10px 14px;
    border: 1px solid rgba(220, 228, 237, 0.9);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 14px 38px rgba(29, 48, 74, 0.08);
    backdrop-filter: blur(16px);
}

.brand {
    display: inline-flex;
    min-width: 0;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    letter-spacing: -0.025em;
}

.brand-mark {
    display: grid;
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 12px;
    background: var(--accent);
    box-shadow: 0 7px 18px rgba(79, 70, 229, 0.24);
    color: #fff;
    font-size: 12px;
}

.brand-name {
    overflow: hidden;
    color: var(--text);
    font-size: 15px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.topbar-actions {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 10px;
}

.topbar-links {
    display: flex;
    align-items: center;
    gap: 3px;
}

.text-link {
    padding: 8px 10px;
    border-radius: 9px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 650;
    transition: background 160ms ease, color 160ms ease;
}

.text-link:hover {
    background: #f2f2ff;
    color: var(--accent-dark);
}

.api-badge {
    padding: 6px 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
    color: var(--muted);
    font-size: 12px;
    white-space: nowrap;
}

.nav-toggle {
    display: none;
    width: 40px;
    height: 40px;
    place-items: center;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: #fff;
    color: var(--text);
    cursor: pointer;
}

.nav-toggle:hover {
    border-color: rgba(79, 70, 229, 0.28);
    color: var(--accent);
}

.nav-toggle-icon,
.nav-toggle-icon::before,
.nav-toggle-icon::after {
    display: block;
    width: 18px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
    transition: transform 160ms ease, opacity 160ms ease;
}

.nav-toggle-icon {
    position: relative;
}

.nav-toggle-icon::before,
.nav-toggle-icon::after {
    position: absolute;
    left: 0;
    content: '';
}

.nav-toggle-icon::before { top: -6px; }
.nav-toggle-icon::after { top: 6px; }

.nav-toggle[aria-expanded="true"] .nav-toggle-icon {
    background: transparent;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-icon::before {
    top: 0;
    transform: rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-icon::after {
    top: 0;
    transform: rotate(-45deg);
}

.api-badge.is-success {
    border-color: rgba(8, 116, 67, 0.2);
    background: rgba(8, 116, 67, 0.08);
    color: var(--success);
}

.api-badge.is-error {
    border-color: rgba(180, 35, 24, 0.2);
    background: rgba(180, 35, 24, 0.08);
    color: var(--danger);
}

.global-alert {
    margin: 0 0 16px;
    padding: 14px 16px;
    border: 1px solid rgba(180, 35, 24, 0.2);
    border-radius: 13px;
    background: #fff3f1;
    color: var(--danger);
    box-shadow: 0 8px 26px rgba(29, 48, 74, 0.06);
}

.global-alert.is-info {
    border-color: rgba(79, 70, 229, 0.2);
    background: #f0efff;
    color: var(--accent-dark);
}

.global-alert.is-success {
    border-color: rgba(8, 116, 67, 0.2);
    background: #effaf4;
    color: var(--success);
}

.layout {
    display: grid;
    grid-template-columns: minmax(0, 1.04fr) minmax(0, 0.96fr);
    gap: 18px;
}

.card {
    min-width: 0;
    padding: 24px;
    border: 1px solid rgba(220, 228, 237, 0.9);
    border-radius: 22px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.hero-card,
.order-card {
    align-self: start;
}

.operator-card {
    grid-column: 1 / -1;
}

.section-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
}

.eyebrow {
    margin: 0 0 5px;
    color: var(--accent);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

h1,
h2 {
    margin: 0;
    letter-spacing: -0.035em;
}

h1 {
    font-size: clamp(30px, 4vw, 44px);
    line-height: 1.02;
}

h2 {
    font-size: 24px;
}

.section-copy {
    max-width: 39rem;
    margin: 10px 0 0;
    color: var(--muted);
}

.status-dot {
    width: 9px;
    height: 9px;
    margin-top: 8px;
    border-radius: 999px;
    background: #36b37e;
    box-shadow: 0 0 0 5px rgba(54, 179, 126, 0.12);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.field {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 7px;
}

.field > span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 650;
}

.field em {
    color: #98a3b1;
    font-style: normal;
    font-weight: 400;
}

.field-wide {
    grid-column: 1 / -1;
}

.field-inline {
    margin-bottom: 14px;
}

input,
select {
    width: 100%;
    height: 46px;
    padding: 0 13px;
    border: 1px solid var(--line);
    border-radius: 12px;
    outline: none;
    background: var(--surface-soft);
    color: var(--text);
}

select {
    cursor: pointer;
}

input:focus,
select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.13);
}

input[readonly] {
    color: var(--muted);
}

.direction-meta {
    min-height: 20px;
    margin-top: -4px;
    color: var(--muted);
    font-size: 13px;
}

.form-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.button {
    min-height: 42px;
    padding: 0 16px;
    border: 1px solid transparent;
    border-radius: 11px;
    cursor: pointer;
    font-weight: 750;
    transition: transform 0.15s ease, background 0.15s ease, opacity 0.15s ease;
}

.button:hover {
    transform: translateY(-1px);
}

.button:active {
    transform: translateY(0);
}

.button:disabled {
    cursor: wait;
    opacity: 0.58;
    transform: none;
}

.button-primary {
    background: var(--accent);
    color: #fff;
}

.button-primary:hover {
    background: var(--accent-dark);
}

.button-ghost {
    border-color: var(--line);
    background: var(--surface-soft);
    color: var(--text);
}

.button-danger {
    border-color: rgba(180, 35, 24, 0.18);
    background: rgba(180, 35, 24, 0.07);
    color: var(--danger);
}

.result-panel,
.info-box {
    margin-top: 18px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface-soft);
}

.result-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 6px 0;
}

.result-row > :last-child {
    text-align: right;
}

.result-row code {
    padding: 3px 6px;
    border-radius: 6px;
    background: #eef1f5;
    font-size: 12px;
    overflow-wrap: anywhere;
}


.result-row.risk-row {
    margin-top: 6px;
    padding: 8px 10px;
    border-radius: 9px;
    background: #f0efff;
}

.result-row.risk-pending {
    color: var(--warning);
    background: #fff7e6;
}

.result-row.risk-rejected {
    color: var(--danger);
    background: #fff3f1;
}

.result-row.risk-approved {
    color: var(--success);
    background: #edf9f2;
}
.timeline {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.timeline li {
    position: relative;
    padding: 10px 12px 10px 28px;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: #fff;
}

.timeline li::before {
    position: absolute;
    top: 16px;
    left: 12px;
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: var(--accent);
    content: "";
}

.timeline small {
    display: block;
    margin-top: 2px;
    color: var(--muted);
}

.queue-list {
    display: grid;
    gap: 9px;
}

.queue-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 11px 12px;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: #fff;
}

.queue-item button {
    min-height: 34px;
    padding: 0 11px;
    font-size: 12px;
}

.operator-panel {
    padding-top: 2px;
}

.operator-panel summary {
    cursor: pointer;
    font-weight: 750;
}

.operator-panel > p {
    margin: 8px 0 14px;
}

.queue-filters {
    margin-top: 14px;
}

.operator-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
}

.muted {
    color: var(--muted);
}

.is-error {
    color: var(--danger);
}

.is-success {
    color: var(--success);
}

.footer {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 24px 4px 8px;
    color: var(--muted);
    font-size: 12px;
}

.footer code {
    color: var(--text);
}


.operator-mode .layout {
    display: block;
}

.operator-mode .hero-card,
.operator-mode .order-card,
.operator-mode #payment-section,
.operator-mode #status-section {
    display: none;
}

.operator-mode .operator-card {
    margin-top: 0;
}


.section-tabs {
    display: flex;
    gap: 4px;
    margin: 0 0 18px;
    padding: 6px;
    border: 1px solid rgba(220, 228, 237, 0.92);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 12px 32px rgba(29, 48, 74, 0.07);
    backdrop-filter: blur(14px);
}

.section-tabs a {
    display: inline-flex;
    min-height: 42px;
    flex: 1 1 0;
    align-items: center;
    justify-content: center;
    padding: 9px 12px;
    border-radius: 11px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
    text-align: center;
    transition: background 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.section-tabs a:hover {
    background: #f3f2ff;
    color: var(--accent-dark);
}

.section-tabs a.is-active {
    background: var(--accent);
    box-shadow: 0 8px 18px rgba(79, 70, 229, 0.22);
    color: #fff;
}

.steps {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 18px;
}

.steps span {
    padding: 7px 11px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface-soft);
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.steps span.is-active {
    border-color: rgba(79, 70, 229, 0.25);
    background: #f0efff;
    color: var(--accent-dark);
}

.client-mode .operator-card,
.client-mode .operator-link {
    display: none;
}


.feature-grid,
.contact-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.feature {
    display: grid;
    gap: 8px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface-soft);
}

.feature strong {
    color: var(--accent-dark);
}

.feature span,
.contact-grid .info-box span {
    color: var(--muted);
    font-size: 13px;
}

.faq-list {
    display: grid;
    gap: 9px;
}

.faq-list details {
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: #fff;
}

.faq-list summary {
    cursor: pointer;
    font-weight: 700;
}

.faq-list p {
    margin: 10px 0 0;
    color: var(--muted);
}

.contact-grid .info-box {
    margin-top: 0;
    display: grid;
    gap: 6px;
}

@media (max-width: 900px) {
    .feature-grid,
    .contact-grid {
        grid-template-columns: 1fr;
    }

    .layout {
        grid-template-columns: 1fr;
    }

    .operator-card {
        grid-column: auto;
    }
}

@media (max-width: 620px) {
    .app-shell {
        padding: 12px;
    }

    .topbar {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
    }

    .topbar-actions {
        width: 100%;
        justify-content: space-between;
    }

    .card {
        padding: 18px;
        border-radius: 17px;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .field-wide {
        grid-column: auto;
    }

    .footer {
        flex-direction: column;
        gap: 4px;
    }
}

/* Compact exchange calculator */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.client-main {
    display: grid;
    gap: 16px;
}

.calc-shell {
    display: grid;
    gap: 12px;
}

.calc-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.calc-heading h1 {
    margin: 0 0 4px;
    font-size: clamp(24px, 3vw, 34px);
    letter-spacing: -0.035em;
}

.calc-steps {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    justify-content: flex-end;
}

.calc-steps span {
    padding: 6px 9px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface-soft);
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.calc-steps span.is-active {
    border-color: rgba(79, 70, 229, 0.25);
    background: #f0efff;
    color: var(--accent-dark);
}

.calc-columns {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.08fr);
    gap: 12px;
    align-items: start;
}

.calc-panel {
    min-width: 0;
    padding: 14px;
    border-radius: 15px;
}

.calc-panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.calc-panel-head .eyebrow {
    margin-bottom: 1px;
    color: var(--accent);
    font-size: 10px;
}

.calc-panel-head h2 {
    margin: 0;
    font-size: 20px;
}

.calc-panel-caption {
    color: var(--muted);
    font-size: 11px;
    text-align: right;
}

.calc-amount-box {
    display: block;
    margin-bottom: 9px;
    padding: 9px 10px;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: var(--surface-soft);
}

.calc-amount-box > span {
    display: block;
    margin-bottom: 2px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
}

.calc-amount-line {
    display: flex;
    align-items: center;
    gap: 7px;
}

.calc-amount-line input {
    min-width: 0;
    width: 100%;
    padding: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text);
    font-size: 23px;
    font-weight: 750;
    letter-spacing: -0.03em;
}

.calc-amount-readonly .calc-amount-line input {
    color: var(--accent-dark);
}

.calc-clear {
    flex: 0 0 auto;
    width: 26px;
    height: 26px;
    border: 0;
    border-radius: 8px;
    background: #e8ecf2;
    color: var(--muted);
    cursor: pointer;
    font-size: 17px;
    line-height: 1;
}

.calc-clear:hover {
    background: #dfe5ed;
    color: var(--text);
}

.calc-selected {
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 45px;
    margin-bottom: 7px;
    padding: 7px 9px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
}

.calc-selected strong,
.calc-selected small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.calc-selected strong {
    font-size: 13px;
}

.calc-selected small {
    color: var(--muted);
    font-size: 11px;
}

.calc-icon {
    display: grid;
    flex: 0 0 auto;
    width: 31px;
    height: 31px;
    place-items: center;
    border-radius: 50%;
    background: #eef0ff;
    color: var(--accent-dark);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.calc-limits,
.calc-reserve,
.calc-meta,
.calc-note {
    color: var(--muted);
    font-size: 11px;
    line-height: 1.45;
}

.calc-limits {
    min-height: 16px;
    margin-bottom: 8px;
}

.calc-reserve {
    margin: -1px 0 7px;
    padding: 6px 9px;
    border-radius: 8px;
    background: var(--surface-soft);
}

.calc-warning {
    margin: 0 0 8px;
    padding: 7px 9px;
    border: 1px solid rgba(180, 35, 24, 0.16);
    border-radius: 8px;
    background: #fff3f1;
    color: var(--danger);
    font-size: 11px;
    line-height: 1.4;
}

.calc-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 7px;
    padding: 3px;
    border-radius: 9px;
    background: #f1f3f7;
}

.calc-tabs button {
    flex: 1 1 0;
    min-width: 0;
    padding: 6px 5px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    font-size: 10px;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
}

.calc-tabs button span {
    opacity: 0.65;
    font-weight: 500;
}

.calc-tabs button.is-active {
    background: #fff;
    color: var(--accent-dark);
    box-shadow: 0 1px 4px rgba(29, 48, 74, 0.08);
}

.calc-search {
    display: block;
    margin-bottom: 7px;
}

.calc-search input {
    width: 100%;
    padding: 8px 9px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--text);
    font: inherit;
    font-size: 12px;
    outline: none;
}

.calc-search input:focus {
    border-color: rgba(79, 70, 229, 0.5);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.08);
}

.calc-options {
    display: grid;
    gap: 3px;
    max-height: 298px;
    overflow-y: auto;
    padding-right: 2px;
    scrollbar-width: thin;
}

.calc-option {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    min-width: 0;
    padding: 6px 7px;
    border: 1px solid transparent;
    border-radius: 9px;
    background: transparent;
    color: var(--text);
    cursor: pointer;
    text-align: left;
}

.calc-option:hover {
    background: var(--surface-soft);
}

.calc-option.is-selected {
    border-color: rgba(79, 70, 229, 0.24);
    background: #f2f1ff;
}

.calc-option:disabled {
    cursor: not-allowed;
    opacity: 0.45;
}

.calc-option .calc-icon {
    width: 27px;
    height: 27px;
    font-size: 9px;
}

.calc-option-text {
    display: grid;
    min-width: 0;
    gap: 1px;
}

.calc-option-text strong,
.calc-option-text small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.calc-option-text strong {
    font-size: 12px;
}

.calc-option-text small {
    color: var(--muted);
    font-size: 10px;
}

.calc-option-badge {
    margin-left: auto;
    color: var(--muted);
    font-size: 9px;
    white-space: nowrap;
}

.calc-empty {
    padding: 12px 7px;
    color: var(--muted);
    font-size: 12px;
    text-align: center;
}

.calc-details .calc-panel-head {
    margin-bottom: 8px;
}

.calc-refresh {
    padding: 6px 8px;
    font-size: 10px;
}

.calc-rate-box {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 6px;
    margin-bottom: 7px;
    padding: 8px 9px;
    border-radius: 10px;
    background: #f7f8fc;
}

.calc-rate-box > div {
    display: grid;
    min-width: 0;
    gap: 2px;
}

.calc-label {
    color: var(--muted);
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.calc-rate-box strong {
    overflow: hidden;
    font-size: 12px;
    text-overflow: ellipsis;
}

.calc-meta {
    min-height: 28px;
    margin-bottom: 4px;
}

.calc-note {
    margin-bottom: 7px;
}

.calc-note.is-error,
.calc-errors {
    color: var(--danger);
}

.calc-summary {
    display: grid;
    gap: 4px;
    margin-bottom: 8px;
    padding: 9px 10px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
}

.calc-summary-row {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    font-size: 11px;
}

.calc-summary-row span {
    color: var(--muted);
}

.calc-summary-direction {
    padding: 3px 0;
    color: var(--accent-dark);
    font-size: 11px;
    font-weight: 700;
    text-align: center;
}

.calc-instructions {
    margin-bottom: 8px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: var(--surface-soft);
}

.calc-instructions summary {
    padding: 8px 10px;
    cursor: pointer;
    font-size: 11px;
    font-weight: 700;
}

.calc-instructions-body {
    padding: 0 10px 9px;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.5;
}

.calc-instructions-body ol {
    margin: 6px 0;
    padding-left: 18px;
}

.calc-instructions-body strong {
    color: var(--text);
}

.calc-form {
    display: grid;
    gap: 7px;
}

.calc-form-group {
    display: grid;
    gap: 5px;
    padding-top: 7px;
    border-top: 1px dashed var(--line);
}

.calc-form-group h3 {
    margin: 0;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted);
}

.calc-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}

.calc-field {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.calc-field-wide {
    grid-column: 1 / -1;
}

.calc-field > span {
    color: var(--muted);
    font-size: 10px;
    font-weight: 650;
}

.calc-field > span em {
    font-style: normal;
    font-weight: 400;
    opacity: 0.75;
}

.calc-field input {
    width: 100%;
    min-width: 0;
    padding: 7px 8px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: #fff;
    color: var(--text);
    font: inherit;
    font-size: 12px;
    outline: none;
}

.calc-field input:focus {
    border-color: rgba(79, 70, 229, 0.5);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.08);
}

.calc-consents {
    display: grid;
    gap: 4px;
    padding-top: 6px;
    border-top: 1px dashed var(--line);
    color: var(--muted);
    font-size: 10px;
    line-height: 1.35;
}

.calc-consents label {
    display: flex;
    align-items: flex-start;
    gap: 6px;
}

.calc-consents input {
    flex: 0 0 auto;
    margin-top: 1px;
}

.calc-consents a {
    color: var(--accent-dark);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.calc-errors {
    padding: 6px 8px;
    border-radius: 7px;
    background: #fff3f1;
    font-size: 10px;
    line-height: 1.4;
}

.calc-submit {
    width: 100%;
    padding: 10px 12px;
    font-size: 13px;
    font-weight: 800;
}

.calc-details .result-panel {
    margin-top: 4px;
    padding: 9px;
    font-size: 11px;
}

.calc-details .result-row {
    padding: 3px 0;
}

@media (max-width: 1120px) {
    .calc-columns {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    }

    .calc-details {
        grid-column: 1 / -1;
    }
}

@media (max-width: 760px) {
    .client-main {
        gap: 12px;
    }

    .calc-heading {
        display: grid;
    }

    .calc-steps {
        justify-content: flex-start;
    }

    .calc-columns {
        grid-template-columns: minmax(0, 1fr);
    }

    .calc-details {
        grid-column: auto;
    }

    .calc-options {
        max-height: 252px;
    }

    .calc-form-grid {
        grid-template-columns: 1fr;
    }

    .calc-field-wide {
        grid-column: auto;
    }

    .calc-rate-box {
        grid-template-columns: 1fr 1fr;
    }

    .calc-rate-box > div:last-child {
        grid-column: 1 / -1;
    }

    .calc-steps span {
        font-size: 10px;
    }
}

[hidden],
.calc-form-group[hidden] {
    display: none !important;
}

html,
body {
    overflow-x: clip;
}

.calc-columns,
.calc-panel,
.calc-form,
.calc-form-group,
.calc-form-grid,
.calc-field,
.calc-consents {
    min-width: 0;
}

.calc-timer {
    display: block;
    margin-top: 1px;
    color: var(--success);
    font-size: 9px;
    font-weight: 600;
}

.calc-summary-side {
    display: flex;
    align-items: center;
    gap: 5px;
    min-width: 0;
}

.calc-summary-side > span:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.calc-summary-side small {
    color: var(--muted);
    font-size: 9px;
}

.calc-summary-icon {
    display: grid;
    flex: 0 0 auto;
    width: 19px;
    height: 19px;
    place-items: center;
    border-radius: 50%;
    background: #eef0ff;
    color: var(--accent-dark);
    font-size: 7px;
    font-weight: 800;
}

.calc-consents label {
    display: grid;
    grid-template-columns: 14px minmax(0, 1fr);
    align-items: start;
    gap: 6px;
}

.calc-consents input[type="checkbox"] {
    width: 14px;
    height: 14px;
    margin: 1px 0 0;
    accent-color: var(--accent);
}

.calc-consents label > span {
    min-width: 0;
    overflow-wrap: anywhere;
}

.calc-field input,
.calc-search input,
.calc-amount-line input {
    max-width: 100%;
}

.calc-details {
    overflow: hidden;
}

.calc-filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin: -1px 0 7px;
}

.calc-filter-chips button {
    padding: 4px 8px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    color: var(--muted);
    cursor: pointer;
    font-size: 10px;
    font-weight: 700;
}

.calc-filter-chips button.is-active {
    border-color: rgba(79, 70, 229, 0.2);
    background: #f0efff;
    color: var(--accent-dark);
}

@media (max-width: 760px) {
    .topbar {
        flex-wrap: wrap;
    }

    .topbar-actions {
        flex-wrap: wrap;
        gap: 8px 12px;
    }

    .section-tabs {
        gap: 4px;
    }

    .section-tabs a {
        padding: 8px 10px;
    }

    .calc-panel,
    .calc-columns,
    .calc-tabs,
    .calc-option,
    .calc-amount-box {
        max-width: 100%;
    }

    .calc-tabs {
        overflow: hidden;
    }

    .calc-tabs button {
        white-space: normal;
        overflow-wrap: anywhere;
    }

    .calc-option-badge {
        display: none;
    }

    .calc-panel-caption {
        max-width: 42%;
    }

    .calc-form,
    .calc-form-group,
    .calc-consents,
    .calc-summary,
    .calc-instructions {
        width: 100%;
        max-width: 100%;
    }
}

.calc-field select {
    width: 100%;
    min-width: 0;
    padding: 7px 8px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: #fff;
    color: var(--text);
    font: inherit;
    font-size: 12px;
    outline: none;
}

/* Refined amount and details hierarchy */
.calc-amount-box {
    padding: 11px 12px;
    border-color: transparent;
    background: #f7f8fc;
    box-shadow: inset 0 0 0 1px rgba(228, 232, 240, 0.9);
}

.calc-amount-box:focus-within {
    box-shadow: inset 0 0 0 1px rgba(81, 69, 229, 0.45), 0 0 0 3px rgba(81, 69, 229, 0.07);
}

.calc-amount-line {
    gap: 8px;
}

.calc-amount-line input {
    font-size: 28px;
    font-weight: 800;
}

.calc-amount-currency {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 7px;
    min-width: 108px;
    max-width: 155px;
    padding: 5px 7px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: #fff;
}

.calc-amount-currency .calc-icon {
    width: 28px;
    height: 28px;
    font-size: 9px;
}

.calc-amount-currency > div {
    display: grid;
    min-width: 0;
    gap: 1px;
}

.calc-amount-currency strong,
.calc-amount-currency small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.calc-amount-currency strong {
    font-size: 12px;
}

.calc-amount-currency small {
    color: var(--muted);
    font-size: 9px;
    font-weight: 500;
}

.calc-clear {
    width: 24px;
    height: 24px;
    background: transparent;
    color: #9aa5b5;
}

.calc-clear:hover {
    background: #e9edf4;
    color: var(--text);
}

.calc-limits {
    margin: -2px 0 10px;
    padding: 0 1px;
    font-size: 10px;
}

.calc-section-title {
    margin: 10px 0 6px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 750;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.calc-summary {
    border: 0;
    background: #f7f8fc;
    padding: 10px 11px;
}

.calc-summary-row.is-receive strong {
    color: var(--accent-dark);
    font-size: 15px;
    letter-spacing: -0.02em;
}

.calc-option {
    padding: 7px 8px;
    transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.calc-option:hover {
    transform: translateX(2px);
}

.calc-option .calc-icon {
    width: 32px;
    height: 32px;
    font-size: 9px;
}

.calc-option.is-selected .calc-icon {
    background: #e7e5ff;
    color: var(--accent-dark);
}

.calc-tabs button,
.calc-filter-chips button,
.button {
    transition: background 160ms ease, border-color 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.calc-instructions {
    border-color: transparent;
    background: #f7f8fc;
}

.calc-instructions summary {
    padding: 9px 11px;
}

.calc-instructions-body {
    padding: 0 11px 10px;
}

.calc-form-group {
    padding-top: 9px;
}

.calc-field input,
.calc-field select {
    min-height: 36px;
    padding: 8px 9px;
    border-color: #e4e8f0;
    background: #fbfcfe;
}

.calc-field input:focus,
.calc-field select:focus {
    background: #fff;
}

.calc-submit {
    min-height: 43px;
    margin-top: 2px;
    box-shadow: 0 10px 22px rgba(81, 69, 229, 0.2);
}

@media (max-width: 760px) {
    .calc-amount-currency {
        min-width: 92px;
        max-width: 112px;
    }

    .calc-amount-line input {
        font-size: 24px;
    }

    .calc-amount-currency small {
        display: none;
    }
}

@media (max-width: 430px) {
    .calc-amount-currency {
        min-width: 72px;
        padding: 4px 5px;
    }

    .calc-amount-currency small {
        display: none;
    }

    .calc-amount-line input {
        font-size: 22px;
    }
}

/* Final calculator composition */
.calc-columns {
    grid-template-columns: minmax(0, 3fr) minmax(0, 3fr) minmax(0, 4fr);
}

.calc-currency-trigger {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 4px;
    padding: 5px 7px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--accent-dark);
    cursor: pointer;
    font: inherit;
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
}

.calc-currency-trigger span:last-child {
    color: var(--muted);
    font-size: 13px;
    line-height: 1;
}

.calc-currency-trigger:hover {
    border-color: rgba(81, 69, 229, 0.3);
    background: #f7f6ff;
}

.calc-method-row {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    margin: -1px 0 7px;
    padding: 8px 9px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
}

.calc-method-row .calc-icon {
    width: 31px;
    height: 31px;
}

.calc-method-text {
    display: grid;
    min-width: 0;
    gap: 1px;
}

.calc-method-text strong,
.calc-method-text small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.calc-method-text strong {
    font-size: 12px;
}

.calc-method-text small {
    color: var(--muted);
    font-size: 10px;
}

.calc-method-change {
    margin-left: auto;
    padding: 4px 0 4px 6px;
    border: 0;
    background: transparent;
    color: var(--accent);
    cursor: pointer;
    font: inherit;
    font-size: 10px;
    font-weight: 750;
    white-space: nowrap;
}

.calc-method-change:hover {
    color: var(--accent-dark);
}

.calc-options {
    max-height: none;
    overflow: visible;
    padding-right: 0;
}

.calc-show-all {
    width: 100%;
    margin-top: 4px;
    padding: 7px 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--accent-dark);
    cursor: pointer;
    font: inherit;
    font-size: 10px;
    font-weight: 750;
}

.calc-show-all:hover {
    border-color: rgba(81, 69, 229, 0.24);
    background: #f7f6ff;
}

.calc-amount-line input {
    flex: 1 1 auto;
}

.calc-method-row + .calc-limits {
    margin-top: 0;
}

.calc-details {
    box-shadow: 0 18px 44px rgba(29, 48, 74, 0.09);
}

@media (max-width: 1120px) {
    .calc-columns {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    }
}

@media (max-width: 760px) {
    .calc-columns {
        grid-template-columns: minmax(0, 1fr);
    }

    .calc-method-change {
        font-size: 9px;
    }

    .calc-currency-trigger {
        font-size: 10px;
    }

    .calc-show-all {
        margin-top: 3px;
    }
}

.text-link.is-active {
    background: #eef0ff;
    color: var(--accent-dark);
    font-weight: 800;
}

.page-heading {
    margin: 2px 0 2px;
}

.page-heading h1 {
    margin: 0 0 5px;
    font-size: clamp(26px, 4vw, 38px);
    letter-spacing: -0.04em;
}

.page-card {
    max-width: 880px;
}

.page-form {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    margin-bottom: 14px;
}

.page-form .calc-field {
    flex: 1 1 auto;
    max-width: 460px;
}

.page-form .button {
    flex: 0 0 auto;
    min-height: 36px;
    padding: 8px 16px;
}

.legacy-hooks {
    display: none !important;
}

@media (max-width: 620px) {
    .page-form {
        align-items: stretch;
        flex-direction: column;
    }

    .page-form .calc-field {
        max-width: none;
    }

    .page-form .button {
        width: 100%;
    }
}

/* Hybrid Checkout */
.hybrid-page {
    --h-ink: #111827;
    --h-text: #1d2738;
    --h-muted: #738094;
    --h-line: #e4e9f1;
    --h-soft: #f6f8fb;
    --h-surface: #ffffff;
    --h-black: #111827;
    --h-danger: #b42318;
    --h-success: #12805c;
    display: grid;
    gap: 14px;
    color: var(--h-text);
}

.hybrid-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
}

.hybrid-header h1 {
    margin: 0 0 5px;
    color: var(--h-ink);
    font-size: clamp(28px, 4vw, 42px);
    letter-spacing: -0.045em;
    line-height: 1.05;
}

.hybrid-header .section-copy {
    max-width: 620px;
    margin: 0;
    color: var(--h-muted);
}

.hybrid-progress {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    justify-content: flex-end;
}

.hybrid-progress button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 10px;
    border: 1px solid var(--h-line);
    border-radius: 999px;
    background: var(--h-surface);
    color: var(--h-muted);
    cursor: pointer;
    font: inherit;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.hybrid-progress button span {
    color: #9aa4b2;
    font-size: 9px;
}

.hybrid-progress button.is-active {
    border-color: var(--h-black);
    background: var(--h-black);
    color: #fff;
}

.hybrid-progress button.is-active span {
    color: rgba(255, 255, 255, 0.66);
}

.hybrid-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(340px, 0.85fr);
    grid-template-areas:
        "exchange conditions"
        "data conditions"
        "review conditions"
        "success conditions";
    gap: 12px 16px;
    align-items: start;
}

#stage-exchange {
    grid-area: exchange;
}

#conditions-card {
    position: sticky;
    top: 14px;
    grid-area: conditions;
    align-self: start;
    max-height: calc(100vh - 28px);
    overflow-y: auto;
    overscroll-behavior: contain;
}

.hybrid-progress.hybrid-stage-nav {
    width: min(100%, 560px);
    margin: 14px 0 12px;
}

#stage-data {
    grid-area: data;
}

#stage-review {
    grid-area: review;
}

#order-success {
    grid-area: success;
}

.hybrid-main,
.hybrid-aside,
.hybrid-card,
.hybrid-summary-card {
    min-width: 0;
}

.hybrid-main {
    display: grid;
    gap: 12px;
}

.hybrid-card {
    padding: 18px;
    border: 1px solid var(--h-line);
    border-radius: 18px;
    background: var(--h-surface);
    box-shadow: 0 12px 34px rgba(17, 24, 39, 0.045);
}

.hybrid-section-head {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 16px;
}

.hybrid-section-head > div {
    flex: 1 1 auto;
    min-width: 0;
}

.hybrid-section-head h2 {
    margin: 0;
    color: var(--h-ink);
    font-size: 20px;
    letter-spacing: -0.025em;
}

.hybrid-section-head p {
    margin: 2px 0 0;
    color: var(--h-muted);
    font-size: 12px;
}

.hybrid-section-state {
    color: #a0a9b7;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.hybrid-step-number {
    display: grid;
    flex: 0 0 auto;
    width: 33px;
    height: 33px;
    place-items: center;
    border-radius: 50%;
    background: var(--h-ink);
    color: #fff;
    font-size: 10px;
    font-weight: 800;
}

.hybrid-direction-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 34px minmax(0, 1fr);
    gap: 8px;
    align-items: stretch;
    margin-bottom: 10px;
}

.hybrid-currency-card {
    display: grid;
    gap: 5px;
    min-width: 0;
    padding: 11px 12px;
    border: 1px solid var(--h-line);
    border-radius: 12px;
    background: var(--h-surface);
    color: var(--h-text);
    cursor: pointer;
    font: inherit;
    text-align: left;
    transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.hybrid-currency-card:hover {
    border-color: #c9d1de;
    background: #fcfdff;
    transform: translateY(-1px);
}

.hybrid-label,
.hybrid-currency-card .hybrid-label {
    color: var(--h-muted);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.hybrid-currency-main {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
}

.hybrid-icon {
    display: grid;
    flex: 0 0 auto;
    width: 35px;
    height: 35px;
    place-items: center;
    border-radius: 50%;
    background: #eef1f6;
    color: var(--h-ink);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.hybrid-currency-text {
    display: grid;
    min-width: 0;
    gap: 1px;
}

.hybrid-currency-text strong,
.hybrid-currency-text small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hybrid-currency-text strong {
    font-size: 13px;
}

.hybrid-currency-text small {
    color: var(--h-muted);
    font-size: 10px;
}

.hybrid-chevron {
    margin-left: auto;
    color: #9aa4b2;
    font-size: 16px;
}

.hybrid-swap {
    align-self: center;
    width: 34px;
    height: 34px;
    border: 1px solid var(--h-line);
    border-radius: 50%;
    background: var(--h-surface);
    color: var(--h-ink);
    cursor: pointer;
    font: inherit;
    font-size: 16px;
    transition: background 160ms ease, transform 160ms ease;
}

.hybrid-swap:hover {
    background: var(--h-soft);
    transform: rotate(180deg);
}

.hybrid-amount-grid {
    display: grid;
    margin-bottom: 10px;
    padding: 2px 14px;
    border: 1px solid var(--h-line);
    border-radius: 15px;
    background: var(--h-surface);
}

.hybrid-amount-card {
    display: grid;
    min-width: 0;
    gap: 2px;
    padding: 12px 0;
}

.hybrid-amount-card + .hybrid-amount-card {
    border-top: 1px solid var(--h-line);
}

.hybrid-amount-label {
    color: var(--h-muted);
    font-size: 11px;
    font-weight: 600;
}

.hybrid-amount-line {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.hybrid-amount-line input {
    min-width: 0;
    flex: 1 1 auto;
    width: 100%;
    padding: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--h-ink);
    font: inherit;
    font-size: 34px;
    font-weight: 750;
    letter-spacing: -0.045em;
    font-variant-numeric: tabular-nums;
    appearance: textfield;
    -moz-appearance: textfield;
}

.hybrid-amount-line input::-webkit-outer-spin-button,
.hybrid-amount-line input::-webkit-inner-spin-button {
    margin: 0;
    -webkit-appearance: none;
    appearance: none;
}

.hybrid-amount-currency {
    flex: 0 0 auto;
    padding: 4px 8px;
    border-radius: 999px;
    background: var(--h-soft);
    color: var(--h-text);
    font-size: 12px;
    font-weight: 750;
    letter-spacing: 0.01em;
}

.hybrid-amount-limits {
    margin-top: 2px;
    color: var(--h-muted);
    font-size: 10px;
    line-height: 1.35;
}

.hybrid-amount-error {
    margin-top: 3px;
    color: var(--h-danger);
    font-size: 10px;
    font-weight: 600;
    line-height: 1.35;
}

.hybrid-amount-card.is-invalid {
    margin: 2px -8px;
    padding-right: 8px;
    padding-left: 8px;
    border-radius: 10px;
    background: #fff6f5;
    box-shadow: inset 0 0 0 1px #fda29b;
}

.hybrid-note {
    color: var(--h-muted);
    font-size: 10px;
    line-height: 1.4;
}

.hybrid-note:empty {
    display: none;
}

.hybrid-note {
    margin: 5px 0 0;
}

.hybrid-note.is-error {
    color: var(--h-danger);
}

.hybrid-warning {
    margin: 0 0 8px;
    padding: 9px 10px;
    border-radius: 9px;
    background: #fff4f2;
    color: var(--h-danger);
    font-size: 11px;
    line-height: 1.4;
}

.hybrid-info-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1px;
    margin-top: 8px;
    overflow: hidden;
    border: 1px solid var(--h-line);
    border-radius: 11px;
    background: var(--h-line);
}

.hybrid-info-cell {
    display: grid;
    min-width: 0;
    gap: 2px;
    padding: 9px 10px;
    background: var(--h-surface);
}

.hybrid-info-cell > span {
    color: var(--h-muted);
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.hybrid-info-cell strong {
    overflow: hidden;
    color: var(--h-ink);
    font-size: 12px;
    text-overflow: ellipsis;
}

.hybrid-timer {
    color: var(--h-success);
    font-size: 9px;
}

.hybrid-instructions {
    margin-top: 9px;
    border: 1px solid var(--h-line);
    border-radius: 10px;
    background: #fbfcfe;
}

.hybrid-instructions summary {
    padding: 10px 11px;
    cursor: pointer;
    color: var(--h-ink);
    font-size: 11px;
    font-weight: 750;
}

.hybrid-instructions-body {
    padding: 0 11px 10px;
    color: var(--h-muted);
    font-size: 11px;
    line-height: 1.5;
}

.hybrid-instructions-body ol {
    margin: 6px 0;
    padding-left: 18px;
}

.hybrid-instructions-body strong {
    color: var(--h-text);
}

.hybrid-form-section {
    display: grid;
    gap: 8px;
    padding: 12px 0;
    border-top: 1px solid var(--h-line);
}

.hybrid-form-section:first-of-type {
    border-top: 0;
    padding-top: 0;
}

.hybrid-form-title {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
}

.hybrid-form-title h3 {
    margin: 0;
    color: var(--h-ink);
    font-size: 13px;
    letter-spacing: -0.01em;
}

.hybrid-form-title span {
    color: var(--h-muted);
    font-size: 10px;
}

.hybrid-field-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 8px;
}

.hybrid-field-wide {
    grid-column: 1 / -1;
}

.hybrid-field {
    display: grid;
    min-width: 0;
    gap: 4px;
}

.hybrid-field > span {
    color: var(--h-muted);
    font-size: 10px;
    font-weight: 700;
}

.hybrid-field > span em {
    font-style: normal;
    font-weight: 500;
    opacity: 0.8;
}

.hybrid-field input,
.hybrid-field select {
    width: 100%;
    min-width: 0;
    min-height: 38px;
    padding: 8px 10px;
    border: 1px solid var(--h-line);
    border-radius: 9px;
    background: #fbfcfe;
    color: var(--h-text);
    font: inherit;
    font-size: 12px;
    outline: none;
    transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.hybrid-field input:focus,
.hybrid-field select:focus {
    border-color: var(--h-black);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(17, 24, 39, 0.07);
}

.hybrid-field-error {
    min-height: 0;
    color: var(--h-danger);
    font-size: 9px;
}

.hybrid-field-error:empty {
    display: none;
}

.hybrid-errors {
    margin-bottom: 10px;
    padding: 9px 10px;
    border-radius: 9px;
    background: #fff4f2;
    color: var(--h-danger);
    font-size: 11px;
    line-height: 1.4;
}

.hybrid-check {
    display: grid;
    grid-template-columns: 15px minmax(0, 1fr);
    align-items: start;
    gap: 7px;
    color: var(--h-muted);
    font-size: 10px;
    line-height: 1.4;
    cursor: pointer;
}

.hybrid-check input {
    width: 15px;
    height: 15px;
    margin: 0;
    accent-color: var(--h-black);
}

.hybrid-check a {
    color: var(--h-ink);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.hybrid-check-muted {
    margin-top: 9px;
    color: #8b96a5;
}

.hybrid-consents {
    display: grid;
    gap: 7px;
    margin: 12px 0;
    padding-top: 12px;
    border-top: 1px solid var(--h-line);
}

.hybrid-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 44px;
    margin-top: 10px;
    padding: 10px 14px;
    border: 1px solid var(--h-black);
    border-radius: 10px;
    background: var(--h-black);
    color: #fff;
    cursor: pointer;
    font: inherit;
    font-size: 13px;
    font-weight: 800;
    text-align: center;
    text-decoration: none;
    transition: background 160ms ease, transform 160ms ease;
}

.hybrid-submit:hover {
    background: #283244;
    transform: translateY(-1px);
}

.hybrid-secondary-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 9px 14px;
    border: 1px solid var(--h-line);
    border-radius: 10px;
    color: var(--h-ink);
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
}

.hybrid-aside {
    position: sticky;
    top: 14px;
    display: grid;
    gap: 10px;
}

.hybrid-summary-card {
    padding: 16px;
    border: 1px solid var(--h-line);
    border-radius: 18px;
    background: var(--h-surface);
    box-shadow: 0 14px 38px rgba(17, 24, 39, 0.055);
}

.hybrid-summary-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: var(--h-muted);
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.hybrid-summary-head span:last-child {
    max-width: 155px;
    overflow: hidden;
    color: #9aa4b2;
    font-weight: 600;
    text-align: right;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hybrid-summary-rate {
    display: grid;
    gap: 2px;
    margin: 14px 0 10px;
}

.hybrid-summary-rate strong {
    overflow: hidden;
    color: var(--h-ink);
    font-size: 18px;
    letter-spacing: -0.03em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hybrid-summary-rate small {
    color: var(--h-muted);
    font-size: 10px;
}

.hybrid-summary-line {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 7px 0;
    border-top: 1px solid var(--h-line);
    font-size: 12px;
}

.hybrid-summary-line span {
    color: var(--h-muted);
}

.hybrid-summary-line strong {
    max-width: 68%;
    overflow: hidden;
    color: var(--h-ink);
    text-align: right;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hybrid-summary-line.is-receive strong {
    font-size: 15px;
}

.hybrid-summary-arrow {
    color: #a7b0be;
    font-size: 13px;
    text-align: center;
}

.hybrid-summary-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 4px 10px;
    margin: 9px 0 13px;
    color: var(--h-muted);
    font-size: 9px;
}

.hybrid-helper-button {
    width: 100%;
    min-height: 46px;
    padding: 11px 14px;
    border: 1px solid var(--h-black);
    border-radius: 11px;
    background: var(--h-black);
    color: #fff;
    cursor: pointer;
    font: inherit;
    font-size: 13px;
    font-weight: 800;
    transition: background 160ms ease, transform 160ms ease;
}

.hybrid-helper-button:hover {
    background: #283244;
    transform: translateY(-1px);
}

.hybrid-action-panel {
    position: fixed;
    z-index: 950;
    left: max(12px, calc((100vw - 1204px) / 2));
    bottom: 14px;
    display: flex;
    align-items: center;
    gap: 14px;
    width: min(729px, calc(100vw - 24px));
    padding: 9px 10px;
    border: 1px solid var(--h-line);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 16px 42px rgba(17, 24, 39, 0.16);
    backdrop-filter: blur(10px);
}

.hybrid-action-panel .hybrid-helper-button {
    width: auto;
    min-height: 44px;
    flex: 0 0 260px;
}

.hybrid-action-panel .hybrid-helper-note {
    flex: 1 1 auto;
    margin: 0;
    font-size: 11px;
    text-align: left;
}

@media (min-width: 701px) {
    .hybrid-page {
        padding-bottom: 96px;
    }
}

.hybrid-helper-note {
    margin: 8px 0 0;
    color: var(--h-muted);
    font-size: 10px;
    line-height: 1.4;
    text-align: center;
}

.hybrid-review-section {
    display: grid;
    gap: 2px;
    padding: 11px 0;
    border-top: 1px solid var(--h-line);
}

.hybrid-review-section:first-child {
    padding-top: 0;
    border-top: 0;
}

.hybrid-review-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 5px;
}

.hybrid-review-head h3 {
    margin: 0;
    color: var(--h-ink);
    font-size: 13px;
}

.hybrid-edit-link {
    border: 0;
    background: transparent;
    color: var(--h-muted);
    cursor: pointer;
    font: inherit;
    font-size: 10px;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.hybrid-edit-link:hover {
    color: var(--h-ink);
}

.hybrid-review-row {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 4px 0;
    font-size: 11px;
}

.hybrid-review-row span {
    color: var(--h-muted);
}

.hybrid-review-row strong {
    max-width: 65%;
    color: var(--h-text);
    text-align: right;
    overflow-wrap: anywhere;
}

.hybrid-success {
    text-align: center;
}

.hybrid-success-icon {
    display: grid;
    width: 54px;
    height: 54px;
    margin: 0 auto 10px;
    place-items: center;
    border-radius: 50%;
    background: #e7f7ef;
    color: var(--h-success);
    font-size: 25px;
    font-weight: 700;
}

.hybrid-success h2 {
    margin: 0 0 5px;
    color: var(--h-ink);
}

.hybrid-success p {
    color: var(--h-muted);
    font-size: 12px;
}

.hybrid-success-tracking {
    color: var(--h-text) !important;
}

.hybrid-success-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    max-width: 440px;
    margin: 16px auto 0;
}

.hybrid-picker {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: grid;
    place-items: center;
    padding: 18px;
}

.hybrid-picker-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.42);
    backdrop-filter: blur(3px);
}

.hybrid-picker-sheet {
    position: relative;
    display: grid;
    width: min(560px, 100%);
    max-height: min(720px, 88vh);
    grid-template-rows: auto auto auto minmax(0, 1fr);
    overflow: hidden;
    border: 1px solid var(--h-line);
    border-radius: 18px;
    background: var(--h-surface);
    box-shadow: 0 24px 80px rgba(15, 23, 42, 0.22);
}

.hybrid-picker-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    padding: 16px 17px 9px;
}

.hybrid-picker-head h2 {
    margin: 0;
    color: var(--h-ink);
    font-size: 20px;
    letter-spacing: -0.03em;
}

.hybrid-picker-close {
    width: 30px;
    height: 30px;
    border: 1px solid var(--h-line);
    border-radius: 50%;
    background: #fff;
    color: var(--h-muted);
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
}

.hybrid-picker-tabs {
    display: flex;
    gap: 4px;
    padding: 0 17px 9px;
}

.hybrid-picker-tabs button {
    flex: 1 1 0;
    padding: 7px 6px;
    border: 1px solid var(--h-line);
    border-radius: 8px;
    background: #fff;
    color: var(--h-muted);
    cursor: pointer;
    font: inherit;
    font-size: 10px;
    font-weight: 700;
    white-space: nowrap;
}

.hybrid-picker-tabs button span {
    opacity: 0.65;
}

.hybrid-picker-tabs button.is-active {
    border-color: var(--h-black);
    background: var(--h-black);
    color: #fff;
}

.hybrid-picker-options {
    display: grid;
    align-content: start;
    gap: 3px;
    overflow-y: auto;
    padding: 0 10px 12px;
    overscroll-behavior: contain;
}

.hybrid-picker-option {
    display: flex;
    align-items: center;
    gap: 9px;
    width: 100%;
    min-width: 0;
    padding: 8px 9px;
    border: 1px solid transparent;
    border-radius: 10px;
    background: transparent;
    color: var(--h-text);
    cursor: pointer;
    font: inherit;
    text-align: left;
    transition: background 140ms ease, border-color 140ms ease;
}

.hybrid-picker-option:hover {
    background: var(--h-soft);
}

.hybrid-picker-option.is-selected {
    border-color: #c9d1de;
    background: #f1f4f8;
}

.hybrid-picker-option-text {
    display: grid;
    min-width: 0;
    gap: 1px;
}

.hybrid-picker-option-text strong,
.hybrid-picker-option-text small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hybrid-picker-option-text strong {
    font-size: 12px;
}

.hybrid-picker-option-text small {
    color: var(--h-muted);
    font-size: 10px;
}

.hybrid-picker-reserve {
    margin-left: auto;
    color: var(--h-muted);
    font-size: 9px;
    white-space: nowrap;
}

.hybrid-picker-empty {
    padding: 20px 10px;
    color: var(--h-muted);
    font-size: 12px;
    text-align: center;
}

.hybrid-picker-open {
    overflow: hidden;
}

.is-attention {
    animation: hybrid-attention 900ms ease;
}

@keyframes hybrid-attention {
    0%, 100% { box-shadow: 0 0 0 0 rgba(17, 24, 39, 0); }
    30% { box-shadow: 0 0 0 4px rgba(17, 24, 39, 0.12); }
}

.is-field-attention {
    animation: field-error-pulse 950ms ease 3;
}

.is-field-attention,
.has-field-error {
    border-color: #f04438 !important;
    background-color: #fff5f4 !important;
    box-shadow: 0 0 0 3px rgba(240, 68, 56, 0.13);
}

.hybrid-amount-line input.is-field-attention,
.hybrid-amount-line input.has-field-error {
    padding: 2px 5px;
    margin: -2px -5px;
    border-radius: 8px;
}

.hybrid-amount-card.is-field-attention {
    margin: 2px -8px;
    padding-right: 8px;
    padding-left: 8px;
    border-radius: 10px;
    background: #fff6f5;
    box-shadow: inset 0 0 0 1px #fda29b;
    animation: field-error-pulse 950ms ease 3;
}

.is-valid-field {
    border-color: #86c9a8 !important;
    box-shadow: 0 0 0 2px rgba(18, 128, 92, 0.09) !important;
}

@keyframes field-error-pulse {
    0%, 100% { box-shadow: 0 0 0 3px rgba(240, 68, 56, 0.10); }
    50% { box-shadow: 0 0 0 6px rgba(240, 68, 56, 0.26); }
}

@media (prefers-reduced-motion: reduce) {
    .is-attention,
    .is-field-attention,
    .hybrid-amount-card.is-field-attention {
        animation: none;
    }
}

[hidden] {
    display: none !important;
}

@media (max-width: 1240px) {
    .hybrid-layout {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas:
            "exchange"
            "conditions"
            "data"
            "review"
            "success";
    }

    #conditions-card {
        position: static;
        max-height: none;
        overflow: visible;
    }

    .hybrid-action-panel {
        right: 12px;
        left: 12px;
        width: auto;
        max-width: none;
    }

    .hybrid-summary-card {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 190px;
        gap: 0 16px;
        align-items: center;
    }

    .hybrid-summary-head,
    .hybrid-summary-rate,
    .hybrid-summary-line,
    .hybrid-summary-arrow,
    .hybrid-summary-meta,
    .hybrid-helper-note {
        grid-column: 1;
    }

    .hybrid-helper-button {
        grid-column: 2;
        grid-row: 1 / span 6;
        align-self: center;
    }
}

@media (max-width: 700px) {
    .hybrid-summary-card {
        display: block;
    }

    .hybrid-helper-button {
        grid-column: auto;
        grid-row: auto;
    }
}

@media (max-width: 700px) {
    .hybrid-page {
        padding-bottom: 116px;
    }

    .hybrid-header {
        align-items: stretch;
        flex-direction: column;
    }

    .hybrid-progress {
        justify-content: flex-start;
    }

    .hybrid-progress button {
        flex: 1 1 auto;
        justify-content: center;
        font-size: 10px;
    }

    .hybrid-card {
        padding: 14px;
        border-radius: 15px;
    }

    .hybrid-direction-row {
        grid-template-columns: minmax(0, 1fr) 30px minmax(0, 1fr);
    }

    .hybrid-currency-card {
        padding: 9px;
    }

    .hybrid-currency-main {
        gap: 6px;
    }

    .hybrid-icon {
        width: 30px;
        height: 30px;
        font-size: 8px;
    }

    .hybrid-currency-text strong {
        font-size: 11px;
    }

    .hybrid-amount-grid {
        padding: 2px 12px;
    }

    .hybrid-amount-line input {
        font-size: 30px;
    }

    .hybrid-amount-currency {
        padding: 3px 7px;
        font-size: 11px;
    }

    .hybrid-info-grid {
        grid-template-columns: 1fr 1fr;
    }

    .hybrid-info-cell:last-child {
        grid-column: 1 / -1;
    }

    .hybrid-field-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .hybrid-field-wide {
        grid-column: auto;
    }

    .hybrid-summary-card {
        display: block;
        padding: 13px;
    }

    .hybrid-summary-rate {
        margin: 9px 0 6px;
    }

    .hybrid-action-panel {
        right: 10px;
        bottom: max(10px, env(safe-area-inset-bottom));
        left: 10px;
        padding: 8px;
    }

    .hybrid-action-panel .hybrid-helper-button {
        width: 100%;
        flex: 1 1 auto;
        min-height: 48px;
    }

    .hybrid-action-panel .hybrid-helper-note {
        display: none;
    }

    .hybrid-picker {
        padding: 0;
        align-items: end;
    }

    .hybrid-picker-sheet {
        width: 100%;
        max-height: 88vh;
        border-radius: 18px 18px 0 0;
    }

    .hybrid-amount-line input {
        font-size: 30px;
    }

    .hybrid-success-actions {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 380px) {
    .hybrid-direction-row {
        grid-template-columns: minmax(0, 1fr);
    }

    .hybrid-swap {
        justify-self: center;
        transform: rotate(90deg);
    }

    .hybrid-swap:hover {
        transform: rotate(270deg);
    }
}

.hybrid-icon.has-image {
    padding: 4px;
    overflow: hidden;
    background: #fff;
    box-shadow: inset 0 0 0 1px var(--h-line);
}

.hybrid-icon.has-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Direction-first exchange and visible terms */
.hybrid-progress-panel {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 3px;
    width: min(100%, 390px);
    padding: 4px;
    border: 1px solid var(--h-line);
    border-radius: 13px;
    background: #eef2f7;
}

.hybrid-progress-panel button {
    justify-content: center;
    min-width: 0;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: #7b8798;
}

.hybrid-progress-panel button.is-active {
    background: #172033;
    color: #fff;
}

.hybrid-progress-panel button.is-complete:not(.is-active) {
    background: rgba(18, 128, 92, 0.08);
    color: #0f766e;
}

.hybrid-progress-panel button.is-error {
    background: #fff1ef;
    color: var(--h-danger);
}

.hybrid-progress-panel button.is-complete::after {
    content: '✓';
    margin-left: 2px;
    font-size: 11px;
}

.hybrid-direction-cta {
    display: flex;
    align-items: center;
    gap: 11px;
    width: 100%;
    margin-bottom: 10px;
    padding: 14px;
    border: 1px solid var(--h-line);
    border-radius: 13px;
    background: #fbfcfe;
    color: var(--h-ink);
    cursor: pointer;
    font: inherit;
    text-align: left;
    transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.hybrid-direction-cta:hover {
    border-color: #b9c3d2;
    background: #fff;
    transform: translateY(-1px);
}

.hybrid-direction-cta-icon {
    display: grid;
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    place-items: center;
    border-radius: 50%;
    background: #eef1f6;
    color: var(--h-ink);
    font-size: 18px;
}

.hybrid-direction-cta > span:nth-child(2) {
    display: grid;
    min-width: 0;
    gap: 2px;
}

.hybrid-direction-cta strong {
    font-size: 13px;
}

.hybrid-direction-cta small {
    color: var(--h-muted);
    font-size: 10px;
}

.hybrid-direction-cta-arrow {
    margin-left: auto;
    color: #8b96a5;
    font-size: 18px;
}

.hybrid-terms {
    margin-top: 12px;
    padding: 12px 0 0;
    border-top: 1px solid var(--h-line);
}

.hybrid-terms-head {
    margin-bottom: 4px;
}

.hybrid-terms-head h2,
.hybrid-terms-head h3 {
    margin: 0;
    color: var(--h-ink);
    font-size: 14px;
    letter-spacing: -0.02em;
}

.hybrid-conditions {
    min-width: 0;
}

.hybrid-conditions .hybrid-terms {
    margin: 0;
    padding: 0;
    border-top: 0;
}

.hybrid-conditions .hybrid-terms-head {
    margin-bottom: 8px;
}

.hybrid-conditions .hybrid-terms-head h2 {
    font-size: 16px;
}

.hybrid-condition-direction {
    display: grid;
    gap: 2px;
    padding-bottom: 9px;
    border-bottom: 1px solid #eef1f5;
}

.hybrid-condition-direction span {
    color: var(--h-muted);
    font-size: 10px;
}

.hybrid-condition-direction strong {
    overflow-wrap: anywhere;
    color: var(--h-ink);
    font-size: 13px;
    line-height: 1.35;
}

.hybrid-condition-totals {
    display: grid;
    gap: 4px;
    padding: 9px 0;
    border-bottom: 1px solid #eef1f5;
}

.hybrid-condition-totals > div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: var(--h-muted);
    font-size: 11px;
}

.hybrid-condition-totals strong {
    color: var(--h-ink);
    font-size: 12px;
    font-variant-numeric: tabular-nums;
    text-align: right;
}

.hybrid-condition-section {
    margin-top: 2px;
    padding-top: 10px;
    border-top: 1px solid #eef1f5;
}

.hybrid-condition-section h3 {
    margin: 0 0 5px;
    color: var(--h-ink);
    font-size: 12px;
}

.hybrid-conditions .hybrid-instructions-body {
    padding: 0;
    color: var(--h-muted);
    font-size: 11px;
    line-height: 1.55;
}

.hybrid-conditions .hybrid-instructions-body ol {
    display: grid;
    gap: 4px;
    margin: 0;
    padding-left: 17px;
}

.hybrid-conditions .hybrid-warning {
    margin-top: 8px;
}

.hybrid-conditions .hybrid-helper-button {
    margin-top: 12px;
}

.hybrid-terms-list {
    margin: 0;
}

.hybrid-term-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.55fr);
    align-items: baseline;
    gap: 18px;
    padding: 8px 0;
    border-top: 1px solid #eef1f5;
}

.hybrid-term-row:first-child {
    border-top: 0;
}

.hybrid-term-row dt {
    margin: 0;
    color: var(--h-muted);
    font-size: 11px;
    line-height: 1.4;
}

.hybrid-term-row dd {
    margin: 0;
    overflow-wrap: anywhere;
    color: var(--h-ink);
    font-size: 12px;
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    line-height: 1.45;
    text-align: right;
}

.hybrid-term-row.is-rate {
    align-items: center;
    padding: 7px 0 10px;
}

.hybrid-term-row.is-rate dd {
    font-size: 15px;
    font-weight: 750;
    letter-spacing: -0.02em;
    line-height: 1.35;
}

.hybrid-term-row dd.is-unavailable {
    color: var(--h-muted);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0;
}

.hybrid-rate-status {
    display: flex;
    margin-top: 5px;
    padding-top: 8px;
    border-top: 1px solid #eef1f5;
    color: var(--h-muted);
    font-size: 9px;
}

.hybrid-rate-refresh {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
    font: inherit;
    font-size: inherit;
}

.hybrid-rate-refresh:hover {
    color: var(--h-ink);
}

.hybrid-rate-refresh svg {
    width: 12px;
    height: 12px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.9;
}

.hybrid-rate-status.is-error {
    color: var(--h-danger);
}

.hybrid-picker-direction {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 9px;
    align-items: center;
}

.hybrid-picker-pair {
    display: flex;
    align-items: center;
    gap: 2px;
}

.hybrid-picker-pair .hybrid-icon {
    width: 27px;
    height: 27px;
    font-size: 7px;
}

.hybrid-picker-arrow {
    color: #9aa4b2;
    font-size: 10px;
}

.hybrid-picker-meta {
    display: grid;
    min-width: 120px;
    gap: 1px;
    text-align: right;
}

.hybrid-picker-meta strong {
    color: var(--h-ink);
    font-size: 10px;
    line-height: 1.3;
}

.hybrid-picker-meta small {
    color: var(--h-muted);
    font-size: 9px;
}

@media (max-width: 700px) {
    .hybrid-progress.hybrid-stage-nav {
        width: 100%;
        margin: 10px 0;
        padding: 3px;
    }

    .hybrid-progress-panel button {
        min-height: 38px;
        padding: 6px 4px;
        font-size: 10px;
    }

    .hybrid-progress-panel button span {
        font-size: 9px;
    }

    .hybrid-term-row {
        gap: 12px;
        padding: 8px 0;
    }

    .hybrid-term-row.is-rate dd {
        font-size: 14px;
    }

    .hybrid-picker-direction {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .hybrid-picker-meta {
        grid-column: 2;
        min-width: 0;
        text-align: left;
    }
}

@media (max-width: 380px) {
    .hybrid-progress-panel button {
        padding: 6px 4px;
        font-size: 10px;
    }
}

/* Stage identities */
.hybrid-progress-panel button.is-active:not(.is-complete) {
    background: #172033;
    color: #fff;
}

.hybrid-progress-panel button.is-complete {
    background: #ecfdf5;
    color: #047857;
    box-shadow: inset 0 0 0 1px #a7f3d0;
}

.hybrid-progress-panel button.is-complete span {
    color: #059669;
}

.hybrid-progress-panel button.is-active.is-complete {
    box-shadow: inset 0 0 0 2px #10b981;
}

.hybrid-progress-panel button.is-complete::after {
    color: #059669;
}

.hybrid-progress-panel button.is-error {
    background: #fff1ef;
    color: var(--h-danger);
}

/* Multi-filter direction picker */
.hybrid-picker-sheet {
    display: flex;
    flex-direction: column;
    grid-template-rows: none;
}

.hybrid-picker-side-switch {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3px;
    margin: 0 17px 9px;
    padding: 3px;
    border-radius: 9px;
    background: #eef2f7;
}

.hybrid-picker-side-switch button {
    padding: 7px 8px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: var(--h-muted);
    cursor: pointer;
    font: inherit;
    font-size: 11px;
    font-weight: 750;
}

.hybrid-picker-side-switch button.is-active {
    background: #fff;
    color: var(--h-ink);
    box-shadow: 0 1px 5px rgba(17, 24, 39, 0.08);
}

.hybrid-picker-filter-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 0 17px 5px;
}

.hybrid-picker-filter-head strong {
    color: var(--h-ink);
    font-size: 11px;
}

.hybrid-picker-reset {
    padding: 4px 6px;
    border: 0;
    background: transparent;
    color: var(--h-muted);
    cursor: pointer;
    font: inherit;
    font-size: 9px;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.hybrid-picker-reset:hover {
    color: var(--h-ink);
}

.hybrid-picker-search-toggle {
    display: grid;
    width: 30px;
    height: 30px;
    flex: 0 0 auto;
    place-items: center;
    padding: 0;
    border: 1px solid var(--h-line);
    border-radius: 50%;
    background: #fff;
    color: var(--h-muted);
    cursor: pointer;
}

.hybrid-picker-search-toggle svg {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-width: 2;
}

.hybrid-picker-search-toggle:hover,
.hybrid-picker-search-toggle.is-active {
    border-color: var(--h-ink);
    color: var(--h-ink);
}

.hybrid-picker-search-row {
    display: flex;
    gap: 6px;
    padding: 0 17px 8px;
}

.hybrid-picker-search-row[hidden] {
    display: none;
}

.hybrid-picker-search-row input {
    width: 100%;
    min-width: 0;
    min-height: 36px;
    flex: 1 1 auto;
    padding: 7px 10px;
    border: 1px solid var(--h-line);
    border-radius: 9px;
    background: #fbfcfe;
    color: var(--h-text);
    font: inherit;
    font-size: 12px;
    outline: none;
}

.hybrid-picker-search-row input:focus {
    border-color: var(--h-ink);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(17, 24, 39, 0.07);
}

.hybrid-picker-search-row input::-webkit-search-cancel-button,
.hybrid-picker-search-row input::-webkit-search-decoration {
    display: none;
}

.hybrid-picker-search-close {
    display: grid;
    width: 36px;
    height: 36px;
    flex: 0 0 auto;
    place-items: center;
    padding: 0;
    border: 1px solid var(--h-line);
    border-radius: 9px;
    background: #fff;
    color: var(--h-muted);
    cursor: pointer;
    font: inherit;
    font-size: 18px;
    line-height: 1;
}

.hybrid-picker-search-close:hover {
    color: var(--h-ink);
}

.hybrid-picker-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    padding: 0 17px 9px;
}

.hybrid-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 9px;
    border: 1px solid var(--h-line);
    border-radius: 999px;
    background: #fff;
    color: var(--h-text);
    cursor: pointer;
    font: inherit;
    font-size: 10px;
    font-weight: 750;
}

.hybrid-chip small {
    color: var(--h-muted);
    font-size: 8px;
    font-weight: 600;
}

.hybrid-chip:hover {
    border-color: #b9c3d2;
}

.hybrid-chip.is-selected {
    border-color: var(--h-ink);
    background: var(--h-ink);
    color: #fff;
}

.hybrid-chip.is-selected small {
    color: rgba(255, 255, 255, 0.65);
}

.hybrid-picker-method-head {
    padding-top: 0;
}

.hybrid-picker-methods {
    display: grid;
    flex: 0 0 auto;
    gap: 7px;
    overflow: visible;
    padding: 0 17px 9px;
}

.hybrid-method-group {
    display: grid;
    gap: 4px;
}

.hybrid-method-group-title {
    color: #929dab;
    font-size: 8px;
    font-weight: 800;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.hybrid-method-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.hybrid-chip-method {
    display: inline-grid;
    gap: 1px;
    border-radius: 8px;
    text-align: left;
}

.hybrid-chip-method small {
    font-size: 8px;
}

.hybrid-picker-result-head {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 0 17px 6px;
    color: var(--h-muted);
    font-size: 9px;
}

.hybrid-picker-options {
    flex: 1 1 auto;
    min-height: 0;
}

.hybrid-picker-empty {
    display: grid;
    justify-items: center;
    gap: 9px;
    padding: 22px 12px;
    color: var(--h-muted);
    font-size: 11px;
    text-align: center;
}

.hybrid-picker-empty strong {
    color: var(--h-text);
    font-size: 12px;
}

.hybrid-picker-empty .hybrid-picker-reset {
    color: var(--h-ink);
}

.hybrid-currency-chip {
    flex-direction: column;
    align-items: flex-start;
    gap: 1px;
    min-width: 82px;
}

.hybrid-currency-chip strong {
    color: inherit;
    font-size: 12px;
}

.hybrid-currency-chip small {
    font-size: 8px;
}

.hybrid-chip-method {
    display: flex;
    align-items: center;
    gap: 7px;
}

.hybrid-chip-method .hybrid-icon {
    width: 26px;
    height: 26px;
    flex: 0 0 auto;
    font-size: 7px;
}

.hybrid-method-text {
    display: grid;
    min-width: 0;
    gap: 1px;
}

.hybrid-method-text strong {
    overflow: hidden;
    color: inherit;
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hybrid-method-text small {
    overflow: hidden;
    color: var(--h-muted);
    font-size: 8px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 700px) {
    .hybrid-picker-sheet {
        display: block;
        width: 100%;
        height: 100dvh;
        max-height: 100dvh;
        overflow-y: auto;
        border-radius: 0;
        padding-top: env(safe-area-inset-top);
        padding-bottom: max(18px, env(safe-area-inset-bottom));
        overscroll-behavior: contain;
    }

    .hybrid-picker-head {
        position: sticky;
        top: 0;
        z-index: 5;
        padding-top: 10px;
        padding-bottom: 8px;
        background: var(--h-surface);
    }

    .hybrid-picker-side-switch {
        margin-bottom: 9px;
    }

    .hybrid-picker-side-switch button {
        min-height: 40px;
        font-size: 14px;
    }

    .hybrid-picker-filter-head {
        padding-top: 0;
    }

    .hybrid-picker-filter-head strong {
        font-size: 14px;
    }

    .hybrid-picker-chips {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        overflow: visible;
        padding-bottom: 10px;
    }

    .hybrid-currency-chip {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        min-width: 0;
        min-height: 58px;
        padding: 10px 12px;
        border-radius: 12px;
    }

    .hybrid-currency-chip strong {
        font-size: 18px;
        letter-spacing: -0.03em;
    }

    .hybrid-currency-chip small {
        max-width: 78px;
        font-size: 9px;
        line-height: 1.2;
        text-align: right;
    }

    .hybrid-picker-methods {
        display: block;
        max-height: none;
        overflow: visible;
        padding-bottom: 10px;
    }

    .hybrid-method-group {
        margin-bottom: 9px;
    }

    .hybrid-method-group-title {
        font-size: 9px;
    }

    .hybrid-method-chips {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 7px;
    }

    .hybrid-chip-method {
        min-height: 62px;
        padding: 9px;
        border-radius: 11px;
        white-space: normal;
    }

    .hybrid-chip-method .hybrid-icon {
        width: 32px;
        height: 32px;
    }

    .hybrid-method-text strong {
        font-size: 11px;
        white-space: normal;
    }

    .hybrid-method-text small {
        font-size: 9px;
    }

    .hybrid-picker-method-head {
        padding-bottom: 7px;
    }

    .hybrid-picker-search-toggle {
        width: 36px;
        height: 36px;
    }

    .hybrid-picker-search-toggle svg {
        width: 17px;
        height: 17px;
    }

    .hybrid-picker-search-row {
        padding: 0 17px 9px;
    }

    .hybrid-picker-search-row input {
        min-height: 40px;
        font-size: 14px;
    }

    .hybrid-picker-search-close {
        width: 40px;
        height: 40px;
    }

    .hybrid-picker-result-head {
        padding-top: 2px;
        padding-bottom: 5px;
        font-size: 10px;
    }

    .hybrid-picker-options {
        flex: none;
        overflow: visible;
        padding-bottom: 4px;
    }

    .hybrid-picker-direction {
        grid-template-columns: auto minmax(0, 1fr);
        padding: 10px;
        gap: 8px;
    }

    .hybrid-picker-pair .hybrid-icon {
        width: 31px;
        height: 31px;
    }

    .hybrid-picker-meta {
        grid-column: 2;
        min-width: 0;
        margin-top: -2px;
        text-align: left;
    }

    .hybrid-picker-meta strong {
        font-size: 11px;
    }

    .hybrid-picker-meta small {
        font-size: 9px;
    }
}

@media (max-width: 360px) {
    .hybrid-picker-chips,
    .hybrid-method-chips {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 760px) {
    .topbar {
        align-items: center;
        flex-direction: row;
        flex-wrap: nowrap;
        gap: 8px;
        padding: 9px 10px;
        border-radius: 16px;
    }

    .brand {
        min-width: 0;
        flex: 1 1 auto;
        gap: 8px;
    }

    .brand-mark {
        width: 34px;
        height: 34px;
        border-radius: 10px;
    }

    .brand-name {
        font-size: 13px;
    }

    .topbar-actions {
        width: auto;
        flex: 0 0 auto;
        flex-wrap: nowrap;
        justify-content: flex-end;
        gap: 6px;
    }

    .topbar-links {
        display: none;
    }

    .api-badge {
        padding: 5px 8px;
        font-size: 10px;
    }

    .nav-toggle {
        display: inline-grid;
        width: 38px;
        height: 38px;
        flex: 0 0 auto;
    }

    .section-tabs {
        display: none;
        margin-bottom: 12px;
        padding: 6px;
        border-radius: 14px;
    }

    .section-tabs.is-open {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 4px;
    }

    .section-tabs a {
        min-height: 46px;
        flex: none;
        justify-content: flex-start;
        padding: 11px 14px;
        font-size: 14px;
        text-align: left;
    }
}

.contact-strip {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 0 6px 8px;
}

.contact-strip-left {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 16px;
    min-width: 0;
}

.contact-link {
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
    overflow-wrap: anywhere;
}

.contact-link:hover {
    color: var(--accent-dark);
}

.contact-link-support {
    color: var(--accent-dark);
}

.topbar {
    position: relative;
    z-index: 30;
    justify-content: space-between;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 3px;
    margin-left: auto;
}

.main-nav > a {
    display: inline-flex;
    min-height: 40px;
    align-items: center;
    justify-content: center;
    padding: 8px 13px;
    border-radius: 10px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
    transition: background 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.main-nav > a:hover {
    background: #f3f2ff;
    color: var(--accent-dark);
}

.main-nav > a.is-active {
    background: var(--accent);
    box-shadow: 0 8px 18px rgba(79, 70, 229, 0.2);
    color: #fff;
}

.mobile-contact-block {
    display: none;
}

@media (max-width: 820px) {
    .contact-strip {
        display: none;
    }

    .main-nav {
        position: absolute;
        top: calc(100% + 8px);
        right: 10px;
        left: 10px;
        display: none;
        margin: 0;
        padding: 8px;
        border: 1px solid var(--line);
        border-radius: 14px;
        background: rgba(255, 255, 255, 0.98);
        box-shadow: 0 18px 44px rgba(29, 48, 74, 0.16);
        backdrop-filter: blur(16px);
    }

    .main-nav.is-open {
        display: grid;
        gap: 4px;
    }

    .main-nav > a {
        min-height: 46px;
        justify-content: flex-start;
        padding: 11px 14px;
        font-size: 14px;
    }

    .main-nav > a.is-active {
        box-shadow: none;
    }

    .mobile-contact-block {
        display: grid;
        gap: 3px;
        margin-bottom: 4px;
        padding: 5px 12px 10px;
        border-bottom: 1px solid var(--line);
        color: var(--muted);
        font-size: 12px;
        overflow-wrap: anywhere;
    }

    .mobile-contact-block a {
        color: var(--accent-dark);
        font-weight: 600;
    }

    .nav-toggle {
        display: inline-grid;
    }
}
