/* Articles index and article pages. Tokens only. */

.breadcrumb ol { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 0 0 var(--space-5); font-size: var(--text-sm); }
.breadcrumb li { display: inline-flex; align-items: center; gap: 6px; color: var(--ts-muted); }
.breadcrumb li + li::before { content: "/"; color: var(--ts-muted); }
.breadcrumb a { color: var(--ts-blue-750); text-decoration: none; display: inline-flex; align-items: center; min-height: 32px; }
.breadcrumb a:hover { text-decoration: underline; }

.tag-list { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 0; }
.tag-list li {
  font-size: var(--text-xs); font-weight: 600; letter-spacing: 0.02em;
  padding: 4px 10px; border-radius: var(--radius-pill);
  background: var(--ts-blue-tint); color: var(--ts-navy-800); border: 1px solid var(--ts-blue-line);
}
.article-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: var(--text-sm); color: var(--ts-muted); margin: 0; }

/* ---------- Index ---------- */
.articles-hero h1 { max-width: 20ch; }
.articles-hero-links a { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-weight: 600; color: var(--ts-blue-750); text-decoration: none; }
.articles-hero-links a:hover { text-decoration: underline; }
.articles-hero-links svg { width: 18px; height: 18px; }
.article-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-5); }
@media (max-width: 1024px) { .article-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .article-grid { grid-template-columns: 1fr; } }
.article-card {
  position: relative; display: flex; flex-direction: column; gap: var(--space-3);
  padding: var(--space-6); background: var(--ts-white);
  border: 1px solid var(--ts-line-soft); border-radius: var(--radius-lg); box-shadow: var(--shadow-1);
  transition: box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.article-card:hover { box-shadow: var(--shadow-2); border-color: var(--ts-blue-line); transform: translateY(-2px); }
.article-card:focus-within { border-color: var(--ts-blue-750); }
.article-card-title { font-size: var(--text-lg); line-height: 1.3; margin: 0; }
.article-card-title a { color: var(--ts-navy-900); text-decoration: none; }
.article-card-title a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.article-card-title a:hover { color: var(--ts-blue-750); }
.article-card-title a:focus-visible { outline: none; }
.article-card-title a:focus-visible::after { outline: 3px solid var(--color-focus); outline-offset: 2px; }
.article-card-desc { color: var(--ts-muted); margin: 0; flex: 1; }
.article-card .tag-list { position: relative; }
.articles-more { margin-top: var(--space-7); text-align: center; color: var(--ts-muted); }

/* ---------- Article ---------- */
.article-page { padding-block: var(--space-7) var(--space-8); }
.article-container { max-width: 1080px; }
.article { max-width: 720px; margin: 0 auto; }
.article-header { display: grid; gap: var(--space-4); padding-bottom: var(--space-6); border-bottom: 1px solid var(--ts-line-soft); margin-bottom: var(--space-6); }
.article-header h1 { font-size: clamp(2rem, 1.4rem + 2.4vw, 3rem); line-height: 1.12; margin: 0; }
.article-dek { font-size: var(--text-md); color: var(--ts-muted); margin: 0; }
.byline { display: flex; align-items: center; gap: var(--space-3); }
.byline-avatar {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--ts-blue-tint); color: var(--ts-blue-750); border: 1px solid var(--ts-blue-line);
}
.byline-avatar svg { width: 22px; height: 22px; }
.byline-name { margin: 0; font-size: var(--text-sm); color: var(--ts-ink); }
.byline-name .author { font-weight: 700; }

.article-body { font-size: 1.0625rem; line-height: 1.75; color: var(--ts-ink); }
.article-body > section { margin-top: var(--space-7); }
.article-body > p:first-child { font-size: var(--text-md); color: var(--ts-navy-800); }
.article-body h2 { font-size: var(--text-2xl); margin: 0 0 var(--space-4); scroll-margin-top: 96px; }
.article-body h3 { font-size: var(--text-lg); margin: var(--space-6) 0 var(--space-2); scroll-margin-top: 96px; }
.article-body p, .article-body ul, .article-body ol { margin: 0 0 var(--space-4); }
.article-body ul, .article-body ol { padding-left: 1.4em; }
.article-body li + li { margin-top: 6px; }
.article-body a { color: var(--ts-blue-750); text-decoration: underline; text-decoration-thickness: 1px; }
.article-body a:hover { text-decoration-thickness: 2px; }
.article-body strong { color: var(--ts-navy-900); }
.article-body code { font-family: var(--font-mono); font-size: 0.9em; background: var(--ts-sky-50); padding: 1px 6px; border-radius: 4px; }
.article-body blockquote { margin: 0 0 var(--space-4); padding: var(--space-4) var(--space-5); border-left: 4px solid var(--ts-blue-500); background: var(--ts-sky-50); border-radius: 0 var(--radius-md) var(--radius-md) 0; }
.article-body blockquote p { margin: 0; }

.article-body .key-takeaways {
  margin-top: var(--space-6); padding: var(--space-5) var(--space-6);
  background: var(--ts-sky-50); border: 1px solid var(--ts-blue-line); border-radius: var(--radius-lg);
}
.article-body .key-takeaways h2 { font-size: var(--text-lg); margin-bottom: var(--space-3); }
.article-body .key-takeaways ul { margin: 0; }

.article-body .article-faq h3 { font-size: var(--text-md); }
.article-body .article-sources { padding-top: var(--space-5); border-top: 1px solid var(--ts-line-soft); }
.article-body .article-sources h2 { font-size: var(--text-lg); }
.article-body .article-sources li { font-size: var(--text-sm); overflow-wrap: anywhere; }

.table-wrap { overflow-x: auto; margin: 0 0 var(--space-5); border: 1px solid var(--ts-line-soft); border-radius: var(--radius-md); }
.table-wrap:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 2px; }
.article-body table { width: 100%; border-collapse: collapse; font-size: var(--text-sm); line-height: 1.5; }
.article-body th, .article-body td { text-align: left; vertical-align: top; padding: 10px 14px; border-bottom: 1px solid var(--ts-line-soft); }
.article-body thead th { background: var(--ts-sky-50); color: var(--ts-navy-900); font-weight: 700; }
.article-body tbody th { font-weight: 600; color: var(--ts-navy-900); }
.article-body tbody tr:last-child > * { border-bottom: 0; }

.author-box {
  display: flex; align-items: center; gap: var(--space-4);
  margin-top: var(--space-7); padding: var(--space-5);
  border: 1px solid var(--ts-line-soft); border-radius: var(--radius-lg); background: var(--ts-white);
}
.author-box p { margin: 0; color: var(--ts-ink); }
.author-box-label { display: block; font-size: var(--text-xs); text-transform: uppercase; letter-spacing: 0.08em; color: var(--ts-muted); font-weight: 600; }

.related { margin-top: var(--space-8); padding-top: var(--space-7); border-top: 1px solid var(--ts-line-soft); }
.related h2 { font-size: var(--text-2xl); margin-bottom: var(--space-5); }
.related-more { margin-top: var(--space-6); text-align: center; }
