/* forex board */
/* series colours, checked for colour-blind separation on each surface (dataviz validator, adjacent pairs) */
[data-board-page="forex"] { --c1: #c77700; --c2: #00a383; --c3: #257de0; }
html[data-theme="dark"] [data-board-page="forex"] { --c1: #d9880f; --c2: #00a888; --c3: #338ced; }

.fo-stats { margin-bottom: 16px; }
.fo-stats .sv small.fo-u { font-size: 13px; font-weight: 600; color: var(--text-3); margin-left: 2px; letter-spacing: 0; }

.fo-top { grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr); align-items: start; margin-top: 0; }

/* rate table */
.fo-n { display: flex; align-items: center; gap: 10px; }
.fo-n > span { display: grid; line-height: 1.3; }
.fo-n b { font-weight: 620; }
.fo-n small { font-size: 11.5px; color: var(--text-3); }
.fo-n small:empty { display: none; }
.fo-code { font-family: var(--mono); font-size: 11.5px; font-weight: 650; width: 40px; height: 24px; display: inline-grid; place-items: center; border-radius: 6px; background: var(--bg-sunk); border: 1px solid var(--line); color: var(--text-2); flex: none; }
.fo-rg { width: 150px; }
.fo-bar { position: relative; display: block; height: 6px; border-radius: 3px; background: var(--bg-sunk); margin: 3px 0 5px; }
.fo-bar i { position: absolute; inset: 0; border-radius: 3px; background: color-mix(in oklab, var(--text-3) 22%, transparent); }
.fo-bar b { position: absolute; top: -3px; width: 4px; height: 12px; margin-left: -2px; border-radius: 2px; background: var(--text); }
.fo-bar[hidden] { display: none; }
.fo-rgv { display: block; font-size: 11px; white-space: nowrap; }

/* converter */
.fo-conv-b { display: grid; gap: 14px; }
.fo-pair { display: grid; grid-template-columns: minmax(0, 1fr) 36px minmax(0, 1fr); gap: 8px; align-items: end; }
.fo-swap { width: 36px; height: 46px; display: grid; place-items: center; border-radius: 10px; border: 1px solid var(--line-strong); color: var(--text-2); background: var(--bg); }
.fo-swap:hover { color: var(--text); border-color: var(--text-3); }
.fo-swap .i { width: 18px; height: 18px; }
.fo-conv .res .rv { font-size: 24px; word-break: break-all; }
.fo-more { list-style: none; margin: 0; padding: 0; display: grid; border-top: 1px solid var(--line); }
.fo-more li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 2px; border-bottom: 1px solid var(--line); font-size: 14px; }
.fo-more li:last-child { border-bottom: 0; }
.fo-more small { color: var(--text-3); font-size: 12px; margin-left: 4px; }
.fo-more b { font-weight: 620; }

/* history */
.fo-hist-b { display: grid; grid-template-columns: minmax(0, 1fr) 230px; }
.fo-hist .chart-box { height: 360px; }
.fo-hs { display: grid; gap: 10px; padding: 14px 16px 16px 6px; align-content: start; }
.fo-hs .stat { padding: 12px 14px; }
.fo-hs .sv { font-size: 19px; }
.fo-hist .panel-h .sp { flex-wrap: wrap; justify-content: flex-end; }

/* USDT and live */
.fo-mid { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); align-items: start; }
.fo-us { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.fo-us .stat { padding: 12px 14px; }
.fo-us .sv { font-size: 19px; }
.fo-usdt .panel-b { padding-bottom: 4px; }
.fo-usdt .chart-box { height: 300px; }
.fo-k1 { background: var(--c1); }
.fo-k2 { background: var(--c3); }
.fo-live-t th { position: static; }
.fo-dxy { border-top: 1px solid var(--line); }
.fo-dxy-h { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; padding: 14px 18px 0; font-size: 13.5px; }
.fo-dxy-h b { font-weight: 650; color: var(--text-2); }
.fo-dxy .chart-box { height: 220px; }

/* cross rates */
.fo-cross-t th[scope="row"] { position: sticky; left: 0; background: var(--bg-soft); font-family: var(--mono); font-size: 12px; color: var(--text-2); z-index: 1; }
.fo-cross-t thead th { font-family: var(--mono); }
.fo-cross-t td { font-size: 13.5px; }

@media (max-width: 1100px) {
  .fo-top, .fo-mid { grid-template-columns: minmax(0, 1fr); }
  .fo-hist-b { grid-template-columns: minmax(0, 1fr); }
  .fo-hs { grid-template-columns: repeat(4, minmax(0, 1fr)); padding: 4px 16px 16px; }
}
@media (max-width: 760px) {
  .fo-tbl th.fo-c, .fo-tbl td.fo-c, .fo-tbl th.fo-rg, .fo-tbl td.fo-rg { display: none; }
  .fo-hs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fo-us { grid-template-columns: minmax(0, 1fr); }
  .fo-hist .chart-box, .fo-usdt .chart-box { height: 280px; }
}
@media (max-width: 520px) {
  .fo-tbl th:nth-child(6), .fo-tbl td[data-k="y1"] { display: none; }
  .fo-hist .panel-h { flex-wrap: wrap; }
  .fo-hist .panel-h .sp { margin-left: 0; width: 100%; justify-content: flex-start; }
  .fo-pair { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .fo-swap { justify-self: center; height: 32px; transform: rotate(90deg); }
  .fo-code { width: 36px; }
  .fo-tbl td, .fo-tbl th { padding-left: 9px; padding-right: 9px; }
}
