/* BUILD 255 — Blog article page styles (series banner, prev/next nav, related cards) */
:root {
  --text-primary: #1a1a2e;
  --text-secondary: #5a5a6e;
  --bg-soft: #f8f5ff;
  --accent: #8b5cf6;
  --accent-2: #ec4899;
  --border: rgba(20, 10, 60, 0.08);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text-primary);
  background: #fff;
  line-height: 1.7;
}
.top-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
  border-bottom: 1px solid var(--border);
}
.top-nav a { color: var(--text-primary); text-decoration: none; font-weight: 600; }
.top-nav .brand { font-size: 1.15rem; }
.top-nav .links { display: flex; gap: 1.25rem; font-size: 0.95rem; }
.top-nav .links a { color: var(--text-secondary); font-weight: 500; }
.top-nav .links a:hover { color: var(--accent); }

main { max-width: 760px; margin: 0 auto; padding: 2rem 1.5rem 4rem; }

/* Series banner (top) */
.series-banner {
  margin: 0 0 2rem;
  padding: 1rem 1.25rem;
  background: linear-gradient(135deg, var(--bg-soft) 0%, #fff0f5 100%);
  border-radius: 12px;
  border-left: 4px solid var(--accent);
}
.series-banner__link {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
  color: inherit;
}
.series-banner__emoji { font-size: 1.5rem; line-height: 1; }
.series-banner__text { display: flex; flex-direction: column; line-height: 1.35; }
.series-banner__label {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent);
}
.series-banner__tagline { font-size: 0.95rem; color: var(--text-secondary); }

article header.article-head {
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}
article h1 {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  line-height: 1.25;
  margin: 0 0 0.75rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}
article .meta {
  color: var(--text-secondary);
  font-size: 0.9rem;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}
article h2 {
  font-size: 1.5rem;
  margin: 2.5rem 0 1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}
article h3 {
  font-size: 1.15rem;
  margin: 1.75rem 0 0.75rem;
  font-weight: 700;
}
article p { margin: 0 0 1.2rem; }
article ul, article ol { margin: 0 0 1.2rem 1.5rem; padding: 0; }
article li { margin-bottom: 0.4rem; }
article strong { color: var(--text-primary); }
article table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.95rem;
}
article th, article td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
article th { background: var(--bg-soft); font-weight: 700; }
article blockquote {
  border-left: 3px solid var(--accent);
  padding: 0.5rem 1.25rem;
  margin: 1.5rem 0;
  color: var(--text-secondary);
  background: rgba(139, 92, 246, 0.04);
  border-radius: 0 8px 8px 0;
}
article a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.cta-block {
  margin: 3rem 0 2rem;
  padding: 2rem 1.75rem;
  background: linear-gradient(135deg, #f8f5ff 0%, #fff0f5 100%);
  border-radius: 16px;
  text-align: center;
}
.cta-block h3 { margin: 0 0 0.5rem; }
.cta-block p { color: var(--text-secondary); margin: 0 0 1.25rem; }
.cta-block .btn {
  display: inline-block;
  padding: 0.85rem 1.75rem;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  color: #fff;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.2s ease;
}
.cta-block .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(139, 92, 246, 0.35);
}

/* Series Navigation (prev/next) */
.series-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 2.5rem 0;
}
.series-nav__item {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 1rem 1.25rem;
  background: var(--bg-soft);
  border-radius: 12px;
  border: 1px solid var(--border);
  text-decoration: none;
  color: var(--text-primary);
  transition: all 0.2s ease;
}
.series-nav__item:not(.series-nav__placeholder):hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(139, 92, 246, 0.12);
}
.series-nav__placeholder {
  background: transparent;
  border: 1px dashed var(--border);
  opacity: 0.4;
}
.series-nav__next { text-align: right; }
.series-nav__direction {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--accent);
}
.series-nav__title {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.35;
}
@media (max-width: 640px) {
  .series-nav { grid-template-columns: 1fr; }
  .series-nav__next { text-align: left; }
}

/* Related section */
.related-section { margin-top: 3rem; }
.related-section__heading {
  font-size: 1.35rem;
  margin: 0 0 1.25rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.related-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
@media (min-width: 700px) {
  .related-grid { grid-template-columns: 1fr 1fr 1fr; }
}
.related-card {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1.1rem 1.25rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  text-decoration: none;
  color: var(--text-primary);
  transition: all 0.2s ease;
}
.related-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(139, 92, 246, 0.1);
}
.related-card__series {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--accent);
}
.related-card__title { font-size: 1rem; font-weight: 700; line-height: 1.35; }
.related-card__desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

footer.site {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  border-top: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 0.85rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}
footer.site a { color: var(--text-secondary); text-decoration: none; margin-right: 1rem; }
footer.site a:hover { color: var(--accent); }

@media (max-width: 600px) {
  article h1 { font-size: 1.65rem; }
  article h2 { font-size: 1.3rem; }
  .top-nav .links { display: none; }
}
