/* avdhesh.eth — quant-terminal */

:root {
  --bg: #0A0A0A;
  --bg-card: #111111;
  --fg: #E0E0E0;
  --fg-bright: #FFFFFF;
  --fg-muted: #888888;
  --amber: #FF8C00;
  --amber-dim: #C05800;
  --green: #00FF41;
  --red: #FF3860;
  --rule: #2A2A2A;
  --max-w: 880px;
}

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

html {
  background: var(--bg);
  color-scheme: dark;
}

body {
  font-family: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  background: var(--bg);
  color: var(--fg);
  line-height: 1.55;
  font-size: 14px;
  font-variant-ligatures: none;
  padding: 32px 20px 80px;
  max-width: var(--max-w);
  margin: 0 auto;
}

/* ── HEADER ───────────────────────────────────────────────── */

.terminal-header {
  border: 1px solid var(--amber);
  padding: 14px 18px;
  margin-bottom: 28px;
  position: relative;
}

.terminal-header h1 {
  font-size: 18px;
  color: var(--amber);
  font-weight: 700;
  letter-spacing: 0.5px;
}

.terminal-header .sub {
  font-size: 13px;
  color: var(--fg-muted);
  margin-top: 4px;
}

.terminal-header .live {
  position: absolute;
  top: 12px;
  right: 16px;
  font-size: 11px;
  color: var(--green);
  letter-spacing: 1px;
}

.terminal-header .live::before {
  content: "● ";
  animation: blink 1.4s step-end infinite;
}

.tagline {
  text-align: center;
  color: var(--amber);
  font-size: 13px;
  margin: 18px 0 28px;
  letter-spacing: 0.3px;
}

/* ── SECTIONS ─────────────────────────────────────────────── */

section {
  margin-bottom: 36px;
}

.section-code {
  display: inline-block;
  color: var(--amber);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 1px;
  margin-bottom: 12px;
}

.section-rule {
  border: none;
  border-top: 1px solid var(--rule);
  margin: 0 0 14px;
}

/* ── PARAGRAPHS / KV BLOCK ────────────────────────────────── */

p {
  margin-bottom: 10px;
  color: var(--fg);
}

p a {
  color: var(--amber);
  text-decoration: none;
  border-bottom: 1px dotted var(--amber-dim);
}

p a:hover {
  color: var(--fg-bright);
  border-bottom-color: var(--amber);
}

.kv {
  display: grid;
  grid-template-columns: 90px 1fr;
  row-gap: 4px;
  font-size: 13px;
}

.kv dt {
  color: var(--amber);
  font-weight: 700;
}

.kv dd {
  color: var(--fg);
}

/* ── PRE / KPI BLOCK ──────────────────────────────────────── */

pre.kpi {
  background: var(--bg-card);
  border-left: 2px solid var(--amber);
  padding: 14px 18px;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--fg);
  overflow-x: auto;
}

pre.kpi .label {
  color: var(--fg-muted);
}

pre.kpi .num {
  color: var(--fg-bright);
  font-weight: 700;
}

pre.kpi .delta-up {
  color: var(--green);
}

/* ── TICKER TABLE ─────────────────────────────────────────── */

table.tickers {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}

table.tickers th {
  color: var(--amber);
  text-align: left;
  font-weight: 700;
  padding: 8px 10px 6px 0;
  border-bottom: 1px solid var(--rule);
  font-size: 11px;
  letter-spacing: 1px;
}

table.tickers td {
  padding: 9px 10px 9px 0;
  border-bottom: 1px dotted var(--rule);
  vertical-align: top;
}

table.tickers td.ticker {
  color: var(--amber);
  font-weight: 700;
  white-space: nowrap;
  width: 130px;
}

table.tickers td.scope {
  color: var(--fg);
}

table.tickers td.link {
  text-align: right;
  white-space: nowrap;
}

table.tickers td.link a {
  color: var(--amber);
  text-decoration: none;
  font-weight: 700;
}

table.tickers td.link a:hover {
  color: var(--fg-bright);
}

table.tickers td.link a.note {
  color: var(--green);
}

/* ── COMM BADGES ──────────────────────────────────────────── */

.comm {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}

.comm a {
  display: inline-block;
  padding: 6px 12px;
  border: 1px solid var(--amber-dim);
  color: var(--amber);
  text-decoration: none;
  font-size: 12px;
  letter-spacing: 0.5px;
  transition: background 0.1s, color 0.1s;
}

.comm a:hover {
  background: var(--amber);
  color: var(--bg);
}

/* ── FOOTER ───────────────────────────────────────────────── */

footer {
  margin-top: 60px;
  padding-top: 20px;
  border-top: 1px solid var(--rule);
  font-size: 11px;
  color: var(--fg-muted);
  text-align: center;
  letter-spacing: 1px;
}

/* ── NOTE PAGE ────────────────────────────────────────────── */

.back {
  display: inline-block;
  font-size: 12px;
  color: var(--fg-muted);
  text-decoration: none;
  margin-bottom: 24px;
  letter-spacing: 1px;
}

.back:hover {
  color: var(--amber);
}

article h1 {
  font-size: 22px;
  color: var(--fg-bright);
  font-weight: 700;
  letter-spacing: 0.5px;
  line-height: 1.3;
  margin-bottom: 12px;
}

article .meta {
  font-size: 12px;
  color: var(--fg-muted);
  margin-bottom: 32px;
  letter-spacing: 0.3px;
}

article h2 {
  font-size: 13px;
  color: var(--amber);
  font-weight: 700;
  letter-spacing: 1px;
  margin-top: 32px;
  margin-bottom: 12px;
}

article p {
  font-size: 14px;
  margin-bottom: 14px;
}

article table.markouts {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 12.5px;
}

article table.markouts th,
article table.markouts td {
  padding: 6px 12px;
  border-bottom: 1px dotted var(--rule);
  text-align: right;
}

article table.markouts th:first-child,
article table.markouts td:first-child {
  text-align: left;
  color: var(--amber);
  font-weight: 700;
}

article table.markouts thead th {
  color: var(--amber);
  font-size: 11px;
  letter-spacing: 1px;
  border-bottom: 1px solid var(--rule);
}

article ul {
  margin-left: 20px;
  margin-bottom: 14px;
}

article ul li {
  margin-bottom: 6px;
}

article code,
article pre {
  background: var(--bg-card);
  color: var(--fg-bright);
  font-family: inherit;
  font-size: 12.5px;
}

article code {
  padding: 1px 5px;
  border: 1px solid var(--rule);
}

article pre {
  padding: 12px 16px;
  border-left: 2px solid var(--amber);
  overflow-x: auto;
  margin-bottom: 16px;
}

article pre code {
  border: none;
  padding: 0;
  background: transparent;
}

/* ── ANIMATIONS ───────────────────────────────────────────── */

@keyframes blink {
  0%, 50% { opacity: 1; }
  50.01%, 100% { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
  }
}

/* ── MOBILE ───────────────────────────────────────────────── */

@media (max-width: 540px) {
  body {
    padding: 20px 14px 60px;
    font-size: 13px;
  }

  .terminal-header {
    padding: 12px 14px;
  }

  .terminal-header h1 {
    font-size: 15px;
  }

  .terminal-header .live {
    position: static;
    display: block;
    margin-top: 6px;
  }

  pre.kpi {
    font-size: 11.5px;
    padding: 12px 14px;
  }

  table.tickers td.ticker {
    width: auto;
    display: block;
    padding-bottom: 0;
    border: none;
  }

  table.tickers td.scope,
  table.tickers td.link {
    display: block;
    padding-top: 2px;
  }

  table.tickers td.link {
    text-align: left;
    padding-bottom: 12px;
    border-bottom: 1px dotted var(--rule);
  }

  table.tickers tr {
    display: block;
    margin-bottom: 8px;
  }

  .kv {
    grid-template-columns: 70px 1fr;
  }
}
