/* Winston V3 — sleeve algorithm card.
   Rendered inside the Desk → sleeve-chip modal AND the Operations →
   Agents → Engine playbooks grid. Single source of truth in
   dashboard/v3/js/sleeve-algorithms.js. */

.sleeve-algo {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  position: relative;
}
/* Per-sleeve color accent on the left edge — matches the Desk chip. */
.sleeve-algo[data-sleeve="swing"]   { box-shadow: inset 3px 0 0 var(--sleeve-swing); }
.sleeve-algo[data-sleeve="scalp"]   { box-shadow: inset 3px 0 0 var(--sleeve-scalp); }
.sleeve-algo[data-sleeve="short"]   { box-shadow: inset 3px 0 0 var(--sleeve-short); }
.sleeve-algo[data-sleeve="options"] { box-shadow: inset 3px 0 0 var(--sleeve-options); }

.sleeve-algo-head {
  display: flex;
  align-items: baseline;
  gap: var(--space-3);
  flex-wrap: wrap;
  margin-bottom: var(--space-3);
  padding-bottom: var(--space-2);
  border-bottom: 1px solid var(--hairline);
}
.sleeve-algo-name {
  font-weight: var(--weight-bold);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  color: var(--ink);
  font-size: var(--type-md);
}
.sleeve-algo-tag { font-size: var(--type-sm); }

.sleeve-algo-meta {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-2) var(--space-4);
  margin: 0 0 var(--space-3);
}
.sleeve-algo-meta > div { display: flex; flex-direction: column; gap: 2px; }
.sleeve-algo-meta dt {
  font-size: var(--type-xs);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  color: var(--ink-muted);
  font-weight: var(--weight-bold);
}
.sleeve-algo-meta dd { margin: 0; font-size: var(--type-sm); color: var(--ink); }

.sleeve-algo-section { margin-top: var(--space-3); }
.sleeve-algo-section h4 {
  font-size: var(--type-xs);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  color: var(--ink-muted);
  font-weight: var(--weight-bold);
  margin: 0 0 var(--space-2);
}
.sleeve-algo-section ul {
  margin: 0;
  padding-left: var(--space-4);
  font-size: var(--type-sm);
  line-height: var(--leading-base);
  color: var(--ink);
}
.sleeve-algo-section li + li { margin-top: 4px; }
.sleeve-algo-section p { margin: 0; font-size: var(--type-sm); line-height: var(--leading-base); }

/* Operations → Engine playbooks: 4-up at desktop, 2-up at tablet, 1-up mobile. */
.ops-playbooks-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-4);
  margin-top: var(--space-3);
}
@media (max-width: 960px) {
  .ops-playbooks-grid { grid-template-columns: 1fr; }
}

/* Tracker #147 — version selector row + knob table for live algorithm data. */
.sleeve-algo-versions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin: var(--space-2) 0 var(--space-3);
  padding: var(--space-2) var(--space-3);
  background: var(--surface-2, var(--surface));
  border: 1px solid var(--hairline);
  border-radius: var(--radius-sm);
}
.sleeve-algo-versions-label {
  font-size: var(--type-xs);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  color: var(--ink-muted);
  font-weight: var(--weight-bold);
}
.sleeve-algo-version-select {
  flex: 1;
  font-family: var(--font-mono);
  font-size: var(--type-sm);
  padding: 4px var(--space-2);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--ink);
}

.sleeve-algo-knobs h4 { margin-bottom: var(--space-1); }
.sleeve-algo-knob-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--type-xs);
}
.sleeve-algo-knob-table td, .sleeve-algo-knob-table th {
  padding: 2px var(--space-2);
  border-bottom: 1px solid var(--hairline);
  text-align: left;
}
.sleeve-algo-knob-table th { color: var(--ink-muted); font-weight: var(--weight-bold); }
.sleeve-algo-knob-table td.num, .sleeve-algo-knob-table th.num { text-align: right; }
.sleeve-algo-knob-table tr:last-child td { border-bottom: none; }

/* Affordance hint on the Desk sleeve-chip — show that clicking opens detail. */
#screen-desk .desk-sleeve-chip {
  cursor: pointer;
  transition: border-color var(--motion-fast) var(--ease-out),
              transform var(--motion-fast) var(--ease-out);
}
#screen-desk .desk-sleeve-chip:hover { border-color: var(--ai-line); transform: translateY(-1px); }
#screen-desk .desk-sleeve-chip:focus-visible {
  outline: 2px solid var(--focus, var(--ai-line));
  outline-offset: 2px;
}
