#exchange.swap-widget-box {
    --ex-ink: #172018;
    --ex-muted: #70806f;
    --ex-green: #2f7d5b;
    --ex-blue: #69a7d8;
    --ex-panel: #ffffff;
    --ex-line: #dce5d9;
    position: relative;
    isolation: isolate;
    max-width: 760px;
    margin: 16px auto 42px;
    padding: clamp(10px, 2vw, 18px);
    color: var(--ex-ink);
    font-family: "Manrope", "Segoe UI", Arial, sans-serif;
    border: 1px solid rgba(220, 229, 217, 0.92);
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.88);
    box-shadow: var(--shadow-lg);
    transition: background 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}

/* Mixer mode: shift the whole card to a cool blue/teal "night-ish" tone
   while keeping the same brand palette (green -> blue accents). */
#exchange.is-mixer-mode.swap-widget-box {
    border-color: rgba(96, 208, 240, 0.4);
    background:
        radial-gradient(circle at 88% 8%, rgba(15, 138, 168, 0.12), transparent 42%),
        linear-gradient(165deg, rgba(238, 247, 251, 0.94), rgba(225, 240, 247, 0.92));
    box-shadow: var(--shadow-lg), 0 0 0 1px rgba(105, 167, 216, 0.08) inset;
}

.home-main {
    position: relative;
    z-index: 5;
    min-height: 0;
    padding-bottom: clamp(8px, 2vw, 18px);
    overflow: visible;
}

.reviews-section {
    position: relative;
    z-index: 1;
}

.home-hero-layout {
    display: grid;
    grid-template-columns: minmax(620px, 760px) minmax(270px, 330px);
    align-items: stretch;
    justify-content: center;
    gap: 18px;
    max-width: 1120px;
    margin: 0 auto clamp(22px, 4vw, 42px);
    padding-top: 16px;
}

.home-main #exchange.swap-widget-box {
    width: 100%;
    margin: 0;
    z-index: 2;
}

.home-benefits {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    max-width: none;
    height: 100%;
    margin: 0;
    padding: 14px;
    overflow: hidden;
    border: 1px solid rgba(220, 229, 217, 0.92);
    border-radius: 30px;
    background:
        radial-gradient(circle at 14% 0%, rgba(105, 167, 216, 0.17), transparent 34%),
        radial-gradient(circle at 92% 8%, rgba(47, 125, 91, 0.16), transparent 30%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(245, 250, 243, 0.9));
    box-shadow: var(--shadow-md);
}

.home-benefits::before {
    content: "";
    position: absolute;
    inset: 10px;
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 23px;
    pointer-events: none;
}

.home-benefits::after {
    content: "";
    position: absolute;
    right: -86px;
    bottom: -98px;
    width: 240px;
    height: 240px;
    border-radius: 50%;
    background: rgba(47, 125, 91, 0.08);
    filter: blur(2px);
    pointer-events: none;
}

.home-benefits-head {
    position: relative;
    z-index: 1;
    display: grid;
    justify-items: center;
    gap: 6px;
    margin-bottom: 10px;
    text-align: center;
}

.home-benefits-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--accent-primary);
    font-size: 10px;
    font-weight: 950;
    letter-spacing: 0.14em;
    line-height: 1.2;
    text-transform: uppercase;
}

.home-benefits-eyebrow::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent-primary);
    box-shadow: 0 0 0 5px rgba(47, 125, 91, 0.1);
}

.home-benefits-head h2 {
    max-width: 280px;
    margin: 0;
    color: var(--text-primary);
    font-size: clamp(1.04rem, 1.5vw, 1.2rem);
    font-weight: 950;
    letter-spacing: -0.055em;
    line-height: 1.05;
    text-align: center;
}

.home-benefits-grid {
    position: relative;
    z-index: 1;
    display: grid;
    flex: 1 1 auto;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    align-items: stretch;
}

.home-benefit-card {
    position: relative;
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    grid-template-rows: auto;
    align-items: center;
    gap: 10px;
    min-height: 0;
    height: 100%;
    padding: 11px;
    overflow: hidden;
    border: 1px solid rgba(207, 226, 205, 0.92);
    border-radius: 17px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(251, 252, 247, 0.9)),
        radial-gradient(circle at 18% 0%, rgba(47, 125, 91, 0.1), transparent 36%);
    box-shadow: 0 14px 34px rgba(48, 65, 49, 0.08), inset 0 1px 0 #fff;
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.home-benefit-card::before {
    content: "";
    position: absolute;
    right: -34px;
    top: -34px;
    width: 96px;
    height: 96px;
    border-radius: 50%;
    background: rgba(47, 125, 91, 0.07);
    pointer-events: none;
}

.home-benefit-card:hover {
    transform: translateY(-3px);
    border-color: rgba(47, 125, 91, 0.28);
    box-shadow: 0 22px 44px rgba(48, 65, 49, 0.12), inset 0 1px 0 #fff;
}

.home-benefit-icon {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    color: #ffffff;
    border: 1px solid rgba(47, 125, 91, 0.18);
    border-radius: 13px;
    background: linear-gradient(135deg, #2f7d5b, #5aa56f);
    box-shadow: 0 16px 28px rgba(47, 125, 91, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.26);
}

.home-benefit-icon svg {
    width: 22px;
    height: 22px;
}

.home-benefit-icon [data-mode-icon] {
    display: none !important;
}

.home-benefit-icon::before {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: currentColor;
    font-family: Arial, sans-serif;
    font-weight: 900;
    line-height: 1;
}

.home-benefit-icon--privacy::before {
    content: "✓";
    width: 17px;
    height: 19px;
    border: 2px solid currentColor;
    border-radius: 9px 9px 11px 11px;
    font-size: 12px;
}

.home-benefit-icon--limits::before {
    content: "∞";
    font-size: 27px;
    transform: translateY(-1px);
}

.home-benefit-icon--speed::before {
    content: "↗";
    font-size: 23px;
}

.home-benefits.is-mixer-mode .home-benefit-icon--privacy::before {
    content: "";
    position: absolute;
    left: 50%;
    top: calc(50% - 10px);
    width: 22px;
    height: 8px;
    border: 0;
    border-radius: 0;
    background: currentColor;
    clip-path: polygon(0 38%, 68% 38%, 68% 0, 100% 50%, 68% 100%, 68% 62%, 0 62%);
    transform: translateX(-50%);
}

.home-benefits.is-mixer-mode .home-benefit-icon--privacy::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: calc(50% - 10px);
    width: 22px;
    height: 8px;
    background: currentColor;
    clip-path: polygon(0 38%, 68% 38%, 68% 0, 100% 50%, 68% 100%, 68% 62%, 0 62%);
    transform: translateX(-50%) rotate(180deg);
}

.home-benefits.is-mixer-mode .home-benefit-icon--limits::before {
    content: "$";
    position: static;
    width: 20px;
    height: 20px;
    border: 2px solid currentColor;
    border-radius: 50%;
    background: none;
    font-size: 13px;
    transform: none;
}

.home-benefits.is-mixer-mode .home-benefit-icon--speed::before {
    content: "CEX";
    position: static;
    width: 24px;
    height: 17px;
    border-top: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    background: none;
    font-size: 8px;
    letter-spacing: 0.4px;
    transform: none;
}

.home-benefits.is-mixer-mode .home-benefit-icon--speed::after {
    content: none;
}

.home-benefit-copy {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    align-content: start;
    min-width: 0;
}

.home-benefit-copy h3 {
    margin: 2px 0 4px;
    color: var(--text-primary);
    font-size: 0.98rem;
    font-weight: 950;
    letter-spacing: -0.045em;
    line-height: 1.15;
}

.home-benefit-copy p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.82rem;
    font-weight: 720;
    line-height: 1.34;
}

#exchange.swap-widget-box::before {
    content: "";
    position: absolute;
    inset: 9px;
    z-index: -1;
    border-radius: 21px;
    background:
        linear-gradient(135deg, rgba(47, 125, 91, 0.08), transparent 38%),
        linear-gradient(315deg, rgba(105, 167, 216, 0.12), transparent 32%);
    pointer-events: none;
    transition: background 0.4s ease;
}

#exchange.is-mixer-mode.swap-widget-box::before {
    background:
        linear-gradient(135deg, rgba(15, 138, 168, 0.12), transparent 40%),
        linear-gradient(315deg, rgba(105, 167, 216, 0.2), transparent 34%);
}

#exchange .swap-widget-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#exchange .swap-widget-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    align-items: stretch;
}

#exchange .swap-widget-col {
    position: relative;
    min-width: 0;
    padding: clamp(10px, 1.6vw, 14px);
    border: 1px solid var(--ex-line);
    border-radius: 22px;
    background: #fff;
    box-shadow: var(--shadow-sm);
}

#exchange.is-mixer-mode .swap-widget-col {
    border-color: rgba(96, 208, 240, 0.34);
    background:
        linear-gradient(180deg, #ffffff, rgba(245, 251, 252, 0.96)),
        radial-gradient(circle at 12% 0%, rgba(96, 208, 240, 0.12), transparent 42%);
}

#exchange.is-mixer-mode .swap-widget-col--receive,
#exchange.is-mixer-mode .reverse-btn {
    display: none;
}

#exchange .asset-picker-head,
#exchange .asset-select,
#exchange .val-label { display: none; }

#exchange .exchange-benefit-line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 7px 10px;
    padding: 2px 4px 5px;
    color: var(--accent-primary);
    font-size: clamp(10px, 1.9vw, 12px);
    font-weight: 950;
    letter-spacing: 0.08em;
    line-height: 1.35;
    text-align: center;
    text-transform: uppercase;
}

#exchange .exchange-benefit-line > span {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

#exchange .exchange-benefit-line > span:not(:first-child)::before {
    content: "";
    width: 5px;
    height: 5px;
    flex: 0 0 5px;
    border-radius: 999px;
    background: #9fc4ab;
    box-shadow: 0 0 0 4px rgba(47, 125, 91, 0.08);
}

#exchange .benefit-text-mobile {
    display: none;
}

#exchange .exchange-mode-switch {
    position: relative;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
    width: 100%;
    margin: 0 0 2px;
    padding: 5px;
    overflow: hidden;
    border: 1px solid rgba(159, 196, 171, 0.55);
    border-radius: 999px;
    background:
        linear-gradient(180deg, rgba(233, 240, 232, 0.95), rgba(244, 249, 243, 0.92));
    box-shadow:
        inset 0 2px 5px rgba(48, 65, 49, 0.14),
        inset 0 -1px 0 rgba(255, 255, 255, 0.7);
}

/* Rail thumb: sliding pill that rides along the track */
#exchange .exchange-mode-switch__glow {
    display: block;
    position: absolute;
    top: 5px;
    left: 5px;
    z-index: 0;
    width: calc(50% - 5px);
    height: calc(100% - 10px);
    border-radius: 999px;
    background:
        linear-gradient(135deg, var(--ex-green), #5aa56f),
        radial-gradient(circle at 20% 0%, rgba(255, 255, 255, 0.32), transparent 50%);
    box-shadow:
        0 10px 22px rgba(47, 125, 91, 0.32),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
    transition: transform 0.26s cubic-bezier(0.4, 0.9, 0.3, 1.2), background 0.22s ease;
}

#exchange:has(.exchange-mode-option input[value="mixer"]:checked) .exchange-mode-switch__glow,
#exchange.is-mixer-mode .exchange-mode-switch__glow {
    transform: translateX(100%);
    background:
        linear-gradient(135deg, #0f8aa8, var(--ex-blue)),
        radial-gradient(circle at 20% 0%, rgba(255, 255, 255, 0.36), transparent 50%);
    box-shadow:
        0 10px 22px rgba(105, 167, 216, 0.34),
        inset 0 1px 0 rgba(255, 255, 255, 0.42);
}

#exchange .exchange-mode-option {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 38px;
    padding: 0 14px;
    color: var(--ex-muted);
    border: 0;
    border-radius: 999px;
    background: transparent;
    cursor: pointer;
    font-size: 12px;
    font-weight: 950;
    letter-spacing: 0.1em;
    line-height: 1;
    text-transform: uppercase;
    transition: color 0.2s ease;
}

/* Rail tie marks before each label to reinforce the "rails" look */
#exchange .exchange-mode-option::before {
    content: "";
    width: 7px;
    height: 7px;
    flex: 0 0 7px;
    border-radius: 50%;
    background: currentColor;
    opacity: 0.5;
    transition: opacity 0.2s ease, box-shadow 0.2s ease;
}

#exchange .exchange-mode-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

#exchange .exchange-mode-option:has(input:checked) {
    color: #ffffff;
}

#exchange .exchange-mode-option:has(input:checked)::before {
    opacity: 1;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.22);
}

#exchange .exchange-mode-option:has(input:disabled) {
    cursor: not-allowed;
    opacity: 0.48;
}

#exchange .commission-tier-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
    margin: 0;
}

#exchange .commission-tier-panel {
    padding: 10px;
    border: 1px solid var(--ex-line);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.88);
    box-shadow: var(--shadow-sm);
}

#exchange .commission-tier-pill {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-width: 0;
    padding: 7px 9px;
    color: var(--ex-ink);
    border: 1px solid rgba(159, 196, 171, 0.46);
    border-radius: 14px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(243, 248, 241, 0.88)),
        radial-gradient(circle at 10% 0%, rgba(47, 125, 91, 0.12), transparent 48%);
    box-shadow: inset 0 1px 0 #fff;
}

#exchange .commission-tier-pill.is-active {
    color: #ffffff;
    border-color: rgba(47, 125, 91, 0.72);
    background:
        linear-gradient(135deg, var(--ex-green), #5aa56f),
        radial-gradient(circle at 12% 0%, rgba(255, 255, 255, 0.22), transparent 48%);
    box-shadow: 0 12px 26px rgba(47, 125, 91, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

#exchange .commission-tier-pill__range {
    min-width: 0;
    overflow: hidden;
    color: var(--ex-muted);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.04em;
    line-height: 1.1;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
}

#exchange .commission-tier-pill.is-active .commission-tier-pill__range {
    color: rgba(255, 255, 255, 0.82);
}

#exchange .commission-tier-pill__pct {
    flex: 0 0 auto;
    color: var(--accent-primary);
    font-size: 13px;
    font-weight: 950;
    line-height: 1;
    letter-spacing: -0.02em;
}

#exchange .commission-tier-pill.is-active .commission-tier-pill__pct {
    color: #ffffff;
}

#exchange .mixing-info-card {
    display: grid;
    gap: 4px;
    margin-top: 8px;
    padding: 11px 12px;
    color: var(--ex-ink);
    border: 1px solid rgba(47, 125, 91, 0.18);
    border-radius: 16px;
    background:
        linear-gradient(180deg, rgba(244, 250, 243, 0.96), rgba(255, 255, 255, 0.9)),
        radial-gradient(circle at 12% 0%, rgba(47, 125, 91, 0.14), transparent 48%);
    box-shadow: var(--shadow-sm);
}

#exchange .mixing-info-card[hidden] {
    display: none;
}

#exchange .mixing-info-card__title {
    color: var(--accent-primary);
    font-size: 11px;
    font-weight: 950;
    line-height: 1.2;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

#exchange .mixing-info-card__text {
    color: var(--ex-muted);
    font-size: 12px;
    font-weight: 800;
    line-height: 1.35;
}

.js #exchange .custom-asset-wrapper { display: block; }
#exchange .swap-inline-row,
#exchange .val-split { display: block; }

#exchange .val-input-wrap {
    display: grid;
    grid-template-columns: minmax(150px, 0.52fr) minmax(0, 1.48fr);
    grid-template-areas: "label label" "asset value";
    gap: 7px;
}

#exchange .val-top-label {
    grid-area: label;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    justify-content: space-between;
    width: 100%;
    color: var(--ex-muted);
    font-size: 9px;
    font-weight: 950;
    letter-spacing: 0.16em;
    line-height: 1.2;
    text-transform: uppercase;
}

#exchange .val-input-wrap.is-mixer-selected .val-top-label::after {
    content: "MIXER";
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    margin-left: auto;
    padding: 2px 6px;
    border: 1px solid rgba(96, 208, 240, 0.55);
    border-radius: 999px;
    color: #0f8aa8;
    background: rgba(96, 208, 240, 0.14);
    font-size: 8px;
    font-weight: 950;
    line-height: 1;
    letter-spacing: 0.04em;
}

#exchange .asset-selector {
    grid-area: asset;
    position: relative;
    min-width: 0;
}

#exchange .asset-search-input {
    width: 100%;
    height: 50px;
    padding: 8px 11px 19px;
    color: transparent;
    -webkit-text-fill-color: transparent;
    border: 1px solid #dce5d9;
    border-radius: 15px;
    outline: none;
    background: #f5f9f2;
    box-shadow: inset 0 1px 0 #fff;
    cursor: pointer;
}

#exchange .asset-search-input:focus {
    border-color: #9fc4ab;
    box-shadow: 0 0 0 4px rgba(47, 125, 91, 0.1);
}

#exchange .asset-selected-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    z-index: 2;
    width: 30px;
    height: 30px;
    overflow: hidden;
    border-radius: 10px;
    transform: translateY(-50%);
    box-shadow: 0 8px 18px rgba(48, 65, 49, 0.12);
    pointer-events: none;
}

#exchange .asset-selected-text-overlay {
    position: absolute;
    left: 50px;
    top: 50%;
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 5px;
    max-width: calc(100% - 60px);
    height: auto;
    color: var(--ex-ink);
    font-size: 13px;
    font-weight: 950;
    letter-spacing: -0.025em;
    line-height: 1;
    white-space: nowrap;
    transform: translateY(-50%);
    pointer-events: none;
}

#exchange .asset-selected-symbol-text {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

#exchange .asset-selected-chain-inline {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    width: fit-content;
    padding: 3px 7px;
    border: 1px solid #d5e5d2;
    border-radius: 999px;
    color: var(--accent-primary);
    background: #f3f8f1;
    font-size: 9px;
    font-weight: 850;
    line-height: 1;
}

#exchange .asset-selected-chain {
    position: absolute;
    left: 50px;
    bottom: 7px;
    z-index: 3;
    font-size: 9px;
    pointer-events: none;
}

#exchange .val-input {
    grid-area: value;
    width: 100%;
    height: 50px;
    min-width: 0;
    padding: 0 14px;
    color: var(--ex-ink);
    font-size: clamp(1.35rem, 2.3vw, 1.9rem);
    font-weight: 950;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.055em;
    line-height: 1;
    text-align: right;
    border: 1px solid #dce5d9;
    border-radius: 15px;
    outline: none;
    background: #fbfcf7;
    box-shadow: inset 0 1px 0 #fff;
}

#exchange .val-input:focus {
    border-color: #9fc4ab;
    box-shadow: 0 0 0 4px rgba(47, 125, 91, 0.1);
}

#exchange .fiat-under-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-height: 24px;
    margin-top: 6px;
    padding: 0 2px;
}

#exchange .fiat-rate-text {
    max-width: 62%;
    overflow: hidden;
    color: var(--ex-muted);
    font-size: 10px;
    font-weight: 850;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#exchange .fiat-input-under {
    width: auto;
    min-width: 106px;
    max-width: 38%;
    height: 24px;
    padding: 0 10px;
    color: var(--accent-primary);
    font-size: 11px;
    font-weight: 950;
    text-align: right;
    border: 1px solid #d5e5d2;
    border-radius: 999px;
    outline: none;
    background: #f3f8f1;
    pointer-events: none;
}

#exchange .reverse-btn {
    display: inline-flex;
    align-self: center;
    align-items: center;
    justify-self: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    padding: 0;
    margin: -1px 0;
    color: #fff;
    border: 0;
    border-radius: 13px;
    background: linear-gradient(135deg, var(--ex-green), #5aa56f);
    box-shadow: 0 12px 24px rgba(47, 125, 91, 0.18);
    transform: rotate(180deg);
    transition: transform 0.16s ease;
}

#exchange .reverse-btn svg {
    display: block;
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
}

#exchange .reverse-btn:hover { transform: rotate(180deg) scale(1.04); }

#exchange .asset-dropdown.active {
    position: absolute;
    left: 0;
    top: calc(100% + 8px);
    z-index: 50;
    width: min(340px, calc(100vw - 48px));
    max-height: 360px;
    overflow-y: auto;
    padding: 8px;
    border: 1px solid var(--ex-line);
    border-radius: 18px;
    background: #ffffff;
    box-shadow: var(--shadow-lg);
}

#exchange .asset-dropdown-item {
    color: var(--ex-ink);
    border-radius: 13px;
}

#exchange .asset-dropdown-item:hover,
#exchange .asset-dropdown-item.selected {
    color: var(--ex-ink);
    background: #f3f8f1;
}

#exchange .dest-submit-grp {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    align-items: start;
}

#exchange .dest-submit-grp > .address-field {
    grid-column: 1;
}

#exchange .dest-submit-grp > .swap-submit-row {
    grid-column: 2;
}

#exchange .dest-submit-grp > .order-captcha {
    grid-column: 1 / -1;
}

#exchange .dest-submit-grp > .refund-wallet-option {
    grid-column: 1 / -1;
}

#exchange .address-field {
    position: relative;
    display: grid;
    grid-template-rows: 56px;
}

#exchange .address-label { display: none; }

#exchange .address-input {
    width: 100%;
    height: 56px;
    padding: 0 17px;
    color: var(--ex-ink);
    font-size: 15px;
    font-weight: 800;
    border: 1px solid #dce5d9;
    border-radius: 17px;
    outline: none;
    background: #fff;
}

#exchange .address-input::placeholder {
    color: #9aa697;
    font-weight: 800;
}

#exchange .address-input:focus {
    border-color: #9fc4ab;
    box-shadow: 0 0 0 4px rgba(47, 125, 91, 0.1);
}

#exchange .refund-wallet-option {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    column-gap: 8px;
    padding: 0 4px;
}

#exchange .refund-wallet-option__toggle {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: var(--ex-green);
    cursor: pointer;
}

#exchange .refund-wallet-option__label {
    width: fit-content;
    color: var(--ex-muted);
    font-size: 13px;
    font-weight: 800;
    line-height: 1.35;
    cursor: pointer;
    user-select: none;
}

#exchange .refund-wallet-option__field {
    grid-column: 1 / -1;
    position: relative;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transition: max-height .2s ease, padding-top .2s ease, opacity .16s ease, visibility 0s linear .2s;
}

#exchange .refund-wallet-option__toggle:checked ~ .refund-wallet-option__field {
    max-height: 76px;
    padding-top: 8px;
    opacity: 1;
    visibility: visible;
    transition-delay: 0s;
}

#exchange .order-captcha {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(140px, 1fr);
    align-items: center;
    gap: 9px;
    padding: 9px;
    border: 1px solid var(--ex-line);
    border-radius: 17px;
    background: var(--ex-panel);
}

#exchange .order-captcha__head {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

#exchange .order-captcha__head strong {
    color: var(--ex-ink);
    font-size: 14px;
    font-weight: 900;
}

#exchange .order-captcha__head span,
#exchange .order-captcha__field > span {
    color: var(--ex-muted);
    font-size: 12px;
    font-weight: 700;
}

#exchange .order-captcha__challenge {
    display: grid;
    grid-template-columns: minmax(0, 150px) auto;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

#exchange .order-captcha__image {
    width: 150px;
    max-width: 100%;
    height: 46px;
    object-fit: contain;
    border: 1px solid var(--ex-line);
    border-radius: 10px;
    background: #eef2f7;
}

#exchange .order-captcha__refresh {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 7px 10px;
    color: var(--ex-green);
    font: inherit;
    font-size: 12px;
    font-weight: 900;
    text-decoration: none;
    cursor: pointer;
    border: 1px solid var(--ex-line);
    border-radius: 11px;
    background: transparent;
}

#exchange .order-captcha__refresh:hover {
    border-color: var(--ex-green);
}

#exchange .order-captcha__field {
    display: block;
    min-width: 0;
}

#exchange .order-captcha__field > span {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

#exchange .order-captcha__field input {
    width: 100%;
    height: 46px;
    padding: 0 14px;
    color: var(--ex-ink);
    font-family: monospace;
    font-size: 19px;
    font-weight: 900;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    border: 1px solid var(--ex-line);
    border-radius: 12px;
    outline: none;
    background: var(--ex-panel);
}

#exchange .order-captcha__field input::placeholder {
    font-family: inherit;
    font-size: 12px;
    letter-spacing: 0;
}

#exchange .order-captcha__field input:focus {
    border-color: var(--ex-green);
    box-shadow: 0 0 0 4px rgba(47, 125, 91, 0.1);
}

#exchange .order-captcha__field input:disabled {
    cursor: wait;
    opacity: 0.55;
}

#exchange .order-captcha__error {
    display: none;
    grid-column: 1 / -1;
    color: #b42318;
    font-size: 12px;
    font-weight: 800;
}

#exchange .order-captcha__error:not(:empty) {
    display: block;
}

#exchange .swap-submit-row {
    position: relative;
    display: grid;
    grid-template-rows: 56px;
}

#exchange .swap-btn-main {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    min-height: 56px;
    height: 56px;
    padding: 6px 18px;
    color: #fff;
    border-radius: 17px;
}

#exchange .swap-btn-main__copy {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px;
    line-height: 1.05;
}

#exchange .swap-btn-main__title {
    font-size: 15px;
    font-weight: 950;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

#exchange .swap-btn-main__fee {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.82);
}

#exchange .swap-btn-main__fee strong {
    color: #fff;
    font-weight: 950;
}

#exchange .swap-btn-main__fee-dot {
    opacity: 0.55;
}

#exchange .button-loader { display: none; }
#exchange .swap-btn-main.loading .button-loader { display: inline-block; }
#exchange .swap-btn-main.loading .swap-btn-main__fee { display: none; }

#exchange .estimate-result,
#exchange .progress-tracking {
    margin-top: 14px;
    padding: 16px;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: 18px;
    background: #fff;
    box-shadow: var(--shadow-sm);
}

.deposit-address-wrapper,
.deposit-memo-wrapper {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
}

.deposit-address,
.deposit-memo,
.estimate-value,
.estimate-link { word-break: break-word; }

@media (max-width: 980px) {
    #exchange .dest-submit-grp { grid-template-columns: minmax(0, 1fr); }
    #exchange .dest-submit-grp > .address-field,
    #exchange .dest-submit-grp > .order-captcha,
    #exchange .dest-submit-grp > .refund-wallet-option,
    #exchange .dest-submit-grp > .swap-submit-row {
        grid-column: 1;
        grid-row: auto;
    }
    .home-hero-layout {
        display: block;
        max-width: 760px;
        margin: 0 auto;
    }

    .home-main #exchange.swap-widget-box {
        margin: 16px auto clamp(12px, 2.6vw, 24px);
    }

    .home-benefits {
        display: block;
        height: auto;
        max-width: 760px;
        margin: 0 auto clamp(22px, 4vw, 42px);
        padding: 16px;
    }

    .home-benefits-head h2 {
        max-width: 560px;
        font-size: clamp(1.14rem, 2.1vw, 1.48rem);
    }

    .home-benefits-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 10px;
    }

    .home-benefit-card {
        grid-template-columns: none;
        grid-template-rows: 46px minmax(0, 1fr);
        align-items: stretch;
        gap: 10px;
        min-height: 148px;
        padding: 14px;
        border-radius: 22px;
    }

    .home-benefit-icon {
        width: 46px;
        height: 46px;
        border-radius: 15px;
    }

    .home-benefit-icon svg {
        width: 25px;
        height: 25px;
    }

    .home-benefit-copy h3 {
        margin: 0 0 6px;
        font-size: clamp(1rem, 1.7vw, 1.14rem);
    }

    .home-benefit-copy p {
        font-size: 0.88rem;
        line-height: 1.42;
    }
    #exchange .reverse-btn {
        margin: 0 auto;
        transform: rotate(180deg);
    }
    #exchange .reverse-btn:hover { transform: rotate(180deg) scale(1.04); }
}

@media (max-width: 620px) {
    .home-main {
        padding-top: 4px;
    }

    .home-main .container {
        width: 100%;
        padding-inline: 8px;
    }

    #exchange.swap-widget-box {
        width: 100%;
        margin-top: 4px;
        margin-bottom: 10px;
        padding: 8px;
        overflow: visible;
        border-radius: 20px;
    }

    .home-main #exchange.swap-widget-box {
        margin: 4px auto 10px;
    }

    .home-benefits {
        gap: 10px;
        padding: 12px;
        border-radius: 24px;
        margin-bottom: 26px;
    }

    .home-benefits::before {
        inset: 6px;
        border-radius: 18px;
    }

    .home-benefits-head {
        display: grid;
        gap: 6px;
        margin-bottom: 10px;
    }

    .home-benefits-head h2 {
        max-width: none;
        font-size: 1.14rem;
        text-align: center;
    }

    .home-benefits-grid {
        gap: 9px;
        grid-template-columns: minmax(0, 1fr);
    }

    .home-benefit-card {
        grid-template-columns: 38px minmax(0, 1fr);
        grid-template-rows: auto;
        align-items: center;
        gap: 10px;
        min-height: auto;
        padding: 12px;
        border-radius: 17px;
    }

    .home-benefit-icon {
        width: 38px;
        height: 38px;
        border-radius: 13px;
    }

    .home-benefit-icon svg {
        width: 22px;
        height: 22px;
    }

    .home-benefit-copy h3 {
        margin: 3px 0 5px;
        font-size: 1rem;
    }

    .home-benefit-copy p {
        font-size: 0.84rem;
        line-height: 1.36;
    }

    #exchange.swap-widget-box::before {
        inset: 6px;
        border-radius: 17px;
    }

    #exchange .swap-widget-form {
        gap: 8px;
    }

    #exchange .swap-widget-row {
        display: flex;
        flex-direction: column;
        position: relative;
        align-items: stretch;
        gap: 0;
    }

    #exchange .swap-widget-col {
        overflow: visible;
        padding: 9px;
        border-radius: 16px;
    }

    #exchange .val-input-wrap {
        overflow: visible;
        grid-template-columns: minmax(118px, 0.88fr) minmax(0, 1.12fr);
        grid-template-areas: "label label" "asset value";
        gap: 6px;
    }

    #exchange .val-top-label {
        font-size: 9px;
        letter-spacing: 0.1em;
    }

    #exchange .asset-search-input,
    #exchange .val-input {
        height: 42px;
        min-height: 42px;
        border-radius: 13px;
    }

    #exchange .asset-search-input {
        padding: 7px 10px 16px;
    }

    #exchange .asset-selected-icon {
        left: 10px;
        width: 26px;
        height: 26px;
        border-radius: 9px;
    }

    #exchange .asset-selected-text-overlay,
    #exchange .asset-selected-chain {
        left: 42px;
        max-width: calc(100% - 50px);
    }

    #exchange .asset-selected-text-overlay {
        font-size: 12px;
    }

    #exchange .asset-selected-chain-inline {
        padding: 2px 5px;
        font-size: 8px;
    }

    #exchange .asset-selected-chain {
        bottom: 5px;
        font-size: 8px;
    }

    #exchange .val-input {
        padding: 0 10px;
        font-size: clamp(1.16rem, 6.4vw, 1.55rem);
        text-align: right;
    }

    #exchange .reverse-btn {
        position: relative;
        z-index: 2;
        left: auto;
        align-self: center;
        justify-self: center;
        width: 34px;
        height: 34px;
        margin: -1px auto;
        border-radius: 12px;
        box-shadow: 0 10px 22px rgba(47, 125, 91, 0.22);
        transform: rotate(180deg);
    }

    #exchange .reverse-btn:hover {
        transform: rotate(180deg) scale(1.04);
    }

    #exchange .reverse-btn svg {
        width: 19px;
        height: 19px;
        flex-basis: 19px;
    }

    #exchange .fiat-under-box {
        align-items: center;
        flex-direction: row;
        gap: 6px;
        margin-top: 5px;
        padding-inline: 0;
    }

    #exchange .fiat-rate-text {
        max-width: 56%;
        font-size: 9px;
        white-space: nowrap;
    }

    #exchange .fiat-input-under {
        width: auto;
        min-width: 86px;
        max-width: 44%;
        height: 22px;
        padding-inline: 8px;
        font-size: 10px;
        text-align: right;
    }

    #exchange .exchange-benefit-line {
        display: flex;
        flex-wrap: nowrap;
        justify-content: center;
        gap: 6px;
        overflow-x: auto;
        padding: 0 0 2px;
        font-size: 9px;
        letter-spacing: 0.04em;
        text-align: center;
        scrollbar-width: none;
    }

    #exchange .exchange-benefit-line::-webkit-scrollbar {
        display: none;
    }

    #exchange .exchange-benefit-line > span {
        flex: 0 0 auto;
        justify-content: center;
        width: auto;
        min-height: 24px;
        padding: 5px 8px;
        border: 1px solid rgba(159, 196, 171, 0.45);
        border-radius: 999px;
        background: rgba(243, 248, 241, 0.86);
    }

    #exchange .exchange-benefit-line > span::before {
        content: "";
        width: 5px;
        height: 5px;
        flex: 0 0 5px;
        border-radius: 999px;
        background: #9fc4ab;
        box-shadow: 0 0 0 4px rgba(47, 125, 91, 0.08);
    }

    #exchange .benefit-text-full {
        display: none;
    }

    #exchange .benefit-text-mobile {
        display: inline;
    }

    #exchange .commission-tier-strip {
        grid-template-columns: minmax(0, 1fr);
        gap: 6px;
        margin: 0;
    }

    #exchange .commission-tier-panel {
        padding: 8px;
        border-radius: 16px;
    }

    #exchange .commission-tier-pill {
        min-height: 30px;
        padding: 6px 9px;
        border-radius: 13px;
    }

    #exchange .commission-tier-pill__range {
        font-size: 9px;
    }

    #exchange .commission-tier-pill__pct {
        font-size: 12px;
    }

    #exchange .mixing-info-card {
        margin-top: 7px;
        padding: 10px;
        border-radius: 14px;
    }

    #exchange .mixing-info-card__title {
        font-size: 10px;
    }

    #exchange .mixing-info-card__text {
        font-size: 11px;
    }

    #exchange .asset-dropdown.active {
        left: max(-10px, calc((100vw - 100%) / -2 + 12px));
        width: min(360px, calc(100vw - 24px));
        max-height: 300px;
    }

    #exchange .address-field,
    #exchange .swap-submit-row {
        grid-template-rows: 46px;
    }

    #exchange .address-input,
    #exchange .swap-btn-main {
        height: 46px;
        min-height: 46px;
        border-radius: 14px;
    }

    #exchange .order-captcha {
        grid-template-columns: minmax(0, 1.45fr) minmax(88px, .75fr);
        gap: 7px;
        padding: 8px;
        border-radius: 14px;
    }

    #exchange .order-captcha__challenge {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 6px;
    }

    #exchange .order-captcha__image {
        width: 100%;
        height: 44px;
    }

    #exchange .order-captcha__refresh {
        width: auto;
        min-height: 44px;
        padding-inline: 8px;
        font-size: 10px;
    }

    #exchange .order-captcha__field input {
        height: 44px;
        padding-inline: 10px;
        font-size: 17px;
    }

    #exchange .swap-btn-main {
        padding: 5px 12px;
    }

    #exchange .swap-btn-main__title {
        font-size: 13px;
    }

    #exchange .swap-btn-main__fee {
        font-size: 9px;
    }

    #exchange .swap-btn-main__fee {
        flex-wrap: wrap;
        justify-content: center;
        line-height: 1.2;
        text-align: center;
    }
}

@media (max-width: 380px) {
    .home-main .container {
        padding-inline: 6px;
    }

    #exchange.swap-widget-box {
        padding: 7px;
        border-radius: 18px;
    }

    .home-benefit-card {
        grid-template-columns: 36px minmax(0, 1fr);
        padding: 11px;
    }

    .home-benefit-icon {
        width: 36px;
        height: 36px;
        border-radius: 12px;
    }

    #exchange .swap-widget-col {
        padding: 8px;
    }

    #exchange .exchange-benefit-line {
        font-size: 9px;
    }

    #exchange .val-input {
        font-size: clamp(1.05rem, 7vw, 1.36rem);
    }

    #exchange .val-input-wrap {
        grid-template-columns: minmax(104px, 0.82fr) minmax(0, 1.18fr);
    }
}
