/* ARGPT Trade Journal. Builds on /site.css and /stats/style.css (masthead,
   pills, stat tiles, footer); this file is only the trade cards. Green and
   red carry meaning (win / loss), everything else stays neutral. */

.j-filters {
  display: flex; flex-wrap: wrap; gap: 10px 12px;
  margin-bottom: 20px;
}
.j-filters .feeds { margin-bottom: 0; }

.j-list { display: grid; gap: 14px; margin-bottom: 40px; }

.j-card {
  position: relative;
  padding: 22px 24px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 22px;
  scroll-margin-top: calc(var(--topbar-h, 64px) + 16px);
}
.j-card::before {
  content: ""; position: absolute; inset-block: 22px; inset-inline-start: 0;
  width: 3px; border-radius: 0 3px 3px 0;
  background: var(--line-strong);
}
html[dir=rtl] .j-card::before { border-radius: 3px 0 0 3px; }
.j-card.is-win::before { background: var(--win); }
.j-card.is-loss::before { background: var(--loss); }
.j-card.is-focus { border-color: var(--accent-line); }

.j-top {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 16px;
  margin-bottom: 16px;
}
.j-id { display: grid; gap: 4px; min-width: 0; }
.j-sym {
  font-size: 20px; font-weight: 700; letter-spacing: -0.02em;
  display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.j-sym:hover { color: var(--text); text-decoration: underline; text-underline-offset: 4px;
  text-decoration-color: var(--line-strong); }
.j-side {
  font-size: 11px; font-weight: 700; letter-spacing: 0.12em;
  padding: 3px 9px; border-radius: 999px;
  border: 1px solid var(--line-strong); color: var(--text-dim);
}
.j-when { font-size: 13px; color: var(--text-faint); }

.j-res { display: grid; justify-items: end; gap: 2px; text-align: end; flex-shrink: 0; }
.j-r { font-size: 26px; font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; }
.j-sub { font-size: 13px; color: var(--text-dim); }

.j-levels {
  display: flex; flex-wrap: wrap; gap: 8px;
  padding-bottom: 16px; margin-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.j-lv {
  display: inline-flex; align-items: baseline; gap: 7px;
  padding: 6px 11px; border-radius: 10px;
  background: var(--surface-2); border: 1px solid var(--line);
  font-size: 13px;
}
.j-lv-k { color: var(--text-faint); font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
.j-lv-v { color: var(--text); font-weight: 500; }

.j-legs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 14px; }
.j-legs .j-note-k { margin-inline-end: 4px; margin-bottom: 0; }
.j-chip {
  font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px;
  border: 1px solid var(--line-strong); color: var(--text-dim);
}
.j-chip.is-tp { color: var(--win); border-color: rgba(57, 217, 138, 0.4); }
.j-chip.is-sl { color: var(--loss); border-color: rgba(255, 107, 129, 0.4); }
.j-chip-p { color: var(--text-faint); font-weight: 500; }

.j-note { margin-top: 12px; }
.j-note-k {
  display: block; margin-bottom: 4px;
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--text-faint);
}
.j-note-v {
  color: var(--text-dim); font-size: 15px; line-height: 1.6;
  white-space: pre-line; overflow-wrap: anywhere; max-width: 75ch;
}
.j-note.is-lesson {
  padding: 12px 14px; border-radius: 14px;
  background: rgba(255, 107, 129, 0.06);
  border: 1px solid rgba(255, 107, 129, 0.22);
}
.j-note.is-lesson .j-note-v { color: var(--text); }

.j-empty {
  padding: 40px 24px; text-align: center;
  border: 1px dashed var(--line-strong); border-radius: 22px;
  color: var(--text-dim);
}
.j-empty h2 { font-size: 20px; color: var(--text); margin-bottom: 8px; letter-spacing: -0.02em; }
.j-empty p { max-width: 52ch; margin: 0 auto; }

.ltr { direction: ltr; unicode-bidi: isolate; }
html[dir=rtl] .j-res { justify-items: start; text-align: start; }

@media (max-width: 600px) {
  .j-card { padding: 18px 16px 16px; border-radius: 18px; }
  .j-card::before { inset-block: 18px; }
  .j-top { flex-direction: column; gap: 10px; }
  .j-res { justify-items: start; text-align: start; grid-auto-flow: column; align-items: baseline; gap: 10px; }
  .j-r { font-size: 22px; }
  .j-sym { font-size: 18px; }
  .j-filters .feeds { width: 100%; }
  .j-filters .feed { flex: 1 1 auto; text-align: center; padding: 8px 12px; }
}
