.xvm-blog [hidden],
.xvm-article [hidden],
.article-float[hidden] {
  display: none !important;
}

.xvm-blog-hero {
  border-bottom: 1px solid var(--x-line);
}

.xvm-blog-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--x-space-3);
  min-width: 0;
}

.xvm-blog-heading > * {
  min-width: 0;
}

.xvm-blog-heading .x-eyebrow {
  margin-bottom: var(--x-space-2);
}

.xvm-blog-heading h1 {
  max-width: 18ch;
}

.xvm-blog-heading .x-lead {
  max-width: 48rem;
}

.xvm-blog-count {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: var(--x-space-1);
  padding: var(--x-space-1) var(--x-space-2);
  border: 1px solid var(--x-line);
  border-radius: var(--x-radius-sm);
  background: var(--x-surface-soft);
  color: var(--x-muted);
  font-size: var(--x-fs-0);
}

#blg-article-count {
  color: var(--x-primary);
  font-family: var(--x-font-mono);
  font-size: var(--x-fs-2);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.xvm-blog-content {
  overflow: hidden;
}

.xvm-blog-panel {
  min-width: 0;
}

.xvm-blog-panel + .xvm-blog-panel {
  margin-top: var(--x-space-5);
  padding-top: var(--x-space-4);
  border-top: 1px solid var(--x-line);
}

.xvm-blog-series-head {
  margin-bottom: var(--x-space-3);
}

.xvm-blog-series-head .x-eyebrow {
  margin-bottom: var(--x-space-2);
}

.blg-magazine {
  margin-bottom: var(--x-space-2);
}

.blg-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 48rem), 1fr));
  gap: 0;
  min-width: 0;
  border-top: 1px solid var(--x-line);
}

.blg-grid--rest,
.blg-grid--openclaw-rest {
  width: 100%;
}

.blog-card {
  min-width: 0;
  color: #FFFFFF;
  text-decoration: none;
}

.blg-featured {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--x-line-dark);
  border-radius: var(--x-radius-lg);
  background: var(--x-dark);
  transition: border-color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.blg-featured:hover {
  transform: translateY(-2px);
  border-color: var(--x-accent);
  box-shadow: var(--x-shadow-scene);
}

.blg-featured:focus-visible {
  outline: 2px solid var(--x-accent);
  outline-offset: 4px;
}

.blg-featured__media {
  position: relative;
  min-width: 0;
  min-height: 16rem;
  overflow: hidden;
  background: var(--x-dark);
}

.blg-featured__img {
  display: none;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.blg-featured__shade {
  position: absolute;
  inset: 0;
  max-width: 100%;
  background: var(--x-dark);
  opacity: 0.76;
}

.blg-featured__overlay {
  position: absolute;
  inset: auto 0 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--x-space-2);
  max-width: 100%;
  padding: var(--x-space-4);
}

.blg-featured__pill {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  padding: var(--x-space-1) var(--x-space-2);
  border: 1px solid var(--x-line-dark);
  border-radius: var(--x-radius-xs);
  color: #fff;
  font-family: var(--x-font-mono);
  font-size: var(--x-fs-0);
  line-height: 1.2;
}

.blg-featured__hl {
  max-width: 22ch;
  margin: 0;
  color: #fff;
  font-size: var(--x-fs-5);
  line-height: 1.08;
}

.blg-featured__body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: var(--x-space-3);
  min-width: 0;
  padding: var(--x-space-3) var(--x-space-4);
  border-top: 1px solid var(--x-line-dark);
  color: #fff;
}

.blg-featured__excerpt {
  max-width: 54rem;
  margin: 0;
  color: #fff;
  line-height: 1.7;
}

.blg-featured__meta {
  min-width: 0;
  color: #fff;
}

.blg-featured__hint {
  display: block;
  font-family: var(--x-font-mono);
  font-size: var(--x-fs-0);
  font-variant-numeric: tabular-nums;
  line-height: 1.5;
}

.blg-compact {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  grid-template-rows: auto auto;
  gap: var(--x-space-1) var(--x-space-3);
  width: 100%;
  padding: var(--x-space-3) var(--x-space-2);
  border: 0;
  border-bottom: 1px solid var(--x-line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  transition: background-color 160ms ease, padding-left 160ms ease;
}

.blg-compact:hover {
  transform: none;
  padding-left: var(--x-space-3);
  border-color: var(--x-line);
  background: var(--x-surface-soft);
  box-shadow: none;
}

.blg-compact:focus-visible {
  outline: 2px solid var(--x-accent);
  outline-offset: -2px;
}

.blg-compact .blg-featured__media,
.blg-compact .blg-featured__overlay,
.blg-compact .blg-featured__body {
  display: contents;
}

.blg-compact .blg-featured__img,
.blg-compact .blg-featured__shade,
.blg-compact .blg-featured__pill {
  display: none;
}

.blg-compact .blg-featured__hl {
  position: static;
  grid-column: 1;
  grid-row: 1;
  max-width: none;
  margin: 0;
  color: var(--x-ink);
  font-size: var(--x-fs-3);
  line-height: 1.25;
}

.blg-compact .blg-featured__excerpt {
  display: -webkit-box;
  grid-column: 1;
  grid-row: 2;
  max-width: 70ch;
  margin: 0;
  overflow: hidden;
  color: var(--x-muted);
  line-height: 1.65;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.blg-compact .blg-featured__meta {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  color: var(--x-muted);
  text-align: right;
}

.blg-compact .blg-featured__hint {
  color: var(--x-muted);
  white-space: nowrap;
}

.xvm-blog-empty {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: var(--x-space-4);
  padding: var(--x-space-4);
  border: 1px solid var(--x-line);
  border-radius: var(--x-radius-lg);
  background: var(--x-surface-soft);
}

.xvm-blog-empty > * {
  min-width: 0;
}

.xvm-blog-empty-copy .x-eyebrow {
  margin-bottom: var(--x-space-2);
}

.xvm-blog-empty-copy h2 {
  margin-bottom: var(--x-space-2);
}

.xvm-blog-empty-copy p:not(.x-eyebrow) {
  margin: 0;
  color: var(--x-muted);
  line-height: 1.7;
}

.xvm-blog-empty-links {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--x-space-1);
}

.xvm-blog-empty-link {
  display: grid;
  grid-template-columns: minmax(0, max-content) minmax(0, 1fr);
  align-items: center;
  gap: var(--x-space-2);
  min-width: 0;
  padding: var(--x-space-2);
  border: 1px solid var(--x-line);
  border-radius: var(--x-radius-sm);
  background: var(--x-light);
  color: var(--x-ink);
  text-decoration: none;
  transition: border-color 160ms ease, transform 160ms ease;
}

.xvm-blog-empty-link:hover {
  transform: translateX(4px);
  border-color: var(--x-accent);
}

.xvm-blog-empty-link:focus-visible {
  outline: 2px solid var(--x-accent);
  outline-offset: 2px;
}

.xvm-blog-empty-link span {
  color: var(--x-muted);
  font-size: var(--x-fs-0);
}

.xvm-blog-empty-link strong {
  min-width: 0;
}

.xvm-blog-cta {
  padding: var(--x-space-5);
  border-radius: var(--x-radius-lg);
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  align-items: center;
  gap: var(--x-space-4);
}

.xvm-blog-cta > * {
  min-width: 0;
}

.xvm-blog-cta .x-eyebrow {
  margin-bottom: var(--x-space-2);
}

.xvm-blog-cta h2 {
  margin-bottom: var(--x-space-2);
}

.xvm-blog-cta p:not(.x-eyebrow) {
  max-width: 56rem;
  margin: 0;
}

.xvm-reading {
  width: min(100%, 54rem);
  margin-inline: auto;
  padding-inline: var(--x-space-2);
}

.xvm-article {
  padding-bottom: var(--x-space-5);
  overflow: hidden;
}

.xvm-article-breadcrumb {
  padding-top: 88px;
  padding-bottom: var(--x-space-4);
}

.xvm-article-breadcrumb .c-breadcrumb ol {
  display: flex;
  align-items: center;
  gap: var(--x-space-1);
  min-width: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.xvm-article-breadcrumb .c-breadcrumb li {
  display: flex;
  align-items: center;
  min-width: 0;
}

.xvm-article-breadcrumb .c-breadcrumb li + li::before {
  margin-right: var(--x-space-1);
  color: var(--x-muted);
  content: "/";
}

.xvm-article-breadcrumb [aria-current="page"] {
  display: block;
  max-width: 38ch;
  overflow: hidden;
  color: var(--x-muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.xvm-article-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.xvm-article-header h1 {
  max-width: 20ch;
  margin: 0;
  font-size: var(--x-fs-6);
  line-height: 1.06;
}

.xvm-article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--x-space-1);
  width: fit-content;
  align-self: flex-start;
  margin-top: var(--x-space-3);
}

.blog-article-date,
.blog-article-lead {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  min-height: 2.25rem;
  margin: 0;
  padding: var(--x-space-1) var(--x-space-2);
  border: 1px solid var(--x-line);
  border-radius: var(--x-radius-xs);
  background: var(--x-surface-soft);
  color: var(--x-muted);
  font-family: var(--x-font-mono);
  font-size: var(--x-fs-0);
  font-variant-numeric: tabular-nums;
}

.blog-article-readtime {
  margin-left: var(--x-space-1);
}

.article-hero {
  width: min(100%, 54rem);
  margin-inline: auto;
  padding-inline: var(--x-space-2);
  margin-top: var(--x-space-3);
  margin-bottom: var(--x-space-3);
}

.article-hero img {
  display: block;
  width: 100%;
  max-height: 28rem;
  object-fit: cover;
  border: 1px solid var(--x-line);
  border-radius: var(--x-radius-lg);
  box-shadow: var(--x-shadow-scene);
}

.blog-article-body {
  width: min(100%, 54rem);
  margin-inline: auto;
  padding-inline: var(--x-space-2);
  color: var(--x-ink);
  font-size: 1rem;
  line-height: 1.75;
}

.blog-article-body > :first-child {
  margin-top: 0;
}

.blog-article-body h2,
.blog-article-body h3 {
  color: var(--x-ink);
  font-family: var(--x-font-heading);
}

.blog-article-body h2 {
  margin-top: var(--x-space-4);
  margin-bottom: var(--x-space-2);
  font-size: var(--x-fs-4);
  line-height: 1.2;
}

.blog-article-body h3 {
  margin-top: var(--x-space-3);
  margin-bottom: var(--x-space-2);
  font-size: var(--x-fs-3);
  line-height: 1.3;
}

.blog-article-body h2[id],
.blog-article-body h3[id] {
  scroll-margin-top: 6rem;
}

.blog-article-body p {
  margin-top: 0;
  margin-bottom: var(--x-space-2);
}

.blog-article-body ul,
.blog-article-body ol {
  margin-top: 0;
  margin-bottom: var(--x-space-2);
  padding-left: var(--x-space-3);
}

.blog-article-body li + li {
  margin-top: var(--x-space-1);
}

.blog-article-body a:not(.c-btn) {
  color: var(--x-primary);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

.blog-article-body a:not(.c-btn):hover {
  color: var(--x-primary-strong);
}

.blog-article-body a:not(.c-btn):focus-visible {
  outline: 2px solid var(--x-accent);
  outline-offset: 3px;
}

.blog-article-body pre {
  max-width: 100%;
  margin: var(--x-space-3) 0;
  padding: var(--x-space-2);
  overflow-x: auto;
  border: 1px solid var(--x-line-dark);
  border-radius: var(--x-radius-md);
  background: var(--x-dark);
  color: #fff;
  font-family: var(--x-font-mono);
  font-size: var(--x-fs-0);
  line-height: 1.65;
  tab-size: 2;
}

.blog-article-body code {
  overflow-wrap: anywhere;
  font-family: var(--x-font-mono);
}

.blog-article-body p code,
.blog-article-body li code,
.blog-article-body dd code {
  padding: 0.12em 0.35em;
  border: 1px solid var(--x-line);
  border-radius: var(--x-radius-xs);
  background: var(--x-surface-soft);
  color: var(--x-primary);
}

.blog-article-body blockquote {
  margin: var(--x-space-3) 0;
  padding: var(--x-space-2) var(--x-space-3);
  border-left: 3px solid var(--x-accent);
  background: var(--x-surface-soft);
  color: var(--x-muted);
}

.blog-article-body blockquote p {
  margin-bottom: 0;
}

.blog-article-body dl {
  margin: var(--x-space-3) 0;
}

.blog-article-body dt {
  margin-top: var(--x-space-2);
  font-weight: 700;
}

.blog-article-body dd {
  margin: var(--x-space-1) 0 0;
  padding-left: var(--x-space-2);
  border-left: 2px solid var(--x-line);
  color: var(--x-muted);
}

.blog-article-body .c-table-scroll {
  max-width: 100%;
  margin: var(--x-space-3) 0;
  overflow-x: auto;
}

.blog-article-body table {
  width: 100%;
  min-width: 40rem;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}

.blog-article-body th,
.blog-article-body td {
  padding: var(--x-space-2);
  border: 1px solid var(--x-line);
  text-align: left;
  vertical-align: top;
}

.blog-article-body th {
  background: var(--x-surface);
  font-family: var(--x-font-mono);
  font-size: var(--x-fs-0);
}

.blog-article-body mark {
  padding-inline: 0.15em;
  background: linear-gradient(var(--x-surface), var(--x-surface));
  color: var(--x-ink);
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.blog-article-body del {
  color: var(--x-muted);
}

.blog-article-body figure {
  margin: var(--x-space-3) 0;
}

.blog-article-body figure img,
.blog-article-body > img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: var(--x-radius-md);
  box-shadow: var(--x-shadow-soft);
}

.blog-article-body figcaption {
  margin-top: var(--x-space-1);
  color: var(--x-muted);
  font-size: var(--x-fs-0);
  text-align: center;
}

.article-toc {
  margin-bottom: var(--x-space-3);
  padding: var(--x-space-3);
  border: 1px solid var(--x-line);
  border-left: 4px solid var(--x-accent);
  border-radius: var(--x-radius-md);
  background: var(--x-surface-soft);
}

.article-toc__title {
  margin: 0 0 var(--x-space-2) !important;
  color: var(--x-primary);
  font-family: var(--x-font-heading);
  font-size: var(--x-fs-2);
  font-weight: 700;
}

.article-toc__list,
.article-toc__sublist {
  margin-bottom: 0 !important;
}

.article-toc__list li::marker,
.article-toc__sublist li::marker {
  color: var(--x-accent);
  font-family: var(--x-font-mono);
}

.article-toc__sublist {
  margin-top: var(--x-space-1);
  padding-left: var(--x-space-3);
}

.article-faq {
  margin: var(--x-space-3) 0;
}

.article-faq__item {
  overflow: hidden;
  border: 1px solid var(--x-line);
  border-radius: var(--x-radius-md);
  background: var(--x-light);
}

.article-faq__item + .article-faq__item {
  margin-top: var(--x-space-1);
}

.article-faq__q {
  padding: var(--x-space-2);
  color: var(--x-ink);
  font-weight: 700;
  cursor: pointer;
}

.article-faq__q:focus-visible {
  outline: 2px solid var(--x-accent);
  outline-offset: -3px;
}

.article-faq__a {
  padding: 14px var(--x-space-2) var(--x-space-2);
  border-top: 1px solid var(--x-line);
  color: var(--x-muted);
}

.article-faq__a p:last-child {
  margin-bottom: 0;
}

.article-mac-promo {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  align-items: center;
  gap: var(--x-space-3);
  margin: var(--x-space-3) 0;
  padding: var(--x-space-3);
  border: 1px solid var(--x-line-dark);
  border-radius: var(--x-radius-lg);
  background: var(--x-dark);
  color: #fff;
}

.article-mac-promo > * {
  min-width: 0;
}

.article-mac-promo .x-eyebrow {
  width: fit-content;
  margin: 0 0 var(--x-space-2);
  color: #fff;
}

.article-mac-promo h2,
.article-mac-promo h3 {
  margin: 0 0 var(--x-space-2);
  color: #fff;
}

.article-mac-promo p:not(.x-eyebrow) {
  margin: 0;
  color: #fff;
}

.article-mac-promo .c-btn {
  border-color: var(--x-light);
  background: var(--x-light);
  color: var(--x-primary);
}

.article-mac-promo .c-btn:hover {
  border-color: var(--x-surface);
  background: var(--x-surface);
  color: var(--x-primary-strong);
}

.article-further-reading {
  margin: var(--x-space-3) 0 0;
  padding-top: var(--x-space-3);
  border-top: 1px solid var(--x-line);
}

.article-further-reading h3 {
  margin-top: 0;
}

.article-further-reading ul {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--x-space-1);
  margin: 0;
  padding: 0;
  list-style: none;
}

.article-further-reading li {
  margin: 0;
}

.article-cta-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--x-space-2);
  min-width: 0;
  padding: var(--x-space-2);
  border: 1px solid var(--x-line);
  border-radius: var(--x-radius-sm);
  background: var(--x-surface-soft);
  text-decoration: none;
  transition: border-color 160ms ease, transform 160ms ease;
}

.article-cta-link:hover {
  transform: translateX(4px);
  border-color: var(--x-accent);
}

.article-cta-link span {
  min-width: 0;
}

.article-float {
  position: fixed;
  right: var(--x-space-3);
  bottom: var(--x-space-3);
  z-index: 40;
  width: min(18rem, calc(100vw - var(--x-space-4)));
  overflow: hidden;
  padding: var(--x-space-3);
  border: 1px solid var(--x-line-dark);
  border-top: 4px solid var(--x-accent);
  border-radius: var(--x-radius-md);
  background: var(--x-dark);
  color: #fff;
  box-shadow: var(--x-shadow-scene);
}

.article-float__close {
  position: absolute;
  top: var(--x-space-1);
  right: var(--x-space-1);
  display: grid;
  width: 2rem;
  height: 2rem;
  padding: 0;
  place-items: center;
  border: 1px solid var(--x-line-dark);
  border-radius: var(--x-radius-xs);
  background: transparent;
  color: #fff;
  cursor: pointer;
}

.article-float__close svg {
  width: 1rem;
  height: 1rem;
}

.article-float__close:hover {
  border-color: var(--x-accent);
  color: var(--x-accent);
}

.article-float__close:focus-visible {
  outline: 2px solid var(--x-accent);
  outline-offset: 2px;
}

.article-float__title {
  margin: 0;
  padding-right: var(--x-space-3);
  color: #fff;
  font-family: var(--x-font-heading);
  font-size: var(--x-fs-2);
  font-weight: 700;
  line-height: 1.35;
}

.article-float__cta {
  width: 100%;
  margin-top: var(--x-space-2);
  white-space: normal;
  text-align: center;
}

@media (max-width: 900px) {
  .article-float {
    display: none !important;
  }
}

@media (max-width: 768px) {
  .xvm-blog-heading,
  .xvm-blog-cta,
  .article-mac-promo {
    grid-template-columns: minmax(0, 1fr);
  }

  .xvm-blog-heading {
    align-items: flex-start;
  }

  .xvm-blog-count {
    align-self: flex-start;
  }

  .blg-featured__media {
    min-height: 13rem;
  }

  .blg-featured__overlay,
  .blg-featured__body {
    padding: var(--x-space-3);
  }

  .blg-featured__body {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
  }

  .xvm-blog-empty {
    grid-template-columns: minmax(0, 1fr);
    padding: var(--x-space-3);
  }

  .xvm-blog-empty-link {
    grid-template-columns: minmax(0, 1fr);
  }

  .xvm-blog-cta .c-btn,
  .article-mac-promo .c-btn {
    width: 100%;
    white-space: normal;
    text-align: center;
  }

  .xvm-article-header h1 {
    font-size: var(--x-fs-5);
  }
}

@media (max-width: 390px) {
  .blg-compact {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto auto;
    padding-inline: 0;
  }

  .blg-compact:hover {
    padding-left: var(--x-space-1);
  }

  .blg-compact .blg-featured__hl {
    grid-column: 1;
    grid-row: 1;
  }

  .blg-compact .blg-featured__excerpt {
    grid-column: 1;
    grid-row: 2;
  }

  .blg-compact .blg-featured__meta {
    grid-column: 1;
    grid-row: 3;
    text-align: left;
  }

  .blg-compact .blg-featured__hint {
    white-space: normal;
  }

  .xvm-article-breadcrumb {
    padding-top: var(--x-space-4);
  }

  .xvm-article-breadcrumb [aria-current="page"] {
    max-width: 16ch;
  }

  .xvm-article-meta {
    align-items: flex-start;
  }

  .blog-article-date,
  .blog-article-lead {
    white-space: normal;
  }

  .article-toc {
    padding: var(--x-space-2);
  }
}

@media (prefers-reduced-motion: reduce) {
  .blg-featured,
  .blg-compact,
  .xvm-blog-empty-link,
  .article-cta-link {
    transition: none;
  }
}
