/* =========================================================================
   ActiveCitizen — Stories & Updates (CMS public pages) + CMS-driven blocks
   Loaded AFTER the website's assets/css/styles.css, which supplies every
   token (colours, Fraunces / Public Sans, spacing), the header, footer,
   bands, buttons, chips and cards. This file only adds what the archive,
   the single post and the article cards need, in the same visual language.
   The website pages load the article-card part through styles.css too.
   ========================================================================= */

/* ---------- Archive tools: category chips + search ---------- */
.archive-tools {
  display: grid;
  gap: 24px;
  margin-bottom: 56px;
}
@media (min-width: 1024px) {
  .archive-tools { grid-template-columns: 1fr 360px; align-items: start; gap: 40px; }
}

.search-form { display: flex; }
.search-form .input { flex: 1; min-width: 0; background-color: var(--card); }
.search-form .btn { white-space: nowrap; }

.archive-grid { margin-top: 56px; }
.archive-grid:first-child { margin-top: 0; }

mark { background: oklch(80.51% 0.1659 74.7 / 0.35); color: inherit; padding: 0 .1em; }

/* ---------- Pagination ---------- */
.pager { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 64px; flex-wrap: wrap; }
.pager a, .pager span {
  min-width: 44px; height: 44px; padding: 0 12px;
  display: inline-grid; place-items: center;
  font-size: 0.875rem; font-weight: 600;
  border: 1px solid var(--border);
  background-color: var(--card);
  color: var(--foreground);
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.pager a:hover { background-color: var(--primary); border-color: var(--primary); color: var(--primary-foreground); }
.pager .is-current { background-color: var(--primary); border-color: var(--primary); color: var(--primary-foreground); }
.pager .is-disabled { opacity: .45; }
.pager .pager-step { padding: 0 18px; }

/* ---------- Single post ---------- */
.post-crumbs { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.post-crumbs a:hover { color: var(--primary); }
.post-crumbs span { color: var(--muted-foreground); }

.post-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 24px;
  margin-top: 32px;
  font-size: 0.875rem; color: var(--muted-foreground);
}

.post-figure { margin-top: 64px; margin-bottom: 0; }
.post-figure img { width: 100%; max-height: 620px; object-fit: cover; }
.post-figure figcaption { margin-top: 12px; }

.post-body { padding-top: 56px; padding-bottom: 96px; }
.post-body--no-figure { padding-top: 72px; }

/* Long-form text */
.prose {
  max-width: 720px;
  margin-inline: auto;
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--foreground);
  overflow-wrap: break-word;
}
.prose > * + * { margin-top: 1.25em; }
.prose h1 {                      /* "# Lead line" */
  font-family: var(--font-sans); font-size: 1.1875rem; font-weight: 500;
  line-height: 1.6; letter-spacing: 0; color: var(--foreground);
}
.prose h2 { font-size: clamp(1.5rem, 2.4vw, 1.875rem); line-height: 1.2; margin-top: 2em; }
.prose h3 { font-size: 1.25rem; line-height: 1.375; margin-top: 1.8em; }
.prose h4 {
  font-family: var(--font-sans); font-size: 11px; font-weight: 600; letter-spacing: .18em;
  text-transform: uppercase; color: var(--clay); margin-top: 2em;
}
.prose > :first-child { margin-top: 0; }
.prose a { color: var(--primary); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.prose a:hover { color: var(--foreground); }
.prose strong { font-weight: 600; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li + li { margin-top: .5em; }
.prose li::marker { color: var(--clay); }
.prose blockquote {
  padding: .2em 0 .2em 24px;
  border-left: 2px solid var(--gold);
  font-family: var(--font-display);
  font-size: 1.375rem;
  line-height: 1.45;
  color: var(--primary);
}
.prose blockquote p + p { margin-top: .8em; }
.prose hr { border: 0; height: 1px; background: var(--border); margin-block: 2.5em; }
.prose img { width: 100%; height: auto; }
.prose code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .86em;
  background: var(--sand); padding: .12em .4em;
}
.prose pre { background: var(--ink); color: var(--on-dark); padding: 20px 24px; overflow-x: auto; font-size: 14px; line-height: 1.6; }
.prose pre code { background: none; padding: 0; color: inherit; }
.table-wrap { overflow-x: auto; border: 1px solid var(--border); background: var(--card); }
.prose table { width: 100%; border-collapse: collapse; font-size: .9375rem; }
.prose th, .prose td { padding: 12px 16px; border-bottom: 1px solid var(--border); text-align: left; }
.prose th { background: var(--sand); font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.prose tr:last-child td { border-bottom: 0; }
.callout { padding: 20px 24px; background: var(--sand); border-left: 3px solid var(--primary); font-size: 1rem; }
.callout-label { display: block; font-size: 11px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--clay); margin-bottom: 6px; }
.callout p + p { margin-top: .6em; }
.callout--warning { border-left-color: var(--gold); }

/* Serif text style (chosen per post in the studio) */
.prose--serif { font-family: var(--font-display); font-size: 1.125rem; }
.prose--serif h1 { font-family: var(--font-display); }

.share-bar {
  max-width: 720px;
  margin: 56px auto 0;
  padding-top: 28px;
  border-top: 1px solid var(--border);
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
}
.post-back { max-width: 720px; margin: 40px auto 0; }

.progress { position: fixed; top: 0; left: 0; height: 3px; background: var(--gold); width: 0; z-index: 150; }

@media (max-width: 720px) {
  .post-figure { margin-top: 40px; }
  .post-body { padding-top: 40px; padding-bottom: 72px; }
  .prose { font-size: 1rem; }
  .prose blockquote { font-size: 1.1875rem; }
}
