/* Article code blocks — dark mini-window with copy button */
.article-code-wrap {
  position: relative;
  margin: 1.25rem 0;
  border-radius: 8px;
  background: #2d2d2d;
  overflow: hidden;
  font-size: 0.9rem;
  line-height: 1.5;
}

.article-code-lang {
  position: absolute;
  top: 0;
  left: 0;
  padding: 8px 12px;
  color: #9ca3af;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  z-index: 1;
}

.article-code-copy {
  position: absolute;
  top: 8px;
  right: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--accent-green, #eaff8a);
  border: none;
  border-radius: 6px;
  color: #232325;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  z-index: 2;
  transition: filter 0.2s, opacity 0.2s;
}

.article-code-copy-icon {
  flex-shrink: 0;
}

.article-code-copy:hover {
  filter: brightness(1.05);
}

.article-code-copy:active {
  opacity: 0.9;
}

.article-code-copy.copied {
  background: #86efac;
  color: #14532d;
}

.article-code-block {
  margin: 0;
  padding: 2.5rem 1.25rem 1.25rem;
  overflow-x: auto;
  color: #e5e7eb;
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  white-space: pre;
}

.article-code-block code {
  padding: 0;
  background: none;
  color: inherit;
  font-size: inherit;
}

/* Syntax-like colors for common tokens (optional) */
.article-code-block .c { color: #6b7280; } /* comment */
.article-code-block .s { color: #fcd34d; } /* string */
.article-code-block .k { color: #93c5fd; } /* keyword */
