/* Experiments > Grade a strategy — its top bar (the strategy shown big, the
 * searchable selector, the primary Results button) and the Results panel. The
 * chart, list, detail, grading and agent panel are the shared Trades page's
 * (chart.css, trades_grade.css, trades_agent.css). Light theme, flat fills. */

.exp-banner {
  margin: 0 0 6px; padding: 4px 12px; font-size: 12px;
  border: 1px dashed var(--warn); border-radius: 4px;
  background: color-mix(in srgb, var(--warn) 8%, transparent); color: var(--warn);
}

#nl-bar {
  background: var(--panel);
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  padding: 6px 12px 8px;
}
.nl-row { display: flex; align-items: center; gap: 12px 16px; flex-wrap: wrap; min-width: 0; }

/* The selected strategy, big: what is being graded. */
.nl-heading { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.nl-kicker { color: var(--text-dim); font-size: 11px; }
.nl-strategy {
  margin: 0; font-size: 18px; font-weight: 600; color: var(--text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 46ch;
}
.nl-version-name { color: var(--text-dim); font-size: 12px; }

/* The selector: one search box over every book. */
.nl-pick { display: flex; flex-direction: column; gap: 2px; min-width: 260px; }
.nl-pick-label { color: var(--text-dim); font-size: 11px; }
.nl-pick input {
  height: 28px; padding: 0 8px; min-width: 300px;
  border: 1px solid var(--border); background: var(--panel); color: var(--text);
}
.nl-pick input:focus { outline: none; border-color: var(--accent); }
.nl-pick-hint { color: var(--text-dim); font-size: 11px; }

.nl-facts { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.nl-asof { color: var(--text-dim); }
.nl-trigger, .nl-pending {
  padding: 1px 8px; border-radius: 4px; color: var(--text-dim);
  border: 1px solid var(--border);
}
.nl-pending.has { color: var(--accent); border-color: var(--accent); font-weight: 600; }

/* Results: the page's one primary action, with what it reveals under it. */
.nl-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.nl-primary {
  height: 28px; padding: 0 14px; cursor: pointer; white-space: nowrap;
  font-size: 12px; font-weight: 600;
  background: var(--accent); color: #ffffff; border: 1px solid var(--accent);
}
.nl-primary:hover { background: color-mix(in srgb, var(--accent) 88%, #000000); }
.nl-primary:focus-visible { outline: 2px solid color-mix(in srgb, var(--accent) 40%, transparent); outline-offset: 2px; }
.nl-results-hint { color: var(--text-dim); font-size: 11px; }
#nl-bar .live-status { margin-left: auto; }

.nl-help { margin-top: 6px; color: var(--text); }
.nl-help summary { cursor: pointer; color: var(--accent); }
.nl-help p { margin: 4px 0 2px; }
.nl-help ul { margin: 0; padding-left: 18px; }
.nl-help li { margin: 1px 0; }

/* The Results panel: a calm card, tiles then the curve. */
#nl-results {
  position: fixed; inset: 0; z-index: 50;
  display: flex; align-items: center; justify-content: center;
  background: rgba(19, 23, 34, 0.18);
}
#nl-results[hidden] { display: none; }
.nl-card {
  width: min(880px, calc(100vw - 48px)); max-height: calc(100vh - 64px); overflow: auto;
  background: var(--panel); border: 1px solid var(--border); border-radius: 6px;
  box-shadow: 0 8px 24px rgba(19, 23, 34, 0.12); color: var(--text); font-size: 12px;
  padding: 16px 20px;
}
.nl-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.nl-card-head h2 { margin: 0; font-size: 16px; }
.nl-card-sub { margin: 2px 0 0; color: var(--text-dim); }
.nl-close {
  width: 28px; height: 28px; padding: 0; cursor: pointer; flex: 0 0 auto;
  font-size: 18px; line-height: 1; color: var(--text-dim);
  background: var(--panel); border: 1px solid transparent;
}
.nl-close:hover { color: var(--text); background: var(--subtle); border-color: var(--border); }
.nl-results-status { margin: 12px 0 0; color: var(--text-dim); }
.nl-results-status:empty { display: none; }
.nl-kpis {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(108px, 1fr));
  gap: 8px; margin: 14px 0 12px;
}
.nl-kpis:empty { display: none; }
.nl-kpi {
  display: flex; flex-direction: column; gap: 4px;
  padding: 10px 12px; border: 1px solid var(--border); border-radius: 4px; background: var(--panel);
}
.nl-kpi-label { color: var(--text-dim); font-size: 11px; }
.nl-kpi-value { font-size: 18px; font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; }
.nl-kpi.up .nl-kpi-value { color: var(--up); }
.nl-kpi.down .nl-kpi-value { color: var(--down); }
.nl-curve-box { margin: 0; border: 1px solid var(--border); border-radius: 4px; padding: 8px 8px 0; }
.nl-curve-box figcaption { color: var(--text-dim); font-size: 11px; padding: 0 4px; }
#nl-curve { width: 100%; min-height: 40px; }
.nl-note { color: var(--text-dim); margin: 10px 0 0; }

/* Blind | Show how it went, at the top of the trade detail. */
.nl-reveal { display: inline-flex; margin: 4px 8px; border: 1px solid var(--border); border-radius: 4px; }
.nl-reveal button {
  font: inherit; font-size: 12px; padding: 3px 10px; border: none; cursor: pointer;
  background: var(--panel); color: var(--text-dim);
}
.nl-reveal button + button { border-left: 1px solid var(--border); }
.nl-reveal button[aria-checked="true"] { background: var(--accent); color: #ffffff; font-weight: 600; }

/* The charts each agent saw: one thumbnail per agent, above its text. */
#nl-charts {
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px;
  padding: 6px 8px; border-bottom: 1px solid var(--border); flex: 0 0 auto;
}
#nl-charts:empty { display: none; }
#nl-charts.is-empty, #nl-charts:has(> .nl-charts-note) { display: block; }
.nl-charts-note { margin: 2px 0; color: var(--text-dim); font-size: 12px; }
#nl-charts.is-empty .nl-charts-note { color: var(--text); font-weight: 600; }
.nl-thumb { margin: 0; min-width: 0; font-size: 11px; }
.nl-thumb img {
  width: 100%; height: 92px; object-fit: cover; object-position: right center;
  border: 1px solid var(--border); border-radius: 3px; cursor: zoom-in; background: #ffffff;
}
.nl-thumb figcaption { display: flex; justify-content: space-between; gap: 4px; margin-top: 2px; }
.nl-thumb figcaption b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nl-vote { font-weight: 600; color: var(--text-dim); }
.nl-vote.buy { color: #089981; }
.nl-vote.sell { color: #f23645; }
.nl-why {
  margin: 1px 0 0; color: var(--text-dim); overflow: hidden;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.nl-miss {
  height: 92px; display: flex; align-items: center; justify-content: center;
  border: 1px dashed var(--border); border-radius: 3px; color: var(--text-dim);
}

#nl-lightbox {
  position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center;
  background: rgba(19, 23, 34, 0.45); cursor: zoom-out;
}
#nl-lightbox[hidden] { display: none; }
.nl-lightbox-card {
  margin: 0; max-width: calc(100vw - 48px); max-height: calc(100vh - 48px);
  background: #ffffff; border: 1px solid var(--border); border-radius: 4px; padding: 8px;
}
.nl-lightbox-card img { display: block; max-width: calc(100vw - 64px); max-height: calc(100vh - 110px); }
.nl-lightbox-card figcaption { margin-top: 6px; font-size: 12px; color: var(--text); }
