/* Portal finish, shared by the testnet tools and their legacy origins. */
:root {
  color-scheme: dark;
  --paper: #f0f0f0;
  --ink: #0d0d0d;
  --faint: #adadad;
  --seam: #343434;
  --surface: #171717;
  --breath: clamp(30px, 5vw, 70px);
  --bg: var(--ink);
  --panel: var(--surface);
  --muted: var(--faint);
  --radius: 18px;
}
body {
  margin: 0;
  color: var(--paper);
  background: var(--ink);
  font: 400 16px/1.55 "Helvetica Neue", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
body .spcx-bar[data-shell=portal] .spcx-rail {
  border: 1px solid #373737;
  border-radius: 36px;
  background: #131313;
  box-shadow: 0 4px 22px #0003;
}
.spcx-rail::before { display: none; }
.spcx-bar #spcx-navigation a::before,
.spcx-bar #connect { border-radius: 50px; }
.spcx-bar .spcx-tools { gap: 5px; }
.spcx-bar #connect { padding-inline: 17px; }
body main:not(.swap-layout) {
  box-sizing: border-box;
  max-width: 1180px;
  margin-inline: auto;
  padding-inline: clamp(16px, 4.2vw, 56px);
  padding-bottom: var(--breath);
}
main .primary, main .outline, main .button, main .copy-button,
main #trade, main #wallet-use, main .tag, main .badge, .scan-tag {
  border-radius: 999px;
}
main .primary, main .button.primary, main #trade {
  background: var(--paper); border-color: var(--paper); color: #181818;
}
main .primary:hover:not(:disabled), main #trade:hover:not(:disabled) {
  background: #fff; border-color: #fff;
}
main .card, main .segmented, main .amount-box, main .input,
main .address, main .amount, main .search input, main .message,
main .result, main .network, main .chain-box, main .swap-field {
  border-radius: 17px;
}
main .card { border-color: transparent; background: var(--surface); }
main .bridge-aside > .card, main .layout > aside > .card,
main .config-list, main .scan-sub.card {
  border: 0; border-top: 1px solid var(--seam);
  border-radius: 0; background: transparent;
  padding: 20px 0 4px;
}
main .table-wrap { border: 0; background: transparent; border-radius: 0; }
main th { background: #181818; }
main th:first-child { border-start-start-radius: 13px; }
main th:last-child { border-start-end-radius: 13px; }
main td, main th { border-bottom-color: #2d2d2d; }

/* Give the landing image space. Inside tools, reserve the first screen for actions. */
body .network-hero {
  border: 0;
  margin-inline: -1px;
  padding: clamp(46px, 7.5vw, 104px) clamp(12px, 3vw, 44px);
  min-height: clamp(300px, 32vw, 440px);
  border-radius: clamp(23px, 4vw, 48px);
  background:
    linear-gradient(90deg, #04040429, #04040445 50%, #04040422),
    #0a0a0a url('/ui-v4/hero.webp') 50% 62%/cover no-repeat;
}
body .network-hero .hero-copy { padding: 0; }
body .network-hero .hero-copy h1 {
  margin: 12px auto 14px;
  font-size: clamp(49px, 7.5vw, 100px);
  font-weight: 500;
  line-height: .99; letter-spacing: -.065em;
}
body .network-hero .hero-copy > p { max-width: 38ch; color: #d4d4d4; }
body .product-hero {
  display: block;
  min-height: 0;
  border: 0;
  background: transparent;
  border-radius: 0;
  text-align: start;
  margin: 6px 0 25px;
  padding: clamp(10px, 2.2vw, 29px) 0 0;
}
body .product-hero .product-copy { max-width: 680px; padding: 0; margin: 0; text-align: start; }
body .product-hero .product-copy h1, body .swap-layout h1 {
  margin: 2px 0 9px; font-weight: 500; font-size: clamp(38px, 5.4vw, 66px);
  line-height: 1.02; letter-spacing: -.065em;
}
body .product-hero .product-copy > p { margin: 0; }
body .product-hero .product-copy .eyebrow { justify-content: flex-start; margin-bottom: 9px; }
body .product-hero .product-art { display: none; }
body .product-hero .tag { margin-top: 10px; }
body .breadcrumb, body .crumb { margin-bottom: 10px; }
body .bridge-layout, body .layout { max-width: none; gap: clamp(24px, 4vw, 58px); }
main .bridge-card, main .form-card, .swap-layout #swap-form {
  border: 1px solid #303030;
  background: #171717;
  border-radius: 28px;
  padding: clamp(18px, 3vw, 36px);
}
main .bridge-aside, main .layout > aside { padding-block: 7px; gap: 25px; }
main .segmented { width: fit-content; max-width: 100%; border-radius: 99px; padding: 4px; }
main .segmented > button { min-height: 40px; padding-inline: 17px; border-radius: 99px; }
main .segmented .selected { background: #333333; color: var(--paper); }
main .chain-box, main .network, main .amount, main .swap-field,
main .address, main .input, main .amount-box, main .search input {
  border: 1px solid #393939; background: #121212;
}
main .chain-box { padding: 13px 16px; }
main .chain-box > div { margin: 5px 0; }
main .route-line { margin: 4px 0; }
main .amount-box:focus-within, main .address:focus-within,
main .swap-field:focus-within { outline: 2px solid #c3c3c3; outline-offset: 1px; }
main .amount-box > input { font-variant-numeric: tabular-nums; }
main .network.selected { border-color: #ababab; background: #232323; }
main .network .icon, main .chain-box .chain-icon { border-radius: 50%; overflow: hidden; }
main .network .icon img, main .chain-box .chain-icon img,
img.asset-icon { display: inline-block; object-fit: contain; vertical-align: middle; }
img.asset-icon { width: 30px; height: 30px; flex: 0 0 auto; border-radius: 50%; }
main #claim-form .amount strong { display: flex; align-items: center; gap: 8px; }
main .testnet-notice { margin-top: 30px; }
body .swap-layout {
  min-height: auto; max-width: 530px; margin: clamp(32px, 8vh, 92px) auto;
  padding: 0 clamp(16px, 3vw, 25px);
}
.swap-layout .swap-field { padding: 14px 17px; gap: 8px; }
.swap-layout #trade { min-height: 50px; }
main .swap-layout output { overflow-wrap: anywhere; }
main :is(a,button,input):focus-visible, .activity-sheet :is(a,button):focus-visible {
  outline: 2px solid #d1d1d1; outline-offset: 3px;
}

/* Flat, readable network measurements and open sections. */
main .network-metrics, main .scan-metrics, main .limits {
  background: transparent; border: 0; border-bottom: 1px solid var(--seam);
  padding: 8px 0; gap: 8px;
}
main .network-metrics article, main .scan-metrics article, main .limits > div {
  padding: 15px 0; border: 0;
}
main .network-metrics strong, main .scan-metrics strong, main .limits strong {
  font-weight: 450; letter-spacing: -.045em;
}
.portal-welcome {
  display: grid; grid-template-columns: .92fr 1.08fr; gap: clamp(28px, 7vw, 88px);
  align-items: start; padding: var(--breath) 0;
}
.portal-welcome h2, main .onboarding h2 {
  font-size: clamp(32px, 4.1vw, 56px);
  line-height: 1.02; font-weight: 500; letter-spacing: -.06em;
  margin: 0 0 14px;
}
.portal-welcome p, .portal-welcome small {
  font-size: 15px; line-height: 1.55; color: #bdbdbd; margin: 0;
}
.welcome-intro p { max-width: 43ch; }
.welcome-paths a {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 16px 0; min-height: 64px; border-bottom: 1px solid var(--seam);
  color: var(--paper);
}
.welcome-paths a:first-child { padding-top: 0; }
.welcome-paths strong, .welcome-paths small { display: block; }
.welcome-paths strong { font-size: 19px; letter-spacing: -.035em; font-weight: 550; }
.welcome-paths small { margin-top: 4px; }
.welcome-arrow { font-size: 23px; line-height: 1; transition: transform .18s ease; }
.welcome-paths a:hover .welcome-arrow { transform: translate(2px,-2px); }
.portal-welcome + .portal-title { margin-top: 8px; }
main .resource-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 0 clamp(22px, 5vw, 70px);
}
main a.resource {
  flex-direction: row; align-items: center; gap: 16px; border: none;
  border-top: 1px solid var(--seam); border-radius: 0;
  padding: 16px 0; background: transparent;
}
main .resource-art, main .resource .swap-art {
  display: grid; place-items: center; width: 64px; height: 64px;
  border-radius: 50%; flex: none; background-color: #1c1c1c; overflow: hidden;
}
main .resource-content {
  border: 0; padding: 0; display: block; min-height: 0;
}
main .resource-content h3 { font-size: 22px; }
main .resource-content p { margin-top: 4px; }
main .resource-content span { font-size: 12px; border: 0; padding: 0; }
main .resource:hover { background: transparent; }
main .resource:hover .resource-content h3 { text-decoration: underline; text-underline-offset: .22em; }
main .onboarding { gap: clamp(22px, 6vw, 70px); margin-block: var(--breath); }
main .scan-pages .outline { min-height: 44px; }

/* The activity overlay is a sheet on touch screens and a compact ledger on desktop. */
button.activity-trigger {
  display: inline-grid; place-items: center; min-width: 44px; min-height: 44px;
  border: 1px solid #474747; border-radius: 50%; background: #1c1c1c;
  color: var(--paper); cursor: pointer;
}
button.activity-trigger:hover { border-color: #9b9b9b; background: #262626; }
dialog.activity-sheet {
  position: fixed; inset: 0; box-sizing: border-box;
  width: min(460px, calc(100vw - 32px));
  height: fit-content; max-height: min(76dvh, 740px); margin: auto;
  border: 1px solid #3d3d3d; border-radius: 27px; padding: clamp(17px, 3vw, 26px);
  color: var(--paper); background: #181818; box-shadow: 0 24px 90px #0006;
  overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; scrollbar-width: thin;
}
dialog.activity-sheet::backdrop { background: #050505ab; }
.activity-sheet[open] { animation: sheet-in .18s ease-out; }
.activity-sheet h2 { margin: 0; font-size: 25px; font-weight: 550; letter-spacing: -.05em; }
.activity-sheet h3 { font-size: 18px; margin-block: 20px 8px; }
.activity-sheet p { color: var(--faint); }
.activity-sheet button, .activity-sheet a { min-height: 44px; }
.activity-sheet .activity-list { display: grid; gap: 0; }
.activity-sheet .activity-card {
  box-sizing: border-box; width: 100%; display: grid; align-items: center;
  text-align: left; color: var(--paper); border: 0; border-bottom: 1px solid var(--seam);
  background: transparent; border-radius: 0; padding: 18px 4px; gap: 6px;
}
.activity-sheet .activity-card:last-child { border-bottom: 0; }
.activity-sheet button.activity-card:hover { background: #242424; }
.activity-sheet .activity-detail { min-width: 0; overflow-wrap: anywhere; }
.activity-sheet .activity-steps { list-style: none; margin: 14px 0 0; padding: 0; }
.activity-sheet .activity-steps > li {
  position: relative; padding: 8px 0 14px 20px; border-left: 1px solid #484848; margin-left: 7px;
}
.activity-sheet .activity-steps > li:last-child { border-left-color: transparent; }
.activity-sheet .activity-steps > li::before {
  content: ""; position: absolute; left: -5px; top: 15px; width: 7px; height: 7px;
  border-radius: 50%; border: 1px solid #787878; background: #1c1c1c;
}
.activity-sheet .activity-steps > li[data-state=done]::before { background: #c8c8c8; border-color: #c8c8c8; }
.activity-sheet .activity-steps > li[data-state=current]::before { background: var(--paper); border-color: var(--paper); }
.activity-sheet a { color: #dadada; text-decoration: underline; text-underline-offset: .18em; }
.activity-sheet .asset-icon { width: 28px; height: 28px; }
@keyframes sheet-in { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: none; } }

@media (max-width: 880px) {
  .portal-welcome { grid-template-columns: 1fr; gap: 18px; }
  .welcome-intro p { max-width: 66ch; }
  body .spcx-bar[data-shell=portal] .spcx-rail { border-radius: 22px; }
  main .onboarding { grid-template-columns: 1fr; }
  main .config-list { border-top: 0; padding: 0; }
}
@media (max-width: 600px) {
  body main:not(.swap-layout) { padding-inline: 16px; padding-top: 12px; }
  body .network-hero { min-height: 275px; padding: 37px 13px; }
  body .network-hero .hero-copy > p { font-size: 15px; line-height: 1.45; }
  body .network-hero .hero-copy h1 { font-size: clamp(41px, 10vw, 55px); }
  main .resource-grid { grid-template-columns: 1fr; }
  main .resource-art, main .resource .swap-art { width: 48px; height: 48px; }
  body .product-hero { margin-bottom: 16px; padding-top: 6px; }
  main .bridge-card, main .form-card, .swap-layout #swap-form { border-radius: 23px; padding: 18px 14px; }
  body .network-metrics, body .scan-metrics { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 0 12px; }
  .activity-sheet[open] { inset: auto 0 0; margin: 0; width: 100%; max-height: 86vh; max-height: 86dvh;
    padding-bottom: max(20px, env(safe-area-inset-bottom)); border-radius: 26px 26px 0 0; }
  main .onboarding { margin-top: 40px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .welcome-arrow, .activity-sheet, .resource, .segmented button { animation: none !important; transition: none !important; }
}
.bridge-actions,.activity-heading,.receipt-links,.transfer-amount,.token-pair {display:flex;align-items:center;gap:10px}
.bridge-actions,.activity-heading {justify-content:space-between}
.activity-heading button,.receiver-copy {background:transparent;color:inherit;border:0;padding:0 8px;cursor:pointer}
.activity-heading h2{flex:1}
.activity-heading [hidden],.bridge-aside [hidden],.token-pair [hidden]{display:none!important}
.receipt-links{align-items:flex-start;flex-direction:column;margin:12px 0}
.receipt-links a{display:inline-flex;align-items:center}
.activity-sheet .stage-label{color:#c9c9c9}
.activity-card strong,.transfer-amount strong{font-size:1.25rem;letter-spacing:-.03em}
.activity-card small,.activity-detail small{color:var(--faint)}
.asset-icon{height:26px;width:26px;display:inline-block;vertical-align:middle;flex:none}
.amount .token-pair,.amount-box .token-pair{display:flex;align-items:center;gap:8px}
.bridge-aside #recovery-open{margin-top:14px;cursor:pointer;font:inherit;background:transparent;border:none;color:var(--faint);text-decoration:underline;text-underline-offset:4px}
.activity-import{margin:14px 0;border-top:1px solid var(--seam);padding-top:15px}
.activity-import summary{cursor:pointer}
.activity-import form{display:grid;gap:7px;margin:12px 0}
@media(prefers-reduced-motion:no-preference){.activity-steps li[data-state=current]::before{animation:spcx-pulse 2s ease-in-out infinite}@keyframes spcx-pulse{50%{opacity:.4}}}
main .spcx-token-symbol::before,main #claim-amount::before{content:none}
main .network-metrics strong.token-pair{display:flex}
body main .view .product-hero .product-copy {margin-inline:0;max-width:70ch}
body .bridge-actions {margin-bottom:14px}
body .bridge-actions .segmented {margin:0}
/* One continuous route inside the bridge form. */
body main .bridge-card .chain-box {position:relative;border:0;border-radius:0;padding:8px 0 8px 20px;background:transparent}
body main .bridge-card .chain-box::before {content:"";position:absolute;left:0;top:16px;width:7px;height:7px;border-radius:50%;background:#dadada}
body main .bridge-card .route-line {border-left:1px solid #4d4d4d;min-height:16px;height:16px;margin:0 0 0 3px;color:transparent}
body main .bridge-card .amount-box {margin-top:4px;border:0;border-bottom:1px solid #505050;border-radius:0;background:transparent;padding:4px 0 10px}
body main .bridge-card .amount-box input {min-width:0;max-width:100%}
.activity-card .asset-route,.activity-detail .asset-route {display:flex;gap:9px;align-items:center}
.asset-route .route-marks{display:inline-flex;align-items:center;flex:none}
.asset-route .route-marks img {box-sizing:border-box;height:20px;width:20px;border-radius:50%;border:2px solid #1a1a1a}
.asset-route .route-marks img+img {margin-left:-6px}

/* SPCX testnet transaction surfaces, v5.3 */
body[data-spcx-ui] {
  color-scheme: dark;
  --text: #f4f4f4; --muted: #c1c1c1; --border: #3e3e3e; --green: #c1c1c1;
  font-family: "Helvetica Neue", Arial, sans-serif;
  min-height: 100vh; min-height: 100svh; margin: 0; color: var(--text);
  background-color:#080808;
  background-image:radial-gradient(ellipse 80% 630px at 96% 0%, rgb(255 255 255 / 15%), transparent 78%),
    radial-gradient(ellipse 56% 490px at 0% 72%, rgb(255 255 255 / 5%), transparent 84%);
  background-repeat:no-repeat;
}
body[data-spcx-ui] .spcx-bar { color-scheme: dark; --text: #f6f6f6; --muted:#bfbfbf; }
body[data-spcx-ui] main:not(.swap-layout), body[data-spcx-ui] main.swap-layout {
  box-sizing: border-box; width: 100%; max-width: 780px; min-height: 0;
  margin: 0 auto; padding: clamp(28px,5vh,58px) clamp(16px,3vw,32px) 60px; color: var(--text);
}
body[data-spcx-ui] :is(.breadcrumb,.crumb), body[data-spcx-ui] .product-art { display: none; }
body[data-spcx-ui] .product-hero, body[data-spcx-ui] .swap-title {
  display: block; text-align: center; min-height: 0; max-width: 540px;
  margin: 0 auto clamp(20px,3.3vh,34px); padding: 0; background: transparent; overflow: visible;
}
body[data-spcx-ui] .product-hero .product-copy { max-width: none; margin:0; text-align:center; padding:0; }
body[data-spcx-ui] .product-hero .product-copy h1, body[data-spcx-ui] .swap-title h1 {
  color: #f4f4f4; font-size:clamp(40px,5.8vw,66px); line-height:1.03;
  letter-spacing:-.069em; font-weight:500; margin:0 0 9px;
}
body[data-spcx-ui] .product-copy > p, body[data-spcx-ui] .swap-title p {
  font-size:clamp(14px,1.5vw,16px); line-height:1.45; color:#c1c1c1; margin:0 auto; max-width:46ch;
}
body[data-spcx-ui] .bridge-layout, body[data-spcx-ui] .layout {
  width:100%; max-width:532px; margin:0 auto; display:grid; grid-template-columns:minmax(0,1fr);
  align-items:start; gap:20px;
}
body[data-spcx-ui] main :is(.bridge-card,.form-card), body[data-spcx-ui] #swap-form {
  box-sizing:border-box; width:100%; min-width:0; margin:0 auto; max-width:532px;
  padding:clamp(17px,2.6vw,28px); border-radius:26px;
  border:1px solid #3e3e3e; background:#151515;
  box-shadow:0 1px 2px #00000009, 0 12px 38px -22px #00000054;
}
body[data-spcx-ui] main :is(label,h2,h3,.token-pair,.amount strong,.detail-row strong,.network strong) {color:#f4f4f4}
body[data-spcx-ui] .bridge-actions { display:flex; align-items:center; justify-content:space-between; margin:0 0 18px; }
body[data-spcx-ui] .bridge-card .segmented {margin:0;background:#1c1c1c;border:1px solid #282828;gap:2px;padding:3px}
body[data-spcx-ui] .segmented button {min-height:38px;padding-inline:19px;color:#c1c1c1}
body[data-spcx-ui] .segmented button.selected {background:#151515;color:#f4f4f4;border:1px solid #3e3e3e;box-shadow:0 1px 3px #00000015}
body[data-spcx-ui] .activity-trigger {color:#d6d6d6;background:#151515;border-color:#3e3e3e}
body[data-spcx-ui] .activity-trigger:hover {background:#1c1c1c}
body[data-spcx-ui] .chain-box {background:#1c1c1c;border:1px solid #282828;border-radius:16px;padding:12px 16px}
body[data-spcx-ui] .chain-box > span, body[data-spcx-ui] .chain-box small,
body[data-spcx-ui] .small, body[data-spcx-ui] .network small, body[data-spcx-ui] .amount span, body[data-spcx-ui] .detail-row span,
body[data-spcx-ui] .disclaimer, body[data-spcx-ui] .limits span, body[data-spcx-ui] .muted {color:#c1c1c1}
body[data-spcx-ui] .chain-box > div { margin:3px 0; gap:9px; }
body[data-spcx-ui] .chain-box small {display:block;line-height:1.35}
body[data-spcx-ui] .chain-box .chain-icon {width:29px;height:29px}
body[data-spcx-ui] main .bridge-card .route-line {position:relative;z-index:1;width:29px;height:29px;margin:-5px auto;
  display:grid; place-items:center;background:#151515;border:1px solid #3e3e3e;border-radius:50%;
  color:#c1c1c1;font:500 18px/1 system-ui;}
body[data-spcx-ui] :is(.amount-box,.address,.input,.swap-field,.amount,.network) {background:#1c1c1c;border:1px solid #282828;color:#f4f4f4}
body[data-spcx-ui] .amount-box input, body[data-spcx-ui] :is(.address,.swap-field) input, body[data-spcx-ui] .swap-field output { color:#f4f4f4; background:transparent }
body[data-spcx-ui] ::placeholder { color:#a9a9a9;opacity:1 }
body[data-spcx-ui] .amount-box span, body[data-spcx-ui] .detail-row, body[data-spcx-ui] #swap-note, body[data-spcx-ui] .swap-fine, body[data-spcx-ui] #swap-status {color:#c1c1c1}
body[data-spcx-ui] .detail-row {border-color:#282828}
body[data-spcx-ui] main :is(.primary,#trade) {background:#f4f4f4;color:#151515;border:1px solid #f4f4f4;border-radius:15px;min-height:48px}
body[data-spcx-ui] main :is(.primary,#trade):hover:not(:disabled) {background:#d6d6d6;color:#151515}
body[data-spcx-ui] main :is(.primary,#trade):disabled {background:#282828;color:#c1c1c1;border-color:#282828;opacity:1}
body[data-spcx-ui] main :is(.outline,#wallet-use) {color:#d6d6d6;background:#151515;border-color:#3e3e3e}
body[data-spcx-ui] .bridge-aside, body[data-spcx-ui] main .layout>aside {display:grid; gap:0; padding:0 3px; min-width:0}
body[data-spcx-ui] .bridge-aside .card, body[data-spcx-ui] main .layout>aside>.card {
  border:0; border-top:1px solid #3e3e3e;background:transparent;padding:17px 0 13px; border-radius:0;
}
body[data-spcx-ui] .bridge-aside h3, body[data-spcx-ui] .layout>aside h2 {color:#d6d6d6;font-size:16px; letter-spacing:-.024em;margin:0 0 5px}
body[data-spcx-ui] .bridge-aside p, body[data-spcx-ui] .guide p, body[data-spcx-ui] .network-list small {color:#c1c1c1;font-size:14px;line-height:1.5}
body[data-spcx-ui] #recovery-open, body[data-spcx-ui] .guide a {color:#d6d6d6}
body[data-spcx-ui] .network.selected {border-color:#a9a9a9;background:#1c1c1c}
body[data-spcx-ui] .network .check {color:#f4f4f4}
body[data-spcx-ui] .title .badge, body[data-spcx-ui] .badge, body[data-spcx-ui] .tag {background:#1c1c1c;border:1px solid #3e3e3e;color:#c1c1c1}
body[data-spcx-ui] main .limits, body[data-spcx-ui] main .disclaimer, body[data-spcx-ui] main .swap-fine {width:100%;max-width:532px;box-sizing:border-box;margin-inline:auto}
body[data-spcx-ui] main .limits {border-color:#3e3e3e} body[data-spcx-ui] .limits strong {color:#d6d6d6}
body[data-spcx-ui] .swap-fine {text-align:center;margin-top:17px;font-size:13px}
body[data-spcx-ui] #swap-form label {color:#c1c1c1;font-weight:550}
body[data-spcx-ui] #swap-form .swap-field {padding:16px; border-radius:16px}
body[data-spcx-ui] #reverse {color:#d6d6d6}
body[data-spcx-ui] :is(.message,.result,.claim-result) {background:#1c1c1c;border:1px solid #3e3e3e;color:#d6d6d6}
body[data-spcx-ui] :is(.message.error,.error) {background:#1c1c1c;color:#c1c1c1;border-color:#515151}
body[data-spcx-ui] :is(.hash,.textbutton,#swap-receipt) {color:#d6d6d6}
body[data-spcx-ui] main :is(input,button,a):focus-visible {outline:2px solid #c1c1c1;outline-offset:3px}
body[data-spcx-ui] .amount-box:focus-within, body[data-spcx-ui] .address:focus-within, body[data-spcx-ui] .swap-field:focus-within {outline:2px solid #a9a9a9}
body[data-spcx-ui] footer {color:#c1c1c1; background:transparent;border-color:#3e3e3e}
body[data-spcx-ui] footer :is(a,span) {color:#c1c1c1}
body[data-spcx-ui] .activity-sheet {color-scheme:dark;--muted:#aeaeae;--text:#eee;--border:#3f3f3f;color:#eee}
body[data-spcx-ui] .activity-sheet :is(h2,label,.input) {color:#eee}
body[data-spcx-ui] .activity-sheet .input {background:#242424;border-color:#434343}
body[data-spcx-ui] .activity-sheet button.outline {background:#282828;color:#eee;border-color:#505050}
@media(max-width:550px){
  body[data-spcx-ui] main:not(.swap-layout), body[data-spcx-ui] main.swap-layout {padding:24px 14px 40px}
  body[data-spcx-ui] main :is(.bridge-card,.form-card), body[data-spcx-ui] #swap-form {border-radius:21px;padding:17px}
  body[data-spcx-ui] .chain-box {padding:10px 13px}
  body[data-spcx-ui] .product-copy>p, body[data-spcx-ui] .swap-title p {max-width:34ch}
  body[data-spcx-ui] .bridge-actions {margin-bottom:14px}
}
body[data-screen=portal]:has(#network:not([hidden])) main {
  max-width:1100px; padding-top:12px;
}
body[data-screen=portal] .network-hero {
  min-height:clamp(260px,31vw,390px);background:none;box-shadow:none;border:0;
}
body[data-screen=portal] .network-hero::before, body[data-screen=portal] .network-hero::after {display:none}
body[data-screen=portal] .hero-copy :is(h1,.hero-docs), body[data-screen=portal] #network a:not(.primary) {color:#f4f4f4}
body[data-screen=portal] .hero-copy > p, body[data-screen=portal] #network :is(p,small,.network-status) {color:#c1c1c1}
body[data-screen=portal] #network :is(.network-metrics,.config-list,.resource,.welcome-paths a,.testnet-notice) {background:transparent;border-color:#3e3e3e}
body[data-screen=portal] #network :is(.resource-content h3,.resource-content span,.metrics strong,.config-list strong) {color:#d6d6d6}
body[data-screen=portal] #network .resource {grid-template-columns:1fr; color:#d6d6d6}
body[data-screen=portal] #network .copy-button {color:#c1c1c1;border-color:#515151}
body[data-screen=portal] #network :is(.wallet-controls,.hero-button.outline) {color:#d6d6d6}
body[data-screen=portal] #network .network-status:has([data-flight]) .dot {display:none}
body[data-spcx-ui] [data-flight]:not([hidden])::before {
  content:""; display:inline-block; height:1.25em; width:1.25em;
  vertical-align:-.24em; margin-inline-end:.42em; pointer-events:none;
  background:currentColor;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' fill-rule='evenodd' d='M21.8 2.2C15.4 1.8 11.4 4.6 8.4 9.1L4 9.8l-2.2 4.4 5.1-.1 3 3 .1 5.1 4.2-2.3.8-4.4C19.5 12.3 22.1 8 21.8 2.2ZM14.1 7.3a1.9 1.9 0 1 0 3.8 0 1.9 1.9 0 0 0-3.8 0ZM7.3 16.1c-.5 3.1-2.4 4.5-5.6 5 .5-3.1 2.1-4.9 5.6-5Z'/%3E%3C/svg%3E") center/contain no-repeat;
}
body[data-spcx-ui] #activity-refresh[data-flight] {font-size:0}
body[data-spcx-ui] #activity-refresh[data-flight]::before {font-size:16px;margin:0}
@media(prefers-reduced-motion:no-preference) {
  body[data-spcx-ui] [data-flight]::before {animation:spcx-flight 1.15s ease-in-out infinite}
  @keyframes spcx-flight {0%,100%{transform:translate(-1.5px,1.5px)}50%{transform:translate(1.5px,-1.5px)}}
}
@media(forced-colors:active){body[data-spcx-ui] [data-flight]::before{background:CanvasText;forced-color-adjust:none}}

/* SPCX black / silver */
body[data-spcx-ui] {accent-color:#d9d9d9}
body[data-spcx-ui] .segmented button.selected {background:#383838;color:#fff;border-color:#676767}
body[data-spcx-ui] main :is(.primary,#trade):not(:disabled) {background:#efefef;color:#121212;border-color:#efefef}
body[data-spcx-ui] main :is(.primary,#trade):hover:not(:disabled) {background:#fff;color:#080808}
body[data-spcx-ui] main :is(.primary,#trade):disabled {background:#292929;color:#aaa;border-color:#444}
body[data-spcx-ui] .chain-box strong, body[data-spcx-ui] #token-symbol {color:#f4f4f4}
body[data-spcx-ui] .network.selected {background:#242424;border-color:#949494}
body[data-spcx-ui] .activity-sheet {background:#161616}
body[data-spcx-ui] ::selection {background:#bcbcbc;color:#080808}
/* Amount, address and swap inputs belong to a single field surface. */
body[data-spcx-ui] main :is(.amount-box,.address,.swap-field):focus-within {
  outline:none;
}
body[data-spcx-ui] main :is(.amount-box,.address,.swap-field) input:is(:focus,:focus-visible) {
  outline:none;box-shadow:none;
}
body[data-spcx-ui] main .bridge-card .amount-box:has(input:focus) {
  border-bottom-color:#dadada;box-shadow:inset 0 -1px #dadada;
}
body[data-spcx-ui] main :is(.address,.swap-field):has(input:focus) {
  border-color:#bcbcbc;box-shadow:inset 0 0 0 1px #bcbcbc;
}
body main :is(#scan-query,#claim-hash,.input):focus-visible,
body .activity-sheet :is(input,select):focus-visible {
  outline:2px solid #c4c4c4;outline-offset:-2px;
}
@supports not selector(:has(input:focus)) {
  body[data-spcx-ui] main :is(.amount-box,.address,.swap-field):focus-within {outline:2px solid #ccc;outline-offset:1px}
}
@media (forced-colors:active) {
  body[data-spcx-ui] main :is(.amount-box,.address,.swap-field):focus-within {outline:2px solid Highlight;outline-offset:2px}
}

body[data-spcx-ui] main .bridge-card {position:relative;--bridge-inset:clamp(17px,2.6vw,28px)}
body[data-spcx-ui] .bridge-card .bridge-actions {
  position:absolute;z-index:2;top:var(--bridge-inset);right:var(--bridge-inset);margin:0;
}
body[data-spcx-ui] .bridge-card .activity-trigger {width:44px;height:44px}
body[data-spcx-ui] #transfer-form > .chain-box:first-child {padding-inline-end:50px}
body[data-spcx-ui] main .bridge-card #bridge-reverse {
  display:grid;place-items:center;position:relative;width:44px;height:44px;
  margin:3px auto;padding:0;border:0;border-radius:50%;background:transparent;color:#eee;
  cursor:pointer;touch-action:manipulation;
}
#bridge-reverse::before {
  content:"";position:absolute;inset:4px;background:#242424;border:1px solid #505050;border-radius:inherit;
}
#bridge-reverse svg {position:relative;display:block;width:19px;height:19px}
#transfer-form[data-direction=withdraw] #bridge-reverse svg {transform:rotate(180deg)}
#bridge-reverse:disabled {opacity:.55;cursor:wait}
body[data-spcx-ui] .bridge-card .route-caption {
  margin:17px 0 22px;color:#bdbdbd;max-width:54ch;font-size:14px;line-height:1.48;
}
body[data-spcx-ui] .bridge-card #recovery-back {
  display:inline-flex;align-items:center;min-height:44px;color:#ddd;background:transparent;border:0;padding:0;margin:0 0 12px;cursor:pointer;
}
@media(hover:hover){#bridge-reverse:hover:not(:disabled)::before {background:#353535;border-color:#888}}
@media(prefers-reduced-motion:no-preference) {
  #bridge-reverse svg {transition:transform 240ms cubic-bezier(.2,.75,.25,1)}
  #transfer-form[data-direction=withdraw] .chain-box strong {animation:spcx-direction-up 230ms ease-out}
  #transfer-form[data-direction=deposit] .chain-box strong {animation:spcx-direction-down 230ms ease-out}
  @keyframes spcx-direction-up {from{opacity:.6;translate:0 4px}to{opacity:1;translate:0 0}}
  @keyframes spcx-direction-down {from{opacity:.6;translate:0 -4px}to{opacity:1;translate:0 0}}
}
@media(max-width:550px){body[data-spcx-ui] main .bridge-card {--bridge-inset:17px}}
