/* ============================================
   Rosho Stocks – Visual System
   ============================================ */
:root {
  --bg: #0b1120;
  --bg-elevated: #111827;
  --card: #1e293b;
  --card-hover: #334155;
  --border: #334155;
  --text: #f1f5f9;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --primary: #3b82f6;
  --primary-hover: #2563eb;
  --accent: #22c55e;
  --warning: #eab308;
  --danger: #ef4444;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 4px 24px rgba(0,0,0,0.35);
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

.hidden { display: none !important; }

/* ----- Buttons ----- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  font-weight: 600;
  font-size: 15px;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
}
.btn-primary {
  background: var(--primary);
  color: #fff;
  padding: 12px 22px;
}
.btn-primary:hover { background: var(--primary-hover); }
.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
  padding: 10px 18px;
}
.btn-ghost:hover { color: var(--text); border-color: var(--text-dim); }
.btn-lg { padding: 16px 32px; font-size: 16px; }
.btn-sm { padding: 8px 14px; font-size: 13px; }
.btn-block { width: 100%; }

/* ----- Landing Header ----- */
.landing-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 28px;
  max-width: 1100px;
  margin: 0 auto;
}
.landing-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 18px;
}
.logo-mark {
  width: 32px;
  height: 32px;
  background: #0b1120;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.logo-mark.small { width: 26px; height: 26px; }
.logo-mark-img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  object-fit: cover;
  display: block;
  background: #0b1120;
}
.app-brand .logo-mark-img { width: 28px; height: 28px; }
.brand-wordmark {
  height: 36px;
  width: auto;
  display: block;
  object-fit: contain;
}
.footer-wordmark { height: 28px; opacity: 0.92; }
.auth-wordmark { height: 42px; margin: 0 auto; }
.hero-mark {
  width: 96px;
  height: 96px;
  border-radius: 16px;
  object-fit: cover;
  margin: 0 auto 18px;
  display: block;
  box-shadow: 0 8px 30px rgba(0,0,0,0.35);
  background: #0b1120;
}
.landing-nav { display: flex; gap: 10px; align-items: center; }

/* ----- Hero ----- */
.hero {
  padding: 60px 28px 70px;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}
.hero-badge {
  display: inline-block;
  background: rgba(59,130,246,0.15);
  color: #60a5fa;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 20px;
  letter-spacing: 0.02em;
}
.hero h1 {
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 18px;
}
.hero-sub {
  font-size: 18px;
  color: var(--text-muted);
  max-width: 540px;
  margin: 0 auto 32px;
  line-height: 1.6;
}
.hero-cta { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.hero-note { font-size: 13px; color: var(--text-dim); }

/* ----- Performance Strip ----- */
.perf-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  max-width: 900px;
  margin: 0 auto 70px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}
.perf-item {
  background: var(--bg-elevated);
  padding: 24px 16px;
  text-align: center;
}
.perf-value {
  font-size: 22px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 4px;
}
.perf-label {
  font-size: 12px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ----- Sections ----- */
.section-title {
  text-align: center;
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 36px;
  letter-spacing: -0.02em;
}
.features, .pricing, .how-it-works {
  padding: 0 28px 80px;
  max-width: 1000px;
  margin: 0 auto;
}

/* ----- Feature Grid ----- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}
.feature-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: border-color 0.15s;
}
.feature-card:hover { border-color: #475569; }
.feature-icon { font-size: 28px; margin-bottom: 12px; }
.feature-card h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.feature-card p { font-size: 14px; color: var(--text-muted); line-height: 1.55; }
.badge-paid {
  font-size: 10px;
  font-weight: 700;
  background: rgba(59,130,246,0.2);
  color: #60a5fa;
  padding: 2px 7px;
  border-radius: 4px;
  text-transform: uppercase;
}

/* ----- Pricing ----- */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  max-width: 700px;
  margin: 0 auto;
}
.price-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  position: relative;
}
.price-card-featured {
  border-color: var(--primary);
  box-shadow: 0 0 0 1px var(--primary), var(--shadow);
}
.price-badge {
  position: absolute;
  top: -11px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 12px;
  border-radius: 999px;
  text-transform: uppercase;
}
.price-tier { font-size: 14px; color: var(--text-muted); font-weight: 600; margin-bottom: 6px; }
.price-amount { font-size: 36px; font-weight: 800; margin-bottom: 4px; }
.price-note { font-size: 13px; color: var(--text-dim); margin-bottom: 20px; }
.price-features {
  list-style: none;
  margin-bottom: 24px;
}
.price-features li {
  font-size: 14px;
  padding: 7px 0;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
}
.price-features li:last-child { border-bottom: none; }

/* ----- How it works ----- */
.steps { display: flex; flex-direction: column; gap: 20px; max-width: 560px; margin: 0 auto; }
.step {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.step-num {
  width: 36px;
  height: 36px;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 15px;
  flex-shrink: 0;
}
.step h4 { font-size: 16px; margin-bottom: 4px; }
.step p { font-size: 14px; color: var(--text-muted); }

/* ----- Disclaimer & Footer ----- */
.disclaimer-bar {
  max-width: 800px;
  margin: 0 auto 40px;
  padding: 0 28px;
}
.disclaimer-bar p {
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.6;
  text-align: center;
}
.disclaimer-bar a { color: var(--text-muted); }
.landing-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 28px;
  max-width: 1100px;
  margin: 0 auto;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-dim);
}
.footer-links { display: flex; gap: 20px; }
.footer-links a { color: var(--text-muted); text-decoration: none; }
.footer-links a:hover { color: var(--text); }

/* ----- Auth ----- */
#auth-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.auth-card {
  width: 100%;
  max-width: 400px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 36px 28px;
  box-shadow: var(--shadow);
}
.auth-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
  justify-content: center;
}
.auth-logo h1 { font-size: 20px; font-weight: 700; }
.auth-form h2 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 20px;
  text-align: center;
}
.auth-form input {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  color: var(--text);
  font-size: 15px;
  margin-bottom: 12px;
  font-family: inherit;
}
.auth-form input:focus {
  outline: none;
  border-color: var(--primary);
}
.auth-form .btn { margin-top: 8px; }
.switch-auth {
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 16px;
}
.switch-auth a { color: var(--primary); text-decoration: none; }
.share-box {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px;
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 16px;
  color: var(--text-muted);
}

/* ----- App Shell ----- */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-elevated);
}
.app-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 15px;
}
.app-user {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: var(--text-muted);
}
.app-nav {
  display: flex;
  gap: 4px;
  padding: 10px 16px;
  overflow-x: auto;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}
.nav-item {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 999px;
  white-space: nowrap;
  transition: all 0.15s;
}
.nav-item:hover { color: var(--text); }
.nav-item.active {
  background: rgba(59,130,246,0.15);
  color: #60a5fa;
}
.app-main {
  padding: 24px 20px 60px;
  max-width: 900px;
  margin: 0 auto;
}
.page-title {
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 6px;
  letter-spacing: -0.02em;
}
.page-sub {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 24px;
}

/* ----- Cards & Audio ----- */
.cards-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}
.audio-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.audio-card.primary {
  border-color: rgba(59,130,246,0.4);
  background: linear-gradient(145deg, #1e293b 0%, #172554 100%);
}
.card-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #60a5fa;
  margin-bottom: 4px;
}
.card-time {
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 10px;
}
.audio-card h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 4px;
}
.card-date { font-size: 13px; color: var(--text-muted); margin-bottom: 12px; }
.card-note { font-size: 13px; color: var(--text-dim); margin-top: 10px; }
.audio-player {
  width: 100%;
  height: 36px;
  margin-top: 8px;
  border-radius: 6px;
}

/* ----- Positions & Episodes ----- */
.section { margin-bottom: 36px; }
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}
.section h2 {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 14px;
}
.positions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}
.position-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px;
  cursor: pointer;
  transition: border-color 0.15s;
}
.position-card:hover { border-color: #475569; }
.position-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}
.position-ticker { font-weight: 700; font-size: 15px; }
.position-name { font-size: 12px; color: var(--text-dim); margin-bottom: 6px; }
.position-stance { font-size: 13px; color: var(--text-muted); line-height: 1.4; }
.position-status {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  text-transform: uppercase;
}
.status-open { background: rgba(34,197,94,0.15); color: #4ade80; }
.status-watch { background: rgba(234,179,8,0.15); color: #facc15; }
.status-flat { background: rgba(148,163,184,0.15); color: #94a3b8; }

.episodes-list { display: flex; flex-direction: column; gap: 10px; }
.episode-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.episode-info { display: flex; flex-direction: column; gap: 2px; }
.episode-meta { font-size: 12px; color: var(--text-dim); }
.empty-note { color: var(--text-dim); font-size: 14px; }

/* ----- Upgrade / Performance ----- */
.upgrade-prompt {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  text-align: center;
}
.upgrade-prompt h3 { margin-bottom: 8px; }
.upgrade-prompt p { color: var(--text-muted); margin-bottom: 20px; font-size: 14px; }
.perf-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}
.perf-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.perf-card-label { font-size: 13px; color: var(--text-muted); margin-bottom: 8px; }
.perf-card-value { font-size: 24px; font-weight: 700; margin-bottom: 6px; }
.perf-card-note { font-size: 12px; color: var(--text-dim); }

/* ----- Responsive ----- */
@media (max-width: 640px) {
  .perf-strip { grid-template-columns: repeat(2, 1fr); }
  .hero { padding: 40px 20px 50px; }
  .hero h1 { font-size: 28px; }
  .landing-header { padding: 16px 20px; }
  .app-main { padding: 20px 16px 50px; }
}

.ticker-pills { display:flex; gap:10px; flex-wrap:wrap; }
.pill {
  background: var(--card); border:1px solid var(--border); border-radius:999px;
  padding:10px 16px; font-weight:700; letter-spacing:.04em;
}
.pill.empty { color:var(--text-dim); font-weight:500; }
.week-tiles { display:grid; grid-template-columns:repeat(3,1fr); gap:12px; }
.week-tile {
  background: var(--card); border:1px solid var(--border); border-radius: var(--radius);
  padding:16px; min-height:120px; cursor:pointer;
}
.week-tile .d { font-size:12px; color:var(--text-muted); text-transform:uppercase; }
.week-tile h3 { margin:6px 0 8px; font-size:16px; }
.week-tile audio { width:100%; margin-top:8px; }
.archive-wrap { margin-top:16px; color:var(--text-muted); }
.archive-wrap summary { cursor:pointer; }
.week-tiles.archive { margin-top:10px; opacity:.9; }
.list-inputs { display:grid; gap:10px; max-width:360px; margin:16px 0; }
.picks-open { display:grid; gap:12px; }
.pick-card {
  background: var(--card); border:1px solid var(--border); border-radius: var(--radius);
  padding:16px;
}
.pick-card .meta { display:flex; gap:16px; flex-wrap:wrap; font-size:13px; color:var(--text-muted); margin-top:8px; }
.pick-card .meta b { color:var(--text); }
.grid-scroll { overflow-x:auto; }
.picks-grid { display:grid; gap:8px; min-width:520px; }
.pg-head, .pg-row { display:grid; grid-template-columns: 90px repeat(var(--days, 3), minmax(140px,1fr)); gap:8px; }
.pg-cell {
  background: var(--card); border:1px solid var(--border); border-radius:10px; padding:10px; font-size:12px;
}
.pg-cell.lab { font-weight:700; display:flex; align-items:center; }
.closed-list { display:flex; flex-direction:column; gap:8px; }
.closed-row { background:var(--card); border:1px solid var(--border); border-radius:10px; padding:12px 14px; display:flex; justify-content:space-between; }
.clubbed { margin-top:12px; font-size:14px; color:var(--text-muted); }
@media (max-width:640px){
  .week-tiles { grid-template-columns:1fr; }
}

.ticker-pills { display:flex; gap:8px; flex-wrap:wrap; }
.pill { background:#122033; border:1px solid var(--border); border-radius:999px; padding:6px 12px; font-weight:700; letter-spacing:.04em; }
.date-group { margin-bottom:16px; }
.date-group h3 { font-size:14px; margin:0 0 8px; color:var(--text-muted); }
.tile-row, .week-tiles { display:grid; grid-template-columns:repeat(auto-fill,minmax(160px,1fr)); gap:10px; }
.audio-tile {
  text-align:left; background:var(--card); border:1px solid var(--border); border-radius:14px;
  padding:12px; color:var(--text); cursor:pointer; min-height:110px;
}
.audio-tile.empty { opacity:.55; cursor:default; min-height:70px; }
.audio-tile .tile-kicker { font-size:11px; color:var(--text-muted); margin-bottom:4px; }
.audio-tile .tile-title { font-size:20px; font-weight:800; }
.audio-tile .tile-sub { font-size:12px; color:var(--text-muted); margin:4px 0 8px; }
.audio-tile .tile-play { font-size:12px; font-weight:700; color:#60a5fa; }
.list-inputs { display:grid; gap:10px; margin:12px 0; }
.mylist-editor { background:var(--card); border:1px solid var(--border); border-radius:14px; padding:16px; margin-bottom:20px; }
.archive-wrap { margin-top:12px; color:var(--text-muted); }
.picks-open { display:grid; grid-template-columns:repeat(auto-fill,minmax(240px,1fr)); gap:12px; }
.pg-row .audio-tile { min-height:88px; }

.grid-scroll { overflow-x:auto; -webkit-overflow-scrolling:touch; }
.data-grid {
  width:100%;
  border-collapse:separate;
  border-spacing:0;
  min-width:720px;
  background:var(--card);
  border:1px solid var(--border);
  border-radius:12px;
  overflow:hidden;
  font-size:13px;
}
.data-grid th, .data-grid td {
  padding:10px 12px;
  border-bottom:1px solid var(--border);
  border-right:1px solid var(--border);
  text-align:left;
  white-space:nowrap;
}
.data-grid th { background:#0f1a2a; color:var(--text-muted); font-size:11px; text-transform:uppercase; letter-spacing:.04em; }
.data-grid tr:last-child td { border-bottom:none; }
.cell-play {
  display:inline-block;
  background:#14325a;
  color:#93c5fd;
  padding:6px 10px;
  border-radius:8px;
  text-decoration:none;
  font-weight:700;
}
.empty-cell { color:#64748b; }
.up { color:#34d399; font-weight:700; }
.down { color:#f87171; font-weight:700; }
.morning-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
}
#list-status { color:#34d399; font-weight:600; min-height:20px; }
.empty-audio {
  margin-top: 10px;
  border: 1px dashed var(--border);
  border-radius: 10px;
  padding: 16px;
  color: var(--text-muted);
  text-align: center;
}
#mylist-editor.hidden { display: none !important; }
#mylist-editor { display: block; }
.locked-input {
  opacity: 0.65;
  background: #0b1522 !important;
  color: #94a3b8 !important;
  pointer-events: none;
}
.pick-inputs { display:grid; grid-template-columns:repeat(auto-fill,minmax(160px,1fr)); gap:10px; }
#pick-status { color:#34d399; font-weight:600; min-height:20px; }
.pulse-row { display:grid; grid-template-columns:repeat(auto-fill,minmax(160px,1fr)); gap:10px; }
.pulse-card {
  background:var(--card); border:1px solid var(--border); border-radius:14px;
  padding:14px; cursor:pointer; text-align:left; color:inherit;
}
.pulse-card.summary { background:#122033; }
html.rosho-in #landing-screen,
html.rosho-in #auth-screen { display:none !important; }
html.rosho-in #main-screen { display:block !important; }

/* Today's Tape */
.tape-card {
  background: #122033;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px 18px 14px;
}
.tape-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 10px;
}
.tape-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.tape-tracklist { list-style: none; margin: 10px 0 0; padding: 0; }
.tape-tracklist li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 4px;
  border-top: 1px solid rgba(51,65,85,0.6);
  font-size: 14px;
  color: var(--text-muted);
}
.tape-tracklist li.active { color: var(--text); }
.tape-num {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: #1e293b;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: #93c5fd;
}
.tape-now { font-size: 13px; color: #93c5fd; min-height: 18px; margin-top: 8px; }
#tape-player { width: 100%; margin-top: 8px; }
.desk-player {
  position: sticky;
  bottom: 0;
  background: #0b1522;
  border-top: 1px solid var(--border);
  padding: 8px 16px 10px;
  z-index: 20;
}
.desk-player.hidden { display: none !important; }
