:root {
  color-scheme: dark;
  --bg: #121621;
  --panel: #1c212c;
  --line: #343b49;
  --muted: #a2acba;
  --fg: #e7ecf1;
  --teal: #00dbb6;
  --orange: #ff8254;
  --mono: "SFMono-Regular", Consolas, monospace;
  font:
    14px/1.5 "DM Sans",
    -apple-system,
    BlinkMacSystemFont,
    "PingFang SC",
    "Microsoft YaHei",
    sans-serif;
  color: var(--fg);
  background: var(--bg);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
header {
  height: 64px;
  padding: 0 clamp(16px, 4vw, 72px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  background: #141924;
}
.brand,
.session,
.connection,
.actions,
.panel-head,
.heading,
.dialog-head,
.watch-form,
.pair {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand img {
  width: 127px;
}
.brand span {
  font-size: 18px;
  border-left: 1px solid #4b5260;
  padding-left: 14px;
  font-weight: 620;
  letter-spacing: -0.04em;
}
.session a {
  color: var(--teal);
  text-decoration: none;
}
.session {
  gap: 10px;
}
.chip,
.tag {
  border-radius: 30px;
  font-size: 12px;
}
.tag {
  padding: 3px 9px;
  background: #272d39;
  color: var(--muted);
}
.live,
.error {
  color: var(--orange);
}
.chip.active,
.paper {
  color: var(--teal);
}
main {
  max-width: 1480px;
  margin: auto;
  padding: 32px clamp(16px, 4vw, 72px);
}
.heading {
  justify-content: space-between;
  align-items: end;
  margin-bottom: 22px;
}
.eyebrow {
  font: 11px var(--mono);
  letter-spacing: 0.12em;
  color: var(--teal);
  margin: 0 0 7px;
}
h1,
h2,
p {
  margin: 0;
}
h1 {
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.3;
  letter-spacing: -0.04em;
}
h2 {
  font-size: 16px;
  font-weight: 640;
}
.identity,
.caption,
.foot,
label {
  color: var(--muted);
  font-size: 12px;
}
.columns {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(290px, 1fr);
  gap: 18px;
}
.left,
aside {
  display: grid;
  gap: 18px;
  align-content: start;
  min-width: 0;
}
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}
.panel-head,
.dialog-head {
  justify-content: space-between;
}
.panel-head {
  padding: 15px 19px;
  border-bottom: 1px solid var(--line);
}
.pad {
  padding: 16px 19px;
}
.watch-form {
  padding: 14px 19px;
}
.watch-form input {
  max-width: 165px;
}
.watch-form label {
  white-space: nowrap;
  margin: 0;
}
.scroll {
  overflow: auto;
}
table {
  border-collapse: collapse;
  width: 100%;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
th,
td {
  padding: 10px 12px;
  text-align: right;
}
th:first-child,
td:first-child {
  text-align: left;
  padding-left: 19px;
}
th {
  font-size: 11px;
  color: var(--muted);
  font-weight: 500;
  background: #191e28;
}
td {
  font: 12px var(--mono);
  border-top: 1px solid #303643;
}
.symbol {
  font-weight: 700;
  font-size: 14px;
}
.subline {
  display: block;
  color: var(--muted);
  font: 11px/1.6 sans-serif;
}
.foot {
  padding: 12px 19px;
  border-top: 1px solid var(--line);
  line-height: 1.6;
}
.connection {
  justify-content: space-between;
  margin-top: 14px;
}
.connection span {
  overflow-wrap: anywhere;
}
input,
select,
button {
  font: inherit;
  color: inherit;
  border: 1px solid #414959;
  border-radius: 5px;
  background: #171c26;
  padding: 7px 10px;
}
input,
select {
  min-width: 0;
  width: 100%;
}
button {
  cursor: pointer;
  font-size: 13px;
  white-space: nowrap;
  background: #2a303b;
}
button:hover:enabled {
  border-color: var(--teal);
}
button:disabled,
fieldset:disabled {
  opacity: 0.55;
}
button:disabled {
  cursor: default;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}
fieldset {
  margin: 0;
  border: 0;
  padding: 0;
  min-width: 0;
}
label {
  display: block;
  margin: 0 0 5px;
}
.side,
.pair {
  display: flex;
  gap: 8px;
  margin: 12px 0;
}
.side button,
.pair > div {
  flex: 1;
  min-width: 0;
}
.side button[aria-pressed="true"]#buy {
  color: var(--teal);
  background: #143b37;
  border-color: #22736a;
}
.side button[aria-pressed="true"]#sell {
  color: #ffa27a;
  background: #462b25;
  border-color: #a05b3d;
}
.primary {
  font-weight: 650;
  background: var(--teal);
  color: #0d2420;
  border-color: transparent;
}
.primary:hover:enabled {
  background: #38e6c9;
}
#review {
  width: 100%;
  margin-top: 4px;
}
.small,
.remove {
  padding: 3px 8px;
  font-size: 12px;
}
.remove {
  background: transparent;
  color: var(--muted);
  border: 0;
}
.good {
  color: var(--teal);
}
.sell {
  color: var(--orange);
}
.message {
  padding: 12px 0;
}
.message:empty,
.error:empty {
  display: none;
}
.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
[hidden] {
  display: none !important;
}
dialog {
  width: min(420px, calc(100% - 32px));
  background: var(--panel);
  color: var(--fg);
  border: 1px solid #525d6b;
  border-radius: 10px;
  padding: 20px;
}
dialog::backdrop {
  background: #090e18bf;
}
.dialog-head {
  margin-bottom: 14px;
}
.dialog-head button {
  font-size: 20px;
  padding: 0 8px;
}
dialog p {
  margin: 12px 0;
}
.actions {
  justify-content: flex-end;
  margin-top: 16px;
}
dl {
  display: grid;
  grid-template-columns: 86px 1fr;
  gap: 8px;
  margin: 16px 0;
}
dt {
  color: var(--muted);
}
dd {
  margin: 0;
  text-align: right;
  overflow-wrap: anywhere;
}
@media (max-width: 820px) {
  .columns {
    grid-template-columns: minmax(0, 1.25fr) minmax(250px, 1fr);
    gap: 12px;
  }
  main {
    padding: 22px 14px;
  }
  .panel-head,
  .pad {
    padding: 12px;
  }
  th,
  td {
    padding: 8px;
  }
  .brand img {
    width: 99px;
  }
}
@media (max-width: 660px) {
  header {
    height: 55px;
    padding: 0 12px;
  }
  .brand {
    gap: 6px;
  }
  .brand img {
    width: 83px;
  }
  .brand span {
    font-size: 15px;
    padding-left: 7px;
  }
  .session {
    gap: 5px;
    font-size: 12px;
  }
  .session button {
    font-size: 11px;
    padding: 4px 6px;
  }
  .columns {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }
  .left,
  aside {
    display: contents;
  }
  .columns .left section:nth-child(2) {
    order: 3;
  }
  .heading {
    margin-bottom: 16px;
  }
  main {
    padding: 20px 12px;
  }
  .watch-form {
    padding: 12px;
  }
  .watch-form input {
    max-width: none;
  }
  .panel-head .caption {
    font-size: 11px;
  }
}
