/* =========================================================================
   Perpetuals · Trading Desk demo
   A refined dark terminal aesthetic. Editorial serif italic for headlines,
   geometric sans for UI, mono for numerics. Copper accent on near-black ink.
   ========================================================================= */

:root {
  /* Surfaces */
  --ink:           #0c0d0a;        /* page background */
  --ink-2:         #131410;        /* card */
  --ink-3:         #1a1c17;        /* hover / elevated */
  --line:          #26281f;        /* hairlines */
  --line-soft:     #1d1f18;
  --line-strong:   #3a3d31;

  /* Text */
  --text:          #ece6d4;        /* warm off-white */
  --text-dim:      #8e8a78;
  --text-mute:     #5e5c50;

  /* Brand & semantic */
  --copper:        #d89b5c;        /* primary accent */
  --copper-bright: #f4b878;
  --copper-faint:  rgba(216, 155, 92, 0.14);

  --up:            #6fd49a;        /* gain (muted emerald) */
  --up-soft:       rgba(111, 212, 154, 0.14);
  --down:          #e07a6b;        /* loss (terracotta, not garish red) */
  --down-soft:     rgba(224, 122, 107, 0.14);

  --chart-grid:    #20221c;

  /* Type */
  --font-display:  "Instrument Serif", "Cormorant Garamond", "Times New Roman", serif;
  --font-ui:       "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono:     "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  /* Geometry */
  --radius:        2px;             /* sharp, terminal-feel */
  --radius-lg:     4px;
  --topbar-h:      56px;
  --content-max:   1480px;
  --gutter:        clamp(20px, 3vw, 40px);

  --shadow-soft:   0 1px 0 0 var(--line-soft) inset,
                   0 0 0 1px var(--line-soft);
  --shadow-card:   0 0 0 1px var(--line);
  --shadow-pop:    0 16px 60px -20px rgba(0,0,0,0.7),
                   0 0 0 1px var(--line-strong);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

html {
  font-family: var(--font-ui);
  background: var(--ink);
  color: var(--text);
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* ---------- ambient background layers ---------- */

.bg-grid {
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(to right, var(--line-soft) 1px, transparent 1px),
    linear-gradient(to bottom, var(--line-soft) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: radial-gradient(ellipse 100% 70% at 50% 0%, #000 30%, transparent 75%);
  opacity: 0.55;
}

.bg-grain {
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1   0 0 0 0 0.95   0 0 0 0 0.85   0 0 0 0.07 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  opacity: 0.5;
  mix-blend-mode: overlay;
}

/* ---------- topbar ---------- */

.topbar {
  position: sticky; top: 0; z-index: 50;
  height: var(--topbar-h);
  padding: 0 var(--gutter);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 28px;
  background: linear-gradient(to bottom, rgba(12,13,10,0.95), rgba(12,13,10,0.78));
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.brand-link {
  display: inline-flex; align-items: baseline; gap: 12px;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.01em;
}
.brand-mark {
  color: var(--copper);
  display: inline-grid; place-items: center;
  transform: translateY(2px);
}
.brand-word {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 22px;
  line-height: 1;
}
.brand-sub {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-mute);
  border-left: 1px solid var(--line-strong);
  padding-left: 10px;
  align-self: center;
}

.nav {
  display: flex; gap: 4px; align-items: center;
  justify-self: center;
}
.nav a {
  position: relative;
  padding: 8px 14px;
  color: var(--text-dim);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.005em;
  border-radius: var(--radius);
  transition: color 120ms ease, background 120ms ease;
}
.nav a:hover { color: var(--text); background: var(--ink-2); }
.nav a[aria-current="page"] {
  color: var(--text);
  background: var(--ink-2);
}
.nav a[aria-current="page"]::after {
  content: ""; position: absolute;
  left: 14px; right: 14px; bottom: 2px; height: 1px;
  background: var(--copper);
}

.status {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-mute);
  letter-spacing: 0.02em;
}
.conn-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--text-mute);
  box-shadow: 0 0 0 0 currentColor;
}
.conn-dot[data-state="live"] {
  background: var(--up);
  animation: pulse 2.2s infinite;
}
.conn-dot[data-state="err"]  { background: var(--down); }
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(111,212,154,0.5); }
  70%  { box-shadow: 0 0 0 8px rgba(111,212,154,0); }
  100% { box-shadow: 0 0 0 0 rgba(111,212,154,0); }
}
.kbd-hint {
  display: inline-block;
  padding: 2px 6px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  color: var(--text-dim);
  font-size: 10.5px;
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  padding: 64px var(--gutter) 36px;
  max-width: var(--content-max);
  margin: 0 auto;
  z-index: 1;
}
.hero[hidden] { display: none; }

.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--copper);
  margin-bottom: 18px;
}
.hero-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(44px, 7vw, 96px);
  line-height: 0.96;
  letter-spacing: -0.02em;
  margin: 0 0 22px;
  color: var(--text);
}
.hero-title em {
  font-style: italic;
  color: var(--copper);
}
.hero-sub {
  max-width: 56ch;
  color: var(--text-dim);
  font-size: 15px;
  line-height: 1.6;
  margin: 0;
}
.hero-ticker {
  margin-top: 32px;
  display: flex; gap: 24px;
  overflow: hidden;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 10px 0;
  mask-image: linear-gradient(90deg, transparent 0, #000 60px, #000 calc(100% - 60px), transparent 100%);
}
.hero-ticker .tk {
  flex: 0 0 auto;
  display: inline-flex; gap: 10px; align-items: baseline;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-dim);
  white-space: nowrap;
}
.hero-ticker .tk strong { color: var(--text); font-weight: 500; }
.hero-ticker .tk .up   { color: var(--up); }
.hero-ticker .tk .down { color: var(--down); }

/* ---------- generic page chrome ---------- */

main {
  position: relative;
  z-index: 1;
  flex: 1 0 auto;
  padding: 0 var(--gutter) 80px;
  max-width: var(--content-max);
  margin: 0 auto;
  width: 100%;
}

.section-head {
  display: flex; align-items: end; justify-content: space-between;
  gap: 16px;
  margin: 28px 0 18px;
}
.section-head h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-style: italic;
  font-size: 30px;
  line-height: 1;
  margin: 0;
  letter-spacing: -0.01em;
}
.section-head .crumbs {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-mute);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

/* Pill / filter row */
.filters {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-bottom: 22px;
  align-items: center;
}
.filters .label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-mute);
  margin-right: 8px;
}
.chip {
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text-dim);
  padding: 6px 12px;
  font-size: 12px;
  font-family: var(--font-ui);
  cursor: pointer;
  transition: color 100ms, border-color 100ms, background 100ms;
}
.chip:hover { color: var(--text); border-color: var(--line-strong); }
.chip[aria-pressed="true"] {
  color: var(--ink);
  background: var(--copper);
  border-color: var(--copper);
}
.search {
  flex: 1;
  min-width: 200px;
  max-width: 360px;
  margin-left: auto;
}
.search input {
  width: 100%;
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  padding: 8px 12px;
  font-family: var(--font-ui);
  font-size: 13px;
  outline: none;
  transition: border-color 120ms;
}
.search input:focus { border-color: var(--copper); }
.search input::placeholder { color: var(--text-mute); }

/* ---------- market grid ---------- */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.card {
  background: var(--ink-2);
  padding: 18px 18px 14px;
  display: flex; flex-direction: column;
  text-decoration: none;
  color: var(--text);
  transition: background 120ms;
  position: relative;
}
.card:hover { background: var(--ink-3); }
.card:hover .star { opacity: 1; }

.market-card header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 6px;
}
.market-card .ticker {
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--text);
}
.kind-pill {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-mute);
  padding: 2px 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.kind-pill[data-kind="perp"]          { color: var(--copper); border-color: var(--copper); }
.kind-pill[data-kind="spot"]          { color: var(--text-dim); }
.kind-pill[data-kind^="rwa"]          { color: #b8c6a1; border-color: #2e3322; }

.market-card .name {
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 14px;
}

.market-card .price-row {
  display: flex; align-items: baseline; gap: 10px;
  font-family: var(--font-mono);
}
.market-card .price {
  font-size: 20px;
  font-weight: 500;
  color: var(--text);
  letter-spacing: -0.005em;
}
.market-card .chg {
  font-size: 12.5px;
}
.chg.up   { color: var(--up); }
.chg.down { color: var(--down); }

.spark {
  width: 100%;
  height: 36px;
  margin: 12px 0 4px;
}
.spark .spark-path.up   { stroke: var(--up); }
.spark .spark-path.down { stroke: var(--down); }

.market-card footer {
  margin-top: 8px;
  display: flex; justify-content: space-between; align-items: center;
}
.market-card .meta {
  font-size: 11px;
  color: var(--text-mute);
}
.market-card .vol { color: var(--text-dim); }
.star {
  background: transparent;
  border: none;
  color: var(--text-mute);
  cursor: pointer;
  padding: 4px;
  opacity: 0.5;
  transition: color 120ms, opacity 120ms;
}
.star:hover { color: var(--copper); }
.star[aria-pressed="true"] {
  color: var(--copper);
  opacity: 1;
}
.star[aria-pressed="true"] svg path { fill: var(--copper); }

/* Flash on price tick */
.card.flash-up    { animation: flashUp 700ms ease-out; }
.card.flash-down  { animation: flashDown 700ms ease-out; }
@keyframes flashUp   { 0% { background: var(--up-soft); } 100% { background: var(--ink-2); } }
@keyframes flashDown { 0% { background: var(--down-soft); } 100% { background: var(--ink-2); } }

/* ---------- trading view ---------- */

.trading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  grid-template-rows: auto auto;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.trading > * { background: var(--ink-2); }

.trade-head {
  grid-column: 1 / -1;
  padding: 22px 24px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 28px;
  align-items: center;
  border-bottom: 1px solid var(--line);
}
.trade-head .id {
  display: flex; flex-direction: column; gap: 4px;
}
.trade-head .id .sym {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 32px;
  line-height: 1;
}
.trade-head .id .nm {
  font-size: 12px;
  color: var(--text-dim);
  letter-spacing: 0.02em;
}
.trade-head .stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 24px;
}
.stat {
  display: flex; flex-direction: column; gap: 2px;
}
.stat .k {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-mute);
}
.stat .v {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--text);
  font-weight: 500;
}
.trade-head .price-big {
  text-align: right;
  display: flex; flex-direction: column; align-items: flex-end; gap: 4px;
}
.trade-head .price-big .p {
  font-family: var(--font-mono);
  font-size: 30px;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1;
}
.trade-head .price-big .c {
  font-family: var(--font-mono);
  font-size: 13px;
}

.chart-pane {
  position: relative;
  min-height: 460px;
  padding: 16px;
}
.chart-toolbar {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 12px;
  gap: 12px;
}
.chart-toolbar .intervals { display: flex; gap: 4px; }
.chart-toolbar .intervals button {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-dim);
  padding: 4px 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  cursor: pointer;
  border-radius: var(--radius);
}
.chart-toolbar .intervals button:hover { color: var(--text); }
.chart-toolbar .intervals button[aria-pressed="true"] {
  color: var(--copper);
  border-color: var(--copper);
}
#chart-host {
  width: 100%;
  height: 420px;
}

.book {
  padding: 16px;
  display: flex; flex-direction: column; gap: 12px;
  border-left: 1px solid var(--line);
  min-height: 460px;
}
.book h3 {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-mute);
  margin: 0;
  font-weight: 500;
}
.book table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-mono);
  font-size: 11.5px;
}
.book thead th {
  text-align: right;
  color: var(--text-mute);
  font-weight: 400;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 8px;
  border-bottom: 1px solid var(--line);
}
.book thead th:first-child { text-align: left; }
.book tbody td {
  text-align: right;
  padding: 3px 8px;
  position: relative;
}
.book tbody td:first-child { text-align: left; }
.book tbody tr { position: relative; }
.book tbody .price-cell { font-weight: 500; }
.book .asks .price-cell { color: var(--down); }
.book .bids .price-cell { color: var(--up); }
/* Depth bars rendered via background gradient on the row */
.book tbody tr.depth { background-image: linear-gradient(to left, var(--bar-color, transparent) var(--bar-pct, 0%), transparent var(--bar-pct, 0%)); }
.book .asks tr.depth { --bar-color: var(--down-soft); }
.book .bids tr.depth { --bar-color: var(--up-soft); }
.book .mid {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 8px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 13px;
}
.book .mid .label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-mute);
}
.book .mid .v { color: var(--copper); font-weight: 500; }

.trades-pane {
  grid-column: 1 / -1;
  padding: 16px 24px 24px;
  border-top: 1px solid var(--line);
}
.trades-pane h3 {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-mute);
  margin: 0 0 10px;
  font-weight: 500;
}
.trades-pane table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-mono);
  font-size: 11.5px;
}
.trades-pane th, .trades-pane td {
  padding: 4px 12px 4px 0;
  text-align: left;
}
.trades-pane th {
  color: var(--text-mute);
  font-weight: 400;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border-bottom: 1px solid var(--line);
}
.trades-pane tr td:nth-child(2) { text-align: right; }
.trades-pane tr td:nth-child(3) { text-align: right; color: var(--text-dim); }
.trades-pane tr td:nth-child(4) { text-align: right; color: var(--text-mute); }
.trades-pane .buy  { color: var(--up); }
.trades-pane .sell { color: var(--down); }

/* ---------- portfolio ---------- */

.pf-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 24px;
}
.pf-tile {
  background: var(--ink-2);
  padding: 22px 22px 20px;
}
.pf-tile .k {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-mute);
  margin-bottom: 10px;
}
.pf-tile .v {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 34px;
  line-height: 1;
  color: var(--text);
}
.pf-tile .sub {
  margin-top: 8px;
  font-size: 12px;
  color: var(--text-dim);
}

.pf-block {
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 22px 22px;
  margin-bottom: 1px;
}
.pf-block h3 {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-mute);
  font-weight: 500;
  margin: 0 0 12px;
}
.pf-block table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-mono);
  font-size: 12px;
}
.pf-block th, .pf-block td {
  text-align: right;
  padding: 6px 10px;
  border-bottom: 1px solid var(--line-soft);
}
.pf-block th:first-child, .pf-block td:first-child { text-align: left; }
.pf-block th {
  color: var(--text-mute);
  font-weight: 400;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
.pf-block td a { color: var(--text); text-decoration: none; }
.pf-block td a:hover { color: var(--copper); }
.pf-block .side.long  { color: var(--up); }
.pf-block .side.short { color: var(--down); }

/* ---------- tokens (RWA) detail ---------- */

.token-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.token-card {
  background: var(--ink-2);
  padding: 22px 22px 20px;
  display: flex; flex-direction: column;
  text-decoration: none;
  color: var(--text);
  position: relative;
  transition: background 120ms;
}
.token-card:hover { background: var(--ink-3); }
.token-card .badge {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-mute);
  margin-bottom: 14px;
}
.token-card h4 {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: 22px;
  line-height: 1.1;
  margin: 0 0 4px;
}
.token-card .sym {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--copper);
  letter-spacing: 0.04em;
  margin-bottom: 14px;
}
.token-card p {
  margin: 0 0 14px;
  color: var(--text-dim);
  font-size: 12.5px;
  line-height: 1.55;
  flex: 1;
}
.token-card .foot {
  display: flex; justify-content: space-between; align-items: baseline;
  font-family: var(--font-mono);
}
.token-card .foot .price { font-size: 16px; font-weight: 500; }
.token-card .foot .chg   { font-size: 12px; }

/* ---------- footer ---------- */

.footer {
  border-top: 1px solid var(--line);
  padding: 16px var(--gutter);
  display: flex; justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-mute);
  letter-spacing: 0.02em;
  max-width: var(--content-max);
  margin: 0 auto;
  width: 100%;
}
.mono { font-family: var(--font-mono); }

/* ---------- command palette ---------- */

.cmdk {
  position: fixed;
  top: 14vh; left: 50%; transform: translateX(-50%);
  width: min(560px, 92vw);
  margin: 0;
  border: none;
  padding: 0;
  background: var(--ink-2);
  color: var(--text);
  box-shadow: var(--shadow-pop);
  border-radius: var(--radius);
  z-index: 100;
}
.cmdk[open] { animation: cmdkin 160ms ease-out; }
@keyframes cmdkin {
  from { opacity: 0; transform: translateX(-50%) translateY(-6px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}
.cmdk::backdrop {
  background: rgba(8,8,5,0.55);
  backdrop-filter: blur(2px);
}
.cmdk input {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--line);
  padding: 16px 20px;
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 15px;
  outline: none;
}
.cmdk input::placeholder { color: var(--text-mute); }
.cmdk-results {
  list-style: none;
  padding: 6px;
  margin: 0;
  max-height: 52vh;
  overflow: auto;
}
.cmdk-results li {
  padding: 10px 14px;
  border-radius: var(--radius);
  display: flex; justify-content: space-between; align-items: center;
  gap: 14px;
  cursor: pointer;
}
.cmdk-results li[aria-selected="true"] {
  background: var(--ink-3);
}
.cmdk-results li .left { display: flex; flex-direction: column; gap: 2px; }
.cmdk-results li .l1 { font-size: 14px; }
.cmdk-results li .l2 {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--text-mute);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.cmdk-results li .right {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-dim);
}
.cmdk-foot {
  border-top: 1px solid var(--line);
  padding: 10px 16px;
  display: flex; gap: 18px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--text-mute);
  letter-spacing: 0.08em;
}
.cmdk-foot kbd {
  display: inline-block;
  padding: 1px 5px;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  margin-right: 4px;
  font-family: inherit;
  font-size: 10px;
}

/* ---------- toast ---------- */

.toast-host {
  position: fixed;
  right: 20px; bottom: 20px;
  z-index: 90;
  display: flex; flex-direction: column; gap: 10px;
  pointer-events: none;
}
.toast {
  background: var(--ink-2);
  border: 1px solid var(--line-strong);
  border-left: 2px solid var(--copper);
  border-radius: var(--radius);
  padding: 10px 14px;
  font-size: 12.5px;
  color: var(--text);
  box-shadow: var(--shadow-pop);
  animation: toastIn 220ms ease-out;
  max-width: 320px;
}
@keyframes toastIn {
  from { transform: translateY(8px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}

/* ---------- loading / empty ---------- */

.loading {
  padding: 60px 20px;
  text-align: center;
  color: var(--text-mute);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.empty {
  padding: 60px 20px;
  text-align: center;
  color: var(--text-dim);
}
.empty h3 {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: 24px;
  margin: 0 0 8px;
  color: var(--text);
}

/* ---------- responsive ---------- */

@media (max-width: 1100px) {
  .trading { grid-template-columns: 1fr; }
  .book { border-left: none; border-top: 1px solid var(--line); }
}
@media (max-width: 760px) {
  .nav { display: none; }
  .topbar { grid-template-columns: auto 1fr; }
  .hero { padding-top: 36px; }
  .trade-head { grid-template-columns: 1fr; gap: 16px; }
  .trade-head .price-big { align-items: flex-start; text-align: left; }
}
