/* Editorial article shell (list + slug pages). Extends the existing guides/article
   pattern in styles.css (.shell, .brand, .eyebrow, .lede, .nav-cta) rather than
   introducing a new visual language. Kept in its own file because these two
   templates render content dynamically (fetched at runtime), unlike the
   hand-authored /guides/*.html pages that only need styles.css itself. */

/* Colorful backdrop for the two dynamic article templates, marked on <body>
   with .articles-page. Kept as soft, low-saturation washes behind the paper
   background so it reads as warmth, not noise. */
.articles-page { background: radial-gradient(900px 420px at 12% -8%, #e9efff 0%, transparent 60%), radial-gradient(760px 380px at 100% 0%, #fdf1e0 0%, transparent 55%), var(--paper); }

.article-list { list-style: none; margin: 32px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 24px; }
.article-card { --card-accent: var(--navy); border: 1px solid #e2e6ee; border-top: 4px solid var(--card-accent); border-radius: 16px; overflow: hidden; background: #fff; transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease; display: flex; flex-direction: column; }
.article-card:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08), 0 4px 14px color-mix(in srgb, var(--card-accent) 30%, transparent); border-color: #cbd5e1; }
.article-card a { color: inherit; text-decoration: none; display: flex; flex-direction: column; height: 100%; }
.article-card-cover { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #0f172a; overflow: hidden; }
.article-card-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.article-card-cover--empty { display: flex; align-items: flex-end; padding: 12px; background: linear-gradient(135deg, var(--card-accent), #0f172a); }
.article-card-body { padding: 20px 22px; flex: 1; display: flex; flex-direction: column; }
.article-card h2 { margin: 0 0 8px; font-size: 20px; line-height: 1.35; color: #0f172a; }
.article-card p { margin: 0 0 14px; color: #475569; line-height: 1.55; font-size: 15px; flex: 1; }
.article-meta { font-size: 13px; color: #64748b; display: flex; flex-wrap: wrap; gap: 6px 12px; margin-top: auto; }

/* Category chip: icon + label, colored per taxonomy code (see CATEGORY_META
   in articles.js). Two placements share the same look -- pinned over a card
   thumbnail, or sitting inline as the article page's kicker. */
.category-badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px 5px 9px; border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--badge-color); background: var(--badge-bg); white-space: nowrap; }
.article-card-cover .category-badge, .article-card-cover--empty .category-badge { position: absolute; top: 12px; left: 12px; box-shadow: 0 2px 8px rgba(15, 23, 42, 0.25); }
.article-card-cover--empty .category-badge { position: static; }
.category-badge--kicker { font-size: 12px; }

.article-state { margin-top: 40px; padding: 28px 24px; border: 1px dashed #d6dbe6; border-radius: 16px; color: #333; }
.article-state h2 { margin: 0 0 8px; font-size: 20px; }
.article-state p { margin: 0; line-height: 1.6; color: #4a4a4a; }
.article-state[data-state="error"] { border-color: #e0b7b7; background: #fff6f6; }
.article-state button.retry { margin-top: 14px; padding: 10px 16px; border: 1px solid var(--navy); border-radius: 99px; background: none; font: inherit; font-weight: 600; cursor: pointer; }
.article-state button.retry:hover { color: #fff; background: var(--navy); }

.article-hero-cover { --accent: var(--navy); margin: 28px 0 24px; border-radius: 16px; overflow: hidden; box-shadow: 0 4px 20px rgba(15, 23, 42, 0.08); border: 1px solid #e2e8f0; border-top: 4px solid var(--accent); }
.article-hero-cover img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; display: block; }

.article-body { margin-top: 28px; }
.article-body p { font-size: 18px; line-height: 1.75; color: #334155; margin: 0 0 20px; }
.article-body h2 { font-size: 24px; font-weight: 700; color: #0f172a; margin: 38px 0 16px; line-height: 1.35; letter-spacing: -0.01em; }
.article-body h3 { font-size: 20px; font-weight: 600; color: #1e293b; margin: 30px 0 14px; line-height: 1.4; }
.article-body ul, .article-body ol { margin: 0 0 24px 24px; padding: 0; font-size: 17px; line-height: 1.75; color: #334155; }
.article-body li { margin-bottom: 10px; }
.article-body strong { color: #0f172a; font-weight: 600; }
.article-byline { margin: 18px 0 0; font-size: 14px; color: #64748b; }
.article-byline .read-minutes { color: #94a3b8; }

[aria-busy="true"] .visually-hidden-loading { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (max-width: 640px) {
  .article-list { grid-template-columns: 1fr; gap: 18px; }
  .article-card-body { padding: 16px; }
  .article-body p { font-size: 17px; }
  .article-body h2 { font-size: 21px; margin: 30px 0 14px; }
  .article-body h3 { font-size: 18px; margin: 24px 0 12px; }
}
