/* Article code blocks — dark panel + inline code (frontend) */
.article-content code,
.article-content kbd,
.article-content samp {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.88em;
  font-weight: 500;
}

.article-content :not(pre) > code {
  display: inline;
  padding: 0.12em 0.42em;
  margin: 0 0.08em;
  border-radius: 5px;
  border: 1px solid rgba(193, 149, 73, 0.28);
  background: rgba(232, 201, 106, 0.12);
  color: #e0a45a;
  word-break: break-word;
  white-space: break-spaces;
}

.article-content .fs-code {
  position: relative;
  margin: 1.1em 0 1.35em;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: #1a1d24;
  box-shadow:
    0 10px 28px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  overflow: hidden;
}

.article-content .fs-code__toolbar {
  position: absolute;
  top: 8px;
  right: 10px;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 0;
  min-height: 0;
  pointer-events: none;
}

.article-content .fs-code__lang {
  margin-right: 0;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(232, 201, 106, 0.85);
  background: rgba(232, 201, 106, 0.1);
  border: 1px solid rgba(232, 201, 106, 0.18);
}

.article-content .fs-code__copy {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin: 0;
  padding: 5px 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: #b8c0cc;
  font-size: 12px;
  font-weight: 650;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.article-content .fs-code__copy:hover {
  color: #f7e5a3;
  border-color: rgba(232, 201, 106, 0.35);
  background: rgba(232, 201, 106, 0.1);
}

.article-content .fs-code__copy.is-done {
  color: #3dd678;
  border-color: rgba(61, 214, 120, 0.35);
}

.article-content .fs-code__copy svg {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
}

.article-content pre {
  position: relative;
  margin: 1.1em 0 1.35em;
  padding: 14px 16px 18px;
  overflow: auto;
  max-height: min(70vh, 640px);
  -webkit-overflow-scrolling: touch;
  background: #1a1d24;
  color: #e6edf3;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 13.5px;
  line-height: 1.65;
  tab-size: 2;
}

.article-content .fs-code > pre,
.article-content pre.fs-code__pre {
  margin: 0;
  border: 0;
  border-radius: 0;
  padding-top: 42px;
}

.article-content pre code,
.article-content .fs-code code.hljs {
  display: block;
  padding: 0;
  margin: 0;
  background: transparent !important;
  border: 0;
  color: inherit;
  font-size: inherit;
  line-height: inherit;
  white-space: pre;
  word-break: normal;
  overflow-wrap: normal;
}

/* highlight.js token colors — match common tech-blog dark panels */
.article-content .hljs {
  color: #e6edf3;
  background: transparent;
}
.article-content .hljs-comment,
.article-content .hljs-quote {
  color: #8b9a7a;
  font-style: italic;
}
.article-content .hljs-section,
.article-content .hljs-title,
.article-content .hljs-title.class_,
.article-content .hljs-title.function_ {
  color: #f0d78a;
}
.article-content .hljs-attr,
.article-content .hljs-attribute,
.article-content .hljs-name,
.article-content .hljs-selector-tag,
.article-content .hljs-keyword,
.article-content .hljs-meta .hljs-keyword {
  color: #7dd3fc;
}
.article-content .hljs-string,
.article-content .hljs-doctag,
.article-content .hljs-regexp,
.article-content .hljs-template-variable {
  color: #d2a8ff;
}
.article-content .hljs-number,
.article-content .hljs-literal,
.article-content .hljs-symbol,
.article-content .hljs-bullet {
  color: #ffa657;
}
.article-content .hljs-built_in,
.article-content .hljs-type,
.article-content .hljs-params {
  color: #79c0ff;
}
.article-content .hljs-variable,
.article-content .hljs-template-tag {
  color: #ff7b72;
}
.article-content .hljs-meta,
.article-content .hljs-subst {
  color: #c9d1d9;
}
.article-content .hljs-deletion {
  background: rgba(248, 81, 73, 0.15);
}
.article-content .hljs-addition {
  background: rgba(46, 160, 67, 0.15);
}

@media (max-width: 720px) {
  .article-content pre {
    font-size: 12.5px;
    padding: 12px 12px 16px;
  }
  .article-content .fs-code > pre,
  .article-content pre.fs-code__pre {
    padding-top: 4px;
  }
}
