.source-switch {
  display: flex;
  gap: 7px;
  width: max-content;
  max-width: 100%;
  margin: 0 0 16px;
  padding: 5px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #171919;
}

.source-switch a {
  padding: 9px 14px;
  border-radius: 4px;
  color: #aaa;
  white-space: nowrap;
}

.source-switch a:hover {
  color: #eee;
  background: #ffffff08;
}

.source-switch a.active {
  color: var(--amber2);
  background: #c9873520;
  box-shadow: inset 0 0 0 1px #9b642f;
}

.freshness {
  min-width: 230px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-left: 2px solid var(--green);
  border-radius: 5px;
  background: #171919;
}

.freshness small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
}

.eco-sync-form {
  margin: 0;
}

.eco-admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.eco-filter-grid {
  grid-template-columns: 2fr 1.3fr 1.2fr 1.3fr 1fr 1fr auto;
  align-items: end;
}

.eco-filter-grid .span-2 {
  grid-column: auto;
}

.eco-news-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.eco-news-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 90px;
  gap: 16px;
  padding: 19px 18px 19px 21px;
  border: 1px solid var(--line);
  border-left: 3px solid #626666;
  border-radius: 6px;
  background: linear-gradient(110deg, #1c1f1f, #171919);
}

.eco-news-card.relevance-high {
  border-left-color: var(--red);
  background: linear-gradient(110deg, #211b1a, #171919 48%);
}

.eco-news-card.relevance-medium {
  border-left-color: var(--amber);
}

.eco-news-meta {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: -4px;
}

.eco-news-content h3 {
  margin: 0 0 8px;
  font-size: 20px;
}

.eco-news-content h3 a {
  color: var(--text);
}

.eco-news-content p {
  max-width: 1100px;
  margin-bottom: 12px;
  color: #bbb7af;
}

.eco-source-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  color: var(--muted);
  font-size: 11px;
}

.eco-score,
.eco-detail-score {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 86px;
  border: 1px solid #5b5e5c;
  border-radius: 5px;
  color: var(--text);
  background: #111414;
}

.eco-score strong,
.eco-detail-score strong {
  color: var(--amber2);
  font: 700 34px Georgia, serif;
  line-height: 1;
}

.eco-score small,
.eco-detail-score small,
.eco-detail-score span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.eco-score.level-high,
.eco-detail-score.level-high {
  border-color: #8d493f;
}

.eco-detail-score {
  min-width: 125px;
  min-height: 110px;
}

.score-reasons {
  margin: 0 0 18px;
  padding-left: 22px;
  color: #c8c4bb;
}

.score-reasons li {
  padding: 6px 0;
  border-bottom: 1px solid #2c3030;
}

.methodology-strip {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 28px;
  align-items: center;
  margin-top: 24px;
}

.methodology-strip h2,
.methodology-strip p {
  margin: 0;
}

.methodology-strip p {
  color: var(--muted);
}

.eco-raw-text {
  margin-top: 14px;
}

.eco-raw-text summary {
  cursor: pointer;
  font-weight: 700;
}

.eco-raw-text pre {
  max-height: 700px;
  overflow: auto;
  white-space: pre-wrap;
  color: #bdbab3;
  background: #111414;
  border: 1px solid #303434;
  padding: 16px;
}

.dictionary-notice {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 14px;
  border-left: 2px solid var(--amber);
}

.dictionary-notice p {
  margin: 0;
  color: var(--muted);
}

.dictionary-layout {
  display: grid;
  grid-template-columns: minmax(360px, .85fr) minmax(0, 1.15fr);
  gap: 14px;
  margin-bottom: 14px;
}

.dictionary-form-panel textarea {
  min-height: 180px;
}

.dictionary-help .details {
  grid-template-columns: 150px minmax(0, 1fr);
  margin-bottom: 18px;
}

.dictionary-list-panel {
  padding-bottom: 12px;
}

.dictionary-table .dictionary-value {
  max-width: 460px;
  color: var(--text);
  font-weight: 700;
  overflow-wrap: anywhere;
}

.dictionary-delete:hover {
  border-color: var(--red);
  color: #efaaa1;
}

@media (max-width: 1250px) {
  .eco-filter-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 760px) {
  .freshness {
    min-width: 0;
    width: 100%;
  }

  .eco-filter-grid,
  .methodology-strip,
  .dictionary-layout {
    grid-template-columns: 1fr;
  }

  .dictionary-notice {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .dictionary-help .details {
    grid-template-columns: 120px minmax(0, 1fr);
  }

  .eco-news-card {
    grid-template-columns: 1fr;
  }

  .eco-score {
    min-height: 65px;
    flex-direction: row;
    gap: 9px;
  }

  .eco-score small {
    margin: 0;
  }
}
