/* Shared terminal surfaces */
.top { background: var(--card); }
.top-in { height: 68px; gap: clamp(22px, 4vw, 58px); }
.brand { gap: 9px; flex-shrink: 0; }
.brand img { display: block; object-fit: contain; }
.nav .nav-offer { display: none; }
.social-link { display: inline-grid; place-items: center; width: 36px; height: 36px; color: var(--ink); border-radius: 7px; }
.social-link:hover { color: var(--blue); background: var(--blue-soft); }
.nav { align-self: stretch; gap: 24px; }
.nav a { display: flex; align-items: center; padding: 0 2px; font-weight: 600; }
.nav a.on { color: var(--blue); }
.top-r { gap: 10px; }
.top-r .btn { height: 38px; }
.mode-badge, .eyebrow, .mtag, .lbl, .cnt-pill, .network-label, .home-topline,
.home-metrics dt, .home-destinations small, .map-legend, .route-map figcaption,
.dfacts small, th, .field > span:first-child, .fstep-h .dnum {
  font-family: var(--mono);
  letter-spacing: .055em;
  font-size: 11px;
  text-transform: uppercase;
}
.mode-badge { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; color: #3c517f; }
.mode-badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--blue); }
.mode-badge:hover, .link:hover { color: var(--blue); }
.btn.cta { box-shadow: none; }
.btn.cta:hover { background: #1740d8; border-color: #1740d8; box-shadow: 0 3px 12px #1d46ed38; }
.btn.ghost { border-color: #425374; background: #25334a; color: #f3f6ff; }
.btn.ghost:hover { border-color: #9ab0fe; }
.page { padding-top: 26px; }
.card { border-color: var(--line-2); border-radius: 12px; }
.dsec-h { gap: 11px; }
.dsec-h h2 { letter-spacing: -.035em; }
.dnum { background: var(--blue-soft); border-radius: 5px; padding: 4px 6px; font-weight: 700; }
.dnum::before { display: none; }
.num, .dfacts b, .home-metrics dd, .vb b, .ftotal b, .fnet b, .kvl dd, .li .r {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}
.dhero {
  isolation: isolate;
  position: relative;
  border: 1px solid #303d57;
  background-color: var(--dark);
  background-image: radial-gradient(ellipse at 82% 10%, #273d763d, transparent 58%),
    linear-gradient(90deg, transparent 55%, #3a4a6627),
    repeating-linear-gradient(90deg, transparent 0 27px, #8ea9fb0d 27px 28px),
    repeating-linear-gradient(0deg, transparent 0 27px, #8ea9fb0d 27px 28px);
}
.dhero h1 { font-weight: 780; letter-spacing: -.055em; }
.dhero .eyebrow { color: #d5dffb; }
.dhero .mtag { color: #9cb1ef; }
.dhero-l > p, .hn small { color: #b8c5dd; }
.dfacts { background: #141d2e; border-top-color: #34415a; }
.dfacts > div, .dfacts > div:nth-child(n+3) { border-color: #303d57; }
.dfacts small { color: #adbcdb; }
.dfacts span { color: #a7b6d2; }
.dfacts b { font-size: clamp(14px, 1.5vw, 20px); letter-spacing: -.04em; }
.dfacts .fee-fact { background: #1e2c4a; }
.fee-fact b { color: #9eb4ff; }
.hroute, .vbars {
  padding: 16px 14px;
  border: 1px solid #3a4a69;
  border-radius: 10px;
  background: #131c2f;
}
.hroute figcaption, .vbars figcaption { color: #abbce0; }
.hroute .wire { background: repeating-linear-gradient(90deg, #5977ed 0 5px, transparent 5px 9px); }
.wire::after { width: 6px; height: 6px; top: -2px; border-radius: 50%; animation-timing-function: linear; }
.dhero .wcard { background: #1a263d; border-color: #3e5279; }
.wcard small, .wcard-f { color: #b0c1df; }
.wcard.off b { color: #c8d6f3; }
.wcard-f { border-color: #3e5279; }
.mpill { border: 1px solid #d3dbef; background: #ecf0f8; color: #455577; }
.mpill.on, .st.Completed { border: 1px solid #afd8c5; background: var(--green-soft); color: var(--green); }
.st.Open { border: 1px solid #b5c4fd; }

/* Home */
.home-terminal {
  background: var(--dark);
  border: 1px solid #2d3b58;
  border-radius: 16px;
  color: #f6f7fc;
  overflow: hidden;
}
.home-topline {
  min-height: 44px;
  padding: 10px clamp(20px, 3vw, 40px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  color: #a8b9db;
  border-bottom: 1px solid #303c55;
}
.home-topline i { display: inline-block; width: 7px; height: 7px; margin-right: 5px; background: #6d8dff; }
.home-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(0, 1fr);
  gap: clamp(20px, 3.5vw, 50px);
  padding: clamp(28px, 4vw, 60px) clamp(20px, 3vw, 40px);
  align-items: center;
  background: radial-gradient(ellipse at 87% 46%, #1e3470 0%, transparent 61%);
}
.home-copy h1 {
  color: #faf9f5;
  font-family: "Bahnschrift", "Aptos Display", "Segoe UI", system-ui, sans-serif;
  font-size: clamp(40px, 5.05vw, 78px);
  font-weight: 650;
  letter-spacing: .005em;
  line-height: 1.12;
}
.home-copy h1 em { color: #8ea6ff; font-style: normal; white-space: nowrap; }
.home-copy p { max-width: 400px; color: #becbe2; margin: 22px 0 28px; font-size: clamp(15px, 1.4vw, 18px); }
.home-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 14px 20px; }
.home-actions .btn { height: 48px; padding: 0 17px; gap: 25px; }
.home-actions .btn span { font-size: 16px; }
.home-link { color: #d1dcf5; font-size: 13px; font-weight: 600; }
.home-link:hover { color: white; text-decoration: underline; text-underline-offset: 4px; }
.route-map { margin: 0; min-width: 0; border: 1px solid #3c4d72; border-radius: 10px; overflow: hidden; background: #111a2c; }
.route-map figcaption, .map-legend { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 14px; color: #aebedd; }
.route-map figcaption { border-bottom: 1px solid #303d57; }
.route-map figcaption span:first-child { color: #e0e8fc; }
.map-graphic { display: block; width: 100%; height: auto; }
.map-guide, .map-orbit { fill: none; stroke: #516899; stroke-width: 1; opacity: .5; }
.map-orbit.outer { stroke-dasharray: 3 6; }
.map-track { fill: none; stroke: #5678e4; stroke-width: 1.4; }
.map-signal { fill: none; stroke: #becaff; stroke-width: 2.6; stroke-linecap: round; stroke-dasharray: 2 105; animation: packet-flow 6s linear infinite; }
.map-endpoints { fill: #b6c5ff; stroke: #20336d; stroke-width: 1; }
.map-chain rect { fill: #17243b; stroke: #42577e; }
.map-chain text { fill: #f2f5ff; font: 650 13px var(--sans); }
.map-chain .map-symbol, .map-core-label { fill: #abbde4; font: 10px var(--mono); letter-spacing: .065em; }
.map-eth { fill: #9eafff; } .map-sol { fill: #7ee9c3; } .map-bnb { fill: #ffd57c; } .map-rh { fill: #b5ef82; }
.map-center { fill: #1b2e5d; stroke: #7696ff; }
.map-legend { border-top: 1px solid #303d57; font-size: 10px; letter-spacing: 0; }
.map-legend span { display: inline-flex; gap: 5px; align-items: center; }
.map-legend i { width: 6px; height: 6px; background: #9eafff; }
.map-legend span:nth-child(2) i { border-radius: 50%; background: #7ee9c3; }
@keyframes packet-flow { to { stroke-dashoffset: -107; } }
.home-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0; background: #151e30; border-top: 1px solid #303c55; }
.home-metrics > div { padding: 15px clamp(16px, 3vw, 40px); }
.home-metrics > div + div { border-left: 1px solid #303c55; }
.home-metrics dt, .home-metrics small { color: #aebedd; }
.home-metrics dd { margin: 1px 0; font-size: 25px; font-weight: 650; color: #f5f8ff; }
.home-metrics dd span { color: #a2b6ff; font-size: .7em; }
.home-destinations { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
.home-destinations a { padding: 16px 18px; background: var(--card); border: 1px solid var(--line-2); border-radius: 10px; }
.home-destinations a:hover { border-color: var(--blue); }
.home-destinations small { color: var(--blue); }
.home-destinations strong { display: flex; justify-content: space-between; color: var(--ink); font-size: 17px; margin: 3px 0; }
.home-destinations strong span { color: var(--blue); }
.home-destinations p { color: var(--dim); font-size: 13px; }

/* Markets, order entry, settlement and account */
.market-hero { margin-bottom: 24px; }
.market-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(240px, .37fr); gap: 22px; align-items: start; }
.market-primary { row-gap: 0; }
.market-primary .dsec-h { margin-bottom: 14px; }
.market-primary .toolbar { margin: 0; padding: 12px; background: var(--card); border: 1px solid var(--line-2); border-bottom: 0; border-radius: 12px 12px 0 0; }
.market-primary .toolbar + .tcard { border-radius: 0 0 12px 12px; }
.market-primary .search { min-width: 120px; max-width: none; }
.market-primary .ttabs { padding: 3px 7px; background: var(--sunk); border-radius: 6px; }
.market-primary .empty { padding: 38px 14px; }
.market-primary .empty a { color: var(--blue); font-weight: 650; }
.book-token { display: grid; gap: 1px; }
.book-token:hover b { color: var(--blue); }
.record-route .route-badge { color: #dce6ff; background: #25334a; }
.record-route .wire { min-width: 16px; }
.transfer-label, .transfer-status { display: grid !important; align-content: center; gap: 4px; }
.transfer-status { justify-items: end; }
.tx-id { display: block; font: 11px/1.5 var(--mono); overflow-wrap: anywhere; }
.vb:has(.vb-t) { grid-template-columns: 80px minmax(0, 1fr) auto; }
.vbars .vb b { white-space: nowrap; }
#local-history:not(:empty) { margin-top: 32px; }
.dhero-l .callout { color: var(--lime-ink); padding: 9px 12px; font-size: 13px; }
.wcard .wallet-address { overflow-wrap: anywhere; font-size: 14px; }
#walletMessage:empty { display: none; }
#walletOptions button:disabled { opacity: .55; cursor: default; }
.market-sidebar { display: grid; gap: 24px; min-width: 0; }
.market-sidebar .dsec-h { flex-wrap: wrap; }
.market-sidebar h2 { font-size: 18px; }
.market-sidebar .li + .li { border-top: 1px solid var(--line); }
.market-sidebar .li .grow { display: flex; align-items: center; gap: 7px; }
.market-sidebar #recent .grow { display: block; }
.route-badge, .market-sidebar .rok { display: inline-flex; align-items: center; gap: 5px; padding: 3px 7px; background: var(--blue-soft); color: #2446b7; border-radius: 5px; font: 500 11px var(--mono); white-space: nowrap; }
.route-badge .arr { color: #5873cd; }
.tcard th { background: #eaeef6; color: #384766; font-weight: 650; }
.tcard td { padding-top: 13px; padding-bottom: 13px; }
.tcard tbody tr[data-id]:hover { background: var(--blue-soft); }
.ticket { box-shadow: 0 8px 20px #1726440c; }
.ticket .card-h {
  background: var(--dark);
  color: #c8d7f6;
  padding: 15px 18px;
  border-radius: 11px 11px 0 0;
}
.ticket .card-h h3 { color: #f5f7ff; font-size: 15px; }
.ticket .kvl dd { font-size: 12px; }
.ticket .kvl .summary-total, .ticket .kvl .summary-fee { background: var(--blue-soft); padding-left: 7px; padding-right: 7px; color: #2041ad; }
.ticket .kvl .summary-total b { color: #2041ad; font-size: 19px; }
.ticket #submit { height: 45px; }
.fstep-h b { font-size: 17px; letter-spacing: -.025em; }
.fstep { gap: 16px; padding: 21px 24px; }
.field > span:first-child { color: #465475; }
.chips button[data-v] { border-color: var(--line); }
.chips button.on[data-v] { border-color: var(--blue); background: var(--blue-soft); }
.chips .chain-symbol { margin-right: 5px; }
.settlement-state { display: grid; gap: 10px; }
.settlement-state .tl { margin: 3px 0 6px; flex-wrap: wrap; gap: 5px 0; }
.tl span.done:last-child { color: var(--green); background: var(--green-soft); padding: 4px 6px; border-radius: 5px; font-weight: 650; }
.tl span::before { border-radius: 50%; }
.olegs { padding: 0 16px; }
.oleg { position: relative; min-height: 68px; }
.oleg > i { border: 1px solid #b5c6fa; background: var(--blue-soft); }
.oleg .amt small { color: #495c8b; }
.lst.done { background: var(--green-soft); border: 1px solid #afd8c5; padding: 3px 6px; border-radius: 5px; }
.lst.done::before { border-radius: 50%; width: 6px; height: 6px; }
.account-activity .li { min-height: 48px; border-bottom: 1px solid var(--line); }
.account-activity .li:last-child { border-bottom: 0; }
.account-activity .li > span:nth-child(2) { font-family: var(--mono); }
.account-activity .empty { padding: 30px 16px; }
.account-activity .empty p { margin-bottom: 12px; }
.account-activity .empty .btn { color: white; text-decoration: none; }
.dnav { background: var(--card); padding: 10px; border: 1px solid var(--line-2); border-radius: 10px; top: 88px; }
.dnav a.on { background: var(--blue-soft); color: #1d41b2; }
.dsec { scroll-margin-top: 92px; }
.dchips { top: 68px; }
.dmain .dsec-h { padding-bottom: 10px; border-bottom: 1px solid var(--line-2); }
.dmain .dsec { scroll-margin-top: 125px; }

/* Compact network ribbon */
.foot { margin-top: 34px; }
.network-ribbon { display: flex; align-items: center; gap: 14px; padding: 9px 0; border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); }
.network-label { flex: none; color: var(--dim); }
.network-ribbon ul { flex: 1; display: flex; align-items: center; margin: 0; padding: 0; list-style: none; min-width: 0; }
.network-ribbon li { display: flex; align-items: center; flex: auto; gap: 6px; white-space: nowrap; font-size: 12px; font-weight: 650; color: #354566; }
.network-ribbon li:not(:last-child)::after {
  content: ""; height: 2px; min-width: 8px; flex: 1; margin: 0 6px;
  background: repeating-linear-gradient(90deg, #7f96e6 0 2px, transparent 2px 7px);
  animation: ribbon-flow 1.5s linear infinite;
}
@keyframes ribbon-flow { to { background-position: 14px 0; } }
.network-ribbon a { color: var(--blue); font: 550 11px var(--mono); white-space: nowrap; }
.network-ribbon a:hover { text-decoration: underline; }
.chain-symbol { display: inline-block; width: 10px; height: 10px; flex: none; background: var(--blue); }
.chain-symbol.eth { background: #5d72d4; clip-path: polygon(50% 0, 93% 55%, 50% 100%, 7% 55%); }
.chain-symbol.sol { background: #1b8b78; clip-path: polygon(18% 5%,100% 5%,82% 28%,0 28%,18% 5%,0 40%,82% 40%,100% 62%,18% 62%,0 40%,18% 74%,100% 74%,82% 97%,0 97%,18% 74%); }
.chain-symbol.bnb { background: #9f6900; transform: rotate(45deg) scale(.72); }
.chain-symbol.rh { background: #377a31; clip-path: polygon(0 100%, 25% 38%, 100% 0, 76% 52%); }
.foot-in { justify-content: flex-start; padding: 12px 0 16px; gap: 10px 16px; }
.foot-in nav { margin-left: auto; align-items: center; }

@media (max-width: 1050px) {
  .market-layout { grid-template-columns: minmax(0, 1fr); }
  .market-sidebar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .top-in { height: auto; gap: 0 9px; padding-top: 10px; }
  .top-r { gap: 6px; }
  .brand { gap: 6px; }
  .top .brand-symbol { width: 27px; height: 20px; }
  .top .brand-wordmark { width: 101px; height: 20px; }
  .top .social-link { width: 31px; }
  .nav { min-height: 42px; padding-top: 4px; gap: 14px; }
  .nav .nav-offer { display: flex; }
  .top-offer { display: none; }
  .mode-badge { display: none; }
  .home-layout { grid-template-columns: minmax(0, 1fr); padding: 24px 19px; gap: 24px; }
  .home-copy h1 { font-size: clamp(34px, 8.8vw, 58px); }
  .home-copy p { margin: 14px 0 18px; }
  .home-topline { padding-inline: 19px; }
  .home-topline > span + span { display: none; }
  .home-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-metrics > div:nth-child(3) { border-left: 0; }
  .home-metrics > div:nth-child(n+3) { border-top: 1px solid #303c55; }
  .home-destinations { grid-template-columns: minmax(0, 1fr); }
  .market-sidebar { grid-template-columns: minmax(0, 1fr); }
  .market-primary .toolbar { padding: 10px; }
  .fstep { padding: 18px 16px; }
  .dchips { top: 0; }
  .dmain .dsec { scroll-margin-top: 64px; }
  .network-ribbon { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
  .network-ribbon ul { grid-column: 1 / -1; grid-row: 2; flex-wrap: wrap; column-gap: 5px; }
  .network-ribbon li { font-size: 10px; }
  .network-ribbon li:not(:last-child)::after { margin: 0 2px; min-width: 4px; }
  .foot-in { flex-wrap: wrap; }
  .foot-in nav { margin-left: 0; }
}
@media (max-width: 380px) {
  .top-r .cta .arr { display: none; }
  .top-r .btn { padding-inline: 7px; font-size: 12px; }
  .map-legend { padding-inline: 8px; font-size: 9px; }
}
@media (prefers-reduced-motion: reduce) {
  .map-signal, .network-ribbon li::after { animation: none; }
}

/* Project CA */
.ca-chip { margin-left: auto; display: inline-flex; align-items: center; height: 38px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: 7px; background: var(--card); color: var(--ink); font: 500 12px var(--mono); white-space: nowrap; flex-shrink: 0; }
.ca-chip[data-state="ready"] { padding: 0 6px 0 11px; }
.ca-chip + .top-r { margin-left: 0; }
.ca-soon, .ca-tag, .ca-copy, .ca-link { font-family: var(--mono); font-size: 11px; letter-spacing: .055em; text-transform: uppercase; }
.ca-soon { display: inline-flex; align-items: center; gap: 7px; color: var(--dim); font-weight: 600; }
.ca-soon::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--blue); animation: ca-pulse 1.6s ease-in-out infinite; }
.ca-ready { display: inline-flex; align-items: center; gap: 9px; }
.ca-tag { color: var(--blue); font-weight: 700; }
.ca-addr { font: 500 12.5px var(--mono); color: var(--ink); text-transform: none; letter-spacing: 0; }
.ca-copy { height: 26px; padding: 0 9px; border: 1px solid #b5c6fa; border-radius: 5px; background: var(--blue-soft); color: #1d41b2; font-weight: 600; cursor: pointer; }
.ca-copy:hover { border-color: var(--blue); }
.ca-link { color: var(--dim); font-weight: 600; }
.ca-link:hover { color: var(--blue); }
@keyframes ca-pulse { 50% { opacity: .3; } }
@media (max-width: 1240px) { .ca-link { display: none; } }
@media (max-width: 760px) {
  .ca-chip { order: 3; width: 100%; justify-content: center; margin: 8px 0 2px; height: 36px; }
  .ca-chip[data-state="ready"] { justify-content: flex-start; }
  .ca-chip[data-state="ready"] .ca-copy { margin-left: auto; }
  .ca-link { display: inline; }
  .ca-chip + .top-r { margin-left: auto; }
}
@media (prefers-reduced-motion: reduce) { .ca-soon::before { animation: none; } }
