.page-articles {
  padding: 28px 0 72px;
}

.articles-head {
  max-width: 40rem;
  margin: 0 0 32px;
}

.articles-kicker {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #b45309;
  margin-bottom: 8px;
}

.articles-head h1 {
  margin: 0 0 10px;
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.2;
}

.articles-head p {
  margin: 0;
  color: var(--muted);
  font-size: 17px;
}

.article-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 22px;
}

.article-card {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border-radius: 24px;
  overflow: hidden;
  text-decoration: none;
  box-shadow: var(--shadow);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.article-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 44px rgba(40, 30, 10, 0.12);
}

.article-card-hero,
.article-hero-img {
  width: 100%;
  aspect-ratio: 2 / 1;
  object-fit: cover;
  background: linear-gradient(135deg, var(--banana-soft), var(--sky-top));
}

.article-card-hero.is-empty {
  min-height: 140px;
}

.article-card-body {
  padding: 18px 20px 22px;
  display: grid;
  gap: 8px;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
  color: var(--muted);
  font-size: 14px;
}

.article-category {
  display: inline-flex;
  align-items: center;
  background: var(--banana-soft);
  color: #7a4a00;
  border-radius: 999px;
  padding: 2px 10px;
  font-weight: 700;
  font-size: 13px;
}

.article-card h2 {
  margin: 0;
  font-size: 22px;
  line-height: 1.3;
}

.article-card-stats {
  margin: 6px 0 0;
  font-size: 13px;
  color: var(--muted);
}

.article-engagement {
  display: flex;
  align-items: center;
  gap: 18px;
  margin: 28px 0 8px;
  padding: 18px 0;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.clap-btn {
  position: relative;
  width: 64px;
  height: 64px;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: #fff;
  color: #1a1a1a;
  cursor: pointer;
  display: grid;
  place-items: center;
  box-shadow: 0 6px 18px rgba(40, 30, 10, 0.08);
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
  touch-action: none;
  user-select: none;
}

.clap-btn:hover:not(:disabled) {
  transform: scale(1.04);
  border-color: #03a87c;
}

.clap-btn.is-active {
  background: #e8faf3;
  border-color: #03a87c;
  color: #03a87c;
}

.clap-btn:disabled,
.clap-btn.is-capped {
  opacity: 0.7;
  cursor: default;
}

.clap-emoji {
  font-size: 28px;
  line-height: 1;
}

.clap-burst {
  position: absolute;
  top: -6px;
  right: -4px;
  font-size: 13px;
  font-weight: 700;
  color: #03a87c;
  pointer-events: none;
}

.clap-burst.is-pop {
  animation: clap-pop 0.45s ease-out;
}

@keyframes clap-pop {
  0% { opacity: 0; transform: translateY(6px) scale(0.8); }
  30% { opacity: 1; transform: translateY(0) scale(1.05); }
  100% { opacity: 0; transform: translateY(-10px) scale(1); }
}

.engagement-stats {
  display: grid;
  gap: 2px;
}

.engagement-stats p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.clap-total {
  color: #1a1a1a !important;
  font-size: 16px !important;
}

.articles-empty,
.articles-error,
.articles-status {
  color: var(--muted);
  font-size: 17px;
}

.article-detail {
  max-width: 760px;
  margin: 0 auto;
}

.article-detail-hero {
  margin: 0 -4px 28px;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.article-detail-hero img {
  width: 100%;
  aspect-ratio: 2 / 1;
  object-fit: cover;
  background: linear-gradient(135deg, var(--banana-soft), var(--sky-top));
}

.article-detail h1 {
  margin: 0 0 12px;
  font-size: clamp(28px, 4.4vw, 44px);
  line-height: 1.2;
}

.article-body {
  margin: 28px 0 48px;
  font-size: 18px;
  line-height: 1.75;
  color: var(--ink-soft);
}

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

.article-body h1,
.article-body h2,
.article-body h3 {
  color: var(--ink);
  line-height: 1.3;
  margin: 1.6em 0 0.6em;
}

.article-body p { margin: 0 0 1em; }

.article-body a { color: #0f6f8a; text-decoration: underline; }

.article-body ul,
.article-body ol { padding-left: 1.3em; }

.article-body img {
  border-radius: 16px;
  margin: 16px 0;
}

.article-body blockquote {
  margin: 16px 0;
  padding: 4px 0 4px 16px;
  border-left: 4px solid var(--banana);
  color: var(--muted);
}

.article-body pre {
  overflow: auto;
  background: #1c1c1c;
  color: #fff;
  padding: 14px 16px;
  border-radius: 12px;
  font-size: 14px;
}

.article-body code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.92em;
}

.article-download {
  background: var(--white);
  border-radius: 24px;
  padding: 28px 24px;
  box-shadow: var(--shadow);
}

.article-download h2 {
  margin: 0 0 8px;
  font-size: 24px;
}

.article-download p {
  margin: 0 0 18px;
  color: var(--muted);
}

.back-link {
  display: inline-flex;
  margin-bottom: 18px;
  font-weight: 600;
  text-decoration: none;
}

.back-link:hover { text-decoration: underline; }

@media (max-width: 720px) {
  .page-articles { padding-top: 16px; }
  .article-detail-hero { border-radius: 18px; }
}
