/* ============================================================
   ezpztrader.com — /journaling/ (templates/marketing/journaling.html,
   TRADE_JOURNAL.md §11): our own Journal, shown with coded product mocks
   on sample data. Built on the shared components (hero, sec-head, card,
   pill, sample-label, cta-band); this file lays them out and draws the
   mocks (.jr-*).
   ============================================================ */

@layer page {

/* ---------- sections: copy and a mock side by side, alternating ---------- */
.jr-section { padding-block: var(--section-y-tight); }
.jr-section--alt { background: var(--sunken); border-block: 1px solid var(--border); }
.jr-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: var(--space-10); align-items: center; }
.jr-split--rev .jr-copy { order: 2; }
.jr-copy .sec-head { margin-bottom: 0; }
.jr-ticks { display: grid; gap: var(--space-2); margin: var(--space-5) 0 0; padding: 0; list-style: none; }
.jr-ticks li { position: relative; padding-left: var(--space-6); color: var(--ink-2); }
.jr-ticks li::before {
  content: ""; position: absolute; left: 2px; top: .3em;
  width: 10px; height: 6px; border-left: 2px solid var(--ok); border-bottom: 2px solid var(--ok);
  transform: rotate(-45deg);
}

/* ---------- mock window ---------- */
.jr-shot { margin: 0; padding: 0; overflow: hidden; box-shadow: var(--shadow-2); }
.jr-bar {
  display: flex; align-items: center; gap: var(--space-3);
  padding: var(--space-2) var(--space-4); border-bottom: 1px solid var(--border); background: var(--sunken);
  font-family: var(--font-mono); font-size: var(--text-xs); color: var(--ink-3);
}
.jr-dots { display: inline-flex; gap: 5px; }
.jr-dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--border-strong); }
.jr-body { padding: var(--space-4); }
.jr-cap { display: flex; justify-content: flex-end; padding: 0 var(--space-4) var(--space-3); }
.jr-shot .is-pos { color: var(--buy); }
.jr-shot .is-neg { color: var(--sell); }

/* overview */
.jr-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-2); margin-bottom: var(--space-4); }
.jr-kpis div { display: grid; gap: 2px; padding: var(--space-2) var(--space-3); border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--raised); }
.jr-kpis span { font-size: var(--text-2xs); color: var(--ink-3); }
.jr-kpis b { font-family: var(--font-mono); font-size: var(--text-md); font-weight: var(--weight-semi); color: var(--ink); font-variant-numeric: tabular-nums; }
.jr-curve { display: block; width: 100%; height: 130px; color: var(--buy); }

/* trade log + note */
.jr-rows { display: grid; border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden; }
.jr-row { display: grid; grid-template-columns: 1.1fr .9fr 1fr .8fr; gap: var(--space-2); align-items: center; padding: var(--space-2) var(--space-3); font-size: var(--text-sm); color: var(--ink); }
.jr-row + .jr-row { border-top: 1px solid var(--border); }
.jr-row span:last-child { text-align: right; font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.jr-row .pill { justify-self: start; }
.jr-row-head { background: var(--sunken); font-size: var(--text-2xs); color: var(--ink-3); text-transform: uppercase; letter-spacing: .06em; }
.jr-note {
  display: grid; grid-template-columns: 1fr 72px; gap: var(--space-1) var(--space-3);
  margin-top: var(--space-3); padding: var(--space-3);
  border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--raised);
}
.jr-note-tags { display: flex; gap: var(--space-2); }
.jr-note-tags i { font-style: normal; font-family: var(--font-mono); font-size: var(--text-2xs); color: var(--action-ink); }
.jr-note p { grid-column: 1; margin: 0; font-size: var(--text-sm); color: var(--ink-2); line-height: var(--leading-normal); }
.jr-thumb {
  grid-column: 2; grid-row: 1 / span 2; min-height: 52px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: linear-gradient(135deg, transparent 45%, var(--buy) 46%, var(--buy) 50%, transparent 51%) center / 100% 100% no-repeat, var(--sunken);
}

/* calendar: --k (0-42) from the view shades each day */
.jr-cal { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.jr-dow { font-size: var(--text-2xs); color: var(--ink-3); text-align: center; }
.jr-day {
  display: grid; align-content: space-between; min-height: 52px; padding: 5px 6px;
  border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--raised);
}
.jr-day i { font-style: normal; font-size: var(--text-2xs); color: var(--ink-3); }
.jr-day b { font-family: var(--font-mono); font-size: var(--text-2xs); font-weight: var(--weight-semi); text-align: right; }
.jr-day.is-pos { background: color-mix(in srgb, var(--buy) calc(var(--k) * 1%), var(--raised)); border-color: color-mix(in srgb, var(--buy) 35%, var(--border)); }
.jr-day.is-neg { background: color-mix(in srgb, var(--sell) calc(var(--k) * 1%), var(--raised)); border-color: color-mix(in srgb, var(--sell) 35%, var(--border)); }
.jr-day.is-pos b { color: var(--buy); }
.jr-day.is-neg b { color: var(--sell); }

/* reports */
.jr-sub { margin: 0 0 var(--space-3); font-size: var(--text-sm); font-weight: var(--weight-semi); color: var(--ink); }
.jr-hbars { display: grid; gap: var(--space-3); }
.jr-hbars div { display: grid; grid-template-columns: 76px 1fr 72px; gap: var(--space-3); align-items: center; font-size: var(--text-sm); color: var(--ink-2); }
.jr-hbars i { display: block; height: 12px; width: var(--w); border-radius: var(--radius-pill); }
.jr-hbars i.is-pos { background: var(--buy); }
.jr-hbars i.is-neg { background: var(--sell); }
.jr-hbars b { font-family: var(--font-mono); font-weight: var(--weight-semi); text-align: right; font-variant-numeric: tabular-nums; }

/* AI chat */
.jr-chat { display: grid; gap: var(--space-3); }
.jr-bubble {
  max-width: 88%; margin: 0; padding: var(--space-3);
  border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--raised);
  font-size: var(--text-sm); color: var(--ink); line-height: var(--leading-normal);
}
.jr-bubble.is-me { justify-self: end; background: var(--action-soft); border-color: var(--action-border); }
.jr-vbars { display: flex; align-items: flex-end; gap: var(--space-3); height: 110px; margin-top: var(--space-3); padding-bottom: var(--space-5); }
.jr-vbars span { position: relative; flex: 1; height: var(--h); border-radius: var(--radius-xs) var(--radius-xs) 0 0; background: var(--action); }
.jr-vbars span.is-neg { background: var(--sell); }
.jr-vbars i { position: absolute; left: 0; right: 0; bottom: -18px; font-style: normal; font-size: var(--text-2xs); color: var(--ink-3); text-align: center; }

/* ---------- portfolio + sync cards ---------- */
.jr-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-4); margin: 0; padding: 0; list-style: none; }
.jr-card-title { margin: 0 0 var(--space-2); font-size: var(--text-lg); font-weight: var(--weight-semi); line-height: var(--leading-heading); color: var(--ink); }
.jr-card p { margin: 0; color: var(--ink-2); line-height: var(--leading-relaxed); }

/* ---------- breakpoints ---------- */
@media (max-width: 900px) {
  .jr-split { grid-template-columns: minmax(0, 1fr); gap: var(--space-6); }
  .jr-split--rev .jr-copy { order: 0; }
  .jr-cards { grid-template-columns: minmax(0, 1fr); gap: var(--space-3); }
}
@media (max-width: 480px) {
  .jr-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .jr-body { padding: var(--space-3); }
  .jr-day { min-height: 44px; padding: 4px; }
  .jr-hbars div { grid-template-columns: 64px 1fr 62px; gap: var(--space-2); }
}

} /* @layer page */
