/* AI Articles — /articles archive + /articles/{slug} single article.
   Shares the site surface recipe (0.025 card, 0.08 hairline, 14px radius)
   and the centered statement-header language of /about, /newsletter,
   /leaderboard. */

.articles-page, .article-page {
  --ab-ink: #f2f5f7;
  --ab-body: rgba(255, 255, 255, 0.62);
  --ab-muted: rgba(255, 255, 255, 0.42);
  --ab-line: rgba(255, 255, 255, 0.08);
  --ab-card: rgba(255, 255, 255, 0.025);
  --ab-accent: #00a8ff;
  max-width: 1100px;
  margin: 0 auto;
  padding: 4rem 1rem 5rem;
}

.article-page { max-width: 760px; }

/* Pico styles bare <article> as a raised card (tinted background + shadow +
   padding) AND gives article > header/footer their own card-section chrome —
   neutralize all of it so the text sits on the page background. */
.article-page article,
.article-page article > header,
.article-page article > footer {
  background: transparent;
  box-shadow: none;
  padding: 0;
  margin: 0;
  border: none;
  border-radius: 0;
}

.article-page article > header { margin-bottom: 0; }

/* ---- shared bits ---------------------------------------------------------- */

.art-brand {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.7rem; font-weight: 600; font-style: italic;
  color: var(--ab-muted); white-space: nowrap;
}
.art-brand img { width: 15px; height: 15px; border-radius: 4px; display: block; }

.art-section-label {
  display: flex; align-items: baseline; gap: 10px;
  font-size: 0.72rem; font-weight: 700; font-style: italic;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: rgba(255, 255, 255, 0.75);
  margin: 2.25rem 0 0.9rem;
}
.art-section-date { color: var(--ab-muted); font-weight: 600; }

/* ---- archive header ------------------------------------------------------- */

.art-header { position: relative; text-align: center; margin-bottom: 2.25rem; }
.art-header::before {
  content: ''; position: absolute; top: -160px; left: 50%; transform: translateX(-50%);
  width: min(900px, 100vw); height: 420px;
  background: radial-gradient(ellipse at center, rgba(0, 168, 255, 0.07) 0%, transparent 65%);
  pointer-events: none;
}
.art-title {
  position: relative; margin: 0 0 0.7rem;
  font-size: clamp(2rem, 4vw, 2.7rem); font-weight: 650;
  letter-spacing: -0.03em; line-height: 1.12; color: var(--ab-ink);
}
.art-subtitle {
  position: relative; margin: 0 auto; max-width: 560px;
  font-size: 0.95rem; line-height: 1.6; color: var(--ab-body);
}

/* ---- archive cards -------------------------------------------------------- */

.art-featured-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }

.art-card {
  display: flex; flex-direction: column;
  background: var(--ab-card); border: 1px solid var(--ab-line);
  border-radius: 14px; overflow: hidden; text-decoration: none;
  transition: transform 0.15s ease, border-color 0.25s ease;
}
.art-card:hover { transform: translateY(-3px); border-color: rgba(255, 255, 255, 0.16); }

.art-card-thumb { position: relative; aspect-ratio: 16 / 9; background: rgba(255, 255, 255, 0.03); overflow: hidden; }
.art-card-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.art-card-thumb-fallback {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
}
.art-card-thumb-fallback img { width: 44px; height: 44px; border-radius: 10px; opacity: 0.5; object-fit: contain; }
.art-card-rank {
  position: absolute; top: 10px; left: 10px;
  font-size: 0.66rem; font-weight: 800; padding: 3px 8px; border-radius: 6px;
  background: rgba(10, 12, 14, 0.78); color: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.art-card-body { display: flex; flex-direction: column; gap: 0.45rem; padding: 0.95rem 1.05rem 1.1rem; flex: 1; }
.art-card-title {
  margin: 0; font-size: 0.98rem; font-weight: 650; letter-spacing: -0.01em;
  color: var(--ab-ink); line-height: 1.35;
}
.art-card-dek {
  margin: 0; font-size: 0.8rem; color: var(--ab-body); line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.art-card-meta {
  margin-top: auto; padding-top: 0.4rem;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  font-size: 0.68rem; color: var(--ab-muted);
}

/* earlier list */
.art-earlier-list { display: flex; flex-direction: column; gap: 0.5rem; }
.art-row {
  display: grid; grid-template-columns: 86px 1fr; gap: 14px; align-items: center;
  background: var(--ab-card); border: 1px solid var(--ab-line); border-radius: 12px;
  padding: 10px 12px; text-decoration: none;
  transition: border-color 0.25s ease;
}
.art-row:hover { border-color: rgba(255, 255, 255, 0.16); }
.art-row-thumb {
  width: 86px; height: 56px; border-radius: 8px;
  background-size: cover; background-position: center;
  background-color: rgba(255, 255, 255, 0.04);
}
.art-row-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.art-row-title { font-size: 0.88rem; font-weight: 650; color: var(--ab-ink); line-height: 1.35; }
.art-row-sub { font-size: 0.7rem; color: var(--ab-muted); }

.art-empty { text-align: center; color: var(--ab-muted); padding: 3rem 1rem; }

/* ---- single article ------------------------------------------------------- */

.art-back {
  display: inline-block; color: var(--ab-muted); text-decoration: none;
  font-size: 0.82rem; margin-bottom: 1.6rem; transition: color 0.15s ease;
}
.art-back:hover { color: var(--ab-accent); }

.art-kicker {
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase;
  color: var(--ab-muted); margin-bottom: 0.7rem;
}
.art-headline {
  margin: 0 0 0.8rem; font-size: clamp(1.6rem, 3.4vw, 2.25rem);
  font-weight: 650; letter-spacing: -0.025em; line-height: 1.18; color: var(--ab-ink);
}
.art-dek { margin: 0 0 1rem; font-size: 1.02rem; line-height: 1.55; color: var(--ab-body); }
.art-byline { display: flex; align-items: center; gap: 12px; margin-bottom: 0.9rem; }
.art-byline-note { font-size: 0.7rem; color: var(--ab-muted); }
.art-topics { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 1.4rem; }
.art-topic-pill {
  font-size: 0.68rem; font-weight: 600; padding: 3px 10px; border-radius: 999px;
  border: 1px solid var(--ab-line); background: var(--ab-card);
  color: var(--ab-body); text-decoration: none;
  transition: border-color 0.18s ease, color 0.18s ease;
}
.art-topic-pill:hover { border-color: rgba(0, 168, 255, 0.45); color: var(--ab-ink); }

.art-hero { margin: 0 0 1.6rem; }
.art-hero img {
  width: 100%; display: block; border-radius: 14px;
  border: 1px solid var(--ab-line);
}
.art-hero figcaption { font-size: 0.68rem; color: var(--ab-muted); margin-top: 6px; }

.art-body { color: var(--ab-body); font-size: 1.02rem; line-height: 1.75; }
.art-body p { margin: 0 0 1.15rem; }
.art-body h2 {
  margin: 1.8rem 0 0.8rem; font-size: 1.25rem; font-weight: 650;
  letter-spacing: -0.015em; color: var(--ab-ink); line-height: 1.3;
}
.art-body blockquote {
  margin: 1.5rem 0; padding: 0.35rem 0 0.35rem 1.15rem;
  border-left: 3px solid var(--ab-accent); color: var(--ab-ink); font-style: italic;
}
.art-body blockquote cite { display: block; margin-top: 0.4rem; font-size: 0.82rem; font-style: normal; color: var(--ab-muted); }
.art-cite a {
  color: var(--ab-accent); text-decoration: none; font-size: 0.72em; font-weight: 700;
}
.art-cite a:hover { text-decoration: underline; }

/* interactive chart block */
.art-chart {
  margin: 1.5rem 0; padding: 1rem 1.15rem 0.85rem;
  background: var(--ab-card); border: 1px solid var(--ab-line); border-radius: 14px;
}
.art-chart-title {
  font-size: 0.7rem; font-weight: 700; font-style: italic; letter-spacing: 0.05em;
  text-transform: uppercase; color: rgba(255, 255, 255, 0.75); margin-bottom: 8px;
}
.art-chart svg { width: 100%; height: auto; display: block; }
.art-chart-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 8px; }
.art-chart-key {
  display: inline-flex; align-items: center; gap: 6px; text-decoration: none;
  font-size: 0.7rem; font-weight: 600; color: var(--ab-body);
}
.art-chart-key:hover { color: var(--ab-ink); }
.art-chart-key i { width: 9px; height: 9px; border-radius: 2px; }
.art-chart-tip {
  position: fixed; z-index: 500; pointer-events: none; display: none;
  background: rgba(15, 15, 18, 0.97); border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 7px; padding: 6px 9px; font-size: 0.7rem; color: rgba(255, 255, 255, 0.85);
}

/* sources */
.art-sources { margin-top: 2.4rem; padding-top: 1.4rem; border-top: 1px solid var(--ab-line); }
.art-sources h3 {
  margin: 0 0 0.8rem; font-size: 0.72rem; font-weight: 700; font-style: italic;
  letter-spacing: 0.06em; text-transform: uppercase; color: rgba(255, 255, 255, 0.75);
}
.art-sources ol { margin: 0; padding-left: 1.25rem; display: flex; flex-direction: column; gap: 0.5rem; }
.art-sources li { font-size: 0.85rem; line-height: 1.5; color: var(--ab-body); }
.art-sources a { color: var(--ab-ink); text-decoration: none; }
.art-sources a:hover { color: var(--ab-accent); }
.art-source-meta { color: var(--ab-muted); font-size: 0.74rem; margin-left: 6px; }

.art-more { margin-top: 3rem; }
.art-more-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

/* ---- responsive ------------------------------------------------------------ */
@media (max-width: 900px) {
  .art-featured-grid { grid-template-columns: 1fr; }
  .art-more-grid { grid-template-columns: 1fr; }
}
