/* =========================================================
   STRATEGIES — library · builder · marketplace
   "The Tape" system (see chatroom.css): hairline structure,
   flat tinted surfaces, tabular numerals, candle motif.
   Scope: strategies pages only. Dark mode rides the token
   override block at the bottom of this file.
   ========================================================= */

/* Tokens live on every strategies root: the library/marketplace shell
   (.strategies-page), the detail shells (.strategy-show), and the
   builder form (.strategy-form). */
.strategies-page,
.strategy-show,
.strategy-form {
  /* ---- palette (light) — same family as chatroom ---- */
  --bg:          #eef1f7;
  --surface:     #ffffff;
  --surface-2:   #f6f8fb;
  --surface-3:   #e9edf4;

  --line:        #dde3ed;
  --line-2:      #e9edf4;

  --ink:         #0b1426;
  --ink-2:       #2c3a55;
  --muted:       #5d6b86;
  --soft:        #8e9bb2;
  --faint:       #cdd7e5;

  --green:       #0e9c68;
  --green-2:     #077a4e;
  --green-soft:  #e7f6ef;
  --green-line:  #bfe6d3;

  --amber:       #a35a00;
  --amber-soft:  #fdf5e7;
  --amber-line:  #efdcb2;

  --red:         #c53d32;
  --red-soft:    #fcf0ee;
  --red-line:    #f2d2cd;

  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;

  --shadow-1: 0 0 0 0.5px var(--line);
  --shadow-2: 0 8px 24px -16px rgba(11, 20, 38, .25);

  --mono: "SF Mono", ui-monospace, "Monaco", "Menlo", monospace;
}

/* =========================================================
   PAGE SHELL
   ========================================================= */
.strategies-page {
  max-width: 1180px;
  margin: 0 auto;
  padding: 28px 32px 48px;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}
.strategies-page .mono-num,
.strategy-show .mono-num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.strategies-page .muted { color: var(--muted); }

/* ---- header band ---- */
.strategies-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin: 0 0 18px;
}
.strategies-heading h1 {
  margin: 0 0 5px;
  font-size: 25px;
  font-weight: 750;
  letter-spacing: -.025em;
  color: var(--ink);
}
.strategies-heading p {
  margin: 0;
  font-size: 13.5px;
  color: var(--muted);
  max-width: 60ch;
}
.strategies-head-actions { display: flex; gap: 8px; align-items: center; }

/* ---- buttons (also consumed by builder + show pages) ---- */
.strategies-page .btn-ink,
.strategies-page .btn-ghost,
.strategies-page .btn-mini,
.strategies-page .btn-primary-action,
.strategies-page .btn-secondary-action,
.strategies-page .btn-danger-action,
.strategies-page .btn-icon-text {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border-radius: var(--r-sm);
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  padding: 9px 14px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease;
  white-space: nowrap;
}
.strategies-page .btn-ink,
.strategies-page .btn-primary-action {
  background: var(--ink);
  color: #f2f5fa;
  border-color: var(--ink);
}
.strategies-page .btn-ink:hover,
.strategies-page .btn-primary-action:hover {
  background: var(--ink-2);
  border-color: var(--ink-2);
}
.strategies-page .btn-ghost,
.strategies-page .btn-secondary-action {
  background: var(--surface);
  color: var(--ink-2);
  border-color: var(--line);
}
.strategies-page .btn-ghost:hover,
.strategies-page .btn-secondary-action:hover {
  color: var(--ink);
  border-color: var(--soft);
}
.strategies-page .btn-danger-action {
  background: var(--surface);
  color: var(--red);
  border-color: var(--red-line);
}
.strategies-page .btn-danger-action:hover { background: var(--red-soft); }

.btn-count {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 999px;
  background: var(--surface-3);
  color: var(--ink-2);
}
.btn-ghost .btn-count { margin-left: 2px; }

/* =========================================================
   LEDGER — counts as one hairline row (not stat cards)
   ========================================================= */
.strategies-ledger {
  display: flex;
  align-items: stretch;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-1);
  margin-bottom: 18px;
  overflow: hidden;
}
.ledger-item {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 13px 20px;
  border-right: 1px solid var(--line-2);
}
.ledger-item:last-child { border-right: none; }
.ledger-item--pushed { margin-left: auto; border-right: none; border-left: 1px solid var(--line-2); }
.ledger-sub { font-size: 11px; color: var(--muted); }
.ledger-label { font-size: 12px; color: var(--muted); }
.ledger-value {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
}
.ledger-value--green { color: var(--green-2); }
.ledger-value--amber { color: var(--amber); }

/* =========================================================
   FILTER BAR
   ========================================================= */
.strategies-filter {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.filter-tabs {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-wrap: wrap;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 3px;
  box-shadow: var(--shadow-1);
}
.filter-tab {
  font-size: 12.5px;
  font-weight: 550;
  color: var(--muted);
  text-decoration: none;
  padding: 6px 11px;
  border-radius: 7px;
  transition: color .12s ease, background-color .12s ease;
}
.filter-tab:hover { color: var(--ink); background: var(--surface-2); }
.filter-tab.is-active {
  color: var(--ink);
  background: var(--surface-3);
  font-weight: 650;
  box-shadow: inset 0 0 0 1px var(--line);
}
.filter-divider { width: 1px; height: 18px; background: var(--line); margin: 0 4px; }

.filter-search {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 230px;
}
.filter-search svg {
  position: absolute;
  left: 11px;
  color: var(--soft);
  pointer-events: none;
}
.filter-search .search-input {
  width: 100%;
  padding: 9px 12px 9px 33px;
  font-size: 13px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-1);
  outline: none;
  transition: border-color .12s ease;
}
.filter-search .search-input::placeholder { color: var(--soft); }
.filter-search .search-input:focus { border-color: var(--soft); }

.filter-note { font-size: 12.5px; color: var(--muted); margin: -12px 0 16px; }
.filter-note a { color: var(--ink-2); font-weight: 550; }

/* =========================================================
   CARDS — library + marketplace
   ========================================================= */
.strategies-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(315px, 1fr));
  gap: 14px;
}

/* The candle strip and its colors */
.strategies-page .candle-spark { display: block; }
.strategies-page .candle-spark .cs-up   { fill: var(--green); }
.strategies-page .candle-spark .cs-down { fill: var(--red); }
.strategies-page .candle-spark .cs-wick     { stroke: var(--soft); stroke-width: 1; }
.strategies-page .candle-spark .cs-wick-up  { stroke: var(--green); }

.strategy-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-1);
  overflow: hidden;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.strategy-card:hover {
  border-color: var(--soft);
  box-shadow: var(--shadow-2);
  transform: translateY(-1px);
}

.s-card-edge {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--accent, var(--green));
  opacity: .9;
}

.s-card-head {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 15px 16px 0 15px;
}
.s-card-glyph {
  width: 34px;
  height: 34px;
  border-radius: var(--r-sm);
  background: var(--tint, var(--surface-3));
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-size: 15px;
}
.s-card-title { min-width: 0; flex: 1; }
.s-card-title h3 {
  margin: 1px 0 5px;
  font-size: 14.5px;
  font-weight: 700;
  letter-spacing: -.01em;
  line-height: 1.3;
}
.s-card-title h3 a { color: var(--ink); text-decoration: none; }
.s-card-title h3 a:hover { color: var(--green-2); }
.s-card-badges { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }

.strategies-page .badge {
  font-size: 10.5px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--tint, var(--surface-3));
  color: var(--ink-2);
  white-space: nowrap;
}
.official-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10.5px;
  font-weight: 650;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green-2);
  white-space: nowrap;
}
.official-badge--lg { font-size: 11.5px; padding: 4px 10px; }
.author-badge {
  font-size: 10.5px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  border: 1px solid var(--line);
  white-space: nowrap;
}
.author-badge--lg { font-size: 11.5px; padding: 4px 10px; }

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--soft);
  flex-shrink: 0;
}
.status-dot--active   { background: var(--green); box-shadow: 0 0 0 3px var(--green-soft); }
.status-dot--draft    { background: var(--soft); }
.status-dot--testing  { background: var(--amber); box-shadow: 0 0 0 3px var(--amber-soft); }
.status-dot--archived { background: var(--faint); }
.s-card-status-text { font-size: 11px; color: var(--muted); }

.star-btn {
  background: none;
  border: none;
  padding: 5px;
  border-radius: var(--r-sm);
  color: var(--soft);
  cursor: pointer;
  flex-shrink: 0;
  transition: color .12s ease, background-color .12s ease;
}
.star-btn:hover { color: var(--amber); background: var(--amber-soft); }
.star-btn.is-favorited { color: var(--amber); }

/* ---- candle strip zone ---- */
.s-card-candles {
  position: relative;
  margin: 13px 16px 0 15px;
  padding: 8px 10px;
  background: var(--surface-2);
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  gap: 10px;
}
.s-card-candles .candle-spark { width: 150px; height: 34px; flex-shrink: 0; }
.s-card-trades {
  margin-left: auto;
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 10.5px;
  color: var(--muted);
  text-align: right;
  line-height: 1.3;
}

.s-card-desc {
  margin: 11px 16px 0 15px;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.s-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding: 11px 16px 0 15px;
}
.strategies-page .tag-chip {
  font-size: 10.5px;
  font-weight: 550;
  color: var(--ink-2);
  background: var(--surface-2);
  border: 1px solid var(--line-2);
  padding: 2px 7px;
  border-radius: 999px;
}
.tag-chip--more { background: var(--surface-3); }
.tag-chip--tf {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  color: var(--green-2);
  border-color: var(--green-line);
  background: var(--green-soft);
}

.s-card-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  margin: 13px 16px 0 15px;
  background: var(--line-2);
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  overflow: hidden;
}
.s-metric {
  background: var(--surface);
  padding: 7px 4px 8px;
  text-align: center;
}
.s-metric span {
  display: block;
  font-size: 9.5px;
  font-weight: 600;
  color: var(--soft);
  margin-bottom: 3px;
}
.s-metric strong {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink-2);
}

.s-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 13px;
  padding: 10px 16px 12px 15px;
  border-top: 1px solid var(--line-2);
}
.s-card-when { font-size: 11px; color: var(--soft); }

.install-state {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: var(--soft);
}
.install-state--done { color: var(--green-2); font-weight: 600; }
.install-state--own  { color: var(--ink-2); font-weight: 600; }

.strategies-page .tool-btn {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  background: none;
  color: var(--soft);
  cursor: pointer;
  padding: 0;
  transition: color .12s ease, background-color .12s ease;
}
.strategies-page .tool-btn:hover {
  color: var(--ink);
  background: var(--surface-2);
  border-color: var(--line);
}

.strategies-page .btn-mini {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 650;
  padding: 6px 11px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-2);
  cursor: pointer;
  transition: background-color .12s ease, border-color .12s ease, color .12s ease;
}
.strategies-page .btn-mini:hover { border-color: var(--soft); color: var(--ink); }
.strategies-page .btn-mini--ink {
  background: var(--ink);
  border-color: var(--ink);
  color: #f2f5fa;
}
.strategies-page .btn-mini--ink:hover {
  background: var(--ink-2);
  border-color: var(--ink-2);
  color: #f2f5fa;
}

/* button_to renders a form.button_to wrapper — keep card actions inline */
.strategies-page form.button_to,
.strategy-show form.button_to,
.strategy-form form.button_to { display: inline; margin: 0; }
.strategies-page form.button_to .btn-mini,
.strategies-page form.button_to .tool-btn,
.strategies-page form.button_to .star-btn,
.strategies-page form.button_to .btn-icon-text { vertical-align: middle; }

/* =========================================================
   EMPTY STATE
   ========================================================= */
.strategies-empty {
  background: var(--surface);
  border: 1px dashed var(--line);
  border-radius: var(--r-lg);
  padding: 56px 24px;
  text-align: center;
  color: var(--muted);
}
.strategies-empty .empty-candles svg { display: inline-block; margin-bottom: 14px; }
.strategies-empty .ec-wick { stroke: var(--faint); stroke-width: 2; }
.strategies-empty .ec-up   { fill: var(--green); }
.strategies-empty .ec-down { fill: var(--red); }
.strategies-empty h3 {
  margin: 0 0 6px;
  font-size: 16.5px;
  font-weight: 700;
  color: var(--ink);
}
.strategies-empty p { margin: 0 0 20px; font-size: 13.5px; max-width: 46ch; margin-left: auto; margin-right: auto; }
.strategies-empty .btn-ghost { margin-left: 8px; }
.strategies-empty-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* Legacy badge classes still used by the show/detail pages */
.strategies-page .type-badge, .strategy-show .type-badge,
.strategies-page .status-badge, .strategy-show .status-badge {
  font-size: 10.5px;
  font-weight: 650;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--surface-3);
  color: var(--ink-2);
  white-space: nowrap;
}
.status-draft    { background: var(--surface-3); color: var(--muted); }
.status-active   { background: var(--green-soft); color: var(--green-2); }
.status-testing  { background: var(--amber-soft); color: var(--amber); }
.status-archived { background: var(--red-soft);   color: var(--red); }

.show-icon {
  width: 50px;
  height: 50px;
  border-radius: var(--r-md);
  display: grid;
  place-items: center;
  font-size: 24px;
  flex-shrink: 0;
}

/* =========================================================
   SHOW PAGE — library detail
   ========================================================= */
.strategy-show { max-width: 1180px; margin: 0 auto; padding: 28px 32px 48px; color: var(--ink); -webkit-font-smoothing: antialiased; }

.strategy-show-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.show-header-left { display: flex; align-items: flex-start; gap: 16px; min-width: 0; }
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  padding: 7px 10px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  background: var(--surface);
  white-space: nowrap;
  transition: color .12s ease, border-color .12s ease;
}
.back-link:hover { color: var(--ink); border-color: var(--soft); }

.show-title { min-width: 0; }
.show-title h1 {
  margin: 2px 0 6px;
  font-size: 22px;
  font-weight: 750;
  letter-spacing: -.02em;
  color: var(--ink);
}
.show-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.show-meta-text { font-size: 12px; color: var(--muted); }
.show-origin { margin: 5px 0 0; font-size: 12px; color: var(--muted); }
.show-origin a { color: var(--ink-2); font-weight: 600; text-decoration: none; border-bottom: 1px solid var(--faint); }
.show-origin a:hover { color: var(--green-2); }

.market-listed-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10.5px;
  font-weight: 650;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green-2);
  border: 1px solid var(--green-line);
}

/* Scoped to .strategy-show on purpose: trades.css owns the same class
   for its detail page and adds margin-top: 16px (require_tree puts it
   in every bundle). The marketplace shell also carries this root. */
.strategy-show .show-actions { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-top: 0; }

.strategies-page .strategy-show .btn-primary-action,
.strategy-show .btn-primary-action {
  background: var(--ink);
  color: #f2f5fa;
  border-color: var(--ink);
}
.strategy-show .btn-primary-action {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border-radius: var(--r-sm);
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  padding: 9px 14px;
  border: 1px solid var(--ink);
  text-decoration: none;
  background: var(--ink);
  color: #f2f5fa;
  white-space: nowrap;
}
.strategy-show .btn-primary-action:hover { background: var(--ink-2); border-color: var(--ink-2); color: #f2f5fa; }
.strategy-show .btn-danger-action {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: var(--r-sm);
  border: 1px solid var(--red-line);
  background: var(--surface);
  color: var(--red);
  cursor: pointer;
}
.strategy-show .btn-danger-action:hover { background: var(--red-soft); }
.strategy-show .btn-icon-text {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border-radius: var(--r-sm);
  font-size: 13px;
  font-weight: 600;
  padding: 9px 14px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-2);
  cursor: pointer;
  transition: border-color .12s ease, color .12s ease, background-color .12s ease;
}
.strategy-show .btn-icon-text:hover { color: var(--ink); border-color: var(--soft); }
.strategy-show .btn-icon-text.favorited { color: var(--amber); }
.strategy-show .btn-publish { color: var(--green-2); }
.strategy-show .btn-publish:hover { background: var(--green-soft); border-color: var(--green-line); }
.strategy-show .btn-unpublish:hover { background: var(--amber-soft); border-color: var(--amber-line); }

.show-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1px;
  background: var(--line-2);
  border: 1px solid var(--line-2);
  border-radius: var(--r-md);
  overflow: hidden;
  margin-bottom: 18px;
}
.show-stat {
  background: var(--surface);
  padding: 13px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.show-stat-label { font-size: 11px; font-weight: 600; color: var(--soft); }
.show-stat-value {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
}

.show-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 296px;
  gap: 16px;
  align-items: start;
}
.show-main { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.show-side { display: flex; flex-direction: column; gap: 14px; position: sticky; top: 20px; }

.show-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-1);
  padding: 18px 20px;
}
.show-card h2 {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -.01em;
  color: var(--ink);
}
.show-card--quiet { background: var(--surface-2); border-style: dashed; }
.show-card--quiet p { margin: 0; font-size: 12.5px; line-height: 1.55; color: var(--muted); }

.show-pre {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--ink-2);
  white-space: pre-wrap;
  word-break: break-word;
}
.show-code {
  margin: 0 0 14px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 14px;
  overflow-x: auto;
}
.show-code code {
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--ink-2);
  white-space: pre;
}
.show-subheading {
  margin: 14px 0 8px;
  font-size: 11px;
  font-weight: 650;
  color: var(--soft);
}

.parsed-rules { display: flex; flex-direction: column; gap: 6px; }
.parsed-row {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 11px;
  background: var(--surface-2);
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
}
.parsed-badge {
  font-size: 9.5px;
  font-weight: 700;
  padding: 2.5px 7px;
  border-radius: 999px;
  flex-shrink: 0;
}
.parsed-badge-indicator { background: var(--green-soft); color: var(--green-2); }
.parsed-badge-condition { background: var(--amber-soft); color: var(--amber); }
.parsed-badge-exit      { background: var(--red-soft);   color: var(--red); }
.parsed-badge-unknown   { background: var(--surface-3);  color: var(--muted); }
.parsed-body { font-size: 12.5px; color: var(--ink-2); word-break: break-word; }
.parsed-body code {
  font-family: var(--mono);
  font-size: 11.5px;
  background: var(--surface-3);
  border-radius: 4px;
  padding: 1px 5px;
}
.parsed-body .tok { font-family: var(--mono); font-size: 11.5px; color: var(--soft); }
.parsed-action { font-family: var(--mono); font-size: 11px; font-weight: 700; }
.parsed-action.action-buy  { color: var(--green-2); }
.parsed-action.action-sell { color: var(--red); }
.parsed-unknown-text { color: var(--muted); font-style: italic; }

.show-side-text { margin: 0; font-size: 12.5px; color: var(--ink-2); }
.show-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.strategies-page .market-tag,
.strategy-show .market-tag {
  font-size: 10.5px;
  font-weight: 550;
  color: var(--ink-2);
  background: var(--surface-2);
  border: 1px solid var(--line-2);
  padding: 3px 8px;
  border-radius: 999px;
}
.strategy-show .muted { color: var(--muted); font-size: 12.5px; }

.checklist-view { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.checklist-view li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--ink-2);
}
.checklist-view li svg { color: var(--green-2); flex-shrink: 0; }

.detail-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 0;
  border-bottom: 1px solid var(--line-2);
  font-size: 12.5px;
}
.detail-row:last-child { border-bottom: none; padding-bottom: 0; }
.detail-row span { color: var(--muted); }
.detail-row strong { color: var(--ink-2); font-weight: 650; font-variant-numeric: tabular-nums; }

.installed-note {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  font-weight: 650;
  color: var(--green-2);
  background: var(--green-soft);
  border: 1px solid var(--green-line);
  padding: 9px 14px;
  border-radius: var(--r-sm);
}

.marketplace-detail .show-side { position: static; }
.marketplace-detail { max-width: 1180px; margin: 0 auto; padding: 28px 32px 48px; color: var(--ink); }

/* =========================================================
   STRATEGY BUILDER (new/edit) — 6-step flow re-skinned
   ========================================================= */
.strategy-form { padding-bottom: 8px; }

.strategy-builder {
  max-width: 1180px;
  margin: 0 auto;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

.strategy-errors {
  background: var(--red-soft);
  border: 1px solid var(--red-line);
  border-radius: var(--r-md);
  padding: 14px 18px;
  margin-bottom: 16px;
  font-size: 13px;
  color: var(--red);
}
.strategy-errors ul { margin: 8px 0 0; padding-left: 18px; }
.strategy-errors li { margin: 3px 0; }

.strategy-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.strategy-header h1 {
  margin: 0 0 5px;
  font-size: 25px;
  font-weight: 750;
  letter-spacing: -.025em;
  color: var(--ink);
}
.strategy-header p { margin: 0; font-size: 13.5px; color: var(--muted); }
.strategy-header-actions { display: flex; gap: 8px; align-items: center; }

.strategy-form .btn-secondary-action,
.strategy-form .btn-primary-action {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border-radius: var(--r-sm);
  font-size: 13px;
  font-weight: 600;
  padding: 9px 14px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.strategy-form .btn-secondary-action {
  background: var(--surface);
  color: var(--ink-2);
  border-color: var(--line);
}
.strategy-form .btn-secondary-action:hover { color: var(--ink); border-color: var(--soft); }
.strategy-form .btn-primary-action {
  background: var(--ink);
  color: #f2f5fa;
  border-color: var(--ink);
}
.strategy-form .btn-primary-action:hover { background: var(--ink-2); border-color: var(--ink-2); }
.strategy-form .btn-primary-action:disabled { opacity: .5; cursor: not-allowed; }

.strategy-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 16px;
  align-items: start;
}

/* ---- left column ---- */
.strategy-form-section { display: flex; flex-direction: column; gap: 14px; min-width: 0; }

.strategy-steps {
  display: flex;
  gap: 2px;
  flex-wrap: wrap;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 4px;
  box-shadow: var(--shadow-1);
}
.step-tab {
  display: flex;
  align-items: center;
  gap: 7px;
  border: none;
  background: none;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 550;
  transition: color .12s ease, background-color .12s ease;
}
.step-tab:hover { color: var(--ink); background: var(--surface-2); }
.step-tab .step-number {
  display: grid;
  place-items: center;
  width: 19px;
  height: 19px;
  border-radius: 999px;
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--muted);
  background: var(--surface-3);
  transition: background-color .12s ease, color .12s ease;
}
.step-tab.active {
  color: var(--ink);
  background: var(--surface-3);
  font-weight: 650;
  box-shadow: inset 0 0 0 1px var(--line);
}
.step-tab.active .step-number { background: var(--ink); color: #f2f5fa; }

.step-content { display: none; flex-direction: column; gap: 14px; }
.step-content.active { display: flex; }

.bcard {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-1);
  padding: 20px;
}
.bcard-title {
  margin: 0 0 4px;
  font-size: 14.5px;
  font-weight: 700;
  letter-spacing: -.01em;
  color: var(--ink);
}
.bcard-subtitle { margin: 0 0 16px; font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.strategy-input-group { margin-bottom: 16px; }
.strategy-input-group:last-child { margin-bottom: 0; }
.strategy-input-group > label {
  display: block;
  font-size: 12px;
  font-weight: 650;
  color: var(--ink-2);
  margin-bottom: 6px;
}
.required { color: var(--red); }
.optional { font-weight: 500; color: var(--soft); font-size: 11.5px; }

.strategy-input-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.strategy-input,
.strategy-textarea {
  width: 100%;
  box-sizing: border-box;
  font-size: 13.5px;
  font-family: inherit;
  color: var(--ink);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 10px 12px;
  outline: none;
  transition: border-color .12s ease, background-color .12s ease;
  -webkit-font-smoothing: antialiased;
}
.strategy-textarea { resize: vertical; line-height: 1.6; }
.strategy-input:focus,
.strategy-textarea:focus {
  border-color: var(--soft);
  background: var(--surface);
}
.strategy-input::placeholder,
.strategy-textarea::placeholder { color: var(--soft); }

.char-count {
  display: block;
  text-align: right;
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 10.5px;
  color: var(--soft);
  margin-top: 4px;
}

/* ---- type grid ---- */
.strategy-type-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.strategy-type-card {
  cursor: pointer;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface-2);
  padding: 12px 10px 11px;
  text-align: center;
  transition: border-color .12s ease, background-color .12s ease, box-shadow .12s ease;
}
.strategy-type-card:hover { border-color: var(--soft); }
.strategy-type-card.selected {
  border-color: var(--ink);
  background: var(--surface);
  box-shadow: 0 0 0 3px var(--surface-3);
}
.strategy-type-card .type-icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  margin: 0 auto 7px;
  border-radius: var(--r-sm);
  font-size: 14px;
  background: var(--surface-3);
}
.strategy-type-card strong {
  display: block;
  font-size: 11.5px;
  font-weight: 650;
  color: var(--ink);
  line-height: 1.25;
}
.strategy-type-card span {
  display: block;
  margin-top: 3px;
  font-size: 10px;
  line-height: 1.35;
  color: var(--soft);
}

/* ---- color swatches ---- */
.color-picker { display: flex; gap: 6px; flex-wrap: wrap; }
.color-swatch {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  border: 2px solid transparent;
  cursor: pointer;
  box-shadow: inset 0 0 0 2px var(--surface);
  transition: transform .12s ease, box-shadow .12s ease;
  padding: 0;
}
.color-swatch:hover { transform: scale(1.12); }
.color-swatch.selected {
  border-color: var(--ink);
  transform: scale(1.05);
}

/* ---- tags input (markets) ---- */
.tags-input-wrapper {
  position: relative;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 6px 8px;
  cursor: text;
  transition: border-color .12s ease;
}
.tags-input-wrapper:focus-within { border-color: var(--soft); }
.selected-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.selected-tags:not(:empty) { margin-bottom: 5px; }
.selected-tags .tag-chip { display: inline-flex; align-items: center; gap: 5px; }
.selected-tags .tag-chip .tag-remove {
  cursor: pointer;
  opacity: .6;
  font-size: 12px;
  line-height: 1;
  padding: 0 1px;
}
.selected-tags .tag-chip .tag-remove:hover { opacity: 1; }
.tags-input {
  border: none;
  outline: none;
  background: transparent;
  font-size: 13px;
  color: var(--ink);
  width: 100%;
  padding: 3px 2px;
}
.tags-input::placeholder { color: var(--soft); }
.tags-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 20;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  box-shadow: var(--shadow-2);
  max-height: 200px;
  overflow-y: auto;
  padding: 4px;
}
.tags-dropdown.open { display: block; }
.tag-option {
  padding: 7px 10px;
  font-size: 12.5px;
  color: var(--ink-2);
  border-radius: 5px;
  cursor: pointer;
}
.tag-option:hover, .tag-option.selected { background: var(--surface-3); color: var(--ink); }

/* ---- code editor ---- */
.code-examples { display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 12px; }
.code-example-btn {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-2);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 11px;
  cursor: pointer;
  transition: color .12s ease, border-color .12s ease;
}
.code-example-btn:hover { color: var(--ink); border-color: var(--soft); }

.code-editor {
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--surface-2);
}
.code-editor-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.traffic-lights { display: flex; gap: 5px; }
.traffic-lights span {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--faint);
}
.traffic-lights span:first-child { background: var(--red); }
.traffic-lights span:nth-child(2) { background: var(--amber); }
.traffic-lights span:last-child  { background: var(--green); }
.code-editor-title {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: .01em;
}
.code-textarea {
  width: 100%;
  box-sizing: border-box;
  border: none;
  outline: none;
  resize: vertical;
  background: transparent;
  color: var(--ink-2);
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 12.5px;
  line-height: 1.7;
  padding: 13px 14px;
  min-height: 220px;
  display: block;
}
.code-textarea::placeholder { color: var(--soft); }

.parsed-empty {
  text-align: center;
  padding: 26px 12px;
  color: var(--muted);
  font-size: 12.5px;
}
.parsed-empty span { display: block; font-size: 22px; margin-bottom: 6px; }
.parsed-empty p { margin: 0; }

.review-content { font-size: 13px; color: var(--ink-2); }
.review-placeholder { margin: 4px 0; color: var(--muted); font-size: 12.5px; }

/* ---- checklist ---- */
.checklist-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}
.checklist-item {
  display: flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 10px 12px;
  font-size: 12.5px;
  color: var(--ink-2);
  transition: border-color .12s ease, background-color .12s ease;
}
.checklist-item:hover { border-color: var(--soft); }
.checklist-item input { position: absolute; opacity: 0; pointer-events: none; }
.checklist-check {
  width: 17px;
  height: 17px;
  border-radius: 5px;
  border: 1.5px solid var(--soft);
  background: var(--surface);
  flex-shrink: 0;
  display: grid;
  place-items: center;
  transition: background-color .12s ease, border-color .12s ease;
}
.checklist-item input:checked ~ .checklist-check {
  background: var(--ink);
  border-color: var(--ink);
}
.checklist-item input:checked ~ .checklist-check::after {
  content: "";
  width: 4.5px;
  height: 8.5px;
  border: solid #f2f5fa;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) translate(-0.5px, -1px);
}
.checklist-item input:checked ~ .checklist-label { color: var(--ink); }
.checklist-label { user-select: none; }

/* ---- step nav ---- */
.strategy-form-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-1);
  padding: 12px 16px;
}
.step-indicator {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 11.5px;
  color: var(--muted);
}

/* ---- right rail: preview ---- */
.strategy-preview-section {
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: sticky;
  top: 20px;
}
.preview-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-1);
  padding: 16px;
}
.preview-card h3 {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}
.preview-type-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 650;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--surface-3);
  color: var(--ink-2);
  margin: 0 0 12px;
}
.summary-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 6.5px 0;
  border-bottom: 1px solid var(--line-2);
  font-size: 12.5px;
}
.summary-row:last-child { border-bottom: none; }
.summary-label { color: var(--muted); flex-shrink: 0; }
.summary-value { color: var(--ink-2); font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; overflow-wrap: anywhere; }
.summary-desc { -webkit-line-clamp: 2; display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; font-weight: 500; }
.summary-row.description-row { align-items: flex-start; }

.targets-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
}
.target-card {
  background: var(--surface-2);
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  padding: 9px 6px 10px;
  text-align: center;
}
.target-label { display: block; font-size: 9.5px; font-weight: 600; color: var(--soft); margin-bottom: 4px; }
.target-value {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-2);
}

/* =========================================================
   SHOW PAGE v2 — hero band, rule rows, daily checklist
   Appended 2026-11-19. Component rules only; every color
   rides the tokens above, so the dark-mode block keeps
   working without duplication.

   NAMESPACE GUARD: every block here is scoped under the
   .strategy-show shell root. The app bundle also carries
   trades.css (require_tree), whose TRADE-detail sheet owns
   global .show-hero / .show-actions names — scoping wins on
   specificity regardless of file order and keeps the two
   detail pages from styling each other. Never add unscoped
   .show-* names in this file.
   ========================================================= */
.strategy-show .show-hero {
  position: relative;
  overflow: hidden;
  display: block; /* reset: trades.css .show-hero is a 2-col grid (collision) */
  grid-template-columns: none;
  background: var(--surface);
  background-image: linear-gradient(115deg,
    color-mix(in srgb, var(--accent, var(--green)) 10%, var(--surface)) 0%,
    var(--surface) 58%);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-1);
  padding: 14px 20px 18px;
  margin-bottom: 16px;
}
.strategy-show .show-hero::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--accent, var(--green));
  opacity: .9;
}
.strategy-show .show-watermark,
.strategy-show .show-hero-tape {
  position: absolute;
  right: 22px;
  pointer-events: none;
  user-select: none;
}
.strategy-show .show-watermark {
  top: -24px;
  font-size: 118px;
  line-height: 1;
  color: var(--accent, var(--green));
  opacity: .10;
  transform: rotate(8deg);
}
.strategy-show .show-hero-tape { bottom: 14px; opacity: .45; }
.strategy-show .show-hero-tape svg {
  width: 280px;
  height: 46px;
  display: block;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 32%);
  mask-image: linear-gradient(90deg, transparent, #000 32%);
}
.strategy-show .show-hero-top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 10px;
  margin-top: 0; /* trades.css .show-actions sibling adds margin-top — neutralize */
}
.strategy-show .show-hero-main {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  min-width: 0;
}
/* show-page candle strip — the .candle-spark color rules above are
   scoped to .strategies-page; the show and marketplace shells need
   their own (2026-11-19: v1 shipped them missing, so the hero tape
   rendered as unstyled default-colored bars). */
.strategy-show .candle-spark { display: block; }
.strategy-show .candle-spark .cs-up   { fill: var(--green); }
.strategy-show .candle-spark .cs-down { fill: var(--red); }
.strategy-show .candle-spark .cs-wick     { stroke: var(--soft); stroke-width: 1; }
.strategy-show .candle-spark .cs-wick-up  { stroke: var(--green); }

/* stat strip — tightened type */
.strategy-show .show-stat-label {
  text-transform: uppercase;
  letter-spacing: .06em;
}
.strategy-show .show-stat-value { font-size: 17px; }

/* card head row + copy tools */
.strategy-show .show-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 10px;
}
.strategy-show .show-card-head h2 { margin: 0; }

/* numbered rule rows */
.strategy-show .rule-list { display: flex; flex-direction: column; gap: 7px; }
.strategy-show .rule-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 9px 12px;
  background: var(--surface-2);
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  font-size: 13px;
  line-height: 1.55;
  color: var(--ink-2);
  word-break: break-word;
}
.strategy-show .rule-index {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--soft);
  background: var(--surface-3);
  border-radius: 5px;
  padding: 2px 6px;
  margin-top: 1px;
  flex-shrink: 0;
}
.strategy-show .show-card--entry .rule-row { border-left: 2px solid var(--green-line); }
.strategy-show .show-card--exit  .rule-row { border-left: 2px solid var(--green-line); }

/* tinted signal cards */
.strategy-show .show-card--invalidation {
  background: var(--red-soft);
  border-color: var(--red-line);
}
.strategy-show .show-card--invalidation h2 { color: var(--red); }
.strategy-show .show-card--invalidation .rule-row { background: var(--surface); border-color: var(--red-line); border-left: 2px solid var(--red); }
.strategy-show .show-card--invalidation .rule-index { color: var(--red); background: var(--red-soft); }
.strategy-show .show-card--notes {
  background: var(--amber-soft);
  border-color: var(--amber-line);
}
.strategy-show .show-card--notes h2 { color: var(--amber); }
.strategy-show .show-card--notes .show-pre { color: var(--ink-2); }

/* pseudo-code terminal chrome */
.strategy-show .show-code-editor {
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  overflow: hidden;
  margin-bottom: 14px;
}
.strategy-show .show-code-editor .show-code {
  margin: 0;
  border: none;
  border-radius: 0;
}
.strategy-show .terminal-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 12px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.strategy-show .terminal-head .code-editor-title { margin-left: auto; }
.strategy-show .mini-copy {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 650;
  color: var(--muted);
  background: none;
  border: none;
  padding: 3px 6px;
  border-radius: 5px;
  cursor: pointer;
  transition: color .12s ease, background-color .12s ease;
}
.strategy-show .mini-copy:hover { color: var(--ink); background: var(--surface-2); }
.strategy-show .mini-copy.is-copied { color: var(--green-2); }

/* daily interactive checklist */
.strategy-show .show-check.is-complete {
  border-color: var(--green-line);
  box-shadow: 0 0 0 1px var(--green-line), var(--shadow-1);
}
.strategy-show .check-head-right { display: inline-flex; align-items: center; gap: 8px; }
.strategy-show .check-count {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--muted);
  background: var(--surface-2);
  border: 1px solid var(--line-2);
  border-radius: 999px;
  padding: 3px 9px;
}
.strategy-show .show-check.is-complete .check-count { color: var(--green-2); background: var(--green-soft); border-color: var(--green-line); }
.strategy-show .check-reset {
  font-size: 11px;
  font-weight: 600;
  color: var(--soft);
  background: none;
  border: none;
  padding: 3px 6px;
  border-radius: 5px;
  cursor: pointer;
  transition: color .12s ease, background-color .12s ease, opacity .12s ease;
}
.strategy-show .check-reset:hover { color: var(--ink); background: var(--surface-2); }
.strategy-show .check-reset[disabled] { opacity: .4; cursor: default; }
.strategy-show .check-progress {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--surface-2);
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  margin-bottom: 12px;
}
.strategy-show .check-ring { width: 28px; height: 28px; transform: rotate(-90deg); flex-shrink: 0; }
.strategy-show .check-ring circle { fill: none; stroke-width: 3; }
.strategy-show .check-ring .check-ring-bg { stroke: var(--surface-3); }
.strategy-show .check-ring .check-ring-fill {
  stroke: var(--green);
  stroke-linecap: round;
  transition: stroke-dashoffset .3s ease;
}
.strategy-show .check-ring-label {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
}
.strategy-show .show-check.is-complete .check-progress {
  background: var(--green-soft);
  border-color: var(--green-line);
}
.strategy-show .show-check.is-complete .check-ring-label { color: var(--green-2); font-weight: 650; }
.strategy-show .check-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.strategy-show .check-item {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 8px 10px;
  border-radius: var(--r-sm);
  cursor: pointer;
  font-size: 12.5px;
  color: var(--ink-2);
  transition: background-color .12s ease;
}
.strategy-show .check-item:hover { background: var(--surface-2); }
.strategy-show .check-item input { position: absolute; opacity: 0; pointer-events: none; }
.strategy-show .check-box {
  width: 17px;
  height: 17px;
  border-radius: 5px;
  border: 1.5px solid var(--soft);
  background: var(--surface);
  flex-shrink: 0;
  display: grid;
  place-items: center;
  margin-top: 1px;
  transition: background-color .12s ease, border-color .12s ease;
}
.strategy-show .check-item:hover .check-box { border-color: var(--ink-2); }
.strategy-show .check-item input:checked ~ .check-box { background: var(--green); border-color: var(--green); }
.strategy-show .check-item input:checked ~ .check-box::after {
  content: "";
  width: 4.5px;
  height: 8.5px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) translate(-0.5px, -1px);
}
.strategy-show .check-item input:checked ~ .check-text { color: var(--soft); text-decoration: line-through; }
html[data-theme="dark"] .strategy-show .check-item input:checked ~ .check-box::after { border-color: #0b1220; }

/* trades chip in details */
.strategy-show .detail-num { font-family: var(--mono); font-variant-numeric: tabular-nums; }

/* =========================================================
   DARK MODE — token overrides only. One block per shell.
   ========================================================= */
html[data-theme="dark"] .strategies-page,
html[data-theme="dark"] .strategy-show,
html[data-theme="dark"] .strategy-form {
  --bg:       #0b1220;
  --surface:  #10192b;
  --surface-2:#16223b;
  --surface-3:#1e2a45;
  --line:     #263452;
  --line-2:   #1e2a45;
  --ink:      #e2e8f0;
  --ink-2:    #a3aec2;
  --muted:    #6b7891;
  --soft:     #4d5b76;
  --faint:    #243050;

  --green:      #1f9d68;
  --green-2:    #34d399;
  --green-soft: rgba(52, 211, 153, .12);
  --green-line: rgba(52, 211, 153, .35);

  --amber:      #fbbf24;
  --amber-soft: rgba(217, 119, 6, .13);
  --amber-line: rgba(217, 119, 6, .42);

  --red:        #f87171;
  --red-soft:   rgba(220, 38, 38, .16);
  --red-line:   rgba(220, 38, 38, .42);

  --shadow-1: 0 0 0 0.5px var(--line);
  --shadow-2: 0 8px 24px -16px rgba(0, 0, 0, .55);
}
html[data-theme="dark"] .strategies-page .btn-ink,
html[data-theme="dark"] .strategy-form .btn-primary-action,
html[data-theme="dark"] .strategy-show .btn-primary-action,
html[data-theme="dark"] .strategies-page .btn-mini--ink,
html[data-theme="dark"] .step-tab.active .step-number { color: #0b1220; }
html[data-theme="dark"] .checklist-item input:checked ~ .checklist-check::after { border-color: #0b1220; }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 960px) {
  .strategies-page { padding: 20px 18px 40px; }
  .strategy-show, .marketplace-detail { padding: 20px 18px 40px; }
  .show-grid, .strategy-grid { grid-template-columns: 1fr; }
  .strategy-preview-section { position: static; }
  .strategy-type-grid { grid-template-columns: repeat(2, 1fr); }
  .strategies-ledger { flex-wrap: wrap; }
  .ledger-item { flex: 1 1 auto; }
  .strategy-show .show-actions { width: 100%; }
}
@media (max-width: 960px) {
  .strategy-show .show-hero { padding: 13px 16px 16px; }
  .strategy-show .show-watermark { font-size: 84px; top: -18px; }
  .strategy-show .show-hero-tape { display: none; }
}
