/* ================================================================
   BOW 360 Blog — Styles
   ================================================================ */

/* Fix: global.css sets overflow-x:hidden on html,body which breaks
   position:sticky. overflow-x:clip clips without creating a scroll
   container, restoring sticky behaviour site-wide on blog pages. */
html, body { overflow-x: clip !important; }

/* Article heroes: left-align. Blog listing inherits global text-align:center */
.phero:not(.blog-phero),
.phero:not(.blog-phero) h1,
.phero:not(.blog-phero) p,
.phero:not(.blog-phero) .kicker { text-align: left !important; justify-content: flex-start !important; }

/* Cancel global.css gradient-text effect on .phero h1 (color:transparent + background-clip:text)
   which causes a ghost/duplicate text artifact on blog pages. */
.phero h1 {
  color: var(--t1) !important;
  background: none !important;
  -webkit-background-clip: unset !important;
  background-clip: unset !important;
  -webkit-text-fill-color: unset !important;
}

/* ---- Breadcrumb ---- */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--t4);
  flex-wrap: wrap;
  margin-bottom: 28px;
}
.breadcrumb a {
  color: var(--t4);
  text-decoration: none;
  transition: color .2s;
}
.breadcrumb a:hover { color: var(--t1); }
.bc-sep { color: var(--line-2); }
.bc-current { color: var(--t3); max-width: 30ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---- Category pills ---- */
.blog-cat {
  display: inline-flex;
  align-items: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .10em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 4px;
  background: color-mix(in oklab, var(--cat-color, var(--c-revops)) 12%, var(--panel));
  color: var(--cat-color, var(--c-revops));
  border: 1px solid color-mix(in oklab, var(--cat-color, var(--c-revops)) 25%, transparent);
}

/* ---- Blog meta row ---- */
.blog-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.blog-time {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--t4);
}

/* ---- Author line ---- */
.blog-author {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--t4);
  margin-top: 16px;
}

/* ================================================================
   LISTING PAGE
   ================================================================ */

/* ---- Blog hero (breadcrumb now lives inside the hero wrap) ---- */
.phero.blog-phero {
  padding-top: 100px;
  padding-bottom: 0;
}

/* Blog listing hero h1 — ligeiramente menor que global (42–90px): texto sólido
   (sem gradient-clip) aparece visualmente mais pesado no mesmo font-size */
.blog-phero h1 {
  font-size: clamp(36px, 5.5vw, 64px);
  font-weight: 800;
  margin-top: 16px;
}

/* Article hero h1 — replaces per-article inline font styles */
.phero:not(.blog-phero) h1 {
  font-size: clamp(28px, 5vw, 48px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -.02em;
  margin: 0 0 20px;
}

/* Article hero bottom spacing — replaces per-article inline padding-bottom (was
   60px, too tight against the article body that follows in .article-layout) */
.phero:not(.blog-phero) {
  padding: 100px 0 96px;
}

/* ---- Image placeholder icon (shown when no real image is present) ---- */
.blog-featured-img,
.blog-card-thumb-wrap {
  position: relative;
}
.blog-ph {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--line-2);
  pointer-events: none;
  z-index: 0;
}
.blog-ph svg { opacity: .45; }
.blog-featured-img img,
.blog-card-thumb {
  position: relative;
  z-index: 1;
}

/* ---- Featured article ---- */
.blog-featured {
  display: block;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  text-decoration: none;
  transition: transform .4s cubic-bezier(.16,1,.3,1), border-color .3s;
  margin-bottom: 16px;
}
.blog-featured:hover {
  transform: translateY(-3px);
  border-color: color-mix(in oklab, var(--c-revops) 35%, transparent);
}
.blog-featured-img {
  display: block;
  height: 340px;
  overflow: hidden;
}
.blog-featured-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.blog-featured-body {
  padding: 40px 48px;
  display: flex;
  flex-direction: column;
}
.blog-featured h2 {
  font-size: clamp(22px, 2.8vw, 32px);
  font-weight: 800;
  letter-spacing: -.02em;
  color: var(--t1);
  line-height: 1.15;
  margin: 0 0 14px;
  max-width: 28ch;
}
.blog-featured .blog-excerpt {
  font-size: 15px;
  color: var(--t3);
  line-height: 1.65;
  margin: 0;
  max-width: 58ch;
}
.blog-read-more {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--c-revops);
  display: inline-block;
  margin-top: 20px;
  transition: color .2s;
}
.blog-featured:hover .blog-read-more,
.blog-card:hover .blog-read-more { color: var(--t1); }

@media (max-width: 768px) {
  .blog-featured-body { padding: 28px 24px; }
}

/* ---- Blog grid ---- */
.blog-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 60px;
  align-items: stretch;
}
.blog-grid .blog-card {
  display: flex;
  flex-direction: column;
}
.blog-grid .blog-card .blog-card-thumb {
  aspect-ratio: 16/9;
  object-fit: cover;
  width: 100%;
  height: auto;
}
.blog-grid .blog-card-thumb-wrap {
  height: auto;
  aspect-ratio: 16/9;
}
@media (max-width: 768px) {
  .blog-grid { grid-template-columns: 1fr; }
}

/* ---- Blog card ---- */
.blog-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  transition: transform .4s cubic-bezier(.16,1,.3,1), border-color .3s;
}
.blog-card:hover {
  transform: translateY(-4px);
  border-color: color-mix(in oklab, var(--c-revops) 40%, transparent);
}
.blog-card-thumb-wrap {
  height: 200px;
  overflow: hidden;
  display: block;
}
.blog-card-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.blog-card-body {
  padding: 34px 30px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.blog-card h3 {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -.02em;
  color: var(--t1);
  line-height: 1.3;
  margin: 12px 0 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.blog-card .blog-excerpt {
  font-size: 14px;
  color: var(--t3);
  line-height: 1.55;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.blog-card .blog-author {
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

/* ---- Blog section label ---- */
.blog-section-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--t4);
  margin-bottom: 24px;
  display: block;
}

/* ---- Newsletter CTA ---- */
.newsletter-cta {
  background: color-mix(in oklab, var(--panel) 80%, transparent);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 40px;
  text-align: center;
  margin: 0 0 60px;
}
.newsletter-cta h3 {
  font-size: clamp(18px, 2vw, 22px);
  font-weight: 700;
  letter-spacing: -.015em;
  color: var(--t1);
  margin: 0 0 8px;
}
.newsletter-cta p {
  font-size: 14px;
  color: var(--t3);
  margin: 0 0 24px;
}
.newsletter-form {
  display: flex;
  gap: 12px;
  max-width: 460px;
  margin: 0 auto;
}
.newsletter-form input {
  flex: 1;
  padding: 12px 16px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-family: 'Archivo', sans-serif;
  font-size: 14px;
  color: var(--t1);
  outline: none;
  transition: border-color .2s;
}
.newsletter-form input:focus { border-color: var(--c-revops); }
.newsletter-form input::placeholder { color: var(--t4); }
@media (max-width: 480px) {
  .newsletter-form { flex-direction: column; }
  .newsletter-cta { padding: 28px 20px; }
}

/* ================================================================
   ARTICLE PAGES
   ================================================================ */

/* ---- Reading progress bar ---- */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 5px;
  width: 0%;
  background: linear-gradient(90deg, var(--c-revops), var(--c-ops));
  z-index: 9999;
  pointer-events: none;
  transition: width .1s linear;
}
@media (prefers-reduced-motion: reduce) { .reading-progress { display: none; } }

/* ---- Article header ---- */
.article-header {
  padding: 40px 0 32px;
  max-width: 780px;
}
/* .article-back removed — breadcrumb handles navigation */
.article-back { display: none; }
.article-header h1 {
  font-size: clamp(24px, 5vw, 48px);
  font-weight: 800;
  color: var(--t1);
  line-height: 1.12;
  letter-spacing: -.02em;
  margin: 12px 0 16px;
  max-width: 780px;
}
.article-lead {
  font-size: clamp(16px, 1.5vw, 18px);
  color: var(--t2);
  line-height: 1.65;
  max-width: 680px;
  margin: 0 0 16px;
}
.article-dates {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--t4);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 12px 0 40px;
}
.date-sep { color: var(--line-2); }

/* ---- Hero image ---- */
.article-hero-wrap {
  width: 100%;
  border-radius: 14px;
  overflow: hidden;
  aspect-ratio: 16/9;
  background: var(--panel-2);
  min-height: 200px;
  margin-bottom: 48px;
}
.article-hero {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
@media (max-width: 768px) {
  .article-hero-wrap { border-radius: 10px; }
}

/* ---- Article layout: TOC sidebar + content ---- */
.article-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 48px;
  align-items: start;
  padding-bottom: 40px;
}
@media (max-width: 1024px) {
  .article-layout { grid-template-columns: 180px 1fr; gap: 36px; }
}
@media (max-width: 900px) {
  .article-layout { grid-template-columns: 1fr; gap: 0; }
}

/* ---- TOC sidebar (desktop) ---- */
.toc-sidebar {
  position: sticky;
  top: 90px;
  align-self: start;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  border-right: 1px solid color-mix(in oklab, var(--line) 60%, transparent);
  padding-right: 24px;
}
.toc {
  padding: 0 0 20px 0;
}
.toc ul, #toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.toc li, #toc-list li {
  list-style: none;
}
.toc-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--t4);
  margin-bottom: 12px;
  display: block;
}
.toc a {
  display: block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--t4);
  padding: 5px 0 5px 12px;
  text-decoration: none;
  transition: color .2s, border-color .2s;
  line-height: 1.4;
  border-left: 2px solid transparent;
}
.toc a:hover { color: var(--t2); border-left-color: color-mix(in oklab, var(--c-revops) 40%, transparent); }
.toc a.active { color: var(--t1); border-left-color: var(--c-revops); }

/* ---- Share buttons (sidebar, desktop) ---- */
.share-buttons {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding-top: 20px;
  margin-top: 20px;
  border-top: 1px solid color-mix(in oklab, var(--line) 50%, transparent);
  padding-right: 24px;
}
.share-buttons-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--t4);
  margin-bottom: 2px;
  display: block;
}
.share-buttons-row {
  display: flex;
  flex-direction: row;
  gap: 8px;
}
.share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--t3);
  cursor: pointer;
  transition: all .25s cubic-bezier(.16,1,.3,1);
  text-decoration: none;
}
.share-btn:hover {
  background: var(--panel-2);
  color: var(--t1);
  border-color: var(--line-2);
  transform: translateY(-2px);
}
.share-btn svg { width: 17px; height: 17px; }

/* ---- Mobile TOC toggle ---- */
.toc-mobile {
  display: none;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 32px;
}
.toc-toggle {
  width: 100%;
  padding: 14px 18px;
  background: var(--panel);
  border: none;
  color: var(--t3);
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  text-align: left;
}
.toc-chevron {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  transition: transform .2s;
}
.toc-toggle[aria-expanded="true"] .toc-chevron { transform: rotate(180deg); }
.toc-mobile-content {
  display: none;
  padding: 12px 18px 16px;
  background: var(--panel);
  border-top: 1px solid var(--line);
}
.toc-mobile-content.open { display: block; }
.toc-mobile-content a {
  display: block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--t4);
  padding: 6px 0;
  text-decoration: none;
  transition: color .2s;
}
.toc-mobile-content a:hover { color: var(--t1); }

@media (max-width: 900px) {
  .toc-sidebar { display: none !important; }
  .toc-mobile { display: block; }
}

/* ---- Share bar (mobile, fixed bottom) ---- */
.share-bar-mobile {
  display: none;
}
@media (max-width: 900px) {
  .share-bar-mobile {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 90;
    padding: 10px 24px;
    background: color-mix(in oklab, var(--bg) 94%, transparent);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid var(--line);
    flex-direction: row;
    justify-content: center;
    gap: 24px;
    transform: translateY(100%);
    transition: transform .3s cubic-bezier(.16,1,.3,1);
  }
  .share-bar-mobile.visible { transform: translateY(0); }
  .share-buttons { display: none !important; }
}
@media (prefers-reduced-motion: reduce) {
  .share-bar-mobile { transition: none; }
}

/* Neutralize global section { padding: var(--sp) 0 } inside articles */
.article-body section { padding: 0; }

/* ---- Article body typography ---- */
.article-body {
  min-width: 0;
  max-width: 680px;
  font-size: 17px;
  line-height: 1.78;
  color: var(--t2);
}
.article-body > p:first-of-type::first-letter {
  font-size: 3.2em;
  font-weight: 800;
  float: left;
  line-height: 0.8;
  margin: 4px 10px 0 0;
  color: var(--t1);
  font-family: 'Archivo', sans-serif;
}
.article-body h2 {
  font-size: clamp(20px, 2.5vw, 26px);
  font-weight: 800;
  color: var(--t1);
  margin: 40px 0 16px;
  scroll-margin-top: 96px;
  position: relative;
  line-height: 1.2;
}
.article-body h2::before {
  content: '';
  display: block;
  width: 40px;
  height: 2px;
  background: var(--c-revops);
  margin-bottom: 12px;
  opacity: 0.45;
  border-radius: 1px;
}
.article-body h3 {
  font-size: clamp(17px, 2vw, 20px);
  font-weight: 700;
  color: var(--t1);
  margin: 36px 0 12px;
  scroll-margin-top: 96px;
  position: relative;
  line-height: 1.25;
}
.article-body p { margin: 0 0 22px; }
.article-body strong { color: var(--t1); font-weight: 600; }
.article-body a {
  color: var(--c-revops);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color .2s;
}
.article-body a:hover { color: var(--t1); }
.article-body blockquote {
  border-left: 3px solid var(--c-revops);
  padding: 20px 28px;
  margin: 32px 0;
  background: color-mix(in oklab, var(--panel) 50%, transparent);
  border-radius: 0 12px 12px 0;
  font-style: italic;
  color: var(--t2);
}
.article-body ul,
.article-body ol { padding-left: 24px; margin: 16px 0 24px; }
.article-body li { margin: 8px 0; }
.article-body hr {
  border: none;
  border-top: 1px solid var(--line);
  margin: 40px 0;
}

/* ---- Anchor links on headings ---- */
.heading-anchor {
  position: absolute;
  left: -28px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--t4);
  text-decoration: none;
  font-size: 16px;
  opacity: 0;
  transition: opacity .2s;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 400;
  line-height: 1;
}
.heading-anchor:hover { color: var(--c-revops); }
.article-body h2:hover .heading-anchor,
.article-body h3:hover .heading-anchor { opacity: 1; }
@media (max-width: 768px) { .heading-anchor { display: none; } }

/* ---- Article figures ---- */
.article-figure { margin: 32px 0; }
.article-figure img,
.article-body img {
  width: 100%;
  border-radius: 12px;
  display: block;
  background: var(--panel-2);
}
.article-figure figcaption {
  margin-top: 10px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--t4);
  text-align: center;
  line-height: 1.5;
}

/* ---- Code blocks ---- */
.article-body pre {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px 24px;
  overflow-x: auto;
  margin: 24px 0;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  line-height: 1.7;
  color: var(--t2);
}
.article-body code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  background: var(--panel);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--c-revops);
}
.article-body pre code {
  background: none;
  padding: 0;
  color: var(--t2);
  font-size: 13px;
}

/* ---- Infographic bars ---- */
.article-infographic {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 28px 32px;
  margin: 32px 0;
}
.article-infographic h4 {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--t4);
  margin: 0 0 20px;
}
.infog-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 10px 0;
}
.infog-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--t3);
  min-width: 160px;
}
.infog-bar-wrap {
  flex: 1;
  height: 8px;
  background: var(--panel-2);
  border-radius: 4px;
  overflow: hidden;
}
.infog-bar {
  height: 100%;
  border-radius: 4px;
  background: var(--c-revops);
  width: 0;
  transition: width .9s cubic-bezier(.16,1,.3,1);
}
.infog-row.accent .infog-bar { background: var(--c-amber); }
.infog-val {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--t1);
  min-width: 72px;
  text-align: right;
  font-weight: 600;
}

/* ---- Callout boxes ---- */
.callout {
  display: flex;
  gap: 14px;
  padding: 18px 22px;
  border-radius: 12px;
  margin: 28px 0;
  border: 1px solid var(--line);
}
.callout-icon { font-size: 18px; flex-shrink: 0; margin-top: 2px; }
.callout-content {
  font-size: 15px;
  line-height: 1.6;
  color: var(--t2);
}
.callout-content strong { color: var(--t1); }
.callout-insight {
  background: color-mix(in oklab, var(--c-revops) 8%, var(--panel));
  border-color: color-mix(in oklab, var(--c-revops) 25%, var(--line));
}
.callout-warning {
  background: color-mix(in oklab, var(--c-amber) 8%, var(--panel));
  border-color: color-mix(in oklab, var(--c-amber) 25%, var(--line));
}
.callout-tip {
  background: color-mix(in oklab, var(--c-ops) 8%, var(--panel));
  border-color: color-mix(in oklab, var(--c-ops) 25%, var(--line));
}

/* ---- CTA within article ---- */
.article-cta {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 28px 32px;
  margin: 40px 0;
  text-align: center;
}
.article-cta .article-cta-text {
  font-size: 17px;
  font-weight: 600;
  color: var(--t1);
  margin: 0 0 18px;
  display: block;
}
.cta-note {
  font-size: 12px;
  color: var(--t4);
  font-family: 'JetBrains Mono', monospace;
  margin: 12px 0 0;
  display: block;
}

/* ---- Author card ---- */
.article-section {
  padding-bottom: 0;
}
.article-author-section {
  margin-top: 0;
  padding: 0 0 32px;
}
.author-card {
  display: flex;
  gap: 16px;
  padding: 20px 24px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  margin: 16px 0 16px;
  align-items: flex-start;
}
.author-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--panel-2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 800;
  color: var(--t2);
  font-family: 'Archivo', sans-serif;
}
.author-info h4 {
  font-size: 16px;
  font-weight: 700;
  color: var(--t1);
  margin: 0 0 4px;
}
.author-role {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--t4);
  margin: 0 0 10px;
  display: block;
}
.author-bio {
  font-size: 14px;
  color: var(--t3);
  line-height: 1.55;
  margin: 0;
}

/* ---- Article navigation (prev / next) ---- */
.article-nav {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin: 16px 0 24px;
}
.article-nav a {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-decoration: none;
  max-width: 45%;
}
.nav-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--t4);
}
.nav-article-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--t3);
  transition: color .2s;
  line-height: 1.35;
}
.article-nav a:hover .nav-article-title { color: var(--t1); }
.article-nav a:last-child { text-align: right; align-items: flex-end; }
.article-nav-spacer { flex: 1; }
@media (max-width: 480px) {
  .article-nav { flex-direction: column; }
  .article-nav a { max-width: 100%; text-align: left !important; align-items: flex-start !important; }
}

/* ---- Share inline (bottom of article body) ---- */
.share-inline {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 0;
  border-top: 1px solid var(--line);
  margin-top: 40px;
  flex-wrap: wrap;
}
.share-inline-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--t4);
  flex-shrink: 0;
}
.share-row {
  display: flex;
  gap: 8px;
}

/* ---- Related articles ---- */
.related-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 0;
}

/* Reduce CTA margin inherited from global.css */
main > .glass-cta { margin-top: 0; }
.related-grid .blog-card {
  flex: 1;
  min-width: 280px;
}
.related-excerpt {
  font-size: 14px;
  color: var(--t3);
  line-height: 1.55;
  margin: 8px 0 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.related-meta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: var(--t4);
  display: block;
  margin-bottom: 12px;
}

/* ---- Back to top button ---- */
.back-to-top {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 80;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--t3);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity .3s, transform .3s cubic-bezier(.16,1,.3,1), background .2s, color .2s;
}
.back-to-top.visible { opacity: 1; pointer-events: auto; transform: none; }
.back-to-top:hover { background: var(--panel-2); color: var(--t1); border-color: var(--line-2); transform: translateY(-3px); }
.back-to-top svg { width: 20px; height: 20px; }
@media (max-width: 900px) { .back-to-top { right: auto; left: 20px; bottom: 140px; } }
@media (prefers-reduced-motion: reduce) {
  .back-to-top { transition: opacity .2s; transform: none !important; }
}

/* ---- Mobile CTA bar ---- */
.mobile-cta-bar { display: none; }
@media (max-width: 900px) {
  .mobile-cta-bar {
    display: flex;
    position: fixed;
    bottom: 68px;
    left: 16px;
    right: 16px;
    z-index: 85;
    background: color-mix(in oklab, var(--bg) 95%, transparent);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 12px 16px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(8px);
    transition: opacity .3s, transform .3s cubic-bezier(.16,1,.3,1);
  }
  .mobile-cta-bar.visible { opacity: 1; pointer-events: auto; transform: none; }
  .mobile-cta-bar span {
    font-size: 12px;
    color: var(--t3);
  }
  .mobile-cta-bar a {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: var(--c-revops);
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .mobile-cta-bar { transition: opacity .2s; transform: none !important; }
}

/* ---- Stack items for numbered automations ---- */
.automation-item {
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
}
.automation-item:last-of-type { border-bottom: none; }
.automation-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--t4);
  margin-bottom: 6px;
  display: block;
}
.automation-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--t1);
  margin: 0 0 10px;
}
.automation-stack {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--c-revops);
  margin-top: 12px;
  padding: 8px 14px;
  background: color-mix(in oklab, var(--c-revops) 8%, var(--panel));
  border-radius: 6px;
  display: inline-block;
}
