/* ============================================================
   EvalLab — Magazine-style Theme
   ============================================================ */

:root {
  --nav-bg: #0f1f33;
  --body-bg: #f0f5f7;
  --card-bg: #ffffff;
  --text: #0f1f33;
  --muted: #64748b;
  --accent: #0e7490;
  --accent-dim: rgba(14, 116, 144, 0.1);
  --border: #dce4eb;
  --radius: 12px;
  --max-w: 1200px;
  --font: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

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

body {
  font-family: var(--font);
  background: var(--body-bg);
  color: var(--text);
  line-height: 1.6;
}

a { color: inherit; text-decoration: none; }

/* ── Top bar ───────────────────────────────────────── */
.top-bar {
  background: var(--accent);
  color: #fff;
  font-size: 0.78rem;
  padding: 0.3rem 0;
}
.top-bar-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.top-bar-tagline { opacity: 0.9; font-weight: 500; letter-spacing: 0.02em; }
.top-bar-links { display: flex; gap: 1.25rem; }
.top-bar-links a { color: #fff; opacity: 0.85; }
.top-bar-links a:hover { opacity: 1; }

/* ── Header / Nav ──────────────────────────────────── */
.site-header {
  background: var(--nav-bg);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 10px rgba(0,0,0,0.35);
}
.header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}
.brand-link {
  font-size: 1.6rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.03em;
}
.brand-link .brand-dot { color: var(--accent); }
.site-nav { display: flex; }
.nav-link {
  color: rgba(255,255,255,0.75);
  padding: 0.45rem 1rem;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  transition: background 140ms, color 140ms;
}
.nav-link:hover { background: rgba(255,255,255,0.1); color: #fff; }
.nav-link.active { color: #fff; background: rgba(255,255,255,0.08); }

/* ── Page wrapper ──────────────────────────────────── */
.site-main {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.25rem 3rem;
}

/* ── Hero section ──────────────────────────────────── */
.hero-section { padding: 1.5rem 0 0; }
.articles-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

/* Featured card */
.featured-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  transition: transform 160ms ease, box-shadow 160ms ease;
}
.featured-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.13);
}
.featured-bg {
  width: 100%;
  height: 180px;
  background: linear-gradient(135deg, #0f1f33 0%, #1a3553 50%, #0f1f33 100%);
}
.featured-img-wrap { overflow: hidden; }
.featured-img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
  transition: transform 300ms ease;
}
.featured-card:hover .featured-img { transform: scale(1.04); }
.featured-body { padding: 1.25rem; }
.featured-title {
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1.25;
  color: var(--text);
  margin: 0.5rem 0 0.6rem;
}
.featured-title a { color: var(--text); }
.featured-title a:hover { color: var(--accent); }
.featured-summary {
  color: var(--muted);
  font-size: 0.9rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 0.6rem;
}
.featured-meta { color: var(--muted); font-size: 0.82rem; }

/* Secondary cards */
.hero-secondary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  align-items: start;
}
.secondary-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  overflow: hidden;
  flex: 1;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  transition: transform 160ms ease, box-shadow 160ms ease;
}
.secondary-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.13);
}
.secondary-bg-1 {
  width: 100%;
  height: 140px;
  background: linear-gradient(135deg, #0d2645 0%, #071828 100%);
}
.secondary-bg-2 {
  width: 100%;
  height: 140px;
  background: linear-gradient(135deg, #0a3040 0%, #051c28 100%);
}
.secondary-img-wrap { overflow: hidden; }
.secondary-img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  display: block;
  transition: transform 300ms ease;
}
.secondary-card:hover .secondary-img { transform: scale(1.04); }
.secondary-body { padding: 1.1rem; }
.secondary-title {
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text);
  margin: 0.3rem 0 0.35rem;
}
.secondary-title a { color: var(--text); }
.secondary-title a:hover { color: var(--accent); }
.secondary-meta { color: var(--muted); font-size: 0.78rem; }

/* ── Tag badges ────────────────────────────────────── */
.tag {
  display: inline-block;
  padding: 0.18rem 0.55rem;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: rgba(14, 116, 144, 0.08);
  color: #0e7490;
  border: 1px solid rgba(14, 116, 144, 0.2);
}
.post-tags { margin: 0.35rem 0 0.25rem; }
.post-tags .tag + .tag { margin-left: 0.25rem; }

/* ── Content area + sidebar ────────────────────────── */
.content-wrapper {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 2rem;
  margin-top: 2rem;
}

/* Section header */
.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  padding-bottom: 0.6rem;
  border-bottom: 3px solid var(--accent);
}
.section-title {
  font-size: 1.1rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text);
}
.view-all-link {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  color: #fff;
  background: var(--accent);
  text-decoration: none;
  letter-spacing: 0.04em;
  white-space: nowrap;
  padding: 0.3rem 0.85rem;
  border-radius: 999px;
  transition: background 150ms ease, transform 150ms ease;
}
.view-all-link:hover {
  background: #0a5f75;
  transform: translateY(-1px);
  text-decoration: none;
}

/* More articles overflow section */
.more-articles { margin-top: 2rem; }

/* Post grid */
.post-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}
.post-grid-empty {
  color: var(--muted);
  font-size: 0.95rem;
  grid-column: 1 / -1;
}

/* Post card */
.post-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  transition: transform 160ms ease, box-shadow 160ms ease;
}
.post-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.13);
}
.post-card-img-wrap { overflow: hidden; }
.post-card-img {
  width: 100%;
  height: 175px;
  object-fit: cover;
  display: block;
  transition: transform 300ms ease;
}
.post-card:hover .post-card-img { transform: scale(1.04); }
.post-card-placeholder {
  width: 100%;
  height: 175px;
  background: linear-gradient(135deg, #d0eaf2 0%, #a8d6e8 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.post-card-body { padding: 1rem; }
.post-card-tags { margin-bottom: 0.45rem; }
.post-card-title {
  font-size: 0.975rem;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 0.4rem;
}
.post-card-title a { color: var(--text); }
.post-card-title a:hover { color: var(--accent); }
.post-card-summary {
  font-size: 0.845rem;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 0.5rem;
}
.post-card-meta { font-size: 0.78rem; color: var(--muted); }

/* ── Benchmark Spotlight (home page) ───────────────── */
.bmark-spot-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}
.bmark-spot-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  box-shadow: 0 1px 3px rgba(0,0,0,0.07);
  transition: box-shadow 0.2s, transform 0.2s;
}
.bmark-spot-card:hover { box-shadow: 0 6px 20px rgba(0,0,0,0.12); transform: translateY(-2px); }
/* Chart image fills the top of the card */
.bmark-spot-chart {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
}
/* Gradient fallback when no chart image is available */
.bmark-spot-fallback {
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 800;
  color: rgba(255,255,255,0.55);
  letter-spacing: 0.03em;
  text-align: center;
  padding: 1rem;
}
/* Inline SVG bar chart */
.bmark-spot-svg {
  width: 100%;
  display: block;
  border-bottom: 1px solid var(--border);
}
/* Bottom text section */
.bmark-spot-body {
  padding: 1rem 1.125rem 1.125rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  flex: 1;
}
.bmark-spot-head { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.bmark-spot-name { font-size: 0.95rem; font-weight: 700; margin: 0; }
.bmark-spot-name a { color: var(--text); text-decoration: none; }
.bmark-spot-name a:hover { color: var(--accent); }
.bmark-spot-link {
  display: inline-flex;
  align-items: center;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  margin-top: auto;
  text-decoration: none;
}
.bmark-spot-link:hover { text-decoration: underline; }

/* ── Sidebar ───────────────────────────────────────── */
.sidebar-widget {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1.25rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.widget-title {
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text);
  margin-bottom: 0.85rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--accent);
}
.topic-links { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.topic-tag {
  display: inline-block;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  background: var(--accent-dim);
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 600;
  transition: background 140ms, color 140ms;
}
.topic-tag:hover { background: var(--accent); color: #fff; }
.resource-links { list-style: none; }
.resource-links li { padding: 0.5rem 0; border-bottom: 1px solid var(--border); }
.resource-links li:last-child { border-bottom: none; padding-bottom: 0; }
.resource-links a { font-size: 0.875rem; font-weight: 500; color: var(--text); }
.resource-links a:hover { color: var(--accent); }

/* ── Footer ────────────────────────────────────────── */
.site-footer { background: var(--nav-bg); color: rgba(255,255,255,0.65); }
.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 2rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.25rem;
}
.footer-brand .brand-link { font-size: 1.2rem; font-weight: 800; color: #fff; }
.footer-brand p { margin: 0.2rem 0 0; font-size: 0.85rem; }
.footer-nav { display: flex; gap: 1.5rem; }
.footer-nav a { color: rgba(255,255,255,0.65); font-size: 0.875rem; }
.footer-nav a:hover { color: #fff; }

/* ── Post reading page ─────────────────────────────── */
.post-page-wrapper {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 2rem;
  padding: 2rem 0;
}
.post-article {
  background: var(--card-bg);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}
.post-hero-img {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  display: block;
}
.post-body-inner { padding: 2rem 2.25rem; }
.post-header {
  margin-bottom: 1.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
}
.post-header h1 {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.22;
  margin-bottom: 0.75rem;
}
.post-header-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--muted);
  font-size: 0.875rem;
  flex-wrap: wrap;
}
.post-date { color: var(--muted); font-size: 0.875rem; }
.post-body { line-height: 1.8; }
.post-body h2 { font-size: 1.5rem; font-weight: 700; margin: 2rem 0 0.75rem; }
.post-body h3 { font-size: 1.2rem; font-weight: 700; margin: 1.75rem 0 0.6rem; }
.post-body h4 { font-size: 1rem; font-weight: 700; margin: 1.5rem 0 0.5rem; }
.post-body p { margin: 1rem 0; }
.post-body ul, .post-body ol { margin: 1rem 0; padding-left: 1.5rem; }
.post-body li { margin: 0.3rem 0; }
.post-body img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 1.5rem auto;
  border-radius: 8px;
}
.post-body a { color: var(--accent); }
.post-body a:hover { text-decoration: underline; }
.post-body blockquote {
  border-left: 4px solid var(--accent);
  padding: 0.75rem 1.25rem;
  margin: 1.5rem 0;
  background: var(--accent-dim);
  border-radius: 0 8px 8px 0;
}
.post-body pre {
  background: #0f1f33;
  color: #e2eef5;
  padding: 1.25rem;
  border-radius: 10px;
  overflow-x: auto;
  margin: 1.5rem 0;
  font-size: 0.875em;
}
.post-body code {
  background: #e6f0f5;
  color: var(--text);
  padding: 0.18rem 0.4rem;
  border-radius: 4px;
  font-size: 0.875em;
}
.post-body pre code { background: none; color: inherit; padding: 0; }
.post-footer { margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--border); }
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 500;
}
.back-link:hover { color: var(--accent); }

/* ── Benchmarks / data pages ───────────────────────── */
.page-hero { padding: 2.5rem 0 1.5rem; }
.page-hero h2 { font-size: 2rem; font-weight: 800; margin-bottom: 0.5rem; }
.page-hero p { color: var(--muted); }
.insight-meta { color: var(--muted); font-size: 0.875rem; margin-top: 0.3rem; }
.source-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  margin-bottom: 1.25rem;
}
.source-card h2 { font-size: 1.05rem; font-weight: 700; margin-bottom: 0.85rem; }
.source-status-list { list-style: none; display: grid; gap: 0.45rem; }
.source-status {
  display: inline-block;
  margin-left: 0.4rem;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
}
.source-status.online { color: #16a34a; }
.source-status.offline { color: #dc2626; }
.insights-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.25rem; margin-top: 1.25rem; }
.insight-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.insight-card h2 { font-size: 1.05rem; font-weight: 700; margin-bottom: 0.2rem; }
.popular-list { list-style: none; margin: 1rem 0 0; }
.popular-item { padding: 0.75rem 0; border-bottom: 1px solid var(--border); }
.popular-item:last-child { border-bottom: none; }
.popular-item.empty { color: var(--muted); }
.popular-item-header { display: flex; justify-content: space-between; align-items: baseline; gap: 0.75rem; }
.popular-item-header h3 { margin: 0; font-size: 0.9rem; font-weight: 600; }
.mention-count { font-size: 0.78rem; color: var(--muted); white-space: nowrap; }
.popular-sources { margin: 0.2rem 0 0; font-size: 0.8rem; color: var(--muted); }
.popular-sources a { color: var(--accent); }

/* ── Benchmark Card Catalog ────────────────────────── */
.bmark-catalog { margin-top: 2rem; }
.bmark-section-title { font-size: 1.4rem; font-weight: 800; margin-bottom: 0.5rem; }
.bmark-section-desc { color: var(--muted); font-size: 0.9rem; margin-bottom: 2rem; }
.bmark-category-section { margin-bottom: 3rem; }
.bmark-category-heading {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--border);
  color: var(--muted);
}
.bmark-cat-heading-purple { border-color: #7c3aed; color: #7c3aed; }
.bmark-cat-heading-blue   { border-color: #2563eb; color: #2563eb; }
.bmark-cat-heading-teal   { border-color: #0891b2; color: #0891b2; }
.bmark-cat-heading-amber  { border-color: #d97706; color: #d97706; }
.bmark-cat-heading-orange { border-color: #ea580c; color: #ea580c; }
.bmark-cat-heading-green  { border-color: #16a34a; color: #16a34a; }
.bmark-cat-heading-red    { border-color: #dc2626; color: #dc2626; }
.bmark-cat-heading-indigo { border-color: #4f46e5; color: #4f46e5; }
.bmark-cat-heading-rose   { border-color: #db2777; color: #db2777; }
.bmark-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.25rem;
}
.bmark-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.07);
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  border: 1px solid transparent;
  transition: border-color 150ms, box-shadow 150ms;
}
.bmark-card:hover { border-color: var(--border); box-shadow: 0 4px 14px rgba(0,0,0,0.1); }
.bmark-card-head { display: flex; flex-direction: column; gap: 0.4rem; }
.bmark-cat-pill {
  display: inline-block;
  padding: 0.18rem 0.6rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  width: fit-content;
}
.bmark-cat-purple { background: #f3f0ff; color: #7c3aed; }
.bmark-cat-blue   { background: #eff6ff; color: #2563eb; }
.bmark-cat-teal   { background: #ecfeff; color: #0891b2; }
.bmark-cat-amber  { background: #fffbeb; color: #d97706; }
.bmark-cat-orange { background: #fff7ed; color: #ea580c; }
.bmark-cat-green  { background: #f0fdf4; color: #16a34a; }
.bmark-cat-red    { background: #fef2f2; color: #dc2626; }
.bmark-cat-indigo { background: #eef2ff; color: #4f46e5; }
.bmark-cat-rose   { background: #fff1f2; color: #db2777; }
.bmark-name { font-size: 1.05rem; font-weight: 700; margin: 0; }
.bmark-name a { color: var(--text); }
.bmark-name a:hover { color: var(--accent); }
.bmark-desc { font-size: 0.875rem; color: var(--muted); line-height: 1.7; flex: 1; }
.bmark-embed-wrap {
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--body-bg);
}
.bmark-embed-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  min-height: 200px;
  padding: 1.5rem;
  text-align: center;
}
.bmark-embed-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 1.25rem;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 140ms;
}
.bmark-embed-btn:hover { opacity: 0.85; }
.bmark-embed-hint { font-size: 0.73rem; color: var(--muted); }
.bmark-embed-hint a { color: var(--accent); }
.bmark-embed-iframe { width: 100%; height: 440px; border: none; display: block; }
.bmark-live-wrap { }
.bmark-live-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  transition: border-color 150ms, color 150ms;
}
.bmark-live-btn:hover { border-color: var(--accent); color: var(--accent); }
.bmark-tags { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: auto; }
.bmark-tag {
  font-size: 0.68rem;
  padding: 0.18rem 0.5rem;
  background: var(--body-bg);
  border-radius: 999px;
  color: var(--muted);
  font-weight: 500;
}
/* Live signals collapsible */
.live-signals-details {
  margin-top: 2.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.live-signals-summary {
  padding: 1rem 1.5rem;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  list-style: none;
  background: var(--card-bg);
  user-select: none;
}
.live-signals-summary::-webkit-details-marker { display: none; }
.live-signals-summary::before { content: '\25B6\00A0'; font-size: 0.65em; vertical-align: middle; }
details[open] .live-signals-summary::before { content: '\25BC\00A0'; }
.live-signals-inner { padding: 1.5rem; background: var(--body-bg); }
.live-signals-inner h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 0.85rem; }

/* ── 404 page ──────────────────────────────────────── */
.not-found-section { padding: 5rem 0; text-align: center; }
.not-found-section h1 {
  font-size: 6rem;
  font-weight: 900;
  color: var(--accent);
  opacity: 0.3;
  line-height: 1;
  margin-bottom: 0.5rem;
}
.not-found-section h2 { font-size: 1.5rem; margin-bottom: 0.75rem; }
.not-found-section p { color: var(--muted); margin-bottom: 1.5rem; }
.btn-primary {
  display: inline-block;
  padding: 0.65rem 1.5rem;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  font-size: 0.925rem;
  transition: opacity 140ms;
}
.btn-primary:hover { opacity: 0.85; }

/* ── R&D Research Papers page ──────────────────────── */
.rd-rating-key {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 1rem 1.5rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.07);
  margin-bottom: 2rem;
}
.rd-rating-key-inner { display: flex; flex-direction: column; gap: 0.45rem; }
.rd-key-item { font-size: 0.82rem; color: var(--muted); display: flex; align-items: center; gap: 0.5rem; }
.rd-key-dot {
  display: inline-block;
  width: 10px; height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.rd-key-industry  { background: #2563eb; }
.rd-key-citations { background: #7c3aed; }
.rd-key-utility   { background: #ea580c; }
.rd-key-rigour    { background: #0891b2; }

.rd-paper-list { list-style: none; display: flex; flex-direction: column; gap: 1.5rem; margin-top: 0; padding: 0; }

/* ── R&D dual-column layout ───────────────────────── */
.rd-dual-col { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; align-items: start; }
.rd-col-heading {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.25rem;
  padding-bottom: 0.6rem;
  border-bottom: 2px solid var(--accent);
}
@media (max-width: 900px) { .rd-dual-col { grid-template-columns: 1fr; } }
.rd-paper-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.07);
  display: flex;
  gap: 1.5rem;
  border: 1px solid transparent;
  transition: border-color 150ms, box-shadow 150ms;
}
.rd-paper-card:hover { border-color: var(--border); box-shadow: 0 4px 16px rgba(0,0,0,0.1); }
.rd-paper-rank {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--accent);
  opacity: 0.25;
  min-width: 2.5rem;
  padding-top: 0.15rem;
  line-height: 1;
  flex-shrink: 0;
}
.rd-paper-body { display: flex; flex-direction: column; gap: 1rem; flex: 1; min-width: 0; }
.rd-paper-meta-row { display: flex; align-items: flex-start; gap: 1rem; }
.rd-score-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 3.2rem;
  padding: 0.3rem 0.6rem;
  background: var(--accent);
  color: #fff;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}
.rd-paper-info { flex: 1; min-width: 0; }
.rd-paper-title { font-size: 1.1rem; font-weight: 700; margin: 0 0 0.3rem; line-height: 1.4; }
.rd-paper-title a { color: var(--text); }
.rd-paper-title a:hover { color: var(--accent); }
.rd-paper-byline { font-size: 0.8rem; color: var(--muted); margin: 0; }
.rd-paper-byline a { color: var(--accent); }
.rd-paper-tags { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.rd-paper-summary { display: flex; flex-direction: column; gap: 0.75rem; }
.rd-paper-summary p { font-size: 0.9rem; color: var(--muted); line-height: 1.75; margin: 0; }
.rd-so-what {
  background: var(--accent-dim);
  border-left: 3px solid var(--accent);
  border-radius: 0 8px 8px 0;
  padding: 0.75rem 1rem;
  font-size: 0.875rem !important;
  color: var(--text) !important;
}
.rd-ratings { display: flex; flex-direction: column; gap: 0.5rem; margin-top: 0.25rem; }
.rd-rating-row { display: flex; align-items: center; gap: 0.75rem; }
.rd-rating-label { font-size: 0.75rem; color: var(--muted); width: 9rem; flex-shrink: 0; }
.rd-rating-bar-track {
  flex: 1;
  height: 6px;
  background: var(--border);
  border-radius: 99px;
  overflow: hidden;
}
.rd-rating-bar {
  height: 100%;
  border-radius: 99px;
  transition: width 0.4s ease;
}
.rd-bar-industry  { background: #2563eb; }
.rd-bar-citations { background: #7c3aed; }
.rd-bar-utility   { background: #ea580c; }
.rd-bar-rigour    { background: #0891b2; }
.rd-rating-num { font-size: 0.78rem; font-weight: 700; color: var(--text); width: 1rem; text-align: right; }

@media (max-width: 640px) {
  .rd-paper-card { flex-direction: column; gap: 0.75rem; padding: 1.25rem; }
  .rd-paper-rank { font-size: 1.1rem; min-width: unset; }
  .rd-paper-meta-row { flex-direction: column; gap: 0.5rem; }
  .rd-rating-label { width: 7rem; }
}

/* ── About page ────────────────────────────────────── */
.about-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 2.25rem;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}
.about-card h2 { font-size: 1.2rem; font-weight: 700; margin: 1.5rem 0 0.5rem; }
.about-card p { color: var(--muted); margin: 0.5rem 0; line-height: 1.75; }
.about-card ul { padding-left: 1.25rem; margin: 0.5rem 0; }
.about-card li { margin: 0.3rem 0; font-size: 0.9rem; color: var(--muted); }
.about-card code { background: #e6f0f5; border-radius: 4px; padding: 0.15rem 0.35rem; font-size: 0.875em; }

/* ── Responsive ────────────────────────────────────── */
@media (max-width: 1024px) {
  .articles-grid { grid-template-columns: 1fr 1fr; }
  .content-wrapper { grid-template-columns: 1fr 260px; }
  .post-page-wrapper { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .top-bar-tagline { display: none; }
  .articles-grid { grid-template-columns: 1fr; }
  .hero-secondary { grid-template-columns: 1fr 1fr; }
  .content-wrapper { grid-template-columns: 1fr; }
  .bmark-spot-grid { grid-template-columns: repeat(2, 1fr); }
  .post-grid { grid-template-columns: 1fr; }
  .insights-grid { grid-template-columns: 1fr; }
  .post-body-inner { padding: 1.5rem; }
  .footer-inner { flex-direction: column; align-items: flex-start; gap: 1rem; }
  .bmark-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .hero-secondary { grid-template-columns: 1fr; }
  .featured-title { font-size: 1.3rem; }
  .featured-img, .featured-bg { height: 195px; }
  .bmark-spot-grid { grid-template-columns: 1fr; }
  .brand-link { font-size: 1.3rem; }
}

