/* Article-page layout — shared across all /news/ articles */

main.article-main {
  max-width: 1240px;
  margin: 0 auto;
  padding: 1.5rem 1.2rem 3rem;
  display: block;
  align-items: initial;
  justify-content: initial;
  text-align: left;
}

/* Breadcrumb */
.breadcrumb {
  font-size: 0.82rem;
  color: var(--text-dim);
  margin-bottom: 1.2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}
.breadcrumb a {
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.15s ease;
}
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb .sep { opacity: 0.4; }

/* Two-column layout: article + sidebar */
.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 2rem;
}
@media (max-width: 960px) {
  .article-layout { grid-template-columns: 1fr; }
}

/* Hero — force block layout to override style.css bare `header { display: flex }` rule */
.article-hero {
  display: block;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  padding: 2rem 2.2rem;
  margin-bottom: 1.4rem;
  flex-direction: initial;
  justify-content: initial;
  align-items: initial;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: none;
  border-bottom-width: 1px;
}
.article-hero .eyebrow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.9rem;
  font-size: 0.75rem;
}
.article-hero .kicker {
  color: var(--primary);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.article-hero .pill {
  background: rgba(255, 107, 0, 0.1);
  border: 1px solid rgba(255, 107, 0, 0.25);
  color: #ffb380;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-weight: 600;
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.article-hero .pill.blue { background: rgba(45,110,239,0.12); border-color: rgba(45,110,239,0.32); color: #93c5fd; }
.article-hero h1 {
  font-size: 2.1rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.015em;
  margin-bottom: 0.9rem;
}
.article-hero .standfirst {
  font-size: 1.05rem;
  line-height: 1.55;
  color: var(--text-dim);
  margin-bottom: 1.4rem;
}
@media (max-width: 640px) {
  .article-hero { padding: 1.4rem; }
  .article-hero h1 { font-size: 1.55rem; }
  .article-hero .standfirst { font-size: 0.95rem; }
}

/* Byline row */
.byline-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.9rem;
  padding-top: 1.2rem;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.byline-row .avatar {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), #ff9554);
  color: #fff; font-weight: 700; font-size: 1rem;
  display: flex; align-items: center; justify-content: center;
}
.byline-row .meta { display: flex; flex-direction: column; gap: 0.15rem; }
.byline-row .meta a {
  color: var(--text-main);
  font-weight: 700;
  text-decoration: none;
  transition: color 0.15s ease;
}
.byline-row .meta a:hover { color: var(--primary); }
.byline-row .meta .sub {
  color: var(--text-dim);
  font-size: 0.8rem;
}
.byline-row .badge {
  font-size: 0.7rem;
  color: #fcd34d;
  font-weight: 600;
}
.byline-row .spacer { flex: 1; }

/* Vote buttons */
.vote-widget {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  padding: 0.35rem 0.5rem;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
}
.vote-widget button {
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  padding: 0.15rem 0.3rem;
  border-radius: 4px;
  font-size: 1rem;
  line-height: 1;
  transition: color 0.15s ease, background 0.15s ease;
}
.vote-widget button:hover { background: rgba(255,255,255,0.06); }
.vote-widget button.up.active   { color: #ff8a3d; }
.vote-widget button.down.active { color: #60a5fa; }
.vote-widget .score {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-main);
  min-width: 2ch;
  text-align: center;
}
.vote-widget .score.pos { color: #ff8a3d; }
.vote-widget .score.neg { color: #60a5fa; }

/* Top CTA banner */
.cta-banner {
  background:
    linear-gradient(135deg, rgba(255,107,0,0.12), rgba(45,110,239,0.10));
  border: 1px solid rgba(255,107,0,0.3);
  border-radius: 14px;
  padding: 1.1rem 1.4rem;
  display: flex;
  align-items: center;
  gap: 1.2rem;
  margin-bottom: 1.4rem;
}
.cta-banner .copy .cta-h,
.cta-banner .copy h4,
.cta-banner .copy .cta-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
  opacity: 1;
}
.cta-banner .copy .cta-title strong { font-weight: 700; color: inherit; }
.cta-banner .copy p {
  color: var(--text-dim);
  font-size: 0.85rem;
  line-height: 1.4;
}
.cta-banner .actions {
  margin-left: auto;
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
}
.cta-banner .btn {
  padding: 0.55rem 1rem;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.15s ease;
}
.cta-banner .btn.primary {
  background: var(--primary);
  color: #fff;
}
.cta-banner .btn.primary:hover { background: #ff8a3d; }
.cta-banner .btn.ghost {
  background: rgba(255,255,255,0.04);
  color: var(--text-main);
  border: 1px solid rgba(255,255,255,0.1);
}
.cta-banner .btn.ghost:hover { background: rgba(255,255,255,0.08); }
@media (max-width: 640px) {
  .cta-banner { flex-direction: column; align-items: flex-start; }
  .cta-banner .actions { margin-left: 0; }
}

/* Article body */
.article-body {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  border-top: 1px solid rgba(255,255,255,0.18);
  border-radius: 16px;
  padding: 2rem 2.2rem;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-main);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 8px 32px rgba(0,0,0,0.3);
}
.article-body h2 {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin-top: 2.2rem;
  margin-bottom: 0.8rem;
  line-height: 1.25;
}
.article-body h2:first-child { margin-top: 0; }
.article-body h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-top: 1.6rem;
  margin-bottom: 0.5rem;
}
.article-body p { margin-bottom: 1rem; color: var(--text-main); opacity: 0.92; }
.article-body ul, .article-body ol {
  margin: 0.6rem 0 1.2rem 1.4rem;
}
.article-body li { margin-bottom: 0.5rem; line-height: 1.6; opacity: 0.92; }
.article-body strong { color: var(--text-main); font-weight: 700; }
.article-body em { color: var(--text-main); opacity: 0.85; }
.article-body a { color: var(--primary); text-decoration: none; border-bottom: 1px solid rgba(255,107,0,0.3); }
.article-body a:hover { border-bottom-color: var(--primary); }
.article-body code {
  background: rgba(255,255,255,0.06);
  padding: 0.12rem 0.4rem;
  border-radius: 4px;
  font-family: ui-monospace, 'SF Mono', Monaco, monospace;
  font-size: 0.9em;
}
.article-body pre {
  background: rgba(0,0,0,0.35);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  padding: 1rem 1.2rem;
  overflow-x: auto;
  margin: 1rem 0 1.4rem;
  font-size: 0.85rem;
}
.article-body pre code { background: transparent; padding: 0; }

/* Tables — scrollable on mobile */
.article-body table {
  border-collapse: collapse;
  width: 100%;
  margin: 1rem 0 1.5rem;
  font-size: 0.92rem;
}
.article-body th, .article-body td {
  padding: 0.55rem 0.8rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  text-align: left;
  vertical-align: top;
}
.article-body th {
  font-weight: 700;
  color: var(--primary);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Callout blocks */
.callout {
  border-radius: 10px;
  padding: 1rem 1.2rem;
  margin: 1.2rem 0;
  border-left: 3px solid;
  font-size: 0.94rem;
}
.callout.pro-tip   { background: rgba(255,107,0,0.08); border-color: var(--primary); }
.callout.warning   { background: rgba(250,204,21,0.08); border-color: #facc15; }
.callout.good      { background: rgba(74,222,128,0.08); border-color: #4ade80; }
.callout.bad       { background: rgba(239,68,68,0.08); border-color: #ef4444; }
.callout.builder-says {
  background: rgba(45,110,239,0.08);
  border-color: #2D6EEF;
  padding-top: 0.9rem;
}
.callout .lbl {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.35rem;
  opacity: 0.85;
}
.callout.pro-tip .lbl   { color: #ff8a3d; }
.callout.warning .lbl   { color: #fde047; }
.callout.good .lbl      { color: #86efac; }
.callout.bad .lbl       { color: #fca5a5; }
.callout.builder-says .lbl { color: #93c5fd; }
.callout p:last-child { margin-bottom: 0; }
.callout cite {
  display: block;
  margin-top: 0.6rem;
  font-style: normal;
  font-size: 0.8rem;
  color: var(--text-dim);
}

/* Mid-body CTA */
.cta-mid {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  padding: 1.4rem 1.6rem;
  margin: 2rem 0;
  text-align: center;
}
.cta-mid h3,
.cta-mid h4,
.cta-mid .cta-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  opacity: 1;
}
.cta-mid .cta-title strong { font-weight: 700; color: inherit; }
.cta-mid p {
  color: var(--text-dim);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}
.cta-mid .btn {
  display: inline-block;
  padding: 0.65rem 1.4rem;
  border-radius: 8px;
  background: var(--primary);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  font-size: 0.9rem;
}
.cta-mid .btn:hover { background: #ff8a3d; }

/* FAQ accordion */
.faq-block {
  margin: 2rem 0;
}
.faq-block h2 {
  font-size: 1.35rem;
  font-weight: 800;
  margin-bottom: 1rem;
}
.faq-item {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  margin-bottom: 0.55rem;
  overflow: hidden;
}
.faq-item[open] { border-color: rgba(255,107,0,0.3); }
.faq-item summary {
  padding: 0.9rem 1.1rem;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-weight: 600;
  font-size: 0.95rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+';
  color: var(--text-dim);
  font-size: 1.3rem;
  font-weight: 300;
  flex-shrink: 0;
}
.faq-item[open] summary::after { content: '−'; color: var(--primary); }
.faq-item .body {
  padding: 0 1.1rem 1rem;
  color: var(--text-dim);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* Bottom CTA */
.cta-bottom {
  background:
    linear-gradient(135deg, rgba(255,107,0,0.15), rgba(45,110,239,0.12));
  border: 1px solid rgba(255,107,0,0.35);
  border-radius: 16px;
  padding: 2rem;
  margin: 2.4rem 0 1.4rem;
  text-align: center;
}
.cta-bottom h3 {
  font-size: 1.3rem;
  font-weight: 800;
  margin-bottom: 0.6rem;
}
.cta-bottom p {
  color: var(--text-dim);
  margin-bottom: 1.2rem;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}
.cta-bottom .actions { display: flex; gap: 0.6rem; justify-content: center; flex-wrap: wrap; }
.cta-bottom .btn {
  padding: 0.7rem 1.3rem;
  border-radius: 9px;
  font-weight: 600;
  text-decoration: none;
  font-size: 0.92rem;
  transition: all 0.15s ease;
}
.cta-bottom .btn.primary { background: var(--primary); color: #fff; }
.cta-bottom .btn.primary:hover { background: #ff8a3d; }
.cta-bottom .btn.ghost {
  background: rgba(255,255,255,0.04);
  color: var(--text-main);
  border: 1px solid rgba(255,255,255,0.15);
}
.cta-bottom .btn.ghost:hover { background: rgba(255,255,255,0.08); }

/* Sidebar */
.article-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-self: start;
  position: sticky;
  top: 1.2rem;
}
.sidebar-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-top: 1px solid rgba(255,255,255,0.16);
  border-radius: 16px;
  padding: 1.1rem 1.2rem;
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.07), 0 4px 20px rgba(0,0,0,0.25);
}
.sidebar-card h5,
.sidebar-card .card-title {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
  color: var(--text-dim);
  margin-bottom: 0.8rem;
  opacity: 1;
}
.sidebar-card .card-title strong { font-weight: 700; color: inherit; }
.sidebar-card .checklist li {
  list-style: none;
  padding-left: 1.4rem;
  position: relative;
  font-size: 0.88rem;
  margin-bottom: 0.5rem;
  line-height: 1.45;
}
.sidebar-card .checklist li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: #4ade80;
  font-weight: 700;
}
.sidebar-card.figures .num {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.02em;
  display: block;
  margin-bottom: 0.15rem;
}
.sidebar-card.figures .num + .lbl {
  font-size: 0.82rem;
  color: var(--text-dim);
  margin-bottom: 1rem;
  display: block;
}
.sidebar-card.figures .num:last-of-type + .lbl { margin-bottom: 0; }

.sidebar-card .more-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  font-size: 0.88rem;
  color: var(--text-main);
  text-decoration: none;
  transition: color 0.15s ease;
}
.sidebar-card .more-link:last-child { border-bottom: 0; }
.sidebar-card .more-link:hover { color: var(--primary); }
.sidebar-card .more-link::before {
  content: '→';
  color: var(--primary);
  flex-shrink: 0;
}

/* Back to news link */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.88rem;
  margin-top: 1.2rem;
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  transition: all 0.15s ease;
}
.back-link:hover {
  color: var(--primary);
  background: rgba(255,107,0,0.08);
}

/* ── Mobile fixes (≤640px) ── */
@media (max-width: 640px) {
  main.article-main {
    padding: 0.75rem 0.75rem 2rem;
  }

  .article-hero {
    padding: 1rem;
    border-radius: 12px;
  }
  .article-hero h1 {
    font-size: 1.25rem;
    letter-spacing: -0.01em;
  }
  .article-hero .standfirst {
    font-size: 0.9rem;
  }

  .article-body {
    padding: 1.2rem 1rem;
    border-radius: 12px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .article-body * {
    min-width: 0;
    max-width: 100%;
    word-break: break-word;
    overflow-wrap: anywhere;
  }
  .article-body h2 {
    font-size: 1.2rem;
  }
  .article-body ul,
  .article-body ol {
    margin-left: 1rem;
  }

  /* Tables: natural width inside scrollable article-body (Vahanbazaar pattern) */
  .article-body table {
    min-width: 480px;
    width: max-content;
    max-width: none;
    font-size: 0.8rem;
  }
  .article-body th,
  .article-body td {
    padding: 0.4rem 0.6rem;
  }

  .cta-banner {
    flex-direction: column;
    align-items: flex-start;
    padding: 0.9rem 1rem;
    border-radius: 10px;
  }
  .cta-banner .actions {
    margin-left: 0;
    flex-wrap: wrap;
    width: 100%;
  }
  .cta-banner .btn {
    flex: 1;
    text-align: center;
    white-space: normal;
  }

  .cta-mid {
    padding: 1rem;
    border-radius: 10px;
  }

  .cta-bottom {
    padding: 1.2rem 1rem;
    border-radius: 12px;
  }

  .sidebar-card {
    border-radius: 12px;
  }
}
