/* News Hub editorial layout: 3-view tabs, 2-level industry/topic filter bar, hot events & pagination.
 * Uses site theme CSS custom properties for full emerald/ocean/sepia/dark/midnight compatibility.
 */

.news-shell {
  max-width: 1360px;
}

.news-hero {
  margin: 1.35rem 0 1.25rem;
}

.news-hero h1 {
  margin: 0.15rem 0 0;
  font-size: clamp(1.65rem, 3vw, 2.2rem);
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.news-board {
  display: flex;
  flex-direction: column;
  gap: 0.95rem;
  padding-bottom: 2.5rem;
}

.news-empty-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.5rem;
  color: var(--muted);
}

.news-filter-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  text-align: center;
  padding: 2rem 1.5rem;
}

.news-filter-empty[hidden] {
  display: none;
}

.news-filter-empty p {
  margin: 0;
  font-size: 0.92rem;
}

.news-reset-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.42rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--accent-border);
  background: var(--accent-soft);
  color: var(--accent);
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}

.news-reset-btn:hover {
  background: var(--btn-primary-bg, var(--accent));
  border-color: var(--btn-primary-bg, var(--accent));
  color: var(--btn-primary-text, #ffffff);
}

.news-reset-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Primary 3-View Tabs */
.news-view-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface-elevated);
  backdrop-filter: blur(10px);
  align-self: flex-start;
  max-width: 100%;
}

.news-view-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.46rem 0.92rem;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.25;
  cursor: pointer;
  transition: background-color 0.16s ease, color 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.news-view-tab:hover {
  color: var(--text);
  background: var(--surface-subtle);
}

.news-view-tab:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.news-view-tab.is-active,
.news-view-tab[aria-selected="true"] {
  background: var(--btn-primary-bg, var(--accent));
  border-color: var(--btn-primary-bg, var(--accent));
  color: var(--btn-primary-text, #ffffff);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.12);
}

.news-view-tab.is-active:hover,
.news-view-tab[aria-selected="true"]:hover {
  background: var(--btn-primary-hover, var(--accent-dark));
  border-color: var(--btn-primary-hover, var(--accent-dark));
  color: var(--btn-primary-text, #ffffff);
}

.news-view-tab-icon {
  font-size: 0.92em;
  line-height: 1;
}

.news-view-tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.45em;
  padding: 0.06rem 0.42rem;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  background: var(--surface-subtle);
  color: var(--muted);
}

.news-view-tab.is-active .news-view-tab-count,
.news-view-tab[aria-selected="true"] .news-view-tab-count {
  background: rgba(255, 255, 255, 0.22);
  color: inherit;
}

[data-theme="dark"] .news-view-tab.is-active .news-view-tab-count,
[data-theme-palette="dark"] .news-view-tab.is-active .news-view-tab-count {
  background: rgba(4, 47, 46, 0.22);
}

/* 2-Level Filter Bar */
.news-filter-bar {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  padding: 0.85rem 1rem;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface-elevated);
  backdrop-filter: blur(10px);
}

/* Level 1: Industry Bar */
.news-industry-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  padding-bottom: 0.7rem;
  border-bottom: 1px solid var(--border);
}

.news-industry-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  padding: 0.34rem 0.78rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 600;
  line-height: 1.25;
  cursor: pointer;
  transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.news-industry-chip:hover {
  border-color: var(--accent-border);
  background: var(--accent-soft);
  color: var(--accent);
}

.news-industry-chip:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.news-industry-chip.is-active,
.news-industry-chip[aria-pressed="true"] {
  background: var(--accent-soft);
  border-color: var(--accent-border);
  color: var(--accent);
}

.news-industry-chip-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.35em;
  padding: 0.04rem 0.38rem;
  border-radius: 999px;
  font-size: 0.73rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  background: var(--surface-subtle);
  color: var(--muted);
}

.news-industry-chip.is-active .news-industry-chip-count,
.news-industry-chip[aria-pressed="true"] .news-industry-chip-count {
  background: var(--accent);
  color: var(--btn-primary-text, #ffffff);
}

/* Level 2: Topic/Tag Row */
.news-topic-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem 1rem;
}

.news-filter-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.42rem;
}

.news-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.28rem 0.68rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  font-family: inherit;
  font-size: 0.81rem;
  font-weight: 500;
  line-height: 1.25;
  cursor: pointer;
  transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease, transform 0.14s ease;
}

.news-filter-chip:hover {
  border-color: var(--accent-border);
  background: var(--accent-soft);
  color: var(--accent);
}

.news-filter-chip:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.news-filter-chip.is-active,
.news-filter-chip[aria-pressed="true"] {
  background: var(--btn-primary-bg, var(--accent));
  border-color: var(--btn-primary-bg, var(--accent));
  color: var(--btn-primary-text, #ffffff);
  font-weight: 600;
}

.news-filter-chip.is-active:hover,
.news-filter-chip[aria-pressed="true"]:hover {
  background: var(--btn-primary-hover, var(--accent-dark));
  border-color: var(--btn-primary-hover, var(--accent-dark));
  color: var(--btn-primary-text, #ffffff);
}

.news-filter-chip-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.35em;
  padding: 0.05rem 0.38rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  background: var(--surface-subtle);
  color: var(--muted);
  transition: background-color 0.16s ease, color 0.16s ease;
}

.news-filter-chip.is-active .news-filter-chip-count,
.news-filter-chip[aria-pressed="true"] .news-filter-chip-count {
  background: rgba(255, 255, 255, 0.22);
  color: inherit;
}

[data-theme="dark"] .news-filter-chip.is-active .news-filter-chip-count,
[data-theme-palette="dark"] .news-filter-chip.is-active .news-filter-chip-count {
  background: rgba(4, 47, 46, 0.22);
}

.news-filter-status {
  margin: 0;
  font-size: 0.8rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* Standard News Feed */
.news-feed {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  align-items: stretch;
}

@media (max-width: 1024px) {
  .news-feed {
    grid-template-columns: 1fr;
  }
}

.news-feed[hidden] {
  display: none;
}

.news-item {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.15rem 1.3rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.025);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.news-item:hover {
  transform: translateY(-1px);
  border-color: var(--accent-border);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

[data-theme="dark"] .news-item:hover,
[data-theme-palette="midnight"] .news-item:hover {
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
}

.news-item[hidden] {
  display: none;
}

.news-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.45rem;
}

.news-item-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.42rem;
  color: var(--muted);
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
}

.news-industry-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.1rem 0.48rem;
  border-radius: 6px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.35;
}

.news-item-source {
  color: var(--text);
  font-weight: 600;
}

.news-item-sep {
  opacity: 0.45;
}

.news-item-indicators {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  flex-shrink: 0;
}

.news-score-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.12rem 0.48rem;
  border-radius: 6px;
  background: var(--surface-subtle);
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  line-height: 1.3;
}

.news-score-badge.is-high {
  background: var(--accent-soft);
  color: var(--accent);
}

.news-item-ext {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.88rem;
  line-height: 1;
  opacity: 0.65;
  transition: color 0.16s ease, opacity 0.16s ease, transform 0.16s ease;
}

.news-item:hover .news-item-ext,
.news-hot-card:hover .news-item-ext,
.news-item-ext:hover {
  color: var(--accent);
  opacity: 1;
  transform: translate(1px, -1px);
}

.news-item-title {
  margin: 0 0 0.5rem 0;
  font-size: 1.08rem;
  font-weight: 700;
  line-height: 1.45;
  letter-spacing: -0.01em;
}

.news-item-title a {
  color: var(--text);
  text-decoration: none;
  transition: color 0.16s ease;
}

.news-item-title a:hover {
  color: var(--accent);
}

.news-item-summary {
  margin: 0;
  color: var(--text);
  opacity: 0.88;
  font-size: 0.92rem;
  line-height: 1.68;
}

.news-item-context {
  margin: 0.65rem 0 0 0;
  padding: 0.52rem 0.78rem;
  border-left: 3px solid var(--accent-border);
  border-radius: 0 8px 8px 0;
  background: var(--surface-subtle);
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.58;
}

.news-context-label {
  color: var(--accent);
  font-weight: 600;
  margin-right: 0.2rem;
}

.news-item-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin-top: auto;
  padding-top: 0.75rem;
}

.news-tag-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.14rem 0.52rem;
  border-radius: 6px;
  border: 1px solid transparent;
  background: rgba(128, 128, 128, 0.08);
  color: var(--muted);
  font-family: inherit;
  font-size: 0.76rem;
  font-weight: 500;
  line-height: 1.4;
  cursor: pointer;
  transition: background-color 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}

[data-theme="dark"] .news-tag-badge,
[data-theme-palette="midnight"] .news-tag-badge {
  background: rgba(255, 255, 255, 0.07);
}

.news-tag-badge:hover {
  background: var(--accent-soft);
  color: var(--accent);
}

.news-tag-badge:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.news-tag-badge.is-active,
.news-tag-badge[aria-pressed="true"] {
  background: var(--accent-soft);
  border-color: var(--accent-border);
  color: var(--accent);
  font-weight: 600;
}

/* Hot Events Ranked Feed */
.news-hot-feed {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.news-hot-feed[hidden] {
  display: none;
}

.news-hot-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.15rem 1.3rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.025);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.news-hot-card.is-top-rank {
  border-color: var(--accent-border);
}

.news-hot-card:hover {
  transform: translateY(-1px);
  border-color: var(--accent-border);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

[data-theme="dark"] .news-hot-card:hover,
[data-theme-palette="midnight"] .news-hot-card:hover {
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.3);
}

.news-hot-card[hidden] {
  display: none;
}

.news-hot-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 0.75rem;
  margin-bottom: 0.55rem;
}

.news-hot-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}

.news-hot-rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  padding: 0.14rem 0.52rem;
  border-radius: 8px;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.news-hot-rank.is-top {
  background: var(--btn-primary-bg, var(--accent));
  border-color: var(--btn-primary-bg, var(--accent));
  color: var(--btn-primary-text, #ffffff);
}

.news-hot-heat {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.14rem 0.55rem;
  border-radius: 999px;
  background: rgba(234, 88, 12, 0.1);
  border: 1px solid rgba(234, 88, 12, 0.22);
  color: #c2410c;
  font-size: 0.75rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

[data-theme="dark"] .news-hot-heat,
[data-theme-palette="dark"] .news-hot-heat,
[data-theme-palette="midnight"] .news-hot-heat {
  background: rgba(251, 146, 60, 0.14);
  border-color: rgba(251, 146, 60, 0.3);
  color: #fdba74;
}

.news-hot-sources {
  display: inline-flex;
  align-items: center;
  padding: 0.14rem 0.55rem;
  border-radius: 999px;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.news-hot-meta-right {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--muted);
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
}

.news-hot-title {
  margin: 0 0 0.45rem 0;
  font-size: 1.12rem;
  font-weight: 700;
  line-height: 1.42;
  letter-spacing: -0.01em;
}

.news-hot-title a {
  color: var(--text);
  text-decoration: none;
  transition: color 0.16s ease;
}

.news-hot-title a:hover {
  color: var(--accent);
}

.news-hot-summary {
  margin: 0;
  color: var(--text);
  opacity: 0.88;
  font-size: 0.92rem;
  line-height: 1.66;
}

.news-hot-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem 0.75rem;
  margin-top: 0.8rem;
}

.news-hot-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
}

.news-hot-detail-link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.news-hot-detail-link:hover {
  opacity: 0.85;
  transform: translateX(2px);
}

/* Expandable Related Coverage */
.news-hot-related {
  margin-top: 0.85rem;
  padding-top: 0.75rem;
  border-top: 1px dashed var(--border);
}

.news-hot-related-summary {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--muted);
  font-size: 0.81rem;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  transition: color 0.16s ease;
}

.news-hot-related-summary:hover {
  color: var(--accent);
}

.news-hot-related-list {
  list-style: none;
  margin: 0.6rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.news-hot-related-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem 0.75rem;
  padding: 0.45rem 0.65rem;
  border-radius: 8px;
  background: var(--surface-subtle);
}

.news-hot-related-title {
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  line-height: 1.45;
  flex: 1 1 240px;
}

.news-hot-related-title:hover {
  color: var(--accent);
}

.news-hot-related-meta {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--muted);
  font-size: 0.76rem;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}

/* Pagination */
.news-pagination {
  display: flex;
  justify-content: center;
  padding: 0.75rem 0 0.25rem;
}

.news-pagination[hidden] {
  display: none;
}

.news-load-more-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.55rem 1.4rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.15s ease;
}

.news-load-more-btn:hover {
  border-color: var(--accent-border);
  background: var(--accent-soft);
  color: var(--accent);
  transform: translateY(-1px);
}

.news-load-more-btn:active {
  transform: translateY(0);
}

.news-load-more-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

@media (max-width: 640px) {
  .news-view-tabs {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .news-view-tab {
    justify-content: center;
    padding: 0.45rem 0.5rem;
    font-size: 0.82rem;
    gap: 0.28rem;
  }

  .news-filter-bar {
    padding: 0.75rem 0.85rem;
  }

  .news-industry-chip {
    padding: 0.28rem 0.62rem;
    font-size: 0.8rem;
  }

  .news-item,
  .news-hot-card {
    padding: 0.95rem 1rem;
  }

  .news-filter-chip {
    padding: 0.26rem 0.6rem;
    font-size: 0.78rem;
  }

  .news-load-more-btn {
    width: 100%;
  }
}
