/* authority.css — authority-mode enhancements layered on top of styles.css.
   Only fills classes the base sheet does not define. Design tokens (--primary,
   --surface, --border, --radius, --shadow, …) come from styles.css :root. */

/* ---------- Footer columns ---------- */
.footer-brand h4,
.footer-col h4 {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--secondary);
  margin-bottom: 0.75rem;
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-col li + li {
  margin-top: 0.4rem;
}

.footer-col a {
  color: var(--muted);
  font-size: 0.9rem;
}

.footer-col a:hover {
  color: var(--primary);
}

/* ---------- Article intro ---------- */
.intro {
  font-size: 1.075rem;
  line-height: 1.7;
  color: var(--secondary-light);
  margin: 0 0 1.5rem;
}

/* ---------- Key takeaways ---------- */
.takeaways {
  background: var(--primary-soft);
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius-sm);
  padding: 1.25rem 1.5rem;
  margin: 1.75rem 0;
}

.takeaways h2 {
  font-size: 1.05rem;
  margin: 0 0 0.75rem;
  color: var(--secondary);
}

.takeaways ul {
  margin: 0;
  padding-left: 1.15rem;
}

.takeaways li {
  margin-bottom: 0.5rem;
  line-height: 1.6;
}

.takeaways li:last-child {
  margin-bottom: 0;
}

/* ---------- Table of contents ---------- */
.toc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1.25rem 1.5rem;
  margin: 1.75rem 0;
  box-shadow: var(--shadow-sm);
}

.toc h2 {
  font-size: 1rem;
  margin: 0 0 0.75rem;
  color: var(--secondary);
}

.toc ul {
  list-style: none;
  margin: 0;
  padding: 0;
  columns: 2;
  column-gap: 1.5rem;
}

.toc li {
  margin-bottom: 0.4rem;
  break-inside: avoid;
}

.toc a {
  color: var(--primary);
  font-size: 0.925rem;
}

@media (max-width: 640px) {
  .toc ul {
    columns: 1;
  }
}

/* ---------- Byline (author / reviewer) ---------- */
.byline {
  font-size: 0.875rem;
  color: var(--muted);
  margin: 0 0 1.25rem;
}

.byline a {
  color: var(--muted);
  text-decoration: underline;
}

.byline a:hover {
  color: var(--primary);
}

/* ---------- Affiliate CTA (only rendered when affiliate.enabled) ---------- */
.affiliate-cta {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1.25rem 1.5rem;
  margin: 1.75rem 0;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.affiliate-cta > p:first-child {
  margin-bottom: 0.75rem;
}

.affiliate-cta a {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  font-weight: 600;
  padding: 0.7rem 1.4rem;
  border-radius: var(--radius-sm);
}

.affiliate-cta a:hover {
  background: var(--primary-dark);
  color: #fff;
}

.affiliate-disclosure {
  font-size: 0.8rem;
  color: var(--muted);
  margin: 0;
}

/* ---------- Sources / further reading ---------- */
.sources {
  border-top: 1px solid var(--border);
  margin-top: 2rem;
  padding-top: 1.5rem;
}

.sources h2 {
  font-size: 1.05rem;
  margin: 0 0 0.75rem;
  color: var(--secondary);
}

.sources ul {
  margin: 0;
  padding-left: 1.15rem;
}

.sources li {
  margin-bottom: 0.5rem;
  line-height: 1.55;
  font-size: 0.925rem;
}

.sources li:last-child {
  margin-bottom: 0;
}

/* ---------- Related pages ---------- */
.related {
  border-top: 1px solid var(--border);
  margin-top: 2rem;
  padding-top: 1.5rem;
}

.related h2 {
  font-size: 1.05rem;
  margin: 0 0 0.75rem;
  color: var(--secondary);
}

.related ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.related li a {
  display: inline-block;
  background: var(--primary-soft);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.4rem 0.9rem;
  font-size: 0.9rem;
  color: var(--primary-dark);
}

.related li a:hover {
  background: var(--primary-light);
  color: #fff;
}

/* ---------- 404 ---------- */
.error-page .container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
}

.error-page .page-content {
  text-align: center;
}

.error-page h1 {
  margin-bottom: 0.75rem;
}
