/* Пипсы: additions on top of the Деньги stylesheet (same tokens, same dark language). */

.live { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; border-radius: 999px; background: var(--card-2); border: 1px solid var(--line); font-weight: 600; }
.live i { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px var(--green-bg); }
.live.off i { background: var(--text-3); box-shadow: none; }
.live small { color: var(--text-2); font-weight: 500; }

.kv { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); font-size: 14.5px; }
.kv:first-child { border-top: 0; }
.kv .k { color: var(--text-2); }
.kv .v { font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; }

.pbar { position: relative; height: 10px; border-radius: 6px; background: var(--card-3); overflow: hidden; margin: 14px 0 8px; }
.pbar i { position: absolute; top: 0; bottom: 0; border-radius: 6px; }
.pbar .up { left: 50%; background: var(--green); }
.pbar .down { right: 50%; background: var(--red); }
.pbar::after { content: ""; position: absolute; left: 50%; top: -2px; bottom: -2px; width: 2px; background: rgba(255, 255, 255, .5); }
.pbar-cap { display: flex; justify-content: space-between; color: var(--text-2); font-size: 12.5px; font-variant-numeric: tabular-nums; }

.stage { display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: 999px; font-size: 13px; font-weight: 600; background: var(--card-3); color: var(--text); }
.stage.phase1 { background: rgba(10, 132, 255, .18); color: #64b5ff; }
.stage.phase2 { background: rgba(191, 90, 242, .18); color: #d49bff; }
.stage.funded { background: var(--green-bg); color: var(--green); }
.stage.failed { background: var(--red-bg); color: var(--red); }

.legs { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.leg { background: var(--card-2); border: 1px solid var(--line); border-radius: 18px; padding: 16px; }
.leg-h { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.leg-h b { font-size: 16px; }
.side { display: inline-flex; height: 22px; align-items: center; padding: 0 8px; border-radius: 7px; font-size: 12px; font-weight: 700; letter-spacing: .02em; }
.side.buy { background: var(--green-bg); color: var(--green); }
.side.sell { background: var(--red-bg); color: var(--red); }
.leg-pnl { font-size: 30px; font-weight: 600; letter-spacing: -.02em; margin: 2px 0 10px; font-variant-numeric: tabular-nums; }
.leg .kv { font-size: 13.5px; padding: 7px 0; }

.scen { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.scen > div { border-radius: 16px; padding: 14px 16px; background: var(--card-2); border: 1px solid var(--line); }
.scen .t { font-weight: 600; margin-bottom: 6px; }
.scen .r { display: flex; justify-content: space-between; font-size: 14px; color: var(--text-2); padding: 2px 0; font-variant-numeric: tabular-nums; }
.scen .r b { color: var(--text); }

.tbl-wrap { overflow-x: auto; margin: 0 -6px; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.tbl th { text-align: left; color: var(--text-2); font-weight: 500; font-size: 12.5px; padding: 8px 6px; border-bottom: 1px solid var(--line-2); white-space: nowrap; }
.tbl td { padding: 11px 6px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl tr.pair-start td { border-top: 1px solid var(--line-2); }
.tbl td.r, .tbl th.r { text-align: right; }
.tbl tr.cur td { background: rgba(255, 255, 255, .025); }

.calc { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.calc label { display: flex; flex-direction: column; gap: 6px; color: var(--text-2); font-size: 13px; }
.calc input, .calc select {
  height: 46px; border-radius: 14px; background: var(--card-2); border: 1px solid var(--line); padding: 0 14px; outline: none;
  font-size: 16px; font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; -webkit-appearance: none; appearance: none;
}
.calc input:focus, .calc select:focus { border-color: var(--line-2); background: var(--card-3); }
.big { font-size: 44px; font-weight: 600; letter-spacing: -.03em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.big small { font-size: 15px; color: var(--text-2); font-weight: 500; letter-spacing: 0; margin-left: 6px; }
.note { color: var(--text-2); font-size: 13.5px; line-height: 1.5; margin-top: 12px; }
.empty-c { color: var(--text-2); text-align: center; padding: 28px 10px; }

@media (max-width: 960px) {
  .calc { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .hero-flows { flex-wrap: wrap; gap: 6px 16px; font-size: 15px; }
  .hero-flows > div { white-space: nowrap; }
  .legs, .scen { grid-template-columns: 1fr; }
  .big { font-size: 36px; }
  .tabbar a { width: 64px; }
}

.hero-flows > div { white-space: nowrap; }

/* ---------- overview v2: tiles, pair cards, account rows ---------- */
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.tile-k { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-card); padding: 18px 20px; }
.tile-k .k { color: var(--text-2); font-size: 13.5px; }
.tile-k .v { font-size: 34px; font-weight: 600; letter-spacing: -.03em; margin: 4px 0 4px; font-variant-numeric: tabular-nums; }
.tile-k .s { color: var(--text-3); font-size: 12.5px; line-height: 1.4; }
.sect { margin: 26px 4px 12px; font-size: 19px; font-weight: 600; letter-spacing: -.015em; }

.pc { margin-bottom: 12px; padding: 20px 22px; }
.pc-h { display: flex; align-items: flex-start; gap: 16px; }
.pc-t { font-weight: 600; font-size: 16.5px; }
.pc-sub { color: var(--text-2); font-size: 13px; margin-top: 3px; }
.pc-now { margin-left: auto; text-align: right; }
.pc-now .k { color: var(--text-2); font-size: 12.5px; }
.pc-now .v { font-size: 26px; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.track { padding: 34px 6px 6px; }
.track .bar { position: relative; height: 8px; border-radius: 6px;
  background: linear-gradient(90deg, rgba(255, 69, 58, .55), rgba(255, 255, 255, .08) 45%, rgba(255, 255, 255, .08) 55%, rgba(52, 199, 123, .55)); }
.track .fill { position: absolute; top: 0; bottom: 0; background: rgba(255, 255, 255, .35); border-radius: 6px; }
.track .entry { position: absolute; top: -5px; width: 2px; height: 18px; margin-left: -1px; background: var(--text-3); }
.track .dot { position: absolute; top: 50%; width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 4px rgba(255, 255, 255, .18); }
.track .dot b { position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%); font-size: 13px; font-weight: 600; white-space: nowrap; background: var(--card-3); padding: 3px 8px; border-radius: 8px; font-variant-numeric: tabular-nums; }
.ends { display: flex; justify-content: space-between; gap: 16px; margin-top: 12px; }
.end { font-size: 13.5px; line-height: 1.45; }
.end.take { text-align: right; }
.end .e1 { font-weight: 600; font-variant-numeric: tabular-nums; }
.end.stop .e1 { color: var(--red); }
.end.take .e1 { color: var(--green); }
.end .e2 { color: var(--text-3); font-size: 12.5px; }
.end .e3 { color: var(--text-2); }

.rows { padding: 6px 22px; }
.arow { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.4fr) auto; gap: 20px; align-items: center; padding: 16px 0; border-top: 1px solid var(--line); }
.arow:first-child { border-top: 0; }
.a-t { font-weight: 600; font-size: 16px; display: flex; align-items: center; gap: 8px; }
.a-sub { color: var(--text-2); font-size: 13px; margin-top: 3px; }
.a-bar { height: 8px; border-radius: 6px; background: var(--card-3); overflow: hidden; }
.a-bar i { display: block; height: 100%; background: var(--green); border-radius: 6px; }
.a-cap { color: var(--text-2); font-size: 12.5px; margin-top: 6px; }
.a-val { text-align: right; font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; }
.a-val .a-sub { font-size: 12.5px; font-weight: 400; }

@media (max-width: 760px) {
  .tiles { grid-template-columns: 1fr 1fr; gap: 10px; }
  .tiles .tile-k:first-child { grid-column: span 2; }
  .tile-k { padding: 14px 16px; border-radius: 20px; }
  .tile-k .v { font-size: 26px; }
  .pc { padding: 16px; }
  .pc-now .v { font-size: 20px; }
  .ends { flex-direction: row; }
  .end { font-size: 12.5px; }
  .rows { padding: 2px 16px; }
  .arow { grid-template-columns: 1fr auto; gap: 8px 14px; }
  .a-prog { grid-column: span 2; grid-row: 2; }
}
.end .e3 b, .end .e1 { white-space: nowrap; }

.tc { margin-bottom: 12px; padding: 18px 22px 10px; }
.tc .tbl-wrap { margin-top: 12px; }
.tc .tbl tr:last-child td { border-bottom: 0; }
.sect .muted { font-weight: 500; margin-left: 4px; }
.track .dot { transition: left 1.8s ease; will-change: left; }

/* trades as Money-style bullets grouped by day */
.bul { background: var(--card-2); border-radius: var(--r-row); padding: 12px 16px 6px 12px; margin-bottom: 6px; }
.bul-h { display: flex; align-items: center; gap: 13px; }
.bul .tile { width: 44px; height: 44px; border-radius: var(--r-tile); display: grid; place-items: center; background: var(--card-3); color: var(--text-2); flex: none; }
.bul .tile.win { background: var(--green-bg); color: var(--green); }
.bul .tile.loss { background: var(--red-bg); color: var(--red); }
.bul-b { flex: 1; min-width: 0; }
.bul .t1 { font-weight: 500; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bul .t2 { color: var(--text-2); font-size: 14px; margin-top: 1px; }
.bul .amt { text-align: right; white-space: nowrap; }
.bul .a1 { font-weight: 600; font-size: 17px; font-variant-numeric: tabular-nums; }
.bul .a2 { color: var(--text-3); font-size: 12.5px; margin-top: 2px; }
.bul .tbl-wrap { margin: 8px 0 0 57px; }
.tbl.sm { font-size: 13.5px; }
.tbl.sm th { font-size: 12px; padding: 6px; border-bottom: 1px solid var(--line); }
.tbl.sm td { padding: 8px 6px; }
.tbl.sm tr:last-child td { border-bottom: 0; }
.card > .day-h:first-child { padding-top: 0; }
.legend { flex-wrap: wrap; }
@media (max-width: 760px) {
  .bul .tbl-wrap { margin-left: 0; }
}

/* page switch: soft fade-up of the new page (live 3 s refreshes do not animate) */
.page-in { animation: pageIn .32s cubic-bezier(.2, .8, .25, 1); }
@keyframes pageIn { from { opacity: 0; transform: translateY(8px); } }
@media (prefers-reduced-motion: reduce) { .page-in { animation: none; } }

/* red news strip */
.news { margin: 16px 0; background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 0 18px; }
.news summary { list-style: none; display: flex; align-items: center; gap: 10px; min-height: 52px; cursor: pointer; font-size: 14.5px; flex-wrap: wrap; }
.news summary::-webkit-details-marker { display: none; }
.news .ndot { width: 9px; height: 9px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px var(--green-bg); flex: none; }
.news .ndot.hot { background: var(--red); box-shadow: 0 0 0 4px var(--red-bg); }
.news .ncount { margin-left: auto; min-width: 26px; height: 26px; border-radius: 999px; background: var(--card-3); display: grid; place-items: center; font-size: 12.5px; font-weight: 600; }
.nlist { border-top: 1px solid var(--line); padding: 6px 0; }
.nrow { display: grid; grid-template-columns: 170px 48px 1fr auto; gap: 10px; padding: 8px 0; font-size: 13.5px; border-top: 1px solid var(--line); align-items: baseline; }
.nrow:first-child { border-top: 0; }
.nrow.usd .nc, .nrow.usd .nn { color: var(--orange); font-weight: 600; }
.nrow .nt { color: var(--text-2); font-variant-numeric: tabular-nums; }
.news .note { margin: 0 0 14px; }
@media (max-width: 760px) {
  .nrow { grid-template-columns: 1fr auto; }
  .nrow .nn { grid-column: span 2; }
  .nrow .nf { grid-column: span 2; }
}
.news .ndot.warm { background: var(--orange); box-shadow: 0 0 0 4px var(--orange-bg); }

/* calculator v2 */
.lrow { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.sync { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 999px; background: var(--card-3); color: var(--text-2); font-size: 11.5px; font-weight: 600; }
.sync i { width: 6px; height: 6px; border-radius: 50%; background: var(--text-3); }
.sync.on { background: var(--green-bg); color: var(--green); }
.sync.on i { background: var(--green); }
.step { display: flex; align-items: center; height: 46px; border-radius: 14px; background: var(--card-2); border: 1px solid var(--line); overflow: hidden; }
.step input { flex: 1; min-width: 0; border: 0 !important; background: none !important; text-align: center; height: 44px; padding: 0 4px; }
.step button { width: 42px; height: 100%; font-size: 20px; color: var(--text-2); }
.step button:hover { background: var(--card-3); color: var(--text); }
.hint { color: var(--text-2); font-size: 13.5px; margin: 12px 2px 0; }
.lots { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 16px; }
.lot { background: var(--card-2); border: 1px solid var(--line); border-radius: 18px; padding: 16px 18px; }
.lot-n { font-size: 54px; font-weight: 600; letter-spacing: -.03em; line-height: 1.05; font-variant-numeric: tabular-nums; margin-top: 6px; }
.lot-u { color: var(--text-2); font-size: 13px; }
@media (max-width: 760px) {
  .lot-n { font-size: 40px; }
}

/* dollar amount under a stop / take price in the trade table */
.tbl .lv { display: block; font-size: 12px; margin-top: 2px; font-variant-numeric: tabular-nums; }
