/* sato on fogo — clone of sat0.org aesthetic. dark-only, monospace, no rounded corners. */

:root {
  --bg: #09090b;       /* zinc-950 */
  --fg: #fafafa;       /* zinc-50  */
  --border: #27272a;   /* zinc-800 */
  --border-2: #1f1f23;
  --muted: #71717a;    /* zinc-500 */
  --muted-2: #52525b;  /* zinc-600 */
  --emerald: #34d399;  /* emerald-400 */
  --amber: #fbbf24;    /* amber-400 */
  --red: #f87171;      /* red-400 */
  --mono: ui-monospace, "JetBrains Mono", "SF Mono", Menlo, Consolas, monospace;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: var(--mono);
  border-radius: 0;
}

html, body {
  background: var(--bg);
  color: var(--fg);
  font-size: 14px;
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--emerald); color: var(--bg); }

a { color: inherit; text-decoration: none; }
a:hover { color: var(--emerald); }

button {
  background: transparent;
  color: inherit;
  border: 0;
  cursor: pointer;
  font-family: var(--mono);
  font-size: inherit;
}

input {
  background: transparent;
  color: inherit;
  border: 0;
  outline: none;
  font-family: var(--mono);
  width: 100%;
}

.muted { color: var(--muted); }
.muted-2 { color: var(--muted-2); }
.emerald { color: var(--emerald); }
.amber { color: var(--amber); }
.red { color: var(--red); }
.num { font-variant-numeric: tabular-nums; }
.xs { font-size: 12px; }
.sm { font-size: 14px; }
.text-10 { font-size: 10px; }
.text-11 { font-size: 11px; }
.center { text-align: center; }
.right { text-align: right; }

/* loading "|" pulse */
@keyframes pulse { 0%,100% { opacity: 1 } 50% { opacity: 0.3 } }
.pulse { animation: pulse 1.5s ease-in-out infinite; }

/* ─────────── header ─────────── */
.hdr {
  position: sticky;
  top: 0;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  z-index: 50;
}
.hdr-inner {
  max-width: 80rem;
  margin: 0 auto;
  padding: 8px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.hdr-left { display: flex; align-items: center; gap: 12px; }
.brand { font-size: 16px; }
.brand:hover { color: var(--emerald); }

/* ─────────── stats strip ─────────── */
.stats-strip {
  border-bottom: 1px solid var(--border);
  padding: 8px 12px;
  font-size: 11px;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  max-width: 80rem;
  margin: 0 auto;
}
.stats-strip .v { color: var(--fg); }

/* ─────────── main ─────────── */
.main {
  max-width: 80rem;
  margin: 0 auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.grid-main {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 12px;
}
@media (max-width: 1024px) {
  .grid-main { grid-template-columns: 1fr; }
}

/* ─────────── panels ─────────── */
.panel {
  border: 1px solid var(--border);
  padding: 16px;
}
.panel-title {
  font-size: 14px;
  font-weight: normal;
  margin-bottom: 12px;
}

/* chart */
.chart-panel { padding: 12px 16px; }
.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  font-size: 12px;
  flex-wrap: wrap;
  gap: 8px;
}
.legend { display: flex; gap: 12px; align-items: center; }
.dash { display: inline-block; width: 14px; height: 2px; vertical-align: middle; }
.dash-emerald { background: var(--emerald); }
.dash-amber { background: var(--amber); }
.chart-stats { display: flex; gap: 16px; }
.chart-wrap {
  position: relative;
  width: 100%;
  height: 280px;
  border: 1px solid var(--border);
  background: var(--bg);
}
#curve-chart { width: 100%; height: 100%; display: block; }
.x-axis {
  display: flex;
  justify-content: space-between;
  padding: 6px 4px 0;
  font-size: 10px;
  color: var(--muted-2);
}
.x-label { text-align: center; padding-top: 4px; }

/* trade panel */
.tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--border);
  margin-bottom: 14px;
}
.tab {
  padding: 10px;
  font-size: 12px;
  background: transparent;
  color: var(--muted);
}
.tab.active { background: var(--fg); color: var(--bg); }
.trade-row {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  margin-bottom: 6px;
}
.input-row {
  display: flex;
  align-items: center;
  border: 1px solid var(--border);
  padding: 10px 12px;
  margin-bottom: 8px;
  gap: 8px;
}
.input-row input {
  font-size: 20px;
  font-variant-numeric: tabular-nums;
}
.btn-text {
  font-size: 11px;
  color: var(--emerald);
  padding: 4px 8px;
  border: 1px solid transparent;
}
.btn-text:hover { border-color: var(--emerald); }
.symbol { color: var(--muted); font-size: 13px; }
.hint { margin-bottom: 12px; }
.quote-box {
  border: 1px solid var(--border);
  padding: 10px 12px;
  margin-bottom: 14px;
}
.quote-row {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  margin: 3px 0;
}
.footer-cap {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border-2);
}
.footer-cap a { text-decoration: underline; color: var(--muted); }
.footer-cap a:hover { color: var(--emerald); }

/* buttons */
.btn {
  border: 1px solid;
  padding: 8px 14px;
  font-size: 12px;
  display: inline-block;
}
.btn-emerald {
  border-color: var(--emerald);
  color: var(--emerald);
  background: rgba(52, 211, 153, 0.1);
}
.btn-emerald:hover { background: rgba(52, 211, 153, 0.2); }
.btn-red {
  border-color: var(--red);
  color: var(--red);
  background: rgba(248, 113, 113, 0.1);
}
.btn-red:hover { background: rgba(248, 113, 113, 0.2); }
.btn-full { width: 100%; padding: 14px; font-size: 14px; }
.btn-mono { border-color: var(--border); color: var(--muted); }
.btn-mono:hover { border-color: var(--emerald); color: var(--emerald); }
.btn:disabled {
  border-color: var(--border) !important;
  background: rgba(255,255,255,0.02) !important;
  color: var(--muted-2) !important;
  cursor: not-allowed;
}

/* data panel */
.data-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 32px;
  font-size: 12px;
}
@media (max-width: 600px) { .data-grid { grid-template-columns: 1fr; } }
.data-row {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px dotted var(--border);
  padding: 5px 0;
}

/* flows */
.flows-bars {
  display: grid;
  grid-template-columns: repeat(24, 1fr);
  gap: 2px;
  height: 120px;
  border-bottom: 1px solid var(--border);
  align-items: end;
  position: relative;
}
.flows-bars::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0; right: 0;
  height: 1px;
  background: var(--border);
}
.flow-bar { display: flex; flex-direction: column; height: 100%; }
.flow-in { background: var(--emerald); margin-top: auto; min-height: 1px; }
.flow-out { background: var(--red); min-height: 1px; }
.flows-x {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  font-size: 10px;
  color: var(--muted-2);
}

/* manifesto */
.manifesto {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  white-space: pre-wrap;
  word-break: break-word;
}

/* notice */
.notice {
  margin-top: 24px;
  padding: 16px 12px;
  font-size: 10px;
  color: var(--muted-2);
}

/* whitepaper page */
.wp {
  max-width: 720px;
  margin: 0 auto;
  padding: 32px 16px;
  font-size: 13px;
  line-height: 1.7;
}
.wp h1 { font-size: 14px; font-weight: normal; margin-bottom: 24px; }
.wp p { margin-bottom: 14px; color: var(--fg); }
.wp p.muted { color: var(--muted); }
.wp .addr {
  font-size: 11px;
  color: var(--muted);
  word-break: break-all;
}
