:root {
  color-scheme: dark;
  --bg: #10110f;
  --panel: #191b18;
  --lift: #20231f;
  --line: #383c35;
  --ink: #f2f3ea;
  --muted: #a7aea3;
  --yellow: #f2d35d;
  --up: #8bd5a3;
  --down: #f4988c;
  --atlas: #c1b1fd;
  --pulse: #8ed6d1;
  --nova: #f6c18e;
  font:
    15px/1.45 -apple-system,
    BlinkMacSystemFont,
    "Helvetica Neue",
    sans-serif;
  font-variant-numeric: tabular-nums;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
}
button,
select {
  font: inherit;
  color: inherit;
}
button {
  cursor: pointer;
}
button:focus-visible,
select:focus-visible,
a:focus-visible {
  outline: 2px solid var(--yellow);
  outline-offset: 3px;
}
button:disabled {
  opacity: 0.45;
  cursor: wait;
}
button {
  border: 0;
  background: transparent;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: clamp(33px, 4.2vw, 57px);
  line-height: 1.04;
  letter-spacing: -0.063em;
  font-weight: 650;
}
h2 {
  font-size: 21px;
  line-height: 1.2;
  letter-spacing: -0.045em;
}
h3 {
  font-size: 15px;
  line-height: 1.3;
}
b {
  font-weight: 650;
}
header {
  height: 66px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 max(24px, calc((100vw - 1470px) / 2));
  gap: 20px;
  background: #11130f;
}
.logo {
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 20px;
  letter-spacing: 0.12em;
  font-weight: 800;
  line-height: 1;
}
.logo svg {
  width: 30px;
  height: 30px;
  color: var(--yellow);
}
nav {
  display: flex;
  align-items: stretch;
  height: 100%;
  gap: 6px;
}
nav button {
  padding: 0 15px;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  font-weight: 590;
  font-size: 14px;
}
nav button.active {
  border-color: var(--yellow);
  color: var(--yellow);
}
nav button:hover,
.rowbutton:hover {
  background: #24261f;
}
.paper {
  font:
    600 11px/1.2 ui-monospace,
    Menlo,
    monospace;
  letter-spacing: 0.035em;
  border: 1px solid #74704f;
  color: #e4d99c;
  padding: 6px 9px;
  border-radius: 4px;
  white-space: nowrap;
}
main {
  max-width: 1518px;
  margin: 0 auto;
  padding: 27px 27px 35px;
}
.heading,
.hgroup,
.panelhead,
.agentline,
.spread,
.timebar,
.filters {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.hgroup {
  justify-content: flex-start;
  align-items: flex-end;
  gap: 14px;
  min-width: 0;
}
.headmeta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 9px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--muted);
}
.status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #b3b6ac;
  flex: none;
}
.dot.yes {
  background: var(--up);
  box-shadow: 0 0 0 3px #8bd5a318;
}
.dot.wait {
  background: var(--yellow);
}
.refresh {
  flex: none;
  background: var(--yellow);
  color: #272314;
  border-radius: 6px;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 7px;
}
.refresh:hover {
  background: #ffe489;
}
.summary {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr 1fr;
  gap: 0;
  margin: 24px 0 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  padding: 13px 4px;
}
.metric {
  padding: 0 18px;
  border-left: 1px solid var(--line);
  min-width: 0;
}
.metric:first-child {
  border: 0;
}
.metric span,
.label,
.dim,
.sub {
  color: var(--muted);
}
.metric span,
.label {
  font-size: 12px;
}
.metric strong {
  font-size: clamp(19px, 2.3vw, 33px);
  font-weight: 570;
  letter-spacing: -0.05em;
  display: block;
  line-height: 1.2;
  margin-top: 4px;
}
.pos {
  color: var(--up) !important;
}
.neg {
  color: var(--down) !important;
}
.yellow {
  color: var(--yellow);
}
.ticker {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--line);
  margin: 0 0 20px;
  overflow-x: auto;
  scrollbar-width: thin;
}
.tick {
  min-width: 110px;
  flex: 1 0 auto;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 8px;
  text-align: left;
  padding: 8px 12px 12px;
  border-right: 1px solid #2e312b;
}
.tick:last-child {
  border-right: 0;
}
.tick:hover {
  background: var(--panel);
}
.tick b {
  font-size: 12px;
}
.tick .number {
  font:
    500 13px ui-monospace,
    Menlo,
    monospace;
  grid-column: 1/-1;
}
.tick .dot {
  width: 5px;
  height: 5px;
  align-self: center;
}
.content {
  display: grid;
  grid-template-columns: minmax(0, 1.48fr) minmax(305px, 1fr);
  gap: 15px;
  align-items: start;
}
.stack,
.sections {
  display: grid;
  gap: 15px;
}
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  min-width: 0;
  overflow: hidden;
}
.panelhead {
  padding: 16px 17px;
  border-bottom: 1px solid var(--line);
}
.headcopy {
  min-width: 0;
}
.sub {
  font-size: 12px;
  margin-top: 4px;
}
.filters {
  justify-content: flex-start;
  gap: 5px;
  flex-wrap: wrap;
}
.filter {
  border: 1px solid var(--line);
  color: var(--muted);
  padding: 4px 9px;
  border-radius: 4px;
  font-size: 12px;
}
.filter.on {
  color: var(--ink);
  background: #34382e;
  border-color: #70745e;
}
.filter:hover,
.rowbutton:hover,
.outline:hover {
  color: var(--ink);
  border-color: #69705f;
}
.chatbar {
  padding: 10px 16px 9px;
  border-bottom: 1px solid #30332d;
}
.chat {
  height: clamp(240px, 40vh, 410px);
  overflow: auto;
  scrollbar-width: thin;
  overscroll-behavior: contain;
}
.message {
  padding: 13px 17px;
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 10px;
  border-bottom: 1px solid #30342c;
}
.message:last-child {
  border-bottom: 0;
}
.message p {
  margin-top: 3px;
  font-size: 14px;
  line-height: 1.4;
  color: #dadfd4;
  overflow-wrap: anywhere;
}
.glyph {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--agent, #c7cebc) 12%, transparent);
  border: 1px solid
    color-mix(in srgb, var(--agent, #c7cebc) 38%, transparent);
  border-radius: 6px;
  color: var(--agent, #c7cebc);
  font:
    700 15px ui-monospace,
    Menlo,
    monospace;
}
.atlas {
  --agent: var(--atlas);
}
.pulse {
  --agent: var(--pulse);
}
.nova {
  --agent: var(--nova);
}
.agentname {
  color: var(--agent, var(--ink));
  font-weight: 640;
}
.msgmeta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.when {
  color: var(--muted);
  font:
    11px ui-monospace,
    Menlo,
    monospace;
}
.msgmeta .when {
  margin-left: auto;
}
.kind {
  font-size: 10px;
  color: #b7c0ac;
  border: 1px solid #48523e;
  border-radius: 3px;
  padding: 0 4px;
  line-height: 1.4;
}
.book {
  padding: 10px 15px;
  width: 100%;
  border-bottom: 1px solid #31342d;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
  text-align: left;
}
.book:last-child {
  border: 0;
}
.book .sub {
  margin: 1px 0 0;
  font-size: 11px;
}
.book .amount {
  text-align: right;
  font:
    600 13px ui-monospace,
    Menlo,
    monospace;
}
.book .amount small {
  display: block;
  font:
    11px ui-monospace,
    Menlo,
    monospace;
  margin-top: 3px;
}
.signal {
  padding: 12px 16px;
  border-bottom: 1px solid #30352c;
  font-size: 13px;
}
.signal:last-child {
  border: 0;
}
.signal p {
  margin-top: 4px;
  color: #d1d8c9;
}
.empty {
  color: var(--muted);
  padding: 18px;
  font-size: 13px;
}
.outline {
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 5px 9px;
  font-size: 12px;
  white-space: nowrap;
}
.note {
  font-size: 12px;
  line-height: 1.45;
  color: var(--muted);
}
.foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 14px;
}
.section {
  margin-top: 14px;
}
.marketgrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(217px, 1fr));
  gap: 10px;
  padding: 14px;
}
.market {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
}
.market .quote {
  font:
    540 22px ui-monospace,
    Menlo,
    monospace;
  margin: 9px 0;
}
.market .sub {
  font-size: 12px;
}
.chart-link {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  color: var(--ink);
  font-size: 12px;
  text-underline-offset: 3px;
}
.card {
  margin: 13px 16px 16px;
  border-left: 3px solid var(--agent, var(--line));
  padding-left: 12px;
}
.card .sub {
  margin: 5px 0;
}
.card h3 {
  font-size: 19px;
}
.tablewrap {
  overflow-x: auto;
  max-width: 100%;
  scrollbar-width: thin;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 13px;
}
th,
td {
  padding: 9px 15px;
  text-align: left;
  border-bottom: 1px solid #33362f;
}
th {
  font-size: 11px;
  color: var(--muted);
  font-weight: 500;
}
.num {
  text-align: right;
  white-space: nowrap;
  font-family: ui-monospace, Menlo, monospace;
}
tbody tr:last-child td {
  border-bottom: 0;
}
.reason {
  max-width: 44ch;
  min-width: 210px;
}
.smallrow {
  display: flex;
  gap: 11px;
  align-items: center;
  flex-wrap: wrap;
}
.smallrow .label {
  min-width: 60px;
}
.error {
  margin: 0 0 12px;
  background: #392f22;
  color: #ffe1a2;
  border: 1px solid #665132;
  padding: 9px 13px;
  border-radius: 5px;
  font-size: 13px;
}
.hide,
[hidden] {
  display: none !important;
}
.led {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
}
.access {
  position: absolute;
  left: -10000px;
}
.access:focus {
  position: static;
}
.sell {
  color: var(--down);
}
.buy {
  color: var(--up);
}
.tradeSide {
  font-weight: 650;
  font-size: 12px;
}
.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
.detail {
  padding: 12px 16px;
  background: #22261f;
  border-bottom: 1px solid var(--line);
}
.activequote {
  border-color: #bba74c;
  background: #24251c;
}
@media (min-width: 1450px) {
  .chat {
    height: 410px;
  }
  .tick {
    min-width: 120px;
  }
}
@media (max-width: 900px) {
  main {
    padding: 18px;
  }
  .content {
    grid-template-columns: minmax(0, 1.22fr) minmax(255px, 1fr);
  }
  header {
    padding: 0 18px;
    gap: 9px;
  }
  .panelhead {
    padding: 13px;
  }
  .metric {
    padding: 0 13px;
  }
  .chat {
    height: 380px;
  }
  nav {
    gap: 0;
  }
  nav button {
    padding: 0 10px;
  }
  .tick {
    min-width: 105px;
  }
}
@media (max-width: 680px) {
  header {
    height: auto;
    min-height: 68px;
    flex-wrap: wrap;
    padding: 12px 15px 0;
    gap: 5px;
  }
  .logo {
    font-size: 17px;
  }
  .logo svg {
    width: 24px;
    height: 24px;
  }
  nav {
    order: 3;
    flex-basis: 100%;
    justify-content: space-between;
  }
  nav button {
    padding: 8px 5px;
    font-size: 13px;
  }
  .paper {
    font-size: 10px;
    padding: 4px 7px;
  }
  main {
    padding: 17px 12px 24px;
  }
  .content {
    grid-template-columns: 1fr;
  }
  .summary {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px 0;
    margin: 15px 0 9px;
  }
  .metric:nth-child(3) {
    border-left: 0;
  }
  .ticker {
    margin-bottom: 13px;
  }
  .tick {
    min-width: 95px;
  }
  .chat {
    height: 330px;
  }
  .heading {
    align-items: center;
  }
  .refresh {
    font-size: 12px;
    padding: 9px 10px;
  }
  .headmeta {
    font-size: 12px;
    gap: 6px;
  }
  .message {
    padding: 10px 12px;
  }
  .metric strong {
    font-size: 22px;
  }
  .foot {
    align-items: flex-start;
  }
  .panelhead {
    gap: 7px;
  }
  .tablewrap table {
    min-width: 540px;
  }
  .timebar {
    align-items: flex-start;
  }
  .heading {align-items: flex-start;}
}


.brand-group {
  display: flex;
  align-items: center;
  gap: clamp(12px, 2vw, 28px);
}
.back-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}
.back-link:hover {color: var(--ink); text-decoration: underline;}
@media (max-width:680px) {
  .heading > div {min-width:0;}
  nav button {min-height:44px;}
  .brand-group {gap:14px;}
  .headmeta {column-gap:8px;}
  #lastcheck {flex-basis:100%;}
  .tablewrap {max-width:100%;}
  .stack, .panel {min-width:0;}
  .summary .metric strong {overflow-wrap:anywhere;}
}
