/* Insights: the list of articles, one article, and the newsletter pages.
   Builds on theme.css (cards, eyebrow, section heads). Spacing follows the 8px step. */

/* ---------- Shared: the small line of facts under a title ---------- */
.in-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; margin: 0; color: var(--muted); font-size: .88rem; font-weight: 600; }
.in-meta > * + *::before { content: "·"; margin-right: 16px; color: var(--faint); }
.in-meta-head { margin-top: 24px; }
.in-tag { padding: 2px 10px; border-radius: var(--pill); background: var(--green-50); color: var(--green-800); font-size: .78rem; font-weight: 700; letter-spacing: .04em; }
.page-head .eyebrow a { color: inherit; text-decoration: none; }
.page-head .eyebrow a:hover { text-decoration: underline; }

/* ---------- Category filter ---------- */
.in-filter { margin-bottom: 32px; }
.in-filter ul { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.in-filter a { display: inline-flex; align-items: center; min-height: 40px; padding: 6px 16px; border: 1px solid var(--line-strong); border-radius: var(--pill); background: #fff; color: var(--text); font-size: .92rem; font-weight: 700; text-decoration: none; }
.in-filter a:hover { border-color: var(--blue-300); color: var(--blue-700); }
.in-filter a[aria-current] { border-color: var(--blue-600); background: var(--blue-600); color: #fff; }

/* ---------- Empty state ---------- */
.in-empty { max-width: 560px; margin-inline: auto; padding: clamp(32px, 6vw, 64px) 24px; border: 1px dashed var(--line-strong); border-radius: var(--card-radius); text-align: center; }
.in-empty .card-icon { margin-inline: auto; }
.in-empty h3 { margin-bottom: 8px; font-size: 1.3rem; }
.in-empty p { margin: 0; color: var(--muted); }

/* ---------- Featured article ---------- */
.in-lead { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 0; margin-bottom: 32px; padding: 0; overflow: hidden; }
.in-lead-cover { display: block; background: var(--surface-2); }
.in-lead-cover img { display: block; width: 100%; height: 100%; min-height: 240px; object-fit: cover; }
.in-lead-text { display: flex; flex-direction: column; justify-content: center; gap: 16px; padding: clamp(24px, 4vw, 48px); }
.in-lead:not(:has(.in-lead-cover)) { grid-template-columns: 1fr; }
.in-lead h3 { margin: 0; font-size: clamp(1.4rem, 2.6vw, 2rem); letter-spacing: -.02em; }
.in-lead p { margin: 0; }

/* ---------- Article cards ---------- */
.in-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 24px; margin: 0; padding: 0; list-style: none; }
.in-grid > li { display: flex; min-width: 0; }
.in-card { display: flex; flex-direction: column; width: 100%; padding: 0; overflow: hidden; }
.in-card-cover { display: block; aspect-ratio: 16 / 9; background: var(--surface-2); }
.in-card-cover img { display: block; width: 100%; height: 100%; object-fit: cover; }
.in-card-text { display: flex; flex: 1; flex-direction: column; gap: 12px; padding: 24px; }
.in-card h3 { margin: 0; font-size: 1.2rem; line-height: 1.3; }
.in-card h3 a, .in-lead h3 a { color: inherit; text-decoration: none; }
.in-card h3 a:hover, .in-lead h3 a:hover { color: var(--blue-700); text-decoration: underline; }
.in-card p { margin: 0; }
.in-card-text > p:not(.in-meta) { color: var(--muted); font-size: .98rem; }
.in-card-text > .in-meta:last-child { margin-top: auto; padding-top: 8px; }

/* ---------- Pages ---------- */
.in-pages { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; margin-top: 40px; }
.in-pages > :first-child { justify-self: start; }
.in-pages > :last-child { justify-self: end; }
.in-pages-now { color: var(--muted); font-size: .92rem; font-weight: 600; }

/* ---------- One article ---------- */
.in-preview { max-width: 720px; }
.in-article { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 280px); gap: clamp(32px, 5vw, 72px); align-items: start; }
.in-article-main { min-width: 0; }
.in-cover { display: block; width: 100%; height: auto; margin-bottom: 32px; border: 1px solid var(--line); border-radius: var(--card-radius); }
.in-body { overflow-wrap: break-word; }
.in-body > :first-child { margin-top: 0; }
.in-body h4 { margin-top: 1.6em; font-size: 1.05rem; }
.in-body img { display: block; max-width: 100%; height: auto; margin-block: 8px; }
.in-body a { overflow-wrap: anywhere; }
.in-body table { display: block; max-width: 100%; overflow-x: auto; }
.in-body .align-left { text-align: left; }
.in-body .align-right { text-align: right; }
.in-body .align-centre { text-align: center; }
.in-body hr { margin-block: 32px; border: 0; border-top: 1px solid var(--line); }
.in-aside { display: grid; gap: 24px; }
.in-author { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 16px; align-items: center; padding: 24px; border: 1px solid var(--line); border-radius: var(--card-radius); background: #fff; }
.in-author img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; }
.in-author p { display: grid; gap: 2px; margin: 0; color: var(--muted); font-size: .92rem; }
.in-author strong { color: var(--ink); font-size: 1.05rem; }
.in-author-label { font-size: .74rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.in-share h2 { margin-bottom: 12px; color: var(--muted); font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.in-share ul { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.in-share a { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 6px 14px; border: 1px solid var(--line-strong); border-radius: var(--pill); background: #fff; color: var(--text); font-size: .9rem; font-weight: 700; text-decoration: none; }
.in-share a:hover { border-color: var(--blue-300); color: var(--blue-700); }
.in-share .icon { width: 16px; height: 16px; }
.in-back { margin: 0; }
@media (min-width: 961px) { .in-aside { position: sticky; top: 104px; } }

/* ---------- Newsletter: the block on Insights pages and the newsletter pages ---------- */
.in-newsletter { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(24px, 4vw, 56px); align-items: center; }
.in-newsletter h2 { margin-bottom: 8px; letter-spacing: -.02em; }
.in-newsletter p { margin: 0; }
.nl-card { padding: clamp(24px, 5vw, 56px); border: 1px solid var(--line); border-radius: var(--card-radius); background: #fff; box-shadow: var(--card-shadow); }
.nl-card h1 { margin-bottom: 16px; font-size: clamp(1.7rem, 3.4vw, 2.4rem); letter-spacing: -.02em; }
.nl-card .nl-again { margin: 32px 0 16px; font-size: 1.15rem; }
.nl-card .nl-form { margin-top: 24px; }
.nl-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 24px 0 0; }
/* The form itself (.nl-form and its fields) is styled in footer.css, which every page loads. */

@media (max-width: 960px) {
  .in-article, .in-newsletter { grid-template-columns: 1fr; }
  .in-lead { grid-template-columns: 1fr; }
  .in-lead-cover img { min-height: 0; aspect-ratio: 16 / 9; }
}
@media (max-width: 640px) {
  .in-pages { grid-template-columns: 1fr; justify-items: center; }
  .in-pages > :first-child, .in-pages > :last-child { justify-self: center; }
  .nl-actions .btn { flex: 1 1 100%; }
}
