/* ============================
   Blog Hub & Article Styles
   The hub builds on home.css (container, CTA). Articles only load chrome.css, so they use its tokens.
   ============================ */

/* ---- Hub: masthead ---- */
.blog-hero {
  padding-top: var(--hp-nav-height);
}
/* The divider is a drawn line rather than a border so it can draw outward from the center on load */
.blog-filters-bar > .hp-container {
  position: relative;
}
.blog-filters-bar > .hp-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: var(--hp-gutter);
  right: var(--hp-gutter);
  height: 1px;
  background: rgba(255, 255, 255, 0.12);
  animation: blogRuleDraw 1.1s cubic-bezier(0.22, 1, 0.36, 1) 0.1s both;
}
@keyframes blogRuleDraw {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}
/* "Deck" pins left, "Blog" pins right, and the archway video sits dead center between them;
   the side tracks can't grow past an equal share, so the words never push the video off center */
.blog-headline {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  margin: 0;
  padding-block: clamp(16px, 2vw, 40px) clamp(48px, 5vw, 96px);
  font-size: clamp(44px, 6.4vw, 120px);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.035em;
  color: var(--text-primary);
}
/* The video's near-black backdrop drops out under lighten. The mask fades only the far sides and the bottom,
   where the path runs off the frame; the eased stops keep the bottom fade from ending in a visible line.
   The arch itself spans 24%-75% of the frame, inside the side fades. */
.blog-hero-video {
  --blog-video-fade-x: linear-gradient(to right, transparent, #000 20%, #000 80%, transparent);
  --blog-video-fade-y: linear-gradient(to bottom, #000 48%, rgba(0, 0, 0, 0.92) 58%, rgba(0, 0, 0, 0.74) 68%, rgba(0, 0, 0, 0.48) 78%, rgba(0, 0, 0, 0.22) 88%, rgba(0, 0, 0, 0.06) 95%, transparent);
  display: block;
  width: clamp(220px, 26vw, 460px);
  aspect-ratio: 1;
  object-fit: cover;
  mix-blend-mode: lighten;
  -webkit-mask-image: var(--blog-video-fade-x), var(--blog-video-fade-y);
  -webkit-mask-composite: source-in;
  mask-image: var(--blog-video-fade-x), var(--blog-video-fade-y);
  mask-composite: intersect;
  pointer-events: none;
}
/* The words sweep in from past their edges; the masthead clips sideways so the words starting
   off-canvas never cause horizontal scroll */
.blog-masthead {
  overflow-x: clip;
}
.blog-headline span:first-child {
  justify-self: start;
  animation: blogSlideFromLeft 1.4s cubic-bezier(0.16, 1, 0.3, 1) 0.05s both;
}
.blog-headline span:last-child {
  justify-self: end;
  animation: blogSlideFromRight 1.4s cubic-bezier(0.16, 1, 0.3, 1) 0.05s both;
}
/* Too narrow for words on both sides of the video, so it sits above them */
@media (max-width: 640px) {
  .blog-headline {
    grid-template-columns: 1fr 1fr;
    row-gap: 8px;
  }
  .blog-hero-video {
    grid-column: 1 / -1;
    grid-row: 1;
    justify-self: center;
    width: min(100%, 320px);
  }
}
@keyframes blogSlideFromLeft {
  from { opacity: 0; transform: translateX(-0.7em); }
  to { opacity: 1; transform: none; }
}
@keyframes blogSlideFromRight {
  from { opacity: 0; transform: translateX(0.7em); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .blog-filters-bar > .hp-container::before,
  .blog-headline span { animation: none; }
}

/* Category row spread edge to edge, with the first and last pills flush to the content edges */
.blog-filters {
  --blog-pill-pad: 14px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding-block: clamp(20px, 2vw, 32px) clamp(10px, 1vw, 16px);
  opacity: 0;
  animation: heroFadeIn 0.8s ease 0.6s forwards;
}
.blog-filter {
  display: inline-flex;
  align-items: center;
  flex: none;
  height: 34px;
  padding: 0 var(--blog-pill-pad);
  border: 0;
  border-radius: 999px;
  background: transparent;
  font: inherit;
  font-size: 16px;
  color: var(--hp-text-muted);
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.2s ease, background-color 0.2s ease;
}
.blog-filter[aria-pressed="true"] {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}
.blog-filter:focus-visible {
  outline: 2px solid var(--text-primary);
  outline-offset: 2px;
}
@media (hover: hover) {
  .blog-filter:hover { color: var(--text-primary); }
}

/* ---- Hub: sections ---- */
.blog-band {
  padding-top: clamp(72px, 8vw, 144px);
}
/* Tucked under the category row so the filters read as part of the content they filter */
.blog-band--top {
  padding-top: clamp(8px, 1vw, 16px);
}
.blog-band--top .blog-posts {
  opacity: 0;
  animation: heroFadeIn 0.8s ease 0.7s forwards;
}
.blog-band[hidden] { display: none; }
#main > deck-cta {
  display: block;
  margin-top: clamp(96px, 11vw, 180px);
}

.blog-post {
  color: inherit;
  text-decoration: none;
}
.blog-posts .blog-post[hidden] { display: none; }
.blog-post:focus-visible {
  outline: 2px solid var(--text-primary);
  outline-offset: 3px;
}
.blog-post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  font-size: 14px;
  line-height: 20px;
  font-variant-numeric: tabular-nums;
}
.blog-post-meta time { color: var(--text-primary); }
.blog-post-category { color: var(--hp-text-muted); }
.blog-post-title {
  margin: 0;
  font-weight: 500;
  color: var(--text-primary);
}

/* Grids: subtle blocks like the homepage cards; the summary only shows in the article itself */
.blog-posts--grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.blog-posts--grid .blog-post {
  --blog-card-pad: clamp(20px, 1.8vw, 28px);
  display: flex;
  flex-direction: column;
  min-height: clamp(300px, 26vw, 420px);
  padding: var(--blog-card-pad);
  background: rgba(255, 255, 255, 0.03);
  transition: background-color 0.3s ease;
}
.blog-posts--grid .blog-post-meta::after {
  content: '';
  flex: none;
  align-self: center;
  width: 20px;
  height: 20px;
  margin-left: auto;
  background: var(--text-primary);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 8h10M9 4l4 4-4 4'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 8h10M9 4l4 4-4 4'/%3E%3C/svg%3E") center / contain no-repeat;
  opacity: 0;
  transform: translateX(-8px);
  transition: opacity 0.3s ease, transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
/* Covers come from scripts/blog-covers; list rows stay text only */
.blog-post-cover { display: none; }
.blog-posts--grid .blog-post:has(.blog-post-cover) { min-height: 0; }
.blog-posts--grid .blog-post-cover {
  display: block;
  aspect-ratio: 1200 / 630;
  margin-bottom: var(--blog-card-pad);
  overflow: hidden;
  background: #151917;
}
.blog-posts--grid .blog-post-cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.blog-posts--grid .blog-post-cover--contain { background: var(--bg-primary); }
.blog-posts--grid .blog-post-cover--contain img {
  object-fit: contain;
  padding: 12%;
}
/* Title reads first; the meta row sits at the bottom so dates line up across a row */
.blog-posts--grid .blog-post-title {
  order: 1;
  font-size: clamp(20px, 1.6vw, 26px);
  line-height: 1.25;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.blog-posts--grid .blog-post-meta {
  order: 2;
  column-gap: 0;
  margin-top: auto;
  padding-top: clamp(36px, 3vw, 48px);
}
.blog-posts--grid .blog-post-meta time { color: var(--hp-text-muted); }
.blog-posts--grid .blog-post-category::before {
  content: "\00b7";
  margin: 0 8px;
  color: rgba(255, 255, 255, 0.3);
}
.blog-posts--grid .blog-post-desc { display: none; }
@media (hover: hover) {
  .blog-posts--grid .blog-post:hover { background-color: rgba(255, 255, 255, 0.06); }
  .blog-posts--grid .blog-post:hover .blog-post-meta::after { opacity: 1; transform: none; }
}

/* List: title on the left, date on the right, no header */
.blog-posts--list {
  margin-top: clamp(40px, 4vw, 64px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.blog-posts--list .blog-post {
  position: relative;
  z-index: 0;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 32px;
  padding: 20px clamp(20px, 1.8vw, 28px);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
/* Opaque and 1px taller than the row, so the hover block covers the borders above and below it */
.blog-posts--list .blog-post::before {
  content: '';
  position: absolute;
  inset: -1px 0;
  z-index: -1;
  background: color-mix(in srgb, #fff 3%, var(--bg-primary));
  opacity: 0;
  transition: opacity 0.3s ease;
}
.blog-posts--list .blog-post-meta {
  order: 1;
  flex: none;
  font-size: 16px;
  line-height: 24px;
}
.blog-posts--list .blog-post-meta time { color: var(--hp-text-muted); }
.blog-posts--list .blog-post-category,
.blog-posts--list .blog-post-desc { display: none; }
.blog-posts--list .blog-post-title {
  min-width: 0;
  font-size: 18px;
  font-weight: 400;
  line-height: 1.45;
  letter-spacing: -0.01em;
  color: rgba(255, 255, 255, 0.88);
}
.blog-load-more {
  display: flex;
  justify-content: center;
  margin-top: clamp(32px, 3vw, 48px);
}
.blog-load-more .hp-btn {
  border: 0;
  font-family: inherit;
  cursor: pointer;
}
.blog-load-more[hidden] { display: none; }
/* The arrow reads as "go somewhere"; this button stays on the page */
.blog-load-more .hp-btn::after { content: none; }
.blog-load-more .hp-btn:hover,
.blog-load-more .hp-btn:focus-visible { padding: 0 22px; }
@media (hover: hover) {
  .blog-posts--list .blog-post:hover { z-index: 1; }
  .blog-posts--list .blog-post:hover::before { opacity: 1; }
}

/* ---- Hub: changelog row, a timeline that reads left to right ---- */
.blog-changelog-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
}
.blog-band-title {
  margin: 0;
  font-size: clamp(40px, 4.4vw, 68px);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.025em;
  color: var(--text-primary);
}
/* Mirrors .hp-head-link on the homepage */
.blog-view-all {
  display: inline-flex;
  align-items: center;
  flex: none;
  gap: 8px;
  font-size: 20px;
  line-height: 1.5;
  color: #77AB97;
  white-space: nowrap;
  text-decoration: none;
}
.blog-view-all svg {
  width: 18px;
  height: 18px;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.blog-view-all:focus-visible {
  outline: 2px solid var(--text-primary);
  outline-offset: 3px;
}
@media (hover: hover) {
  .blog-view-all:hover svg { transform: translateX(4px); }
}

.blog-timeline-scroll {
  margin-top: clamp(40px, 4vw, 64px);
}
/* Same padding and gap as the post cards, so the blocks and copy line up with the grids */
.blog-timeline {
  --blog-dot: 7px;
  --blog-tl-pad: clamp(20px, 1.8vw, 28px);
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  column-gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.blog-timeline::before {
  content: '';
  position: absolute;
  top: calc(var(--blog-dot) / 2 - 0.5px);
  left: var(--blog-tl-pad);
  right: 0;
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
}
.blog-tl-item {
  position: relative;
  min-width: 0;
  padding-top: calc(var(--blog-dot) + 40px);
}
.blog-tl-item::before,
.blog-tl-item:first-child::after {
  content: '';
  position: absolute;
  top: 0;
  left: var(--blog-tl-pad);
  width: var(--blog-dot);
  height: var(--blog-dot);
  border-radius: 50%;
}
.blog-tl-item::before {
  background: #3A3D3C;
  box-shadow: 0 0 0 4px var(--bg-primary);
}
/* The newest entry is lit and pulses, like the changelog page */
.blog-tl-item:first-child::before { background: #77AB97; }
.blog-tl-item:first-child::after {
  background: #77AB97;
  pointer-events: none;
  animation: blogTlPulse 2.4s cubic-bezier(0.22, 1, 0.36, 1) infinite;
}
@keyframes blogTlPulse {
  0%        { transform: scale(1); opacity: 0.6; }
  70%, 100% { transform: scale(3.2); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .blog-tl-item:first-child::after { content: none; }
}
.blog-tl-link {
  display: flex;
  flex-direction: column;
  margin-block: calc(-1 * var(--blog-tl-pad));
  padding: var(--blog-tl-pad);
  color: inherit;
  text-decoration: none;
  transition: background-color 0.3s ease;
}
.blog-tl-link:focus-visible {
  outline: 2px solid var(--text-primary);
  outline-offset: 0;
}
.blog-tl-title {
  margin: 16px 0 0;
  font-size: 20px;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  text-wrap: balance;
}
.blog-tl-desc {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  margin: 12px 0 0;
  font-size: 16px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.6);
}
.blog-tl-date {
  font-size: 14px;
  line-height: 20px;
  font-variant-numeric: tabular-nums;
  color: var(--hp-text-muted);
}
.blog-tl-item:first-child .blog-tl-date { color: var(--text-primary); }
@media (hover: hover) {
  .blog-tl-link:hover { background-color: rgba(255, 255, 255, 0.03); }
}

/* ---- Hub: responsive ---- */
@media (max-width: 900px) {
  .blog-posts--grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .blog-view-all { font-size: 18px; }
  /* The timeline scrolls sideways instead of stacking, so it still reads left to right */
  .blog-timeline-scroll {
    margin-inline: calc(-1 * var(--hp-gutter));
    padding-inline: var(--hp-gutter);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: var(--hp-gutter);
    scrollbar-width: none;
  }
  .blog-timeline-scroll::-webkit-scrollbar { display: none; }
  .blog-timeline {
    width: max-content;
    min-width: 100%;
    grid-template-columns: repeat(4, min(280px, 72vw));
  }
  .blog-tl-item { scroll-snap-align: start; }
}
/* Below this the seven categories no longer fit one row, so the row scrolls sideways */
@media (max-width: 820px) {
  .blog-filters {
    justify-content: flex-start;
    gap: 4px;
    margin-inline: calc(-1 * var(--hp-gutter));
    padding-inline: var(--hp-gutter);
    overflow-x: auto;
    scrollbar-width: none;
  }
  .blog-filters::-webkit-scrollbar { display: none; }
}
@media (max-width: 600px) {
  .blog-posts--grid { grid-template-columns: minmax(0, 1fr); }
  .blog-posts--grid .blog-post { min-height: 240px; }
  .blog-posts--grid .blog-post-title { font-size: 20px; }
  .blog-posts--list .blog-post {
    flex-direction: column;
    gap: 4px;
    padding: 16px 0;
  }
  .blog-posts--list .blog-post-meta { font-size: 14px; line-height: 20px; }
  .blog-posts--list .blog-post-title { font-size: 17px; }
}

/* ============================
   Article Page
   Breadcrumbs in a left rail, everything else in one centered reading column.
   The column comes from side padding rather than a grid so sibling margins in the body still collapse.
   ============================ */
.blog-article {
  --blog-measure: 720px;
  --blog-gap: clamp(32px, 3vw, 48px);
  --blog-page: calc(var(--hp-max) + 2 * var(--hp-gutter));
  position: relative;
  padding:
    calc(var(--hp-nav-height) + clamp(48px, 4.6vw, 100px))
    max(var(--hp-gutter), calc((100% - var(--blog-measure)) / 2))
    clamp(96px, 11vw, 180px);
  font-size: 20px;
  text-wrap: pretty;
}
.blog-article > * {
  animation: heroFadeIn 0.8s ease 0.2s both;
}

/* Breadcrumbs (also used by the customer stories) */
.blog-breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 8px;
  font-size: 16px;
  line-height: 24px;
  color: var(--hp-text-muted);
}
.blog-breadcrumbs a,
.blog-breadcrumbs span:last-child {
  color: var(--hp-text-muted);
  text-decoration: none;
  transition: color 0.2s ease;
}
.blog-breadcrumb-sep {
  color: rgba(255, 255, 255, 0.3);
}
@media (hover: hover) {
  .blog-breadcrumbs a:hover { color: var(--text-primary); }
}
/* In the rail: on the site's content edge, level with the date at the top of the column */
.blog-article > .blog-breadcrumbs {
  --blog-rail-left: max(var(--hp-gutter), calc((100% - var(--blog-page)) / 2 + var(--hp-gutter)));
  position: absolute;
  top: calc(var(--hp-nav-height) + clamp(48px, 4.6vw, 100px));
  left: var(--blog-rail-left);
  width: calc((100% - var(--blog-measure)) / 2 - var(--blog-rail-left) - 40px);
}

/* Header: date · reading time, title, optional byline */
.blog-article-header {
  margin-bottom: var(--blog-gap);
}
.blog-article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  margin-bottom: 24px;
  font-size: 16px;
  line-height: 24px;
  font-variant-numeric: tabular-nums;
  color: var(--hp-text-muted);
}
.blog-article-meta .blog-article-date + .blog-article-reading::before {
  content: "\00b7";
  margin: 0 8px;
  color: rgba(255, 255, 255, 0.3);
}
.blog-article h1 {
  margin: 0;
  font-size: clamp(36px, 3.4vw, 52px);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.025em;
  color: var(--text-primary);
  text-wrap: balance;
}
.blog-article-header .blog-byline {
  margin: 20px 0 0;
}

/* Optional hero image */
.blog-article-img {
  aspect-ratio: 16 / 9;
  margin-bottom: var(--blog-gap);
  overflow: hidden;
  background: #151917;
}
.blog-article-img img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.blog-article-img.blog-img-badge {
  background: var(--bg-primary);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08);
}
.blog-article-img.blog-img-badge img {
  object-fit: contain;
  padding: clamp(24px, 3vw, 48px);
}
.blog-article-img.blog-img-cover {
  aspect-ratio: 1200 / 630;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06);
}

/* Body copy: case study type scale */
.blog-article h2 {
  margin: 2.4em 0 0.8em;
  font-size: clamp(30px, 2.8vw, 40px);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  text-wrap: balance;
}
.blog-article h3 {
  margin: 1.8em 0 0.5em;
  font-size: 22px;
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}
.blog-article h4 {
  margin: 1.6em 0 0.4em;
  font-size: 20px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--text-primary);
}
.blog-article p,
.blog-article ul,
.blog-article ol {
  margin: 0 0 1.2em;
  font-size: 1em;
  line-height: 1.6;
  letter-spacing: -0.01em;
  color: rgba(255, 255, 255, 0.72);
}
.blog-article ul,
.blog-article ol {
  padding-left: 1.2em;
}
.blog-article li {
  margin-bottom: 0.4em;
}
.blog-article strong {
  color: var(--text-primary);
  font-weight: 500;
}
.blog-article em {
  font-style: italic;
}
.blog-article code {
  padding: 0.1em 0.35em;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
  font-family: var(--mono);
  font-size: 0.8em;
  color: rgba(255, 255, 255, 0.88);
  overflow-wrap: anywhere;
}
.blog-article pre {
  margin: 1.6em 0;
  padding: 20px 24px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  overflow-x: auto;
}
.blog-article pre code {
  padding: 0;
  background: none;
  font-size: 13px;
  line-height: 1.6;
  white-space: pre;
  overflow-wrap: normal;
}
.blog-article blockquote {
  margin: 2.4em 0;
  padding: 0;
}
.blog-article blockquote p {
  margin-bottom: 0;
  font-size: clamp(24px, 2.2vw, 32px);
  font-weight: 500;
  font-style: normal;
  line-height: 1.3;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  text-wrap: balance;
}
.blog-article blockquote cite {
  display: block;
  margin-top: 20px;
  font-size: 16px;
  font-style: normal;
  font-weight: 400;
  color: var(--hp-text-muted);
}
/* Links in the copy: green like the customer stories */
.blog-article :is(p, li, td, figcaption) a:not(.btn) {
  color: #77AB97;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(119, 171, 151, 0.35);
  transition: text-decoration-color 0.2s ease;
}
.blog-article :is(p, li, td, figcaption) a:not(.btn):hover {
  text-decoration-color: currentColor;
}

/* Tables */
.blog-article table {
  width: 100%;
  margin: 1.6em 0;
  border-collapse: collapse;
  font-size: 16px;
  line-height: 1.5;
}
.blog-table-wrap {
  overflow-x: auto;
  margin: 1.6em 0;
  -webkit-overflow-scrolling: touch;
}
.blog-table-wrap table {
  margin: 0;
  min-width: 560px;
}
.blog-article th,
.blog-article td {
  padding: 12px 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  text-align: left;
  vertical-align: top;
}
.blog-article th {
  background: rgba(255, 255, 255, 0.04);
  font-weight: 500;
  color: var(--text-primary);
}
.blog-article td {
  color: rgba(255, 255, 255, 0.72);
}

/* CTA blocks: subtle background like the hub cards, buttons like the homepage */
.blog-cta {
  margin-top: 2.4em;
  padding: clamp(28px, 3vw, 48px);
  background: rgba(255, 255, 255, 0.03);
}
.blog-article .blog-cta h3 {
  margin: 0 0 12px;
  font-size: clamp(24px, 2.2vw, 32px);
  line-height: 1.2;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.blog-article .blog-cta p {
  margin-bottom: 28px;
  color: var(--hp-text-muted);
}
.blog-article .blog-cta .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 22px;
  border: 0;
  border-radius: 999px;
  background: var(--hp-gray);
  font-size: 16px;
  font-weight: 500;
  line-height: 1;
  color: var(--text-primary);
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.2s ease, transform 0.2s ease;
}
.blog-article .blog-cta .btn-primary { background: var(--hp-green); }
.blog-article .blog-cta .btn:active { transform: scale(0.98); }
.blog-article .blog-cta .btn:focus-visible {
  outline: 2px solid var(--text-primary);
  outline-offset: 2px;
}
@media (hover: hover) {
  .blog-article .blog-cta .btn:hover { opacity: 1; transform: none; background: var(--hp-gray-hover); }
  .blog-article .blog-cta .btn-primary:hover { background: var(--hp-green-hover); }
}
.blog-article .blog-cta-eyebrow {
  margin: 0 0 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--hp-text-muted);
}
.blog-cta-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.blog-cta-trust {
  display: flex;
  align-items: center;
  gap: 10px 20px;
  flex-wrap: wrap;
  margin-top: 24px;
  font-size: 14px;
  color: var(--hp-text-muted);
}
.blog-cta-trust span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.blog-cta-trust span::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #77AB97;
}
.blog-cta--inline {
  margin: 1.6em 0 2em;
  padding: 20px 24px;
}
.blog-cta--closing {
  margin-top: 3.2em;
}

/* Author byline */
.blog-byline {
  font-size: 16px;
  line-height: 24px;
}
.blog-byline-label,
.blog-byline-title {
  color: var(--hp-text-muted);
}
.blog-byline-name {
  color: var(--text-primary);
  font-weight: 500;
}

/* Callout blocks: TL;DR, contents, stats, flows, and series navigation */
.blog-tldr,
.blog-toc,
.blog-cluster-toc,
.blog-cluster-nav,
.blog-stat,
.blog-flow-step {
  background: rgba(255, 255, 255, 0.03);
}
.blog-tldr,
.blog-toc,
.blog-cluster-toc,
.blog-cluster-nav {
  margin: 1.6em 0 2em;
  padding: clamp(20px, 2vw, 28px);
}
.blog-article .blog-tldr-label,
.blog-article .blog-toc-label {
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 500;
}
.blog-article .blog-tldr-label { color: #77AB97; }
.blog-article .blog-toc-label { color: var(--hp-text-muted); }
.blog-article .blog-tldr ul,
.blog-article .blog-toc ol {
  margin: 0;
  font-size: 18px;
}
.blog-article .blog-tldr li:last-child,
.blog-article .blog-toc li:last-child {
  margin-bottom: 0;
}
.blog-article .blog-cluster-toc h3,
.blog-article .blog-cluster-nav h3 {
  margin: 0 0 16px;
}
.blog-article .blog-cluster-toc ol,
.blog-article .blog-cluster-nav ul {
  margin-bottom: 0;
}
.blog-article .blog-cluster-nav ul {
  padding-left: 0;
  list-style: none;
}

/* Related reading: the blog hub's cards, sized for the reading column */
.blog-related {
  margin-top: clamp(64px, 6vw, 96px);
}
.blog-article .blog-related-title {
  margin: 0 0 32px;
}
.blog-related .blog-posts--grid {
  grid-template-columns: minmax(0, 1fr);
}
.blog-related .blog-posts--grid .blog-post {
  min-height: 0;
}
.blog-article .blog-related .blog-post-title {
  margin: 0;
  font-size: 20px;
  line-height: 1.3;
  letter-spacing: -0.015em;
}

/* Comparison table icons */
.blog-cmp-yes,
.blog-cmp-no {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
}
.blog-cmp-yes {
  background: rgba(119, 171, 151, 0.15);
  color: #77AB97;
}
.blog-cmp-no {
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.35);
}
.blog-cmp-yes svg,
.blog-cmp-no svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Mid-article screenshot / product figure */
.blog-figure {
  margin: 1.6em 0 2em;
  overflow: hidden;
  background: #151917;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08);
}
.blog-figure img {
  display: block;
  width: 100%;
  height: auto;
}
.blog-figure figcaption {
  padding: 12px 16px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--hp-text-muted);
}

/* Flow diagram */
.blog-flow {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 8px;
  margin: 1.6em 0 2em;
}
.blog-flow-step {
  flex: 1 1 140px;
  min-width: 120px;
  padding: 16px;
}
.blog-flow-num {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: #77AB97;
}
.blog-article .blog-flow-step p {
  margin: 0;
  font-size: 15px;
  line-height: 1.45;
}
.blog-flow-arrow {
  display: none;
  align-self: center;
  color: rgba(255, 255, 255, 0.25);
  font-size: 1.2rem;
}
@media (min-width: 800px) {
  .blog-flow-arrow {
    display: block;
    flex: 0 0 auto;
  }
}

/* Stat callout */
.blog-stat {
  margin: 1.6em 0;
  padding: clamp(20px, 2vw, 28px) clamp(24px, 2.4vw, 32px);
  border-left: 2px solid #77AB97;
}
.blog-stat-value {
  display: block;
  margin-bottom: 8px;
  font-size: clamp(40px, 4.4vw, 68px);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.025em;
  color: var(--text-primary);
}
.blog-article .blog-stat-label {
  margin: 0;
  font-size: 18px;
  line-height: 1.5;
  color: var(--hp-text-muted);
}

/* HubSpot meetings embed: flush left with the body copy. HubSpot centers its widget inside
   the iframe, so the iframe takes the column width instead of the old 125%/zoom trick. */
.meetings-iframe-container {
  margin: clamp(56px, 6.5vw, 104px) 0 0;
  text-align: left;
}
.meetings-iframe-container iframe {
  display: block;
  width: 100% !important;
  max-width: 640px;
  margin: 0;
  zoom: 1;
  transform: none;
}

/* ---- Article: responsive ---- */
/* Too narrow for a rail beside the column, so the breadcrumbs sit above the date */
@media (max-width: 1200px) {
  .blog-article > .blog-breadcrumbs {
    position: static;
    width: auto;
    margin-bottom: 12px;
  }
}
@media (max-width: 768px) {
  .blog-article {
    padding-top: calc(var(--hp-nav-height) + 40px);
    font-size: 18px;
  }
}
@media (max-width: 600px) {
  .blog-article h1 {
    font-size: 32px;
  }
  .blog-article-img.blog-img-badge img {
    padding: 16px;
  }
}

/* ============================
   Case Study Detail Layout
   ============================ */
/* Same page container and type scale as the homepage and product pages (chrome.css tokens) */
.case-study {
  max-width: calc(var(--hp-max) + 2 * var(--hp-gutter));
  margin: 0 auto;
  padding: calc(var(--hp-nav-height) + clamp(48px, 4.6vw, 100px)) var(--hp-gutter) clamp(96px, 11vw, 180px);
}
.case-study .blog-breadcrumbs {
  margin-bottom: clamp(24px, 2.4vw, 40px);
  font-size: 16px;
}
.case-study .blog-breadcrumbs a,
.case-study .blog-breadcrumbs span:last-child {
  color: var(--hp-text-muted);
}
.case-study h1,
.case-study-hero,
.case-study-stats,
.case-study-body {
  opacity: 0;
}
.case-study-hero { animation: heroFadeIn 0.8s ease 0.2s forwards; }
.case-study-stats { animation: heroFadeIn 0.8s ease 0.3s forwards; }
.case-study-body { animation: heroFadeIn 0.8s ease 0.4s forwards; }
.case-study h1 {
  animation: heroBlurIn 0.6s ease 0.05s forwards;
  margin-bottom: clamp(56px, 6.5vw, 104px);
  font-size: clamp(44px, 5.4vw, 80px);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  text-wrap: balance;
}

/* Hero image */
.case-study-hero {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #151917;
}
.case-study-hero img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Stats row */
.case-study-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 40px;
  padding: clamp(48px, 5vw, 80px) 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.case-study-stats-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.case-study-stat {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.case-study .stat-value {
  font-size: clamp(40px, 4.4vw, 68px);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.025em;
  color: var(--text-primary);
}
.case-study .stat-label {
  max-width: 20em;
  font-size: 18px;
  line-height: 1.5;
  color: var(--hp-text-muted);
  text-wrap: pretty;
}

/* Body: content + sidebar */
.case-study-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 320px);
  gap: clamp(48px, 8vw, 160px);
  margin-top: clamp(56px, 6.5vw, 104px);
}
.case-study-content {
  max-width: 40em;
  font-size: 20px;
}

/* Content column */
.case-study-content h2 {
  margin: 2.8em 0 0.8em;
  font-size: clamp(30px, 2.8vw, 40px);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  text-wrap: balance;
}
.case-study-content h3 {
  margin: 1.8em 0 0.5em;
  font-size: 22px;
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}
.case-study-content p,
.case-study-content ul,
.case-study-content ol {
  margin-bottom: 1.2em;
  font-size: 1em;
  line-height: 1.6;
  letter-spacing: -0.01em;
  color: rgba(255, 255, 255, 0.72);
  text-wrap: pretty;
}
.case-study-content ul,
.case-study-content ol {
  padding-left: 1.2em;
}
.case-study-content li {
  margin-bottom: 0.4em;
}
.case-study-content strong {
  color: var(--text-primary);
  font-weight: 500;
}
.case-study-content blockquote {
  margin: 2.4em 0;
  padding: 0;
}
.case-study-content blockquote p {
  margin-bottom: 0;
  font-size: clamp(24px, 2.2vw, 32px);
  font-weight: 500;
  font-style: normal;
  line-height: 1.3;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  text-wrap: balance;
}
.case-study-content blockquote cite {
  display: block;
  margin-top: 20px;
  font-size: 16px;
  font-style: normal;
  font-weight: 400;
  color: var(--hp-text-muted);
}
.case-study-content a,
.sidebar-value a {
  color: #77AB97;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(119, 171, 151, 0.35);
  transition: text-decoration-color 0.2s ease;
}
.case-study-content a:hover,
.sidebar-value a:hover {
  text-decoration-color: currentColor;
}

/* Sidebar */
.case-study-sidebar {
  position: sticky;
  top: calc(var(--hp-nav-height) + 40px);
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.sidebar-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.sidebar-label {
  font-size: 14px;
  font-weight: 500;
  color: var(--hp-text-muted);
}
.sidebar-value {
  font-size: 16px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.9);
  text-wrap: pretty;
}

/* Meetings embed on customer pages: flush-left with the body text.
   HubSpot centers its widget inside the iframe, so we drop the 125%/zoom
   inflation and let the iframe size to the container, left-aligned. */
.case-study .meetings-iframe-container {
  text-align: left;
  margin: clamp(56px, 6.5vw, 104px) 0 0 0;
}
.case-study .meetings-iframe-container iframe {
  width: 100% !important;
  max-width: 640px;
  zoom: 1;
  transform: none;
  margin: 0;
}

/* Responsive */
@media (max-width: 1024px) {
  .case-study-stats-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .case-study-body {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
  }
  .case-study-sidebar {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 24px 40px;
    order: -1;
  }
  .sidebar-section {
    min-width: 140px;
  }
  /* "About" is a sentence, so it gets the full row */
  .sidebar-section:last-child {
    flex-basis: 100%;
  }
}
@media (max-width: 768px) {
  .case-study {
    padding-top: calc(var(--hp-nav-height) + 40px);
  }
  .case-study-content {
    font-size: 18px;
  }
  .case-study .stat-label {
    font-size: 16px;
  }
}
@media (max-width: 600px) {
  /* Story headlines are long, so they step down further than the product page heroes */
  .case-study h1 {
    font-size: 36px;
  }
  .case-study-stats,
  .case-study-stats-4 {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
  }
  .case-study-sidebar {
    flex-direction: column;
  }
}
