/* SWAP inherits the ZIRIX design system in app.css. No separate brand palette. */
.zirix-swap .swap-page { width:min(1280px,calc(100% - 40px)); margin:auto; padding:22px 0 60px; }
.swap-page button { cursor:pointer; }
.swap-page button:disabled { cursor:not-allowed; opacity:.55; }
.swap-page button:focus-visible,.swap-page a:focus-visible,.swap-page summary:focus-visible { outline:2px solid var(--accent); outline-offset:3px; }
.swap-page svg { width:20px; height:20px; fill:none; stroke:currentColor; stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round; flex-shrink:0; }
.swap-skip { position:absolute; left:20px; top:-100px; z-index:100; padding:10px 16px; background:var(--surface); color:var(--accent); border:1px solid var(--line); border-radius:var(--radius-sm); }
.swap-skip:focus { top:110px; }
.swap-hero { position:relative; display:grid; grid-template-columns:minmax(0,1.5fr) minmax(240px,.7fr); align-items:center; gap:40px; overflow:hidden; padding:34px 42px; color:#dce7f5; background:radial-gradient(circle at 90% 10%,rgba(66,220,163,.09),transparent 35%),linear-gradient(115deg,#071421,#0c2342); border:1px solid #20364b; border-radius:22px; }
.swap-hero::before { content:""; position:absolute; inset:0; pointer-events:none; background-image:linear-gradient(rgba(255,255,255,.023) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.023) 1px,transparent 1px); background-size:32px 32px; }
.swap-hero-copy,.swap-hero-panel { position:relative; }
.swap-hero .eyebrow { color:#79e4bb; font-size:10px; letter-spacing:.16em; }
.swap-hero .eyebrow i { width:7px; height:7px; border-radius:50%; background:#42dca3; box-shadow:0 0 0 5px rgba(66,220,163,.1); }
.swap-hero h1 { margin:12px 0; font-size:clamp(32px,3.4vw,46px); line-height:1.08; color:#fff; letter-spacing:-.04em; }
.swap-hero h1 span { color:#8fb7ff; }
.swap-hero p { max-width:575px; margin:0; color:#aebed4; font-size:13px; line-height:1.75; }
.swap-hero-panel { justify-self:end; width:100%; max-width:280px; padding:20px; border:1px solid rgba(143,183,255,.17); border-radius:14px; background:rgba(8,22,39,.5); }
.swap-hero-label { color:#7e9ab8; font-size:8px; font-weight:800; letter-spacing:.12em; }
.swap-hero-symbol { display:flex; align-items:center; gap:14px; margin:17px 0; color:#fff; font-size:27px; letter-spacing:.14em; font-weight:800; }
.swap-hero-symbol svg { width:45px; height:45px; }
.swap-hero-symbol rect { fill:#102845; stroke:rgba(255,255,255,.18); stroke-width:1.4; }
.swap-hero-flow { display:flex; justify-content:space-between; gap:7px; color:#adc4dd; font-size:10px; }
.swap-hero-flow i { color:#42dca3; font-style:normal; }
.swap-mode { display:inline-block; margin-top:16px; padding:3px 8px; color:#79e4bb; background:rgba(66,220,163,.08); border:1px solid rgba(66,220,163,.17); border-radius:5px; font-size:9px; letter-spacing:.1em; font-weight:800; text-transform:uppercase; }
.swap-workspace { display:grid; grid-template-columns:minmax(0,1fr) 290px; gap:18px; align-items:start; margin-top:18px; }
.swap-trade-panel,.swap-info-card { background:var(--surface); border:1px solid var(--line); border-radius:var(--radius); box-shadow:var(--shadow-xs); }
.swap-trade-panel { min-width:0; padding:25px; scroll-margin-top:120px; }
.swap-panel-heading { display:flex; align-items:center; justify-content:space-between; gap:20px; padding-bottom:20px; border-bottom:1px solid var(--line-soft); }
.swap-kicker { display:block; color:var(--accent); font-size:9px; font-weight:850; letter-spacing:.12em; }
.swap-panel-heading h2 { margin:5px 0 0; font-size:23px; }
.swap-page .wallet-button { gap:8px; flex-shrink:0; min-height:38px; padding:8px 12px; color:var(--text); background:var(--surface-2); border-color:var(--line); font-size:12px; }
.wallet-dot { width:6px; height:6px; border-radius:50%; background:var(--muted-2); }
.wallet-button.connected .wallet-dot { background:var(--yes); box-shadow:0 0 0 3px var(--yes-soft); }
.swap-tools { display:flex; justify-content:space-between; align-items:center; gap:10px; padding:17px 0; }
.network-button,.swap-settings-button { display:inline-flex; align-items:center; gap:8px; padding:7px 10px; color:var(--text); background:var(--surface-2); border:1px solid var(--line); border-radius:var(--radius-sm); font-size:12px; font-weight:650; }
.swap-settings-button { color:var(--muted); background:transparent; }
.swap-settings-button svg { width:15px; height:15px; }
.network-button:hover,.swap-settings-button:hover { color:var(--accent); border-color:var(--accent); }
.network-dot { display:inline-block; width:6px; height:6px; border-radius:50%; background:var(--yes); flex-shrink:0; }
.chevron { display:inline-block; width:6px; height:6px; margin:0 3px 3px; border-right:1.5px solid currentColor; border-bottom:1.5px solid currentColor; transform:rotate(45deg); flex-shrink:0; }
.swap-pair { display:grid; grid-template-columns:minmax(0,1fr) 32px minmax(0,1fr); gap:8px; align-items:center; }
.amount-card { min-width:0; padding:17px; background:var(--surface-2); border:1px solid var(--line); border-radius:12px; }
.receive-card { border-color:color-mix(in srgb,var(--yes) 25%,var(--line)); }
.card-caption { display:flex; justify-content:space-between; align-items:center; gap:6px; margin-bottom:14px; font-size:12px; font-weight:650; color:var(--muted); }
.card-caption label { margin:0; color:inherit; font-size:inherit; }
.card-caption>span:last-child { color:var(--muted-2); font-size:10px; font-variant-numeric:tabular-nums; }
.swap-page .token-chip { display:inline-flex; align-items:center; gap:8px; max-width:100%; min-height:38px; padding:6px 10px 6px 6px; border:1px solid var(--line); border-radius:8px; background:var(--surface); color:var(--text-strong); font-size:15px; font-weight:750; }
.swap-page .token-chip.empty { color:var(--accent); background:var(--accent-soft); border-color:color-mix(in srgb,var(--accent) 28%,var(--line)); padding-left:10px; font-size:13px; }
.token-chip:hover { border-color:var(--accent); }
.token-icon { display:inline-flex; align-items:center; justify-content:center; width:25px; height:25px; flex-shrink:0; border-radius:7px; background:#627eea; color:#fff; font-size:21px; font-weight:700; line-height:1; }
.token-icon[data-symbol=WETH] { background:#8a92b2; }
.token-icon[data-symbol=USDC] { background:#2775ca; font-size:19px; }
.swap-page .amount-card input,.swap-page .amount-card output { display:block; width:100%; min-width:0; min-height:58px; margin-top:14px; padding:0; border:0; border-radius:0; color:var(--text-strong); background:transparent; box-shadow:none; font-size:clamp(28px,3vw,38px); font-weight:650; font-variant-numeric:tabular-nums; line-height:1.5; letter-spacing:-.035em; }
.swap-page .amount-card input:focus { box-shadow:0 2px 0 var(--accent); }
.swap-page .amount-card output { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.swap-page .amount-card input::placeholder { color:var(--muted-2); }
.amount-meta { display:flex; justify-content:space-between; align-items:center; min-height:20px; gap:4px; font-size:11px; color:var(--muted); }
.amount-meta>span { white-space:nowrap; text-overflow:ellipsis; overflow:hidden; }
.amount-meta button { flex-shrink:0; border:0; padding:0 3px; background:none; color:var(--accent); font-size:11px; font-weight:700; }
.balance-line { display:flex; align-items:center; gap:4px; margin-top:10px; padding-top:10px; border-top:1px solid var(--line); color:var(--muted-2); font-size:11px; }
.balance-line span { color:var(--muted); font-variant-numeric:tabular-nums; overflow-wrap:anywhere; }
.flip-button { display:grid; place-items:center; width:32px; height:36px; padding:0; border:1px solid var(--line); border-radius:8px; color:var(--accent); background:var(--surface); }
.flip-button:hover { background:var(--accent-soft); border-color:var(--accent); }
.swap-page .primary-button { width:100%; min-height:46px; margin-top:20px; font-size:14px; }
.testnet-note { display:flex; align-items:center; justify-content:center; gap:7px; margin:13px 0 0; color:var(--muted); font-size:11px; }
.config-warning { margin:16px 0 0; padding:12px 14px; border:1px solid color-mix(in srgb,var(--warn) 35%,var(--line)); border-radius:8px; background:var(--warn-soft); color:var(--warn); font-size:12px; }
.action-status { margin:12px 0 0; color:var(--muted); font-size:12px; text-align:center; overflow-wrap:anywhere; }
.action-status:empty { display:none; }
.action-status[data-kind=error] { color:var(--no); }
.action-status[data-kind=ok] { color:var(--yes); }
.swap-sidebar { display:grid; gap:16px; }
.swap-info-card { padding:22px; scroll-margin-top:120px; }
.swap-info-card h2 { margin:10px 0 16px; font-size:18px; }
.swap-info-card p { font-size:12px; line-height:1.7; color:var(--muted); }
.swap-fee-number { display:block; margin:0 0 10px; color:var(--yes); font-size:39px; line-height:1.2; letter-spacing:-.04em; font-variant-numeric:tabular-nums; }
.swap-service-state { margin-top:16px; padding-top:13px; border-top:1px solid var(--line); color:var(--muted); font-size:10px; line-height:1.6; }
.swap-service-state[data-state=active] { color:var(--yes); }
.swap-howto { margin:0; padding:0; list-style:none; }
.swap-howto li { display:flex; align-items:center; gap:10px; padding:11px 0; border-bottom:1px solid var(--line-soft); }
.swap-howto b { display:grid; place-items:center; width:27px; height:27px; border-radius:7px; color:var(--accent); background:var(--accent-soft); flex-shrink:0; font-size:10px; }
.swap-howto span { color:var(--muted); font-size:11px; line-height:1.5; }
.swap-about-button { display:flex; justify-content:space-between; width:100%; margin-top:16px; padding:0; border:0; background:none; color:var(--accent); font-size:12px; font-weight:700; }
.quote-box { margin-top:16px; border:1px solid var(--line); border-radius:9px; background:var(--surface-2); padding:0 14px; font-size:12px; }
.quote-box summary { display:flex; justify-content:space-between; gap:10px; padding:12px 0; color:var(--text); cursor:pointer; list-style:none; }
.quote-box summary>span:last-child { color:var(--muted); }
.swap-page summary::-webkit-details-marker { display:none; }
.swap-page dl { margin:0; }
.swap-page dl>div { display:flex; align-items:flex-start; justify-content:space-between; gap:20px; padding:7px 0; }
.swap-page dt { color:var(--muted); }
.swap-page dd { margin:0; max-width:65%; color:var(--text); text-align:right; overflow-wrap:anywhere; }
.quote-box dl { padding:3px 0 12px; border-top:1px solid var(--line); }
.transaction-steps { display:none; justify-content:center; flex-wrap:wrap; gap:4px; margin-top:14px; color:var(--muted-2); font-size:10px; }
.transaction-steps:has([data-state=active]),.transaction-steps:has([data-step=swap][data-state]) { display:flex; }
.transaction-steps span { padding:4px 8px; border:1px solid var(--line); border-radius:5px; }
.transaction-steps [data-state=active] { color:var(--accent); background:var(--accent-soft); }
.transaction-steps [data-state=done] { color:var(--yes); }
.transaction-steps [data-state=error] { color:var(--no); }
.receipt-card { margin-top:20px; padding:18px; border:1px solid var(--line); border-radius:10px; background:var(--surface-2); }
.receipt-card h2 { margin:0 0 12px; font-size:17px; }
.receipt-card [data-receipt-details]>div { display:flex; justify-content:space-between; gap:15px; padding:6px 0; font-size:12px; }
.receipt-card span { color:var(--muted); }
.receipt-card b { text-align:right; font-weight:600; overflow-wrap:anywhere; }
.transaction-link { display:block; margin-top:12px; text-align:center; color:var(--accent); font-size:12px; }
.swap-dialog { width:460px; max-width:calc(100vw - 24px); max-height:calc(100dvh - 32px); padding:24px; overflow:auto; border:1px solid var(--line); border-radius:var(--radius); background:var(--surface); color:var(--text); box-shadow:var(--shadow-lg); }
.swap-dialog::backdrop { background:rgba(3,11,24,.76); backdrop-filter:blur(3px); }
.dialog-heading { display:flex; justify-content:space-between; align-items:center; gap:15px; padding-bottom:16px; margin-bottom:18px; border-bottom:1px solid var(--line); }
.dialog-heading h2 { margin:0; font-size:22px; }
.swap-dialog .close-button { min-width:30px; height:30px; padding:0; font-size:23px; }
.token-dialog { min-height:510px; }
.swap-page .token-search { display:flex; gap:10px; align-items:center; margin-bottom:14px; padding:0 12px; border:1px solid var(--line); border-radius:var(--radius-sm); background:var(--surface-2); color:var(--muted); }
.swap-page .token-search input { min-width:0; width:100%; padding:10px 0; border:0; background:none; box-shadow:none; color:var(--text); font-size:13px; }
.token-search:focus-within { outline:2px solid var(--accent); outline-offset:2px; }
.picker-networks { display:flex; flex-wrap:wrap; gap:6px; margin:12px 0; }
.picker-networks button { padding:6px 8px; border:1px solid var(--line); border-radius:6px; background:var(--surface-2); color:var(--muted); font-size:10px; font-weight:650; }
.picker-networks button[aria-pressed=true] { color:var(--accent); border-color:var(--accent); background:var(--accent-soft); }
.picker-notice { margin:12px 0; padding:10px 12px; border-left:2px solid var(--yes); border-radius:0 6px 6px 0; background:var(--yes-soft); color:var(--yes); font-size:11px; line-height:1.6; }
.popular-tokens { display:flex; flex-wrap:wrap; gap:8px; margin:20px 0; }
.popular-tokens button { display:flex; align-items:center; gap:6px; padding:5px 8px 5px 5px; border:1px solid var(--line); border-radius:7px; background:var(--surface-2); color:var(--text); font-size:12px; }
.popular-tokens .token-icon { width:22px; height:22px; font-size:18px; }
.list-label { display:flex; justify-content:space-between; margin:12px 0 5px; color:var(--muted); font-size:11px; letter-spacing:.04em; text-transform:uppercase; }
.list-label span { font-size:10px; font-weight:500; }
.token-list button { display:flex; align-items:center; gap:12px; width:100%; padding:13px 5px; border:0; border-bottom:1px solid var(--line-soft); background:none; color:var(--text); text-align:left; }
.token-list button:hover { background:var(--surface-2); }
.token-list .token-icon { width:32px; height:32px; font-size:24px; }
.token-text { display:flex; flex:1; flex-direction:column; min-width:0; gap:3px; }
.token-text b { font-size:14px; font-weight:700; }
.token-text small { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:var(--muted); font-size:11px; }
.token-amount { color:var(--muted); font-size:12px; }
.empty-search { margin:20px 0; color:var(--muted); font-size:13px; text-align:center; }
.settings-section { padding:18px 0; border-bottom:1px solid var(--line); }
.settings-section:first-of-type { padding-top:0; }
.settings-section>label { color:var(--text); font-size:14px; }
.settings-section p,.settings-footnote,.dialog-description { margin:8px 0 0; color:var(--muted); font-size:12px; line-height:1.7; }
.settings-section select { background:var(--surface-2); color:var(--text); font-size:13px; }
.slippage-controls { display:flex; gap:7px; margin-top:14px; }
.slippage-controls>button,.custom-slippage { margin:0; padding:9px 12px; border:1px solid var(--line); border-radius:7px; background:var(--surface-2); color:var(--muted); font-size:12px; font-weight:650; white-space:nowrap; }
.slippage-controls>button.active { color:var(--accent); background:var(--accent-soft); border-color:var(--accent); }
.swap-page .custom-slippage { display:flex; align-items:center; flex:1; min-width:0; gap:4px; }
.swap-page .custom-slippage input { width:100%; min-width:0; min-height:0; padding:0; border:0; border-radius:0; background:none; color:var(--text); box-shadow:none; font-size:12px; }
.custom-slippage:focus-within { outline:2px solid var(--accent); outline-offset:2px; }
.settings-footnote { margin-top:16px; font-size:11px; }
.wallet-option { display:flex; align-items:center; gap:12px; width:100%; margin:20px 0; padding:16px; border:1px solid var(--line); border-radius:10px; background:var(--surface-2); color:var(--text); text-align:left; }
.wallet-option>span:nth-child(2) { flex:1; }
.wallet-option b { display:block; font-size:16px; }
.wallet-option small { display:block; margin-top:4px; color:var(--muted); font-size:11px; }
.metamask-icon { display:grid; place-items:center; width:38px; height:38px; flex-shrink:0; border-radius:9px; background:#f6851b; color:#3c1f0c; font-size:23px; font-weight:850; }
.connected-wallet { padding:14px; border:1px solid var(--line); border-radius:9px; background:var(--surface-2); font-size:12px; }
.connected-wallet code { display:block; margin:8px 0 14px; overflow-wrap:anywhere; }
.secondary-button { padding:9px 12px; border:1px solid var(--line); border-radius:7px; background:var(--surface); color:var(--text); font-size:12px; }
.review-amount { display:flex; flex-direction:column; gap:8px; padding:16px; border:1px solid var(--line); border-radius:9px; background:var(--surface-2); }
.review-amount span { color:var(--muted); font-size:12px; }
.review-amount strong { color:var(--text-strong); font-size:26px; font-weight:650; overflow-wrap:anywhere; }
.review-arrow { padding:5px 14px; color:var(--accent); }
.review-details { padding-top:14px; font-size:12px; }
.about-copy p { color:var(--muted); font-size:13px; line-height:1.8; }
@media(max-width:1100px) {
    .swap-workspace { grid-template-columns:minmax(0,1fr) 250px; gap:14px; }
    .swap-trade-panel { padding:20px; }
    .swap-pair { grid-template-columns:minmax(0,1fr) 26px minmax(0,1fr); gap:5px; }
    .flip-button { width:26px; }
    .amount-card { padding:13px; }
    .swap-page .wallet-button { font-size:11px; }
}
@media(max-width:940px) {
    .swap-workspace { grid-template-columns:1fr; }
    .swap-sidebar { grid-template-columns:1fr 1fr; }
    .swap-hero { gap:25px; padding:30px; }
    .swap-hero-panel { padding:16px; }
    .swap-pair { grid-template-columns:minmax(0,1fr) 34px minmax(0,1fr); gap:10px; }
    .flip-button { width:34px; }
}
@media(max-width:600px) {
    .zirix-swap .topbar-inner { gap:10px; }
    .zirix-swap .topbar-right > .btn-primary { display:none; }
    .zirix-swap .swap-page { width:calc(100% - 18px); padding-top:10px; }
    .swap-hero { display:block; padding:25px 23px; border-radius:16px; }
    .swap-hero h1 { font-size:33px; }
    .swap-hero p { font-size:12px; }
    .swap-hero-panel { display:none; }
    .swap-panel-heading { flex-wrap:wrap; gap:15px; padding-bottom:16px; }
    .swap-panel-heading h2 { font-size:21px; }
    .swap-page .wallet-button { width:100%; font-size:12px; }
    .swap-trade-panel { padding:18px; }
    .swap-tools { padding:14px 0; }
    .swap-pair { grid-template-columns:1fr; gap:7px; }
    .amount-card { padding:16px; }
    .flip-button { justify-self:center; height:29px; }
    .flip-button svg { transform:rotate(90deg); }
    .swap-page .amount-card input,.swap-page .amount-card output { min-height:48px; margin-top:8px; font-size:34px; }
    .card-caption { margin-bottom:10px; }
    .swap-sidebar { grid-template-columns:1fr; }
    .testnet-note { align-items:flex-start; font-size:10px; text-align:left; }
    .testnet-note .network-dot { margin-top:5px; }
    .swap-dialog { padding:20px; }
    .dialog-heading h2 { font-size:20px; }
    .slippage-controls>button,.custom-slippage { padding:9px 10px; }
    .picker-networks { gap:5px; }
}
@media(prefers-reduced-motion:reduce) { .swap-page * { transition:none!important; animation:none!important; } }
