:root {
  --article-accent: #e53935;
  --article-accent-dark: #c62828;
  --article-accent-soft: #fdecea;
  --article-text: #1f2937;
  --article-muted: #6b7280;
  --article-border: #e5e7eb;
  --article-surface: #f8f9fa;
  --article-card: #ffffff;
}

body {
  max-width: 800px;
  margin: 0 auto;
  padding: 16px;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: #f5f5f5;
  line-height: 1.7;
  color: var(--article-text);
}

article.article-container {
  background: var(--article-card);
  border-radius: 12px;
  padding: 40px;
  margin: 20px auto;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  max-width: 800px;
}

.article-header {
  text-align: center;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 2px solid var(--article-border);
}

.article-title {
  font-size: 2.2rem;
  color: var(--article-text);
  margin-bottom: 10px;
  font-weight: 700;
}

.article-date {
  color: var(--article-muted);
  font-size: 1.05rem;
  font-weight: 500;
}

.article-content {
  font-size: 1.1rem;
  color: var(--article-text);
}

.article-content h2 {
  color: var(--article-accent);
  margin-top: 28px;
  margin-bottom: 16px;
  font-size: 1.6rem;
  font-weight: 600;
}

.article-content h3 {
  color: #374151;
  margin-top: 20px;
  margin-bottom: 10px;
  font-size: 1.2rem;
  font-weight: 600;
}

.article-content p,
.article-content ul,
.article-content ol {
  margin-bottom: 16px;
}

.article-content li {
  margin-bottom: 8px;
}

.summary {
  background: var(--article-accent-soft);
  border: 1px solid #fecaca;
  border-left: 4px solid var(--article-accent);
  border-radius: 8px;
  padding: 16px;
  margin: 20px 0;
  color: #7f1d1d;
}

.code {
  background: var(--article-surface);
  border: 1px solid var(--article-border);
  border-radius: 6px;
  padding: 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.95rem;
  overflow-x: auto;
  white-space: pre-wrap;
  margin: 12px 0;
}

.note {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 8px;
  padding: 12px;
  margin: 16px 0;
  color: #92400e;
}

.faq {
  background: var(--article-surface);
  border: 1px solid var(--article-border);
  border-radius: 8px;
  padding: 16px;
}

.faq h3 {
  margin: 0 0 10px;
}

.btn {
  display: inline-block;
  padding: 10px 16px;
  background: var(--article-accent);
  color: #fff;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
}

.btn:hover {
  background: var(--article-accent-dark);
  color: #fff;
}

.muted {
  color: var(--article-muted);
}

.ad-top-banner {
  text-align: center;
  margin: 16px 0;
  position: relative;
  transition: opacity 0.3s ease, height 0.3s ease;
}

.ad-banner.loading::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: utm-skeleton 1.5s infinite;
}

@keyframes utm-skeleton {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.ad-banner.hidden {
  opacity: 0;
  height: 0;
  overflow: hidden;
}

@media (max-width: 768px) {
  article.article-container {
    padding: 24px 18px;
    margin: 12px auto;
  }

  .article-title {
    font-size: 1.85rem;
  }
}
