/* Vibe quant research pages: factor library, alpha bench, strategy review. */
@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;600;700&family=IBM+Plex+Mono:wght@500;600;700&display=swap");

:root {
  --bg: #0c1118;
  --panel: #151b25;
  --panel2: #101720;
  --line: #2b3547;
  --text: #edf3ff;
  --muted: #93a1b8;
  --green: #00d68f;
  --yellow: #f0b90b;
  --red: #f6465d;
  --blue: #6aa8ff;
  --mono: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
}

* {
  box-sizing: border-box;
  letter-spacing: 0;
}

body {
  background:
    linear-gradient(120deg, rgba(0, 214, 143, .08), transparent 30%),
    linear-gradient(rgba(106, 168, 255, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(106, 168, 255, .03) 1px, transparent 1px),
    var(--bg) !important;
  background-size: auto, 34px 34px, 34px 34px, auto !important;
  color: var(--text) !important;
  font-family: "IBM Plex Sans", "Microsoft YaHei", -apple-system, sans-serif !important;
}

.top {
  background: rgba(12, 17, 24, .92) !important;
  border-bottom: 1px solid var(--line) !important;
  backdrop-filter: blur(16px);
}

.wrap {
  max-width: 1220px !important;
}

h1 {
  font-size: clamp(24px, 3vw, 34px) !important;
  letter-spacing: 0 !important;
}

h1 span,
.ok,
.status-ok {
  color: var(--green) !important;
}

.bad,
.status-bad {
  color: var(--red) !important;
}

.warn,
.status-warn {
  color: var(--yellow) !important;
}

.nav,
.top .wrap {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
}

.nav a,
.top a {
  text-decoration: none !important;
  border: 1px solid var(--line) !important;
  border-radius: 8px !important;
  padding: 7px 11px !important;
  color: var(--muted) !important;
  background: rgba(255, 255, 255, .02) !important;
}

.nav a:hover,
.top a:hover {
  color: var(--text) !important;
  border-color: var(--green) !important;
}

.dim {
  color: var(--muted) !important;
}

.grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)) !important;
  gap: 10px !important;
}

.grid div,
.panel,
.summary-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, .035), transparent 44%), var(--panel) !important;
  border: 1px solid var(--line) !important;
  border-radius: 10px !important;
  box-shadow: none !important;
}

.grid div {
  padding: 14px !important;
}

.grid b,
.summary-card b {
  display: block;
  color: var(--text) !important;
  font-size: 17px;
}

.grid span,
.summary-card span {
  color: var(--muted) !important;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
  margin: 18px 0;
}

.summary-card {
  padding: 14px;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 860px;
  font-variant-numeric: tabular-nums;
}

th,
td {
  border-bottom: 1px solid var(--line) !important;
  padding: 10px 12px !important;
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted) !important;
  font-family: var(--mono);
  font-size: 12px;
}

pre,
code {
  font-family: var(--mono);
}

pre {
  white-space: pre-wrap;
  max-height: 140px;
  overflow: auto;
  margin: 0;
  color: var(--muted);
}

.error-pill {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(246, 70, 93, .34);
  border-radius: 999px;
  padding: 3px 8px;
  color: var(--red);
  background: rgba(246, 70, 93, .08);
  font-family: var(--mono);
  font-size: 12px;
}

@media (max-width: 680px) {
  .wrap {
    padding: 16px !important;
  }

  .top .wrap {
    align-items: flex-start !important;
  }
}
