:root {
  --black: #000;
  --panel: #07111e;
  --panel-2: #0b1727;
  --line: #24364d;
  --text: #f4f8ff;
  --muted: #9babc0;
  --green: #55e3a1;
  --red: #ff6680;
  --blue: #58a4ff;
  --yellow: #ffca3a;
  --white-line: #c8d5e5;
}

* { box-sizing: border-box; }

html,
body {
  width: 600px;
  height: 600px;
  margin: 0;
  overflow: hidden;
  background: var(--black);
  color: var(--text);
  font-family: ui-monospace, "SFMono-Regular", Menlo, Monaco, Consolas, monospace;
}

button { font: inherit; }

#app {
  width: 600px;
  height: 600px;
  padding: 20px 20px 14px;
  outline: none;
  background: var(--black);
}

.topbar {
  height: 78px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

p { margin: 0; }

#eyebrow,
.label,
.list-heading,
#ohlc,
footer {
  color: var(--muted);
  font-size: 16px;
}

h1 {
  max-width: 350px;
  margin: 5px 0 0;
  overflow: hidden;
  color: var(--text);
  font-size: 25px;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quote {
  display: flex;
  align-items: flex-end;
  flex-direction: column;
  gap: 6px;
}

#price { font-size: 27px; line-height: 1; }

.pill {
  display: inline-flex;
  min-width: 86px;
  min-height: 28px;
  align-items: center;
  justify-content: center;
  padding: 4px 12px;
  border: 1px solid currentColor;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 700;
}

.bull { color: var(--green); }
.bear { color: var(--red); }
.neutral { color: var(--muted); }

.screen { height: 452px; padding-top: 14px; }
.hidden { display: none !important; }

.headline-card {
  height: 92px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
}

.headline-card > div:first-child {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

#headline-action { font-size: 27px; }

.basis-block {
  display: grid;
  grid-template-columns: auto auto;
  gap: 4px 12px;
  text-align: right;
}

.basis-block span,
.basis-block small { color: var(--muted); font-size: 15px; }
.basis-block strong { color: var(--blue); font-size: 20px; }
.basis-block small { grid-column: 1 / -1; }

.list-heading {
  display: flex;
  justify-content: space-between;
  height: 36px;
  align-items: center;
  padding: 6px 10px 3px;
}

.market-list { display: grid; gap: 4px; }

.market-row {
  width: 100%;
  min-height: 46px;
  display: grid;
  grid-template-columns: 1.25fr .9fr .65fr;
  align-items: center;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--panel);
  color: var(--text);
  text-align: left;
}

.market-row.selected {
  border-color: var(--blue);
  background: var(--panel-2);
  box-shadow: 0 0 14px rgb(88 164 255 / 24%);
}

.market-row .name { font-size: 19px; font-weight: 700; }
.market-row .row-price { color: var(--white-line); font-size: 18px; text-align: right; }
.market-row .row-action { font-size: 18px; font-weight: 700; text-align: right; }

.chart-heading {
  height: 50px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.chart-heading > div { display: grid; gap: 3px; }
.chart-heading strong { font-size: 22px; }
#ohlc { max-width: 430px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.chart-wrap {
  position: relative;
  height: 260px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  overflow: hidden;
}

canvas { display: block; }

.wt-wrap {
  height: 120px;
  margin-top: 7px;
  border-top: 1px solid var(--line);
  position: relative;
}

.wt-values {
  position: absolute;
  z-index: 1;
  top: 5px;
  left: 6px;
  color: var(--muted);
  font-size: 14px;
}

footer {
  height: 42px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: end;
  border-top: 1px solid var(--line);
}

#status { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#clock { text-align: right; }

.pager { display: flex; align-items: center; gap: 12px; }

.page-dot {
  width: 16px;
  height: 16px;
  padding: 0;
  border: 2px solid var(--muted);
  border-radius: 50%;
  background: transparent;
}

.page-dot.active { border-color: var(--blue); background: var(--blue); }
.page-dot:focus { outline: 2px solid var(--text); outline-offset: 3px; }

@media (prefers-reduced-motion: no-preference) {
  .market-row,
  .page-dot { transition: border-color 150ms ease, background 150ms ease, box-shadow 150ms ease; }
}
