:root {
  --articles-bg: #f4f8fb;
  --articles-panel: #ffffff;
  --articles-line: #e3edf5;
  --articles-text: #25313b;
  --articles-muted: #667786;
  --articles-navy: #062b45;
  --articles-blue: #0b74b8;
  --articles-gold: #ffb703;
  --articles-shadow: 0 14px 34px rgba(10, 35, 60, 0.09);
}

/* Page */
.articles-page {
  background: var(--articles-bg);
  color: var(--articles-text);
}

.articles-wrap {
  max-width: 1220px;
  margin: 0 auto;
  padding: 44px 20px 64px;
}

/* Listing hero */
.articles-hero {
  margin-bottom: 34px;
  padding: 64px 46px;
  border-radius: 28px;
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.22), transparent 34%),
    linear-gradient(135deg, var(--articles-navy), var(--articles-blue));
  color: #fff;
  box-shadow: var(--articles-shadow);
}

.articles-kicker,
.article-category {
  display: inline-block;
  text-transform: uppercase;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.articles-kicker {
  margin-bottom: 12px;
  color: var(--articles-gold);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
}

.articles-hero h1 {
  max-width: 900px;
  margin: 0 0 16px;
  color: #fff;
  font-size: clamp(2.3rem, 5vw, 4.6rem);
  line-height: 1.05;
}

.articles-hero p {
  max-width: 800px;
  margin: 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.1rem;
  line-height: 1.7;
}

/* Actions */
.articles-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.articles-button {
  display: inline-block;
  padding: 14px 20px;
  border-radius: 14px;
  background: var(--articles-gold);
  color: #102030;
  text-decoration: none;
  font-weight: 800;
}

.articles-button.secondary {
  background: #fff;
  color: var(--articles-navy);
}

/* Sections */
.articles-section {
  margin-top: 34px;
}

.articles-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
  margin-bottom: 18px;
}

.articles-heading h2,
.articles-note h2 {
  color: var(--articles-navy);
}

.articles-heading h2 {
  margin: 0;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
}

.articles-heading p {
  margin: 6px 0 0;
  color: var(--articles-muted);
  line-height: 1.55;
}

/* Article grid */
.article-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(285px, 1fr));
  gap: 22px;
}

.article-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  overflow: hidden;
  border: 1px solid var(--articles-line);
  border-radius: 22px;
  background: var(--articles-panel);
  box-shadow: var(--articles-shadow);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.article-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 42px rgba(10, 35, 60, 0.13);
}

.article-card-media {
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background:
    linear-gradient(135deg, rgba(11, 116, 184, 0.14), rgba(255, 183, 3, 0.18)),
    #dceaf4;
}

.article-card-media img,
.article-feature img {
  display: block;
  width: 100%;
}

.article-card-media img {
  height: 100%;
  object-fit: cover;
}

.article-card-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 175px;
  height: 100%;
  color: var(--articles-navy);
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.article-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 12px;
  padding: 22px;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--articles-muted);
  font-size: 0.85rem;
  font-weight: 700;
}

.article-card h2 {
  margin: 0;
  color: var(--articles-navy);
  font-size: 1.18rem;
  line-height: 1.32;
}

.article-card h2 a {
  color: inherit;
  text-decoration: none;
}

.article-card h2 a:hover,
.read-more-button {
  color: var(--articles-blue);
}

.article-card p {
  margin: 0;
  color: var(--articles-muted);
  line-height: 1.6;
}

.read-more-button {
  margin-top: auto;
  text-decoration: none;
  font-weight: 800;
}

.read-more-button:hover {
  text-decoration: underline;
}

/* Pagination */
.article-pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 34px;
}

.article-pagination a,
.article-pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  padding: 10px 13px;
  border: 1px solid var(--articles-line);
  border-radius: 12px;
  background: #fff;
  color: var(--articles-navy);
  text-decoration: none;
  font-weight: 800;
}

.article-pagination a:hover {
  border-color: var(--articles-blue);
  color: var(--articles-blue);
}

.article-pagination .current {
  border-color: var(--articles-blue);
  background: var(--articles-blue);
  color: #fff;
}

.article-pagination .disabled {
  opacity: 0.45;
}

/* Empty and note states */
.empty-state,
.articles-note {
  box-shadow: var(--articles-shadow);
  text-align: center;
}

.empty-state {
  padding: 28px;
  border: 1px solid var(--articles-line);
  border-radius: 18px;
  background: #fff;
  color: var(--articles-muted);
}

.articles-note {
  padding: 34px;
  border: 1px solid #ffd166;
  border-radius: 24px;
  background: linear-gradient(135deg, #fff8df, #ffffff);
}

.articles-note h2 {
  margin-top: 0;
}

.articles-note p {
  max-width: 820px;
  margin: 0 auto;
  color: #4d5b66;
  line-height: 1.7;
}

/* Single article */
.article-shell {
  max-width: 980px;
  margin: 0 auto;
  padding: 32px 20px 56px;
}

.article-hero {
  margin-bottom: 28px;
}

.article-hero .article-meta {
  gap: 12px;
  margin: 12px 0 20px;
  color: #666;
  font-size: 14px;
}

.article-excerpt {
  margin: 0 0 22px;
  color: #333;
  font-size: 18px;
  line-height: 1.6;
}

.article-feature {
  margin: 0 0 28px;
}

.article-feature img {
  height: auto;
  border-radius: 12px;
}

.article-feature figcaption {
  margin-top: 8px;
  color: #666;
  font-size: 14px;
}

.article-content {
  font-size: 17px;
  line-height: 1.8;
}

.article-content h2 {
  margin-top: 34px;
}

.article-content h3 {
  margin-top: 24px;
}

.article-content a {
  color: #0b5cab;
  text-decoration: underline;
}

.article-content ul,
.article-content ol {
  padding-left: 1.5rem;
}

.article-embed {
  margin: 28px 0;
}

.article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 28px;
}

.article-tag {
  padding: 6px 10px;
  border-radius: 999px;
  background: #eef3f8;
  font-size: 13px;
}

.article-category {
  margin-bottom: 10px;
  color: #0a5;
  font-size: 13px;
  letter-spacing: 0.04em;
}

/* Rating */
.article-rating-box {
  margin: 34px 0 10px;
  padding: 22px;
  border: 1px solid #d9e2ec;
  border-radius: 14px;
  background: #f8fbfd;
}

.article-rating-summary {
  margin: 0 0 12px;
  color: #333;
  font-size: 16px;
}

.article-rating-stars {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 14px 0;
}

.article-rating-stars label {
  padding: 8px 10px;
  border: 1px solid #ccd7e1;
  border-radius: 999px;
  background: #fff;
  cursor: pointer;
}

.article-rating-stars input {
  margin-right: 5px;
}

.article-rating-box button {
  padding: 10px 16px;
  border: 0;
  border-radius: 8px;
  background: #0b5cab;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

.rating-message,
.rating-error {
  margin: 12px 0;
  padding: 10px 12px;
  border-radius: 8px;
}

.rating-message {
  background: #e8f7ee;
  color: #176a35;
}

.rating-error {
  background: #fdecea;
  color: #9f1d1d;
}

.rating-login-note,
.rating-status-note {
  margin: 10px 0 0;
  color: #555;
}

/* Responsive */
@media (max-width: 800px) {
  .articles-wrap {
    padding: 28px 14px 44px;
  }

  .articles-hero {
    padding: 40px 24px;
    border-radius: 22px;
  }

  .articles-heading {
    display: block;
  }

  .articles-button {
    width: 100%;
    box-sizing: border-box;
    text-align: center;
  }
}