/* ═══════════════════════════════════════════════════════════════════════════
   BLOG / INSIGHTS — blog.css
   Inherits CSS variables from style.css (--primary, --surface, etc.)
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Nav extension ────────────────────────────────────────────────────────── */
.lp-nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-left: auto;
}
.lp-nav-link {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  transition: color .15s;
}
.lp-nav-link:hover,
.lp-nav-link.active {
  color: var(--primary);
}

/* ── Blog header ──────────────────────────────────────────────────────────── */
.blog-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 40px 16px 32px;
}
.blog-header-inner {
  max-width: 860px;
  margin: 0 auto;
}
.blog-header-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  margin: 8px 0 10px;
}
.blog-header-lead {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.65;
  max-width: 620px;
  margin: 0;
}

/* ── Layout: blog listing ─────────────────────────────────────────────────── */
.blog-layout {
  max-width: 1100px;
  margin: 32px auto;
  padding: 0 16px;
  display: grid;
  grid-template-columns: 1fr 280px;
  grid-template-rows: auto 1fr;
  gap: 0 40px;
}

/* Category bar spans full width */
.blog-categories {
  grid-column: 1 / 3;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.blog-cat {
  padding: 6px 16px;
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  background: var(--surface);
  transition: all .15s;
}
.blog-cat:hover,
.blog-cat.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* Article list */
.blog-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* ── Blog card ────────────────────────────────────────────────────────────── */
.blog-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  transition: box-shadow .15s, border-color .15s;
}
.blog-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,.10);
  border-color: #c5ccd4;
}
.blog-card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.blog-card-meta time,
.blog-read-time {
  font-size: 12px;
  color: var(--text-muted);
}
.blog-card-title {
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 10px;
  line-height: 1.3;
}
.blog-card-title a {
  color: var(--text);
  text-decoration: none;
  transition: color .15s;
}
.blog-card-title a:hover {
  color: var(--primary);
}
.blog-card-excerpt {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.65;
  margin: 0 0 16px;
}
.blog-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}
.blog-read-more {
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
}
.blog-read-more:hover {
  text-decoration: underline;
}
.blog-card-tickers {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.blog-ticker-more {
  font-size: 12px;
  color: var(--text-muted);
}

/* ── Category tag badges ──────────────────────────────────────────────────── */
.blog-cat-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: 20px;
  text-decoration: none;
  white-space: nowrap;
}
.blog-cat-tag.screening {
  background: #e0f2fe;
  color: #075985;
}
.blog-cat-tag.investing {
  background: #dcfce7;
  color: #166534;
}
.blog-cat-tag.analysis {
  background: #fef9c3;
  color: #854d0e;
}

/* ── Ticker chips ─────────────────────────────────────────────────────────── */
.blog-ticker {
  display: inline-block;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  text-decoration: none;
  letter-spacing: .02em;
}
.blog-ticker:hover {
  background: var(--primary);
  color: #fff;
}
.blog-ticker-link {
  color: var(--primary);
  font-weight: 700;
  text-decoration: none;
}
.blog-ticker-link:hover {
  text-decoration: underline;
}

/* ── Sidebar ──────────────────────────────────────────────────────────────── */
.blog-sidebar {
  grid-row: 2;
}
.blog-sidebar-widget {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 20px;
}
.blog-sidebar-widget h3 {
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 10px;
  color: var(--text);
}
.blog-sidebar-widget p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0 0 12px;
}
.blog-sidebar-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.blog-sidebar-links a {
  font-size: 13px;
  color: var(--primary);
  text-decoration: none;
}
.blog-sidebar-links a:hover {
  text-decoration: underline;
}
.sidebar-cta {
  display: block;
  background: var(--primary);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  padding: 9px 14px;
  border-radius: var(--radius);
  text-decoration: none;
  text-align: center;
  transition: opacity .15s;
}
.sidebar-cta:hover { opacity: .88; }

/* ═══════════════════════════════════════════════════════════════════════════
   ARTICLE PAGE
   ═══════════════════════════════════════════════════════════════════════════ */

.article-layout {
  max-width: 1100px;
  margin: 40px auto;
  padding: 0 16px;
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 0 40px;
  align-items: start;
}

/* ── Article header ───────────────────────────────────────────────────────── */
.article-header {
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}
.article-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.article-title {
  font-size: 30px;
  font-weight: 800;
  line-height: 1.25;
  color: var(--text);
  margin: 0 0 16px;
}
.article-lead {
  font-size: 17px;
  color: var(--text-muted);
  line-height: 1.7;
  margin: 0 0 20px;
  max-width: 680px;
}
.article-tickers-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.article-tickers-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-right: 4px;
}

/* ── Article body typography ──────────────────────────────────────────────── */
.article-body h2 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin: 32px 0 12px;
  padding-top: 8px;
}
.article-body h3 {
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
  margin: 24px 0 10px;
}
.article-body p {
  font-size: 15px;
  line-height: 1.75;
  color: var(--text);
  margin: 0 0 18px;
}
.article-body a {
  color: var(--primary);
}
.article-body a:hover {
  text-decoration: underline;
}

/* ── In-article CTA box ───────────────────────────────────────────────────── */
.article-cta-box {
  background: var(--primary-light);
  border: 1px solid #b6cffc;
  border-radius: var(--radius);
  padding: 18px 20px;
  margin: 24px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.article-cta-box p {
  margin: 0;
  font-size: 14px;
  color: var(--primary);
  font-weight: 500;
}

/* ── Article table ────────────────────────────────────────────────────────── */
.article-table-wrap {
  overflow-x: auto;
  margin: 20px 0 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.article-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.article-table thead th {
  background: #f1f3f5;
  padding: 10px 14px;
  text-align: left;
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.article-table tbody td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}
.article-table tbody tr:last-child td {
  border-bottom: none;
}
.article-table tbody tr:hover td {
  background: var(--primary-light);
}
.score-perfect {
  font-weight: 700;
  color: var(--green);
}
.article-table-note {
  font-size: 12px;
  color: var(--text-muted);
  padding: 8px 14px;
  border-top: 1px solid var(--border);
  margin: 0;
  background: var(--surface);
}

/* ── Article footer ───────────────────────────────────────────────────────── */
.article-footer {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.article-tags {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--text-muted);
}
.article-tag {
  background: #f1f3f5;
  color: var(--text-muted);
  border-radius: 4px;
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 500;
}
.article-back {
  font-size: 13px;
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}
.article-back:hover { text-decoration: underline; }
.article-nav-links { display: flex; gap: 16px; }

/* ── Comments section ─────────────────────────────────────────────────────── */
.article-comments {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 2px solid var(--border);
}
.article-comments h2 {
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 8px;
}
.comments-intro {
  font-size: 14px;
  color: var(--text-muted);
  margin: 0 0 24px;
}

/* Comment form */
.comment-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 32px;
}
.comment-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 14px;
}
.comment-form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.comment-form-group label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}
.comment-form-group input,
.comment-form-group textarea {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 13px;
  font-family: inherit;
  color: var(--text);
  background: var(--bg);
  transition: border-color .15s;
}
.comment-form-group input:focus,
.comment-form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
}
.comment-form-group textarea {
  resize: vertical;
  min-height: 100px;
}
.comment-submit {
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  padding: 9px 22px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity .15s;
}
.comment-submit:hover { opacity: .88; }
.comment-submit:disabled { opacity: .6; cursor: default; }
.comment-notice {
  font-size: 12px;
  color: var(--text-muted);
  margin: 10px 0 0;
}

/* Comment list */
.comments-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.comment {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
}
.comment-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}
.comment-author {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}
.comment-date {
  font-size: 12px;
  color: var(--text-muted);
}
.comment-text {
  font-size: 14px;
  line-height: 1.65;
  color: var(--text);
  margin: 0;
}
.comments-empty {
  font-size: 14px;
  color: var(--text-muted);
  font-style: italic;
}

/* Article sidebar — sticky */
.article-sidebar {
  position: sticky;
  top: 20px;
}

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .blog-layout,
  .article-layout {
    grid-template-columns: 1fr;
  }
  .blog-categories {
    grid-column: 1;
  }
  .blog-sidebar,
  .article-sidebar {
    position: static;
    grid-row: auto;
  }
  .article-title {
    font-size: 24px;
  }
  .comment-form-row {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 600px) {
  .blog-header {
    padding: 24px 16px;
  }
  .article-cta-box {
    flex-direction: column;
    align-items: flex-start;
  }
}
