/* Blog styles from SEO post template */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 18px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.75;
  color: #1a1a1a;
  background: #ffffff;
  max-width: 780px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

h1, h2, h3, h4 {
  line-height: 1.3;
  font-weight: 700;
  color: #111111;
  margin-top: 2rem;
  margin-bottom: 0.6rem;
}
h1 { font-size: 2rem; margin-top: 1.5rem; }
h2 { font-size: 1.5rem; border-bottom: 2px solid #f0f0f0; padding-bottom: 0.3rem; }
h3 { font-size: 1.2rem; }
h4 { font-size: 1rem; }

p { margin-bottom: 1.25rem; }

a { color: #0057b8; text-decoration: underline; text-underline-offset: 3px; }
a:hover { color: #003d82; }

strong { font-weight: 700; }
em { font-style: italic; }

.site-header {
  padding: 1rem 0;
  border-bottom: 1px solid #e8e8e8;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.site-logo { font-size: 1.2rem; font-weight: 700; color: #111; text-decoration: none; }
.site-nav a {
  margin-left: 1.25rem;
  color: #444;
  text-decoration: none;
  font-size: 0.9rem;
}
.site-nav a:hover { color: #0057b8; }

.breadcrumb {
  font-size: 0.8rem;
  color: #666;
  margin-bottom: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  align-items: center;
}
.breadcrumb a { color: #666; text-decoration: none; }
.breadcrumb a:hover { color: #0057b8; text-decoration: underline; }
.breadcrumb-sep { color: #aaa; }

.article-meta {
  font-size: 0.85rem;
  color: #555;
  margin-bottom: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  align-items: center;
}
.article-meta time { font-weight: 600; color: #333; }
.article-category {
  background: #f0f4ff;
  color: #0057b8;
  padding: 0.15rem 0.6rem;
  border-radius: 3px;
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
}

.article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.5rem;
}
.article-tag {
  background: #f0f0f0;
  color: #444;
  padding: 0.15rem 0.6rem;
  border-radius: 3px;
  font-size: 0.78rem;
  text-decoration: none;
}
.article-tag:hover { background: #e0e8ff; color: #0057b8; }

.hero-image {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 6px;
  margin-bottom: 0.4rem;
}
figcaption {
  font-size: 0.8rem;
  color: #777;
  text-align: center;
  margin-top: 0.4rem;
  margin-bottom: 1.75rem;
}

.toc {
  background: #f8f9fa;
  border-left: 4px solid #0057b8;
  border-radius: 0 6px 6px 0;
  padding: 1.25rem 1.5rem;
  margin: 1.75rem 0;
  font-size: 0.9rem;
}
.toc-title {
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 0.75rem;
  color: #111;
}
.toc ol { padding-left: 1.25rem; }
.toc li { margin-bottom: 0.35rem; }
.toc a { color: #0057b8; text-decoration: none; }
.toc a:hover { text-decoration: underline; }

.intro-highlight {
  font-size: 1.1rem;
  line-height: 1.8;
  color: #222;
  border-left: 4px solid #0057b8;
  padding-left: 1.25rem;
  margin-bottom: 1.75rem;
}

.callout {
  background: #fffbea;
  border: 1px solid #f0d060;
  border-radius: 6px;
  padding: 1rem 1.25rem;
  margin: 1.75rem 0;
  font-size: 0.95rem;
}
.callout strong { color: #7a5c00; }

.post-image {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 4px;
  margin: 1.75rem 0 0.4rem;
}

.article-body > *:first-child { margin-top: 0; }
.article-body img { max-width: 100%; height: auto; }

table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.75rem 0;
  font-size: 0.9rem;
}
th {
  background: #f0f4ff;
  color: #111;
  font-weight: 700;
  text-align: left;
  padding: 0.6rem 0.9rem;
  border-bottom: 2px solid #d0d8f0;
}
td {
  padding: 0.55rem 0.9rem;
  border-bottom: 1px solid #e8e8e8;
  vertical-align: top;
}
tr:last-child td { border-bottom: none; }

.author-box {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  background: #f8f9fa;
  border-radius: 6px;
  padding: 1.25rem;
  margin: 2.5rem 0;
}
.author-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  flex-shrink: 0;
  object-fit: cover;
}
.author-name { font-weight: 700; font-size: 1rem; margin-bottom: 0.25rem; }
.author-bio { font-size: 0.88rem; color: #444; line-height: 1.6; }
.author-links { margin-top: 0.5rem; font-size: 0.82rem; }
.author-links a { margin-right: 0.75rem; color: #0057b8; text-decoration: none; }
.author-links a:hover { text-decoration: underline; }

.related-posts { margin: 2.5rem 0; }
.related-posts h2 { margin-bottom: 1rem; }
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}
.related-card {
  border: 1px solid #e8e8e8;
  border-radius: 6px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: block;
  transition: box-shadow 0.15s;
}
.related-card:hover { box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08); }
.related-card img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  display: block;
}
.related-card-body { padding: 0.75rem; }
.related-card-title { font-weight: 700; font-size: 0.9rem; color: #111; }
.related-card-date { font-size: 0.78rem; color: #888; margin-top: 0.25rem; }

.site-footer {
  border-top: 1px solid #e8e8e8;
  padding: 1.5rem 0;
  margin-top: 3rem;
  font-size: 0.82rem;
  color: #888;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  justify-content: space-between;
}
.site-footer a { color: #888; text-decoration: none; }
.site-footer a:hover { color: #0057b8; text-decoration: underline; }

/* Blog index */
.posts { list-style: none; margin: 0; padding: 0; }
.posts article {
  padding: 1.25rem 0;
  border-bottom: 1px solid #e8e8e8;
}
.posts h2 {
  font-size: 1.2rem;
  border-bottom: none;
  padding-bottom: 0;
  margin-top: 0;
  margin-bottom: 0.35rem;
}
.posts h2 a {
  color: inherit;
  text-decoration: none;
}
.posts h2 a:hover {
  color: #0057b8;
  text-decoration: underline;
}
.posts .meta {
  font-size: 0.875rem;
  color: #555;
  margin-bottom: 0;
}

.empty, .error { color: #555; margin: 1rem 0; }
.error { color: #8b0000; }

@media (max-width: 600px) {
  html { font-size: 16px; }
  h1 { font-size: 1.6rem; }
  h2 { font-size: 1.3rem; }
  .author-box { flex-direction: column; }
  .site-header { flex-direction: column; align-items: flex-start; }
}
