/* fxbyfox.com — exchange route screen (js/chain.js). Uses the app's tokens from app.css. */
.chain {
  position: fixed; inset: 0; z-index: 30; display: flex; flex-direction: column;
  background: var(--bg);
}
.chain[hidden] { display: none; }
body.chain-open { overflow: hidden; }
.cs-head {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  padding: calc(var(--sat) + 10px) var(--pad) 10px;
  max-width: 720px; width: 100%; margin: 0 auto;
}
.cs-head h2 { flex: 1; min-width: 0; font-size: 19px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cs-head .seg { flex: 1 0 100%; }
@media (min-width: 620px) { .cs-head .seg { flex: 0 0 390px; } }
/* the analytics tab (its blocks are styled in banks.css) */
#chBody .an-bud { margin: 4px 0 2px; }
.cs-body {
  flex: 1; overflow-y: auto; overscroll-behavior: contain;
  padding: 4px var(--pad) calc(var(--sab) + 32px);
  max-width: 720px; width: 100%; margin: 0 auto;
}

/* route + what the last currency costs */
.cs-route { color: var(--dim); font-size: 14px; font-weight: 600; letter-spacing: .02em; margin: 4px 2px 10px; }
.cs-route span { color: var(--accent); }
.cs-total { background: var(--card-active); border: 1.5px solid color-mix(in srgb, var(--accent) 45%, transparent); border-radius: 18px; padding: 14px 16px; margin-bottom: 14px; }
.cs-total b { display: block; font-size: 21px; font-weight: 700; }
.cs-total small { display: block; margin-top: 4px; font-size: 13px; color: var(--dim); }

/* currencies and the steps between them */
.cs-list { list-style: none; display: flex; flex-direction: column; }
.cs-node {
  position: relative; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  min-height: 76px; padding: 12px 16px; background: var(--card); border-radius: 18px; border: 1.5px solid transparent;
}
.cs-node.active { border-color: color-mix(in srgb, var(--accent) 55%, transparent); background: var(--card-active); }
.cs-cur { flex: 0 0 auto; display: grid; grid-template-columns: auto auto; grid-template-rows: auto auto; column-gap: 12px; align-items: center; text-align: left; min-width: 0; }
.cs-cur .flag { grid-row: 1 / 3; width: 38px; height: 38px; }
.cs-node[data-amt] { cursor: pointer; }
.cs-code { display: flex; align-items: center; gap: 4px; font-size: 19px; font-weight: 600; }
.cs-code svg { width: 15px; height: 15px; fill: none; stroke: var(--dim); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.cs-sub { font-size: 13px; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cs-del {
  flex: none; width: 32px; height: 32px; border-radius: 50%; background: var(--key-fn); color: var(--dim);
  font-size: 20px; line-height: 1; display: grid; place-items: center;
}
.cs-amt { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; align-items: flex-end; }
.cs-val {
  max-width: 100%; min-width: 60px; min-height: 34px; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: 24px; font-weight: 600; color: var(--text); padding: 2px 0;
}
.cs-amt small { font-size: 13px; color: var(--dim); white-space: nowrap; }

.cs-step { padding: 6px 0 6px 16px; }
.cs-bar {
  position: relative; display: flex; align-items: center; gap: 9px; width: 100%; min-height: 38px; padding: 0 12px;
  background: var(--card); border-radius: 12px; font-size: 13px; text-align: left; color: var(--text);
}
@media (hover: hover) { .cs-bar:hover { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 45%, transparent); } }
.cs-bar .ic { flex: none; display: grid; place-items: center; width: 20px; height: 20px; }
.cs-bar .ic .flag { width: 20px; height: 20px; font-size: 8px; box-shadow: none; }
.cs-bar .ic svg { width: 20px; height: 20px; }
.cs-bar .tx { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cs-bar .tx i { font-style: normal; color: var(--dim); }
.cs-bar > svg:last-child { flex: none; width: 16px; height: 16px; fill: none; stroke: var(--dim); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.cs-bar .gl, .src-pop .gl { fill: none; stroke: var(--dim); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* own rate: [10 000] RUB = [12 000] KGS */
.cs-own { display: flex; align-items: center; gap: 10px; margin-top: 6px; padding: 8px 10px; background: var(--card); border-radius: 12px; }
.cs-own .eq { flex: none; color: var(--dim); font-size: 18px; }
.cs-in {
  flex: 1 1 0; min-width: 0; display: flex; align-items: stretch;
  border: 1px solid var(--line); border-radius: 10px; background: var(--bg); overflow: hidden;
}
.cs-in.on { border-color: var(--accent); }
.cs-in b {
  flex: 1 1 auto; min-width: 0; padding: 9px 10px; font-size: 16px; font-weight: 400; text-align: right;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cs-in b.ph { color: var(--muted); }
.cs-in span {
  flex: none; display: grid; place-items: center; padding: 0 10px;
  border-left: 1px solid var(--line); color: var(--dim); font-size: 13px; font-weight: 600;
}

.cs-add {
  width: 100%; margin-top: 12px; padding: 14px; border-radius: 16px; font-weight: 600;
  border: 1.5px dashed var(--line); color: var(--accent);
}
.cs-hint { margin: 14px 4px 0; font-size: 13px; color: var(--dim); line-height: 1.45; }

/* computer: the main page's background — app.css (with .units and the header) */
