/* ==========================================================
   article.css — Blog article styles (all article types)
   ========================================================== */

/* ---- Base overrides for article pages ---- */
body.article-page { line-height: 1.7; }
body.article-page a { color: #8ab4ff; }

main { padding: 42px 0 64px; }

/* ---- Article card ---- */
.article-card {
  border: 1px solid var(--border);
  background: rgba(255,255,255,.03);
  border-radius: var(--radius2);
  padding: 22px;
  overflow: hidden;
}

.article-card h1 {
  margin: 0 0 10px;
  font-size: clamp(26px, 3vw, 40px);
  letter-spacing: -0.03em;
  line-height: 1.12;
}
.article-meta {
  color: var(--muted2);
  font-size: 13px;
  margin-bottom: 16px;
}
.article-lede {
  color: var(--muted);
  margin: 0 0 18px;
}
.article-card hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 18px 0;
}
.article-card h2 {
  margin: 26px 0 10px;
  font-size: 20px;
  letter-spacing: -0.01em;
}
.article-card h3 {
  margin: 18px 0 8px;
  font-size: 16px;
}
.article-card p {
  margin: 10px 0;
  color: var(--text);
}
.article-card ul {
  margin: 10px 0 10px 18px;
  color: var(--muted);
}

/* ---- Callout box ---- */
.callout {
  border: 1px solid var(--border);
  background: rgba(255,255,255,.02);
  border-radius: 16px;
  padding: 14px;
  margin: 16px 0;
  color: var(--muted);
}
.callout strong {
  color: rgba(255,255,255,.9);
}

/* ---- All images inside articles ---- */
.article-card img {
  max-width: 100% !important;
  width: auto;
  height: auto;
  border-radius: 12px;
  border: 1px solid var(--border);
  display: block;
  margin: 18px 0;
  box-sizing: border-box;
}
.article-card p > img {
  max-width: 100% !important;
}

/* ---- Masthead image (must override .article-card img) ---- */
.article-card img.masthead-img {
  max-height: 400px;
  object-fit: cover;
  border-radius: var(--radius2) var(--radius2) 0 0;
  margin: -22px -22px 22px -22px;
  width: calc(100% + 44px) !important;
  max-width: none !important;
  border: 0;
}

/* ---- Optional wrapper for captioned images ---- */
.article-img {
  margin: 18px 0;
  text-align: center;
}
.article-img figcaption {
  margin-top: 8px;
  font-size: 12px;
  color: var(--muted2);
}

/* ---- Rank cards (competitor comparison) ---- */
.rank {
  border: 1px solid var(--border);
  background: rgba(255,255,255,.02);
  border-radius: 18px;
  padding: 16px;
  margin: 18px 0;
  overflow: hidden;
}

/* ---- Tables (auto-styled inside articles) ---- */
.article-card table {
  width: 100%;
  border-collapse: collapse;
  margin: 18px 0;
  font-size: 13px;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}
.article-card th,
.article-card td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.article-card th {
  background: rgba(255,255,255,.04);
  color: var(--muted2);
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .05em;
  white-space: nowrap;
}
.article-card td {
  color: var(--muted);
}
.article-card tbody tr:last-child td {
  border-bottom: 0;
}
.article-card tbody tr:hover {
  background: rgba(255,255,255,.02);
}

/* ---- Listicle items ---- */
.listicle-item {
  border: 1px solid var(--border);
  background: rgba(255,255,255,.02);
  border-radius: 18px;
  padding: 16px 16px 16px 52px;
  margin: 18px 0;
  position: relative;
  counter-increment: listicle;
}
.listicle-item::before {
  content: counter(listicle);
  position: absolute;
  left: 16px;
  top: 16px;
  width: 28px;
  height: 28px;
  border-radius: 10px;
  background: rgba(124,92,255,.18);
  border: 1px solid rgba(124,92,255,.24);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 13px;
  color: var(--text);
}

/* ---- Table of contents (long article) ---- */
.toc {
  border: 1px solid var(--border);
  background: rgba(255,255,255,.02);
  border-radius: 16px;
  padding: 14px 14px 14px 18px;
  margin: 0 0 22px;
}
.toc-title {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted2);
  text-transform: uppercase;
  letter-spacing: .05em;
}
.toc ul {
  margin: 0;
  padding: 0 0 0 18px;
  color: var(--muted);
  font-size: 13px;
}
.toc li {
  margin: 4px 0;
}
.toc a {
  color: #8ab4ff;
  text-decoration: none;
}
.toc a:hover {
  text-decoration: underline;
}

/* ---- Section dividers (long article) ---- */
.section-divider {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 32px 0;
}

/* ---- Article container width variants ---- */
.article-narrow  { --max: 900px; }
.article-wide    { --max: 960px; }
.article-medium  { --max: 920px; }

/* ---- Simple footer for articles ---- */
.article-footer {
  border-top: 1px solid var(--border);
  padding: 22px 0 34px;
  color: var(--muted2);
  font-size: 12px;
}
.article-footer a {
  color: var(--muted2);
}
