/* ==========================================================================
   BLOG — listing, category and article pages
   Reading pages built on the legal page measure; code blocks are the one
   place the site goes dark, so they read as terminals.
   ========================================================================== */

#blog-page .bl-wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

/* :: LISTING HERO :: */
#blog-page .bl-hero {
  background: linear-gradient(180deg, #f6f9fd 0%, #eef2fb 100%);
  border-bottom: 1px solid var(--border);
  padding: 58px 0 50px;
  margin-bottom: 36px;
}
#blog-page .bl-eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 12px;
}
#blog-page .bl-title {
  font-size: clamp(1.8rem, 3.6vw, 2.5rem);
  font-weight: 700;
  line-height: 1.2;
  color: var(--darkBlue);
  margin-bottom: 12px;
  max-width: 820px;
}
#blog-page .bl-lead {
  font-size: 16.5px;
  line-height: 1.75;
  color: var(--lightBlue);
  max-width: 680px;
  margin: 0;
}
#blog-page .bl-crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 13px;
  margin-bottom: 14px;
}
#blog-page .bl-crumbs a { color: var(--primary); font-weight: 500; }
#blog-page .bl-crumbs span { color: #b4bfd6; }
#blog-page .bl-crumbs .here { color: var(--lightBlue); }

/* :: LISTING: categories left, posts right :: */
#blog-page .bl-listing {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 48px;
  align-items: start;
  margin-bottom: 80px;
}
#blog-page .bl-side { position: sticky; top: 24px; }
#blog-page .bl-catlist { margin: 0 0 18px; }
#blog-page .bl-catlist li + li { margin-top: 2px; }
#blog-page .bl-catlist a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 10px;
  border-left: 2px solid transparent;
  font-size: 14px;
  font-weight: 500;
  color: var(--darkBlue);
  border-radius: 0 6px 6px 0;
}
#blog-page .bl-catlist a span { font-size: 12px; color: #9aa7c7; }
#blog-page .bl-catlist a:hover { background: var(--light); border-left-color: rgba(78,79,235,.4); }
#blog-page .bl-catlist a.is-active { border-left-color: var(--primary); color: var(--primary); background: var(--primary-shadow); }
#blog-page .bl-catlist a.is-active span { color: var(--primary); }
#blog-page .bl-rss { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 500; color: var(--lightBlue); padding: 0 10px; }
#blog-page .bl-rss:hover { color: var(--primary); }
#blog-page .bl-side-cta { margin-top: 26px; padding: 16px 18px; background: var(--light); border-radius: 6px; }
#blog-page .bl-side-cta p { font-size: 13px; line-height: 1.6; color: var(--lightBlue); margin-bottom: 8px; }
#blog-page .bl-side-cta a { font-size: 13.5px; font-weight: 600; color: var(--primary); }

/* :: CARDS :: */
#blog-page .bl-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}
#blog-page .bl-related .bl-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 80px; }
#blog-page .bl-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 24px 24px 20px;
  color: inherit;
  overflow: hidden;
  transition: border-color .2s, box-shadow .2s, transform .2s;
}
#blog-page .bl-card::before {
  content: "";
  position: absolute;
  left: 0; top: 0; right: 0;
  height: 3px;
  background: var(--primary);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .25s ease;
}
#blog-page .bl-card:hover {
  border-color: rgba(78, 79, 235, .45);
  box-shadow: 0 12px 30px rgba(14, 41, 84, .08);
  transform: translateY(-2px);
}
#blog-page .bl-card:hover::before { transform: scaleX(1); }
#blog-page .bl-card-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
#blog-page .bl-cat {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--primary);
  background: var(--primary-shadow);
  padding: 4px 9px;
  border-radius: 3px;
}
#blog-page .bl-date { font-size: 12.5px; color: #9aa7c7; }
#blog-page .bl-card-title {
  font-size: 17.5px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--darkBlue);
  margin-bottom: 10px;
}
#blog-page .bl-card-desc {
  font-size: 14px;
  line-height: 1.7;
  color: var(--lightBlue);
  margin-bottom: 18px;
  flex: 1 1 auto;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
#blog-page .bl-card-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 14px;
  border-top: 1px solid var(--light);
  font-size: 12.5px;
  color: #9aa7c7;
}
#blog-page .bl-go { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--primary); }
#blog-page .bl-go svg { transition: transform .2s; }
#blog-page .bl-card:hover .bl-go svg { transform: translateX(3px); }
#blog-page .bl-empty { color: var(--lightBlue); padding: 40px 0 80px; }

/* :: PAGINATION :: */
#blog-page .bl-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 30px 0 10px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
}
#blog-page .bl-pg-nums { display: flex; align-items: center; gap: 4px; }
#blog-page .bl-pg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--darkBlue);
  background: #fff;
  transition: border-color .15s, background .15s;
}
#blog-page a.bl-pg:hover { border-color: var(--primary); color: var(--primary); }
#blog-page .bl-pg.is-current { background: var(--primary); border-color: var(--primary); color: #fff; }
#blog-page .bl-pg.is-disabled { color: #b4bfd6; border-color: var(--light); cursor: default; }
#blog-page .bl-pg-gap { color: #9aa7c7; padding: 0 4px; }
@media (max-width: 640px) {
  #blog-page .bl-pager { flex-wrap: wrap; justify-content: center; }
  #blog-page .bl-pg-nums { order: 3; width: 100%; justify-content: center; margin-top: 8px; }
}

/* :: ARTICLE :: */
#blog-page.bl-article .bl-wrap { padding-top: 48px; }
#blog-page .bl-head { max-width: 780px; margin-bottom: 40px; }
#blog-page .bl-head .bl-title { font-size: clamp(1.7rem, 3.4vw, 2.4rem); }
#blog-page .bl-meta { font-size: 13.5px; color: #9aa7c7; margin: 14px 0 0; display: flex; gap: 8px; flex-wrap: wrap; }
#blog-page .bl-layout {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 56px;
  align-items: start;
  margin-bottom: 70px;
}
#blog-page .bl-aside { position: sticky; top: 24px; }
#blog-page .side-block + .side-block { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--border); }
#blog-page .side-title {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #9aa7c7;
  margin-bottom: 12px;
}
#blog-page .toc { margin: 0; }
#blog-page .toc li + li { margin-top: 2px; }
#blog-page .toc a {
  display: block;
  padding: 6px 10px;
  border-left: 2px solid transparent;
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--lightBlue);
  border-radius: 0 6px 6px 0;
}
#blog-page .toc a:hover { color: var(--primary); border-left-color: var(--primary); background: var(--light); }
#blog-page .side-cta p { font-size: 13.5px; line-height: 1.65; color: var(--lightBlue); margin-bottom: 14px; }

/* body typography */
#blog-page .bl-body {
  max-width: 760px;
  font-size: 16px;
  line-height: 1.8;
  color: #3b4a68;
}
#blog-page .bl-hero-img { border-radius: 12px; margin-bottom: 28px; border: 1px solid var(--border); }
#blog-page .bl-body h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--darkBlue);
  margin: 44px 0 14px;
  scroll-margin-top: 24px;
}
#blog-page .bl-body > h2:first-child { margin-top: 0; }
#blog-page .bl-body h3 { font-size: 17.5px; font-weight: 600; color: var(--darkBlue); margin: 30px 0 10px; }
#blog-page .bl-body p { margin-bottom: 18px; }
#blog-page .bl-body strong { color: var(--darkBlue); font-weight: 600; }
#blog-page .bl-body a { color: var(--primary); text-decoration: underline; text-underline-offset: 2px; }
#blog-page .bl-body ul, #blog-page .bl-body ol { margin: 0 0 20px; padding-left: 22px; }
#blog-page .bl-body li { margin-bottom: 8px; padding-left: 4px; }
#blog-page .bl-body li::marker { color: var(--primary); font-weight: 600; }
#blog-page .bl-body li > ul, #blog-page .bl-body li > ol { margin: 8px 0 0; }
#blog-page .bl-body hr { border: 0; border-top: 1px solid var(--border); margin: 36px 0; }
#blog-page .bl-body blockquote {
  margin: 0 0 20px;
  padding: 14px 20px;
  border-left: 3px solid var(--primary);
  background: var(--light);
  border-radius: 0 8px 8px 0;
}
#blog-page .bl-body blockquote p:last-child { margin-bottom: 0; }
#blog-page .bl-body table { width: 100%; margin-bottom: 22px; border-collapse: collapse; font-size: 14px; display: block; overflow-x: auto; }
#blog-page .bl-body th, #blog-page .bl-body td { padding: 10px 14px; border: 1px solid var(--border); text-align: left; vertical-align: top; }
#blog-page .bl-body th { background: var(--light); color: var(--darkBlue); font-weight: 600; white-space: nowrap; }
#blog-page .bl-body img { border-radius: 10px; border: 1px solid var(--border); margin: 6px 0 20px; }
#blog-page .bl-body figcaption { font-size: 13px; color: #9aa7c7; margin-top: -12px; margin-bottom: 20px; }

/* inline code: a quiet chip on the page */
#blog-page .bl-body code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 0.88em;
  background: #eef1f8;
  color: #0E2954;
  padding: 2px 6px;
  border-radius: 5px;
  word-break: break-word;
}
#blog-page .bl-body th code, #blog-page .bl-body td code { white-space: nowrap; }

/* :: CODE BLOCKS :: */
#blog-page .code-block {
  margin: 4px 0 24px;
  border-radius: 10px;
  overflow: hidden;
  background: #0f1b33;
  border: 1px solid #1d2c4d;
  box-shadow: 0 8px 24px rgba(14, 41, 84, .14);
}
#blog-page .code-block-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 10px 7px 14px;
  background: #13213d;
  border-bottom: 1px solid #1d2c4d;
}
#blog-page .code-block-lang {
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 11.5px;
  letter-spacing: .6px;
  text-transform: uppercase;
  color: #7f8ea6;
}
#blog-page .code-block-copy {
  border: 1px solid #2a3b60;
  background: transparent;
  color: #b7c3dc;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: background .15s, color .15s;
}
#blog-page .code-block-copy:hover { background: #22345c; color: #fff; }
#blog-page .code-block-copy.is-done { background: #1f7a5a; border-color: #1f7a5a; color: #fff; }
#blog-page .code-block pre {
  margin: 0;
  padding: 16px 18px;
  overflow-x: auto;
  background: transparent;
  color: #e6ecf7;
}
#blog-page .code-block pre code {
  display: block;
  background: transparent;
  color: inherit;
  padding: 0;
  font-size: 13.5px;
  line-height: 1.7;
  white-space: pre;
  word-break: normal;
}

/* highlight.js tokens, tuned to the brand's navy ground */
#blog-page .hljs-comment, #blog-page .hljs-quote { color: #7f8ea6; font-style: italic; }
#blog-page .hljs-keyword, #blog-page .hljs-selector-tag, #blog-page .hljs-section { color: #8fb8ff; font-weight: 600; }
#blog-page .hljs-built_in, #blog-page .hljs-name, #blog-page .hljs-tag { color: #82c7ff; }
#blog-page .hljs-string, #blog-page .hljs-addition, #blog-page .hljs-regexp { color: #a5e3a1; }
#blog-page .hljs-number, #blog-page .hljs-literal { color: #ffcb6b; }
#blog-page .hljs-variable, #blog-page .hljs-template-variable, #blog-page .hljs-params { color: #ffb38a; }
#blog-page .hljs-attr, #blog-page .hljs-attribute, #blog-page .hljs-selector-attr { color: #c3e88d; }
#blog-page .hljs-title, #blog-page .hljs-title.function_, #blog-page .hljs-selector-class, #blog-page .hljs-selector-id { color: #ffd166; }
#blog-page .hljs-meta, #blog-page .hljs-meta .hljs-keyword, #blog-page .hljs-symbol, #blog-page .hljs-bullet { color: #89ddff; }
#blog-page .hljs-deletion { color: #ff8a80; }
#blog-page .hljs-emphasis { font-style: italic; }
#blog-page .hljs-strong { font-weight: 700; }

/* tags + related */
#blog-page .bl-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 34px 0 0; }
#blog-page .bl-tags span { font-size: 12.5px; color: var(--lightBlue); background: var(--light); padding: 4px 10px; border-radius: 999px; }
#blog-page .bl-related { padding-top: 40px; border-top: 1px solid var(--border); }
#blog-page .bl-related-title { font-size: 20px; font-weight: 700; color: var(--darkBlue); margin-bottom: 20px; }

/* :: RESPONSIVE :: */
@media (max-width: 991px) {
  #blog-page .bl-listing { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  #blog-page .bl-side { position: static; }
  #blog-page .bl-catlist { display: flex; flex-wrap: wrap; gap: 6px; }
  #blog-page .bl-catlist li + li { margin: 0; }
  #blog-page .bl-catlist a { border: 1px solid var(--border); border-radius: 4px; padding: 6px 12px; gap: 8px; }
  #blog-page .bl-side-cta { display: none; }
  #blog-page .bl-related .bl-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #blog-page .bl-layout { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  #blog-page .bl-aside { position: static; }
  #blog-page .toc { columns: 2; column-gap: 24px; }
  #blog-page .side-cta { display: none; }
}
@media (max-width: 640px) {
  #blog-page .bl-grid { grid-template-columns: minmax(0, 1fr); }
  #blog-page .bl-hero { padding: 40px 0 34px; }
  #blog-page .toc { columns: 1; }
  #blog-page .bl-body { font-size: 15.5px; }
  #blog-page .code-block pre { padding: 14px; }
  #blog-page .bl-related .bl-grid { grid-template-columns: minmax(0, 1fr); }
}
