/* ZQUANT execution monitor — light theme, same design language as the landing:
   Geist only (no monospace), #09318b blue, white cards on #f2f2f2, dark pill nav. */

:root {
  --bg:          #f2f2f2;
  --surface:     #ffffff;
  --blue:        #09318b;
  --blue-bright: #1f56d6;
  --blue-soft:   #e6eefe;
  --blue-line:   #bacbff;
  --ink:         #010004;
  --ink-2:       #3a3a3d;
  --ink-3:       #5c5c60;
  --muted:       #919195;
  --line:        rgba(1, 0, 4, .10);
  --line-2:      rgba(1, 0, 4, .06);
  --ok:          #12a05c;
  --ok-soft:     #e8f7f0;
  --bad:         #e02b2b;
  --bad-soft:    #fdecec;
  --warn:        #8a5a00;
  --warn-soft:   #fef6e6;
  --radius:      12px;
  --radius-lg:   16px;
  --shadow:      0 1px 2px rgba(0,0,0,.04), 0 10px 28px -18px rgba(0,0,0,.18);
  --sans: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --gutter: clamp(16px, 3.5vw, 32px);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }

.wrap { width: 100%; max-width: 1240px; margin-inline: auto; padding-inline: var(--gutter); }

/* small uppercase labels — same face as everything else, just tighter */
.mono {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
}

/* every figure on the page: Geist, tabular so columns line up */
.num { font-family: var(--sans); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }

/* ---------------- nav ---------------- */

.nav-shell { position: sticky; top: 0; z-index: 50; padding: 16px var(--gutter) 0; }
.nav {
  max-width: 1160px; margin-inline: auto;
  display: flex; align-items: center; gap: 14px;
  background: rgba(8, 8, 10, .86);
  backdrop-filter: saturate(150%) blur(14px);
  -webkit-backdrop-filter: saturate(150%) blur(14px);
  border: 1px solid rgba(255, 255, 255, .06);
  border-radius: 14px;
  padding: 9px 9px 9px 18px;
  box-shadow: 0 2px 3px rgba(0, 0, 0, .15);
  color: #fff;
}
.brand { font-size: 17px; letter-spacing: .02em; margin-right: auto; white-space: nowrap; }
.brand .z { font-weight: 400; }
.brand .q { font-weight: 600; }
.nav-links { display: flex; gap: 2px; }
.nav-links a {
  font-size: 13px; color: rgba(255, 255, 255, .64);
  padding: 8px 12px; border-radius: 8px; white-space: nowrap;
  transition: color .16s ease, background-color .16s ease;
}
.nav-links a:hover { color: #fff; background: rgba(255, 255, 255, .08); }
.nav .live {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--sans); font-size: 11px; font-weight: 500;
  letter-spacing: .1em; text-transform: uppercase;
  background: #fff; color: var(--ink);
  border-radius: 8px; padding: 10px 14px; white-space: nowrap;
}
@media (max-width: 720px) {
  .nav { padding-left: 14px; }
  .nav-links { display: none; }
}

/* ---------------- page head ---------------- */

.head { padding: clamp(36px, 5vw, 60px) 0 clamp(22px, 3vw, 32px); }
h1 { margin: 0; font-size: clamp(30px, 4.4vw, 46px); font-weight: 500; letter-spacing: -.04em; line-height: 1.04; }
.head p { margin: 14px 0 0; color: var(--ink-3); max-width: 62ch; font-size: 15px; }

.demo {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 11px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase;
  color: var(--warn); background: var(--warn-soft);
  border: 1px solid rgba(138, 90, 0, .18);
  border-radius: 999px; padding: 6px 12px; margin-bottom: 18px;
}

.status { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; padding: 0; }
.status li {
  list-style: none; display: flex; align-items: center; gap: 8px;
  font-size: 11px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink-2);
  border: 1px solid var(--line-2); background: var(--surface);
  border-radius: 999px; padding: 7px 13px;
}
.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); flex: none; }
.dot.pulse { animation: pulse 1.8s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.82); } }

/* ---------------- layout ---------------- */

.grid { display: grid; gap: 14px; }
.kpis { grid-template-columns: repeat(6, minmax(0, 1fr)); }
@media (max-width: 1080px) { .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 620px)  { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.split { display: grid; grid-template-columns: minmax(0, 2.1fr) minmax(0, 1fr); gap: 14px; margin-top: 14px; }
@media (max-width: 1020px) { .split { grid-template-columns: minmax(0, 1fr); } }

.card {
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  box-shadow: var(--shadow);
  min-width: 0;
}
.card-head {
  display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  margin-bottom: 16px;
}
.card-head .mono { color: var(--muted); }

.kpi .k { font-size: 11px; font-weight: 500; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); }
.kpi .v {
  font-family: var(--sans); font-variant-numeric: tabular-nums;
  font-size: clamp(22px, 2.4vw, 30px); font-weight: 500;
  letter-spacing: -.035em; line-height: 1.1; margin-top: 10px; color: var(--ink);
}
.kpi .v.pos { color: var(--ok); }
.kpi .s { font-size: 12px; color: var(--muted); margin-top: 5px; }

/* ---------------- chart ---------------- */

.chart-wrap { position: relative; width: 100%; }
.chart { display: block; width: 100%; height: clamp(200px, 26vw, 280px); overflow: visible; }
.chart .grid-line { stroke: rgba(1, 0, 4, .07); stroke-width: 1; }
.chart .area { fill: url(#zqFill); }
.chart .line { fill: none; stroke: var(--blue-bright); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .cursor { fill: var(--blue-bright); }
.chart .cursor-ring { fill: none; stroke: var(--blue-line); stroke-width: 1.5; }
.chart-meta { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.chart-meta .big {
  font-family: var(--sans); font-variant-numeric: tabular-nums;
  font-size: clamp(24px, 2.8vw, 34px); font-weight: 500; letter-spacing: -.04em; color: var(--ink);
}
.chart-meta .delta { font-variant-numeric: tabular-nums; font-size: 13px; color: var(--ok); }
.tf { display: flex; gap: 4px; }
.tf button {
  font-family: var(--sans); font-size: 11px; font-weight: 500;
  letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink-3); background: transparent; border: 1px solid var(--line-2);
  border-radius: 7px; padding: 6px 11px; cursor: pointer;
  transition: color .15s ease, background-color .15s ease, border-color .15s ease;
}
.tf button:hover { color: var(--ink); border-color: var(--line); }
.tf button[aria-pressed="true"] { color: var(--blue); background: var(--blue-soft); border-color: var(--blue-line); }

/* ---------------- trades table ---------------- */

.table-scroll { overflow-x: auto; margin: 0 -20px; padding: 0 20px; }
table { width: 100%; border-collapse: collapse; min-width: 760px; }
th {
  font-size: 10.5px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted); text-align: left;
  padding: 0 14px 10px 0; border-bottom: 1px solid var(--line-2); white-space: nowrap;
}
th:last-child, td:last-child { text-align: right; padding-right: 0; }
td {
  font-family: var(--sans); font-variant-numeric: tabular-nums;
  font-size: 13.5px; color: var(--ink-2);
  padding: 12px 14px 12px 0; border-bottom: 1px solid var(--line-2); white-space: nowrap;
}
td.route { color: var(--ink); font-weight: 500; letter-spacing: -.01em; }
td.net.pos { color: var(--ok); }
td.net.neg { color: var(--bad); }
tr.row-new { animation: rowIn .45s cubic-bezier(.16,.84,.44,1) both; }
@keyframes rowIn { from { opacity: 0; filter: blur(6px); transform: translateY(-6px); } to { opacity: 1; filter: blur(0); transform: none; } }

.pill {
  display: inline-block; font-size: 10.5px; font-weight: 500; letter-spacing: .07em;
  text-transform: uppercase; border-radius: 6px; padding: 5px 9px;
}
.pill.ok { color: var(--ok); background: var(--ok-soft); }
.pill.no { color: var(--bad); background: var(--bad-soft); }

/* ---------------- breakdown bars ---------------- */

.bars { display: flex; flex-direction: column; gap: 14px; }
.bar-row .bar-top {
  display: flex; justify-content: space-between; gap: 12px;
  font-size: 13px; color: var(--ink-2);
}
.bar-row .bar-top span:last-child { color: var(--muted); font-variant-numeric: tabular-nums; }
.track { height: 6px; border-radius: 4px; background: #eceef2; margin-top: 8px; overflow: hidden; }
.fill { height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--blue), var(--blue-bright)); transition: width .5s cubic-bezier(.16,.84,.44,1); }
.fill.warn { background: linear-gradient(90deg, #c0392f, #e8635d); }

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

footer { margin-top: clamp(40px, 5vw, 64px); padding: 22px 0 40px; border-top: 1px solid var(--line-2); }
.foot-in {
  display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  font-size: 11px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted);
}

@media (prefers-reduced-motion: reduce) {
  .dot.pulse, tr.row-new { animation: none !important; }
  .fill { transition: none; }
}
