/* Insights: the article list (insights/index.html, home page band) and the
   article page. Loaded after site.css; uses its tokens only. */

/* ── Article cards ─────────────────────────────── */
.insights-list {
  display: grid;
  gap: 22px;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}
.insight-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px;
  color: inherit;
  text-decoration: none;
  transition: border-color 0.15s, transform 0.15s;
}
.insight-card:hover {
  border-color: var(--primary);
  text-decoration: none;
  transform: translateY(-2px);
}
.insight-card .eyebrow { margin-bottom: 4px; align-self: flex-start; }
.insight-card h3 { margin: 0; font-size: 1.2rem; line-height: 1.3; }
.insight-card p { margin: 0; color: var(--text-muted); font-size: 0.97rem; }
.insight-card .insight-meta { margin-top: auto; padding-top: 8px; }
.insight-meta { color: var(--text-dim); font-size: 0.86rem; }
.insights-filter { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 28px; }
.insight-chip {
  font: inherit; font-size: 0.9rem; color: var(--text); background: var(--bg-panel);
  border: 1px solid var(--border); border-radius: 999px; padding: 6px 14px; cursor: pointer;
}
.insight-chip:hover { border-color: var(--primary); }
.insight-chip[aria-pressed="true"] { border-color: var(--primary); background: var(--primary); color: var(--on-primary); }
.insights-status { color: var(--text-muted); margin: 0; }
.insights-more { margin-top: 28px; text-align: center; }

/* ── Article page ──────────────────────────────── */
.article-head { padding: 56px 0 40px; }
.article-head .container,
.article-body .container { max-width: calc(var(--prose-max-width) + 48px); }
.article-head h1 { max-width: none; }
.article-head .lede { margin: 18px 0 22px; max-width: none; }
.article-byline { color: var(--text-muted); font-size: 0.95rem; margin: 0; }
.article-byline strong { color: var(--text-head); }
.article-back { display: inline-block; margin-bottom: 18px; font-size: 0.92rem; }

.article-body { padding-top: 44px; }
.article-body .prose { margin: 0; line-height: 1.65; }
.article-body .prose h2 { font-size: 1.5rem; margin: 44px 0 14px; }
.article-body .prose li { margin-bottom: 12px; }
.article-body .prose ol,
.article-body .prose ul { padding-left: 1.4em; margin: 0 0 1rem; color: var(--text); }
.article-body .prose sup a { text-decoration: none; font-weight: 600; }

.article-figure { margin: 30px 0; }
.article-figure img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: #ffffff;
}
.article-figure figcaption {
  margin-top: 12px;
  color: var(--text-muted);
  font-size: 0.9em;
  font-style: italic;
}
.article-figure figcaption strong { display: block; color: var(--text); font-style: normal; margin-bottom: 4px; }

/* A prompt the reader can copy: set apart from the prose around it. */
.article-prompt {
  margin: 20px 0 26px;
  padding: 20px 24px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-left: 3px solid var(--primary);
  border-radius: var(--radius-lg);
  font-size: 0.95em;
}
.article-prompt > :last-child { margin-bottom: 0; }
.article-prompt li { margin-bottom: 8px; }

.article-refs { list-style: none; padding-left: 0 !important; font-size: 0.92em; }
.article-refs li { overflow-wrap: anywhere; }
.article-refs li:target { background: var(--primary-soft); border-radius: 6px; }

.article-author {
  margin-top: 44px;
  padding: 26px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  font-size: 0.95em;
}
.article-author h2 { margin-top: 0 !important; }
.article-author p:last-child { margin-bottom: 0; }

/* The article text is English only. The note shows when the site language
   is Spanish (site.js sets <html lang>). */
.article-lang-note {
  display: none;
  margin: 0 0 18px;
  padding: 10px 14px;
  background: var(--primary-soft);
  border-radius: 8px;
  font-size: 0.92rem;
}
html[lang="es"] .article-lang-note { display: block; }

/* Teaser toast at the top of the home page (assets/insights.js). */
.insight-teaser {
  position: fixed;
  top: 84px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 90;
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: min(640px, calc(100vw - 32px));
  padding: 10px 14px 10px 16px;
  background: var(--bg-panel-raised);
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  border-radius: 8px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
  font-size: 0.95rem;
  line-height: 1.4;
}
.insight-teaser[hidden] { display: none; }
.insight-teaser-link { color: inherit; text-decoration: none; }
.insight-teaser-link:hover strong { text-decoration: underline; }
.insight-teaser-close {
  background: transparent;
  border: 0;
  color: inherit;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  opacity: 0.6;
}
.insight-teaser-close:hover { opacity: 1; }
