:root {
  --bg: #fafaf8;
  --bg-alt: #f0efe9;
  --text: #1a1a17;
  --text-muted: #55554e;
  --border: #d8d6cc;
  --accent: #1a1a17;
  --support: #1f6f43;
  --support-bg: #e5f3ea;
  --boycott: #a3311a;
  --boycott-bg: #fbe9e4;
  /* Pressure sits between support and boycott on purpose: the campaign
     is pushing a company, but it has not asked anyone to stop buying. */
  --pressure: #8a5a00;
  --pressure-bg: #fdf1dc;
  --focus: #1560d6;
  --card-bg: #ffffff;
  --radius: 10px;
  --max-width: 960px;
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: light;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

a {
  color: var(--focus);
}

img {
  max-width: 100%;
}

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

/* Header */

header.site-header {
  padding: 2.5rem 0 1.5rem;
  border-bottom: 1px solid var(--border);
}

header.site-header h1 {
  margin: 0 0 0.4rem;
  font-size: 2rem;
}

.mission {
  margin: 0 0 0.5rem;
  color: var(--text-muted);
  font-size: 1.05rem;
}

.license-line {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Search */

.search-section {
  padding: 1.25rem 0;
}

.search-section label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.4rem;
}

#search-input {
  width: 100%;
  padding: 0.65rem 0.8rem;
  font-size: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card-bg);
  color: var(--text);
}

/* Hero band placeholder */

.hero-band {
  height: 120px;
  border-radius: var(--radius);
  margin: 1rem 0;
  background: linear-gradient(120deg, #dcefe1, #f0efe9 45%, #fbe9e4);
}

/* Marquee */

.marquee-section {
  overflow: hidden;
  padding: 0.75rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.marquee-track {
  display: flex;
  gap: 2.5rem;
  width: max-content;
  animation: marquee-scroll 40s linear infinite;
}

.marquee-section:hover .marquee-track,
.marquee-track:focus-within {
  animation-play-state: paused;
}

.marquee-track img,
.marquee-track .logo-badge {
  height: 32px;
  display: block;
}

.marquee-track img.boycott-logo {
  filter: grayscale(100%);
  opacity: 0.7;
}

@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .marquee-track {
    animation: none;
  }
}

/* Filter bar */

.filter-bar {
  padding: 1.25rem 0 0.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: flex-start;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.filter-group .filter-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}

.type-buttons {
  display: flex;
  gap: 0.5rem;
}

.type-buttons button,
.chip {
  border: 1px solid var(--border);
  background: var(--card-bg);
  color: var(--text);
  border-radius: 999px;
  padding: 0.4rem 0.9rem;
  font-size: 0.9rem;
  cursor: pointer;
}

.type-buttons button[aria-pressed="true"],
.chip[aria-pressed="true"] {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  max-width: 480px;
}

#status-select {
  padding: 0.4rem 0.6rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--card-bg);
}

/* Results */

.results-count {
  margin: 1rem 0 0.5rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.card-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .card-list {
    grid-template-columns: 1fr 1fr;
  }
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.card-label {
  display: inline-block;
  align-self: flex-start;
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
}

.card-label.support {
  color: var(--support);
  background: var(--support-bg);
}

.card-label.boycott {
  color: var(--boycott);
  background: var(--boycott-bg);
}

.card-label.pressure {
  color: var(--pressure);
  background: var(--pressure-bg);
}

.status-badge {
  display: inline-block;
  align-self: flex-start;
  margin-left: 0.4rem;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.status-badge.status-active {
  color: #1e7a34;
  background: #e6f4ea;
}

.status-badge.status-won {
  color: #2451b8;
  background: #e8eefc;
}

.status-badge.status-ended,
.status-badge.status-withdrawn {
  color: var(--text-muted);
  background: var(--bg-alt);
}

.status-badge.status-paused {
  color: #7a5b00;
  background: #fff3cd;
}

/* A dormant campaign: its page is still live and still asks, but nothing has
   moved on it. Distinct from .stale-badge, which is about how long since WE
   last verified an entry. Neutral grey, not a warning colour -- the campaign
   has not failed, we just cannot show it is being worked. */
.status-badge.status-no-recent-activity {
  color: var(--text-muted);
  background: var(--bg-alt);
}

.card-top {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.card-logo {
  height: 28px;
  max-width: 120px;
}

.logo-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 28px;
  padding: 0 0.5rem;
  border-radius: 6px;
  background: var(--bg-alt);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
}

.card h3 {
  margin: 0;
  font-size: 1.05rem;
}

.card-product img {
  max-height: 96px;
  border-radius: 6px;
  border: 1px solid var(--border);
}

.card-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.card-claim-basis {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--support);
}

.stale-badge {
  display: inline-block;
  margin-left: 0.4rem;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  background: #fff3cd;
  color: #7a5b00;
  font-size: 0.75rem;
  font-weight: 600;
}

.outcome-line a {
  margin-left: 0.25rem;
}

.card-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 0.85rem;
  margin-top: 0.25rem;
}

/* Free sharing */

.sharing-section {
  margin-top: 2.5rem;
  padding: 1.5rem 0;
  border-top: 1px solid var(--border);
}

.share-buttons a.button,
.share-buttons button.button {
  display: inline-block;
  padding: 0.6rem 1.1rem;
  border-radius: var(--radius);
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  border: none;
  cursor: pointer;
  font-size: 0.95rem;
}

.share-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.share-buttons a.button,
.share-buttons button.button {
  background: var(--bg-alt);
  color: var(--text);
  font-weight: 500;
}

/* Footer */

footer.site-footer {
  margin-top: 2.5rem;
  padding: 1.5rem 0 3rem;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--text-muted);
}

footer.site-footer ul {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1rem;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
