/* Blog pages (Engineering Notes). Loaded only by /blog/ pages; follows docs/DESIGN.md:
   tonal layering, no 1px section borders, Space Grotesk for headings, Inter for body. */
.cgBlog {
  background:
    radial-gradient(circle at 88% 0%, rgba(110, 250, 152, 0.12), rgba(110, 250, 152, 0) 34%),
    linear-gradient(180deg, #f3f2ff 0%, #fbf8ff 520px);
  padding: 156px 0 104px;
  color: #1b2333;
  font-family: 'Inter', sans-serif;
}

.cgBlog__frame {
  width: min(100%, 1180px);
  margin: 0 auto;
  padding: 0 24px;
}

.cgBlog__frame--post {
  width: min(100%, 780px);
}

.cgBlog__header {
  max-width: 860px;
  margin: 0 0 48px;
}

.cgBlog__title {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: clamp(2.1rem, 4.4vw, 3.5rem);
  line-height: 1.06;
  letter-spacing: -0.045em;
  color: #001c6c;
  margin: 0 0 24px;
}

.cgBlog--post .cgBlog__title {
  font-size: clamp(2rem, 3.6vw, 2.9rem);
  line-height: 1.1;
}

.cgBlog__lede {
  font-size: 1.2rem;
  line-height: 1.65;
  color: #3b4a70;
  margin: 0 0 24px;
}

.cgBlog__crumb,
.cgBlog__meta {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #006d34;
  margin: 0 0 16px;
}

.cgBlog__header .cgBlog__meta {
  margin: 0;
  color: #516084;
}

.cgBlog__crumb a {
  color: inherit;
  text-decoration: none;
}

.cgBlog__crumb a:hover,
.cgBlog__crumb a:focus {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.cgBlog__draft {
  background: #e4e7ff;
  color: #001c6c;
  border-radius: 12px;
  padding: 14px 18px;
  font-size: 0.95rem;
  line-height: 1.55;
  margin: 0 0 40px;
}

/* List of notes: the first card leads, the rest sit two across. */
.cgBlog__list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.cgBlog__card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border-radius: 16px;
  padding: 36px;
  box-shadow: 0 20px 40px rgba(0, 20, 84, 0.06);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.cgBlog__card:hover,
.cgBlog__card:focus-within {
  transform: translateY(-4px);
  box-shadow: 0 28px 70px rgba(0, 20, 84, 0.1);
}

.cgBlog__card:first-child {
  grid-column: 1 / -1;
  padding: 48px;
  background: linear-gradient(145deg, #001c6c 0%, #1a338a 100%);
}

.cgBlog__card h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.55rem;
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -0.035em;
  margin: 0 0 14px;
}

.cgBlog__card:first-child h2 {
  max-width: 820px;
  font-size: clamp(1.7rem, 2.8vw, 2.4rem);
  line-height: 1.1;
}

.cgBlog__card h2 a {
  color: #001c6c;
  text-decoration: none;
}

/* The whole card is the link target. */
.cgBlog__card h2 a::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 16px;
}

.cgBlog__card p {
  margin: 0 0 24px;
  color: #516084;
  line-height: 1.65;
}

.cgBlog__card .cgBlog__meta {
  margin: 0 0 16px;
  color: #006d34;
}

.cgBlog__card:first-child p:not(.cgBlog__meta) {
  max-width: 760px;
  font-size: 1.1rem;
  color: rgba(220, 225, 255, 0.9);
}

.cgBlog__card:first-child h2 a {
  color: #fff;
}

.cgBlog__card:first-child .cgBlog__meta,
.cgBlog__card:first-child .cgBlog__more {
  color: #6efa98;
}

.cgBlog__more {
  margin-top: auto;
  font-size: 0.95rem;
  font-weight: 700;
  color: #006d34;
}

.cgBlog__more::after {
  content: " \2192";
}

/* Post body */
.cgBlog__body {
  font-size: 1.1rem;
  line-height: 1.75;
  color: #26304a;
}

.cgBlog__body h2 {
  font-family: 'Space Grotesk', sans-serif;
  color: #001c6c;
  font-size: 1.65rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.035em;
  margin: 56px 0 18px;
}

.cgBlog__body p,
.cgBlog__body ul,
.cgBlog__body ol {
  margin: 0 0 22px;
}

.cgBlog__body strong {
  color: #001c6c;
}

.cgBlog__body ul {
  padding: 0;
  list-style: none;
}

.cgBlog__body ul li {
  position: relative;
  padding-left: 24px;
  margin-bottom: 10px;
}

.cgBlog__body ul li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.68em;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: #006d34;
}

.cgBlog__body a {
  color: #006d34;
  font-weight: 600;
  text-underline-offset: 3px;
}

.cgBlog__body > p:last-child {
  margin: 56px 0 0;
  padding: 20px 24px;
  border-radius: 12px;
  background: #ffffff;
  font-size: 1rem;
}

.cgBlog__back {
  margin: 32px 0 0;
  font-size: 0.95rem;
  font-weight: 700;
}

.cgBlog__back a {
  color: #001c6c;
  text-decoration: none;
}

.cgBlog__back a::before {
  content: "\2190  ";
}

.cgBlog__back a:hover,
.cgBlog__back a:focus {
  text-decoration: underline;
  text-underline-offset: 4px;
}

@media (max-width: 991.98px) {
  .cgBlog {
    padding: 128px 0 80px;
  }

  .cgBlog__list {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 575.98px) {
  .cgBlog__frame {
    padding: 0 20px;
  }

  .cgBlog__card,
  .cgBlog__card:first-child {
    padding: 28px 24px;
  }

  .cgBlog__lede {
    font-size: 1.1rem;
  }

  .cgBlog__body {
    font-size: 1.05rem;
  }

  .cgBlog__body h2 {
    font-size: 1.45rem;
    margin-top: 44px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cgBlog__card {
    transition: none;
  }
}

/* The global "#content > section" padding outranks a single class. */
#content > .cgBlog {
  padding-top: 156px;
  padding-bottom: 104px;
}

@media (max-width: 991.98px) {
  #content > .cgBlog {
    padding-top: 128px;
    padding-bottom: 80px;
  }
}

/* The global a:hover colour fails contrast on the navy lead card. */
.cgBlog__card:first-child h2 a:hover,
.cgBlog__card:first-child h2 a:focus {
  color: #fff !important;
}

/* Inline SVG figure in posts (sign-in flow). Light theme only, like the rest of the site. */
.cgFlow {
  margin: 36px auto 32px;
  max-width: 440px;
}

.cgFlow svg {
  display: block;
  width: 100%;
  height: auto;
}

.cgFlow figcaption {
  margin-top: 14px;
  font-size: 0.9rem;
  line-height: 1.5;
  color: #44474f;
}

.cgFlow__box {
  fill: #f3f2ff;
  stroke: rgba(0, 28, 108, 0.14);
  stroke-width: 1;
}

.cgFlow__step--edge .cgFlow__bar {
  fill: #001c6c;
}

.cgFlow__step--provider .cgFlow__bar {
  fill: #006d34;
}

.cgFlow__step--browser .cgFlow__bar,
.cgFlow__step--legacy .cgFlow__bar {
  fill: #5a6286;
}

.cgFlow__lane {
  font-family: 'Inter', sans-serif;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  fill: #44474f;
}

.cgFlow__step--provider .cgFlow__lane {
  fill: #006d34;
}

.cgFlow__title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
  fill: #001c6c;
}

.cgFlow__detail {
  font-family: 'Inter', sans-serif;
  font-size: 12.5px;
  fill: #44474f;
}

.cgFlow__arrow {
  stroke: #5a6286;
  stroke-width: 1.5;
}

.cgFlow__arrowhead {
  fill: none;
  stroke: #5a6286;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Optional hero image under the post title. */
.cgBlog__hero {
  margin: 0 0 40px;
}

.cgBlog__hero img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(0, 20, 84, 0.08);
}
