/**
 * System Academy â€” Blog archive + single article
 */

body.blog .sa-site-main,
body.single-post .sa-site-main,
body.archive .sa-site-main,
body.category .sa-site-main,
body.tag .sa-site-main,
body.search .sa-site-main {
  padding-top: 0;
  padding-bottom: 0;
  background: var(--sa-surface);
}
.sa-blog { padding: 64px 0 96px; background: var(--sa-surface); }
.sa-blog__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 48px;
}
.sa-blog__chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.sa-blog__chip {
  display: inline-flex;
  align-items: center;
  padding: 8px 18px;
  border-radius: 99px;
  border: 1px solid var(--sa-border);
  background: var(--sa-surface);
  color: var(--sa-text);
  font-family: var(--sa-font-body);
  font-weight: 500;
  font-size: 14px;
  line-height: 1.6;
}
.sa-blog__chip.is-active,
.sa-blog__chip:hover {
  background: var(--sa-brand-blue);
  border-color: var(--sa-brand-blue);
  color: #fff;
}
.sa-blog__search input {
  width: 360px;
  max-width: 100%;
  border: 1.5px solid var(--sa-border);
  border-radius: 12px;
  background: var(--sa-surface);
  padding: 14px 18px;
  font-family: var(--sa-font-body);
  font-size: 16px;
  color: var(--sa-text);
  text-align: start;
}
.sa-blog__search input::placeholder { color: var(--sa-text-muted); }
.sa-post-feature {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--sa-border);
  border-radius: 24px;
  overflow: hidden;
  background: var(--sa-surface);
  margin-bottom: 48px;
}
.sa-post-feature__media,
.sa-post-card__media {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #e4e8fa;
  overflow: hidden;
}
.sa-post-feature__media { flex: 0 0 50%; min-height: 380px; }
.sa-post-feature__media img,
.sa-post-card__media img { width: 100%; height: 100%; object-fit: cover; }
.sa-post-slot { display: grid; place-items: center; width: 100%; height: 100%; }
.sa-post-slot img { width: 32px !important; height: 32px !important; max-width: 32px; object-fit: contain; }
.sa-post-feature__body {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 10px;
  padding: 48px;
  text-align: start;
}
.sa-post-cat {
  display: inline-flex;
  padding: 4px 12px;
  border-radius: 99px;
  background: var(--sa-surface-soft);
  color: var(--sa-brand-blue);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.5;
}
.sa-post-feature__title,
.sa-post-card__title { margin: 0; text-align: start; }
.sa-post-feature__title {
  font-family: var(--sa-font-heading);
  font-weight: 800;
  font-size: 36px;
  line-height: 1.35;
}
.sa-post-feature__title a,
.sa-post-card__title a { color: var(--sa-text); }
.sa-post-feature__title a:hover,
.sa-post-card__title a:hover { color: var(--sa-brand-blue); }
.sa-post-excerpt {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.6;
  color: var(--sa-text-muted);
  text-align: start;
}
.sa-post-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--sa-font-heading);
  font-weight: 700;
  font-size: 16px;
  color: var(--sa-brand-blue);
}
.sa-post-more svg { width: 16px; height: 16px; display: block; }
.sa-blog__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
  align-items: stretch;
}
.sa-post-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-width: 0;
  border: 1px solid var(--sa-border);
  border-radius: 24px;
  overflow: hidden;
  background: var(--sa-surface);
}
.sa-post-card__media { height: 220px; }
.sa-post-card__body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding: 24px;
  text-align: start;
}
.sa-post-card__title {
  font-family: var(--sa-font-heading);
  font-weight: 700;
  font-size: 20px;
  line-height: 1.45;
}
.sa-blog__empty { margin: 0; text-align: start; color: var(--sa-text-muted); }
.sa-blog { scroll-margin-top: 96px; }
.sa-blog__results.is-loading { opacity: .55; }
.sa-blog__pages {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin-top: 32px;
}
.sa-blog__page {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	min-height: 40px;
	padding: 8px 14px;
	border: 1px solid var(--sa-border);
	border-radius: 99px;
	background: #fff;
	color: var(--sa-text);
	font-family: var(--sa-font-num);
	font-weight: 700;
	line-height: 1;
}
.sa-blog__page--step {
	width: 40px;
	min-width: 40px;
	padding: 0;
}
.sa-blog__page.is-active,
.sa-blog__page:hover {
	background: var(--sa-brand-blue);
	border-color: var(--sa-brand-blue);
	color: #fff;
}
.sa-blog__page.is-disabled,
.sa-blog__page.is-disabled:hover {
	background: #fff;
	border-color: var(--sa-border);
	color: var(--sa-text-muted);
	cursor: default;
}
.sa-blog__gap {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 28px;
	color: var(--sa-text-muted);
	font-weight: 700;
	letter-spacing: 1px;
	line-height: 1;
}

.sa-article { padding: 48px 0 32px; background: var(--sa-surface); }
.sa-article__wrap { max-width: 860px; }
.sa-article__media {
  margin: 0 0 32px;
  border-radius: 24px;
  overflow: hidden;
  background: #e4e8fa;
  min-height: 280px;
}
.sa-article__media img { width: 100%; height: auto; display: block; }
.sa-article__content {
  font-size: 18px;
  line-height: 1.8;
  color: var(--sa-text);
  text-align: start;
}
.sa-article__content p { margin: 0 0 16px; }
.sa-article__content h2 {
  font-family: var(--sa-font-heading);
  font-size: 28px;
  margin: 28px 0 12px;
}
.sa-article-related { padding-top: 16px; }
.sa-article-related__title {
  margin: 0 0 24px;
  text-align: start;
  font-family: var(--sa-font-heading);
  font-weight: 800;
  font-size: 32px;
}

.sa-article__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 18px;
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
  color: var(--sa-text-muted);
  font-size: 14px;
}
.sa-article__meta a { color: var(--sa-brand-blue); }
.sa-article__media figcaption {
  margin: 0;
  padding: 10px 16px 14px;
  text-align: start;
  color: var(--sa-text-muted);
  font-size: 13px;
}
.sa-article__content h3,
.sa-article__content h4 {
  font-family: var(--sa-font-heading);
  margin: 24px 0 10px;
  text-align: start;
}
.sa-article__content h3 { font-size: 22px; }
.sa-article__content ul,
.sa-article__content ol { margin: 0 0 16px; padding-inline-start: 1.4em; text-align: start; }
.sa-article__content li { margin: 0 0 6px; }
.sa-article__content a { color: var(--sa-brand-blue); }
.sa-article__content blockquote,
.sa-article__content .wp-block-pullquote {
  margin: 24px 0;
  padding: 8px 20px;
  border-inline-start: 4px solid var(--sa-brand-aqua);
  color: var(--sa-text);
  background: var(--sa-surface-soft);
  border-radius: 16px;
}
.sa-article__content img,
.sa-article__content video,
.sa-article__content iframe { max-width: 100%; height: auto; }
.sa-article__content .wp-block-image,
.sa-article__content figure { margin: 24px 0; max-width: 100%; }
.sa-article__content figcaption { color: var(--sa-text-muted); font-size: 13px; text-align: start; }
.sa-article__content .wp-block-gallery { margin: 24px 0; }
.sa-article__content .wp-block-table { overflow-x: auto; max-width: 100%; }
.sa-article__content table { width: 100%; border-collapse: collapse; }
.sa-article__content th,
.sa-article__content td { border: 1px solid var(--sa-border); padding: 10px 12px; text-align: start; }
.sa-article__content pre,
.sa-article__content code {
  font-family: ui-monospace, monospace;
  background: var(--sa-surface-soft);
  border-radius: 8px;
}
.sa-article__content pre { padding: 16px; overflow-x: auto; }
.sa-article__content .wp-block-embed { margin: 24px 0; max-width: 100%; }
.sa-article__pages { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.sa-article__pages a,
.sa-article__pages > span {
  display: inline-flex;
  min-width: 40px;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  border: 1px solid var(--sa-border);
}
.sa-article__footer { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; margin-top: 32px; }
.sa-article__terms { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.sa-article__terms span { color: var(--sa-text-muted); font-size: 14px; }
.sa-article__terms a {
  display: inline-flex;
  padding: 4px 12px;
  border-radius: 99px;
  background: var(--sa-surface-soft);
  color: var(--sa-brand-blue);
  font-size: 13px;
}
.sa-article__edit { margin: 0; font-size: 13px; }
.sa-author {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-top: 32px;
  padding: 24px;
  border-radius: 24px;
  background: var(--sa-surface-soft);
  text-align: start;
}
.sa-author__avatar img { width: 72px; height: 72px; border-radius: 50%; display: block; }
.sa-author__label { margin: 0; color: var(--sa-eyebrow); font-family: var(--sa-font-num); font-size: 13px; letter-spacing: .12em; }
.sa-author__copy h2 { margin: 4px 0; font-family: var(--sa-font-heading); font-size: 22px; }
.sa-author__copy p { margin: 0; color: var(--sa-text-muted); }
.sa-article__pager {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
  margin-top: 28px;
  align-items: stretch;
}
.sa-article__pager-link {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  min-width: 0;
  padding: 20px;
  border: 1px solid var(--sa-border);
  border-radius: 20px;
  text-align: start;
  color: var(--sa-text);
}
.sa-article__pager-link span { color: var(--sa-text-muted); font-size: 13px; }
.sa-article__pager-link strong {
  display: block;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-family: var(--sa-font-heading);
  font-size: 16px;
  font-weight: 700;
}
.sa-comments { margin-top: 40px; padding-top: 8px; }
.sa-comments__title { margin: 0 0 16px; text-align: start; font-family: var(--sa-font-heading); font-size: 28px; }
.sa-comments__list { margin: 0 0 24px; padding: 0; list-style: none; }
.sa-comment { margin: 0 0 16px; }
.sa-comment .children { margin: 12px 0 0; padding-inline-start: 28px; list-style: none; }
.sa-comment__body { display: flex; align-items: flex-start; gap: 12px; }
.sa-comment__avatar img { width: 48px; height: 48px; border-radius: 50%; }
.sa-comment__main { min-width: 0; text-align: start; }
.sa-comment__meta { display: flex; flex-wrap: wrap; gap: 8px 14px; color: var(--sa-text-muted); font-size: 13px; }
.sa-comment__author { color: var(--sa-text); font-weight: 700; }
.sa-comment__text { margin-top: 6px; }
.sa-comment__actions { display: flex; gap: 12px; font-size: 13px; }
.sa-comment__actions a { color: var(--sa-brand-blue); }
.sa-comment__pending { margin: 6px 0 0; color: var(--sa-text-muted); }
.sa-comment-form { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.sa-comment-form .sa-field { width: 100%; }
.sa-comment-form textarea.sa-field__control { min-height: 140px; }
.sa-comment-form__cookies { display: flex; align-items: center; gap: 8px; margin: 0; }
@media (max-width: 980px) {
  .sa-article__pager { gap: 10px; }
  .sa-article__pager-link { padding: 14px 12px; }
  .sa-article__pager-link strong { font-size: 14px; }
  .sa-author { flex-direction: column; }
}

@media (max-width: 1100px) {
  .sa-blog__search input { width: 240px; }
}
@media (max-width: 980px) {
  .sa-post-feature,
  .sa-blog__bar {
    flex-direction: column;
    align-items: stretch;
  }
  .sa-blog__grid { grid-template-columns: 1fr; }
  .sa-blog { padding: 32px 0 48px; }
  .sa-blog__bar { margin-bottom: 24px; gap: 16px; }
  .sa-blog__search input,
  .sa-blog__search { width: 100%; }
  .sa-post-feature__media { min-height: 200px; flex-basis: auto; }
  .sa-post-feature__body { padding: 24px; }
  .sa-post-feature__title { font-size: 26px; }
}
