/* ===== Wirtschaft / Economy Page ===== */

/* --- Filter-Leiste --- */
.w-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.w-filter-btn {
  padding: 0.4rem 1rem;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface);
  color: var(--text-muted);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all var(--transition);
}

.w-filter-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.w-filter-btn.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.w-filter-count {
  display: inline-block;
  margin-left: 0.3rem;
  font-size: 0.75rem;
  opacity: 0.7;
}

/* --- Topic Card --- */
.w-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 1rem;
  box-shadow: var(--shadow);
  transition: box-shadow var(--transition);
  overflow: hidden;
}

.w-card:hover {
  box-shadow: var(--shadow-lg);
}

.w-card-header {
  padding: 1.2rem 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.w-card-main {
  flex: 1;
  min-width: 0;
}

.w-card-category {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent);
  margin-bottom: 0.3rem;
}

.w-card-title {
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text);
  margin-bottom: 0.4rem;
}

.w-card-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

/* --- Asset Tags --- */
.w-asset-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.w-asset-tag {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  font-size: 0.7rem;
  font-weight: 600;
  border-radius: 4px;
  background: var(--accent-light);
  color: var(--accent);
  text-decoration: none;
  transition: all var(--transition);
}

.w-asset-tag:hover {
  background: var(--accent);
  color: #fff;
}

/* --- Scores (right side) --- */
.w-card-scores {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  flex-shrink: 0;
  align-items: flex-end;
}

.w-score {
  text-align: right;
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.3;
}

.w-score-bar {
  width: 60px;
  height: 4px;
  border-radius: 2px;
  background: var(--border);
  margin-top: 2px;
}

.w-score-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.5s ease;
}

.w-score-fill.high { background: var(--green); }
.w-score-fill.mid  { background: #D4A017; }
.w-score-fill.low  { background: var(--text-muted); }

/* --- Expand Arrow --- */
.w-card-arrow {
  flex-shrink: 0;
  font-size: 1.3rem;
  color: var(--text-muted);
  transition: transform var(--transition);
  align-self: center;
  padding: 0.2rem;
}

.w-card.open .w-card-arrow {
  transform: rotate(180deg);
}

/* --- Expandable Detail --- */
.w-card-detail {
  display: none;
  padding: 0 1.5rem 1.2rem;
  border-top: 1px solid var(--border);
}

.w-card.open .w-card-detail {
  display: block;
}

.w-detail-section {
  margin-top: 1rem;
}

.w-detail-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}

.w-detail-text {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text);
}

/* --- Source List --- */
.w-sources {
  list-style: none;
  padding: 0;
}

.w-sources li {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}

.w-sources li:last-child {
  border-bottom: none;
}

.w-source-name {
  font-weight: 600;
  color: var(--text-muted);
  flex-shrink: 0;
  min-width: 100px;
}

.w-source-title {
  flex: 1;
}

.w-source-title a {
  color: var(--text);
}

.w-source-title a:hover {
  color: var(--accent);
}

.w-source-excerpt {
  display: block;
  margin-top: 0.3rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.w-source-flag {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* --- Section Labels --- */
.w-section-label {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin: 1.5rem 0 0.8rem;
}

.w-section-label:first-child {
  margin-top: 0;
}

/* --- Headline Card (Top Stories) --- */
.w-headline {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 1rem;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.w-headline.w-hl-0 { border-left: 4px solid #2563eb; }
.w-headline.w-hl-1 { border-left: 4px solid #16a34a; }
.w-headline.w-hl-2 { border-left: 4px solid #d97706; }
.w-headline.w-hl-3 { border-left: 4px solid #9333ea; }
.w-headline.w-hl-4 { border-left: 4px solid #dc2626; }

.w-headline:hover {
  box-shadow: var(--shadow-lg);
}

.w-headline-top {
  padding: 1.5rem 1.5rem 1rem;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.w-headline-main {
  flex: 1;
  min-width: 0;
}

.w-headline-title {
  font-size: 1.3rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text);
  margin-bottom: 0.6rem;
}

/* --- Lead Article --- */
.w-lead-article {
  margin-bottom: 0.8rem;
}

.w-lead-source {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.2rem;
}

.w-lead-title {
  font-size: 1rem;
  font-style: italic;
  line-height: 1.5;
  color: var(--text);
  text-decoration: none;
}

.w-lead-title:hover {
  color: var(--accent);
}

.w-card-lead {
  margin: 0.3rem 0 0.5rem;
}

.w-card-lead .w-lead-source {
  font-size: 0.72rem;
}

.w-card-lead .w-lead-title {
  font-size: 0.88rem;
}

/* --- KI-Analyse --- */
.w-analysis {
  margin-bottom: 0.6rem;
  padding: 0.8rem 0;
  border-top: 1px solid var(--border);
}

.w-analysis-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}

.w-analysis-text {
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--text);
}

.w-headline-footer {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.w-headline-sources {
  padding: 0.6rem 1.5rem;
  border-top: 1px solid var(--border);
  cursor: pointer;
}

.w-headline-src-label {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.w-headline-sources .w-card-detail {
  display: none;
  padding: 0.5rem 0 0.3rem;
  border-top: none;
}

.w-headline-sources.open .w-card-detail {
  display: block;
}

.w-headline-sources.open .w-card-arrow {
  transform: rotate(180deg);
}

/* --- Loading / Empty --- */
.w-loading {
  text-align: center;
  padding: 3rem;
  color: var(--text-muted);
}

.w-empty {
  text-align: center;
  padding: 2rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* --- Updated timestamp --- */
.w-updated {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.3rem;
}

/* --- Disclaimer --- */
.w-disclaimer {
  margin-top: 2rem;
  padding: 1rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  line-height: 1.5;
}

/* --- Responsive --- */
@media (max-width: 640px) {
  .w-headline-top {
    flex-direction: column;
  }

  .w-headline-title {
    font-size: 1.15rem;
  }

  .w-card-header {
    flex-direction: column;
    padding: 1rem;
  }

  .w-card-scores {
    flex-direction: row;
    gap: 1rem;
    align-items: center;
  }

  .w-score-bar {
    width: 50px;
  }

  .w-card-arrow {
    position: absolute;
    right: 1rem;
    top: 1.2rem;
  }

  .w-card-header {
    position: relative;
    padding-right: 2.5rem;
  }

  .w-sources li {
    flex-direction: column;
    gap: 0.2rem;
  }

  .w-source-name {
    min-width: auto;
  }
}
