:root {
  --bg: #0e1218;
  --panel: #161d27;
  --border: #2a3545;
  --text: #e9eef5;
  --muted: #8b9bb0;
  --accent: #3dd9a5;
  --danger: #f87171;
  --bull: #14532d;
  --bear: #450a0a;
  --font: system-ui, -apple-system, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.45;
}

.draft-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 1.25rem 2.5rem;
}

.draft-head h1 {
  margin: 0 0 0.35rem;
  font-size: 1.35rem;
}

.lede {
  color: var(--muted);
  margin: 0 0 1rem;
  max-width: 52rem;
}

.row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: flex-end;
}

.row label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.72rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.grow {
  flex: 1 1 180px;
}

input,
select,
button {
  font: inherit;
  color: var(--text);
  background: #1a222e;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.45rem 0.55rem;
}

button {
  cursor: pointer;
  font-weight: 600;
}

.hidden {
  display: none !important;
}

.status-banner {
  margin-bottom: 0.85rem;
  padding: 0.65rem 0.85rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #121820;
  font-size: 0.9rem;
  color: var(--muted);
}

.status-banner.warn {
  border-color: #7c4a03;
  color: #fcd34d;
}

.status-banner.err {
  border-color: #7f1d1d;
  color: #fca5a5;
}

.toolbar {
  margin-bottom: 0.85rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--border);
}

.tabs {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.tab,
.pos-tab {
  background: transparent;
  color: var(--muted);
}

.tab.active,
.pos-tab.active {
  background: var(--accent);
  color: #04120d;
  border-color: transparent;
}

.panel-view {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.85rem 0.95rem;
}

.sub-toolbar {
  margin-bottom: 0.65rem;
}

.pos-tabs {
  display: flex;
  gap: 0.25rem;
}

.hint {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0 0 0.65rem;
}

.scroll {
  overflow: auto;
  max-height: min(68vh, 640px);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.grid {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.grid th,
.grid td {
  border-bottom: 1px solid var(--border);
  padding: 0.35rem 0.5rem;
  text-align: left;
  white-space: nowrap;
}

.grid th {
  position: sticky;
  top: 0;
  background: #1a222e;
  color: var(--muted);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  z-index: 1;
}

.grid td.num,
.grid th.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.grid tr.bold-pos td {
  background: var(--bull);
}

.grid tr.bold-neg td {
  background: var(--bear);
}

.grid tr.replacement-line td {
  border-top: 2px dashed var(--muted);
}

.grid .news-flag {
  color: #fb923c;
  font-weight: 700;
}

.grid td.delta-pos {
  color: #6ee7b7;
}

.grid td.delta-neg {
  color: #f87171;
}

/* Value vs ADP: green when the model ranks a player above the market (a value pick). */
.grid td.value-pos {
  color: #6ee7b7;
  font-weight: 700;
}

.grid td.value-neg {
  color: #f87171;
}

/* Market-fallback rows: projection is vendor ADP, not the model — dim them slightly. */
.grid tr.market-fallback td {
  color: var(--muted);
}

.grid .fallback-dot {
  color: #fb923c;
  font-weight: 700;
  margin-left: 3px;
}

.tab-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: var(--muted);
  padding: 0.45rem 0.55rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-weight: 600;
  font-size: inherit;
  background: transparent;
}

.tab-link:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.msg {
  font-size: 0.85rem;
  color: var(--muted);
  min-height: 1.25rem;
}
