/* ============================================================
   J-Mar Watchlist — Shared Stylesheet
   All pages reference this file. Edit here; no page
   regeneration needed for pure style changes.
   ============================================================ */

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: #111;
  color: #ddd;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  padding: 0 0 40px;
  max-width: 1020px;
  margin: 0 auto;
}

/* ── Top nav ─────────────────────────────────────────────── */
.top-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 32px;
  border-bottom: 1px solid #2a2a2a;
  background: #0f0f0f;
  position: sticky;
  top: 0;
  z-index: 50;
}
.site-title {
  font-size: 20px;
  font-weight: 700;
  color: #f0f0f0;
  letter-spacing: -0.3px;
}
.site-title a { color: inherit; text-decoration: none; }

/* ── Site logo lockup (icon + text) ─────────────────────── */
.site-logo-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.site-logo-icon {
  height: 44px;
  display: block;
  flex-shrink: 0;
}
.site-logo-text {
  font-size: 26px;
  font-weight: 900;
  font-family: "Arial Black", "Arial Bold", Impact, sans-serif;
  color: #d60000;
  letter-spacing: 0.5px;
  line-height: 1;
  white-space: nowrap;
  text-transform: uppercase;
}

.date-nav { display: flex; align-items: center; gap: 10px; }
.nav-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 5px;
  background: #1e1e1e;
  color: #aaa;
  text-decoration: none;
  font-size: 17px;
  transition: background 0.15s;
}
.nav-arrow:hover { background: #2a2a2a; color: #f0f0f0; }
.nav-arrow.disabled { color: #333; cursor: default; pointer-events: none; }
.date-select {
  background: #1e1e1e;
  color: #ccc;
  border: 1px solid #333;
  border-radius: 5px;
  padding: 5px 10px;
  font-size: 13px;
  cursor: pointer;
}
.date-select:focus { outline: none; border-color: #555; }

/* ── Page body ───────────────────────────────────────────── */
.page-body { padding: 24px 32px 0; }
.date-heading { font-size: 14px; color: #666; margin-bottom: 18px; font-weight: 500; }

/* ── Market bar ──────────────────────────────────────────── */
.market-bar {
  display: flex;
  gap: 20px;
  margin-bottom: 28px;
  padding: 10px 14px;
  background: #1a1a1a;
  border-radius: 6px;
  font-size: 13px;
  flex-wrap: wrap;
}
.market-bar .sym { color: #888; margin-right: 4px; }
.market-bar .up   { color: #26a69a; font-weight: 600; }
.market-bar .down { color: #ef5350; font-weight: 600; }

/* ── Section headers ─────────────────────────────────────── */
.section-header {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 28px 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #222;
}
.section-header:first-of-type { margin-top: 0; }
.section-title {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #888;
}
.section-highlight .section-title { color: #ffa726; }
.section-swingtrader .section-title { color: #42a5f5; }
.section-alternative .section-title { color: #ce93d8; }
.section-count { font-size: 11px; color: #444; }

/* ── Candidate cards ─────────────────────────────────────── */
.candidate-list { display: flex; flex-direction: column; gap: 14px; }
.candidate {
  display: flex;
  align-items: stretch;
  background: #1a1a1a;
  border: 1px solid #262626;
  border-radius: 8px;
  overflow: hidden;
  transition: border-color 0.15s;
}
.candidate:hover { border-color: #3a3a3a; }

/* highlight card gets a subtle gold left border */
.candidate.is-highlight { border-left: 3px solid #ffa72666; }

/* ── Thumbnail ───────────────────────────────────────────── */
.thumb-wrap {
  flex: 0 0 240px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  background: #0f0f0f;
}
.thumb-wrap img {
  width: 240px;
  height: 152px;
  object-fit: cover;
  object-position: top left;
  display: block;
  transition: opacity 0.15s;
}
.thumb-wrap:hover img { opacity: 0.85; }
.thumb-wrap .zoom-hint {
  position: absolute;
  bottom: 6px;
  right: 6px;
  background: rgba(0,0,0,0.6);
  color: #aaa;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 3px;
  pointer-events: none;
}
.thumb-wrap.no-chart {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #444;
  font-size: 12px;
  cursor: default;
}

/* ── Candidate body ──────────────────────────────────────── */
.candidate-body {
  flex: 1;
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
}
.ticker-line { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.ticker-line .ticker {
  font-size: 20px;
  font-weight: 700;
  color: #f0f0f0;
  letter-spacing: -0.3px;
}
.ticker-line .company { font-size: 13px; color: #666; }

/* ── Badges ──────────────────────────────────────────────── */
.exch-badge, .section-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 3px;
  letter-spacing: 0.4px;
  align-self: center;
}
.exch-nyse    { background: #1a2a3a; color: #42a5f5; border: 1px solid #42a5f544; }
.exch-nasdaq  { background: #1a3a2a; color: #26a69a; border: 1px solid #26a69a44; }
.exch-other   { background: #2a2a1a; color: #ffa726; border: 1px solid #ffa72644; }
.badge-highlight   { background: #2a2010; color: #ffa726; border: 1px solid #ffa72644; }
.badge-swingtrader { background: #101a2a; color: #42a5f5; border: 1px solid #42a5f544; }
.badge-alternative { background: #1e1028; color: #ce93d8; border: 1px solid #ce93d844; }

/* ── Card metrics row ────────────────────────────────────── */
.metrics-row {
  display: flex;
  gap: 14px;
  margin-top: 4px;
  flex-wrap: wrap;
}
.metric-item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
}
.metric-lbl { color: #555; text-transform: uppercase; letter-spacing: 0.4px; }
.metric-pass { color: #26a69a; font-weight: 700; }
.metric-fail { color: #ef5350; font-weight: 700; }
.metric-val  { color: #aaa;    font-weight: 600; }

/* ── Bullets ─────────────────────────────────────────────── */
.bullets { list-style: none; display: flex; flex-direction: column; gap: 3px; }
.bullets li {
  font-size: 13px;
  color: #aaa;
  padding-left: 14px;
  position: relative;
  line-height: 1.5;
}
.bullets li::before { content: "·"; position: absolute; left: 2px; color: #555; }

/* ── Returns column ──────────────────────────────────────── */
.returns-col {
  flex: 0 0 250px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  border-left: 1px solid #222;
}
.ret-label {
  font-size: 10px;
  color: #555;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 4px;
}
.ret-header {
  display: grid;
  grid-template-columns: 28px 1fr 1fr 1fr;
  font-size: 10px;
  color: #444;
  margin-bottom: 3px;
}
.ret-header span { text-align: right; }
.ret-header span:first-child { text-align: left; }
.ret-header.ret-solo { grid-template-columns: 28px 1fr; }
.ret-row {
  display: grid;
  grid-template-columns: 28px 1fr 1fr 1fr;
  font-size: 12px;
  align-items: center;
}
.ret-row.ret-solo { grid-template-columns: 28px 1fr; }
.ret-row .period { color: #555; font-size: 11px; }
.ret-row span:not(.period) { text-align: right; }
.val-up   { color: #26a69a; font-weight: 600; }
.val-down { color: #ef5350; font-weight: 600; }
.val-none { color: #444; }
.ret-pending {
  font-size: 10px;
  color: #444;
  font-style: italic;
  margin-top: 6px;
  text-align: center;
}

/* ── No candidates message ───────────────────────────────── */
.no-candidates {
  padding: 40px 0;
  text-align: center;
  color: #444;
  font-size: 14px;
  font-style: italic;
}

/* ── Lightbox ────────────────────────────────────────────── */
.lightbox-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.88);
  z-index: 100;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.lightbox-overlay.active { display: flex; }
.lightbox-overlay img {
  max-width: 92vw;
  max-height: 92vh;
  border-radius: 6px;
  box-shadow: 0 8px 48px rgba(0,0,0,0.8);
  cursor: default;
}

/* ── Index table ─────────────────────────────────────────── */
.section-label {
  font-size: 11px;
  color: #555;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  margin-bottom: 14px;
}
table { width: 100%; border-collapse: collapse; }
thead th {
  font-size: 10px;
  color: #555;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding: 0 12px 8px 0;
  text-align: left;
  border-bottom: 1px solid #222;
}
tbody tr { border-bottom: 1px solid #1e1e1e; transition: background 0.1s; }
tbody tr:hover { background: #161616; }
tbody td { padding: 10px 12px 10px 0; vertical-align: middle; }
.col-date { width: 140px; white-space: nowrap; }
.col-date .dow { font-size: 11px; color: #555; margin-right: 6px; }
.col-date a { color: #ccc; text-decoration: none; font-weight: 500; }
.col-date a:hover { color: #f0f0f0; }
.col-wins { width: 100px; text-align: right; white-space: nowrap; }
.ticker-pill {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 3px;
  margin: 2px 3px 2px 0;
  background: #1e1e1e;
  color: #888;
  border: 1px solid #2a2a2a;
  cursor: default;
}
.ticker-pill.pill-up   { background: #0d2016; color: #26a69a; border-color: #26a69a33; }
.ticker-pill.pill-down { background: #200d0d; color: #ef5350; border-color: #ef535033; }
.win-pos  { color: #26a69a; font-weight: 600; font-size: 12px; }
.win-neg  { color: #ef5350; font-weight: 600; font-size: 12px; }
.win-none { color: #444;    font-size: 12px; }

/* ── Disclaimer modal ────────────────────────────────────── */
.disclaimer-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.93);
  z-index: 300;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.disclaimer-overlay.active { display: flex; }
.disclaimer-box {
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 10px;
  max-width: 640px;
  width: 100%;
  padding: 32px 36px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-height: 90vh;
  overflow-y: auto;
}
.disclaimer-title {
  font-size: 15px;
  font-weight: 700;
  color: #f0f0f0;
  letter-spacing: -0.2px;
  border-bottom: 1px solid #2a2a2a;
  padding-bottom: 12px;
}
.disclaimer-body {
  font-size: 12px;
  color: #999;
  line-height: 1.75;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.disclaimer-body strong { color: #ddd; }
.disclaimer-btn {
  align-self: flex-end;
  margin-top: 6px;
  background: #26a69a;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 10px 28px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}
.disclaimer-btn:hover { background: #2bbbad; }

/* ── Landing page ────────────────────────────────────────── */
.home-body { padding: 60px 32px 0; display: flex; flex-direction: column; gap: 48px; }
.home-hero { display: flex; flex-direction: column; gap: 16px; align-items: flex-start; }
.home-hero h1 { font-size: 36px; font-weight: 800; color: #f0f0f0; letter-spacing: -0.8px; }
.home-tagline { font-size: 15px; color: #666; max-width: 520px; line-height: 1.6; }
.home-btns { display: flex; gap: 12px; margin-top: 8px; flex-wrap: wrap; }
.btn-primary {
  display: inline-block;
  background: #26a69a;
  color: #fff;
  text-decoration: none;
  padding: 12px 28px;
  border-radius: 7px;
  font-size: 14px;
  font-weight: 600;
  transition: background 0.15s;
}
.btn-primary:hover { background: #2bbbad; }
.btn-secondary {
  display: inline-block;
  background: #1e1e1e;
  color: #aaa;
  text-decoration: none;
  padding: 12px 28px;
  border-radius: 7px;
  font-size: 14px;
  font-weight: 500;
  border: 1px solid #2a2a2a;
  transition: background 0.15s, color 0.15s;
}
.btn-secondary:hover { background: #252525; color: #ddd; }
.home-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 640px) { .home-cards { grid-template-columns: 1fr; } }
.home-card {
  background: #1a1a1a;
  border: 1px solid #262626;
  border-radius: 8px;
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.home-card-title { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.7px; }
.home-card-title.sw-color  { color: #42a5f5; }
.home-card-title.alt-color { color: #ce93d8; }
.home-card p { font-size: 13px; color: #666; line-height: 1.65; }

/* ── Performance page ────────────────────────────────────── */
.algo-pills-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.algo-lbl {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 2px 5px;
  border-radius: 3px;
  flex-shrink: 0;
}
.algo-lbl.sw-lbl  { color: #42a5f5; background: #101a2a; border: 1px solid #42a5f533; }
.algo-lbl.alt-lbl { color: #ce93d8; background: #1e1028; border: 1px solid #ce93d833; }
.ticker-pill.pill-alt { background: #1e1028; color: #ce93d8; border-color: #ce93d833; }
.col-spy { width: 58px; text-align: center; white-space: nowrap; font-size: 13px; font-weight: 600; }
.spy-up   { color: #66bb6a; }
.spy-down { color: #ef5350; }
.col-wins-dual { width: 140px; text-align: right; white-space: nowrap; }
.wr-row { font-size: 12px; line-height: 1.9; }
.wr-lbl { color: #444; font-size: 10px; }

/* ── Footer ──────────────────────────────────────────────── */
.page-footer {
  margin-top: 32px;
  padding: 16px 32px 0;
  border-top: 1px solid #1e1e1e;
  font-size: 11px;
  color: #444;
  text-align: center;
  line-height: 1.8;
}
