:root {
  --bg: #f5f6f8;
  --surface: #ffffff;
  --text: #1b1f24;
  --text-muted: #5b6472;
  --border: #e1e4e9;
  --accent: #5b2d90; /* Microsoft partner-adjacent purple, swap freely */
  --accent-contrast: #ffffff;
  --new-badge: #0f7b0f;
  --new-badge-bg: #e6f4ea;
  --radius: 10px;
  font-size: 16px;
}

* { box-sizing: border-box; }

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

.wrap {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 20px;
}

.site-header {
  background: var(--accent);
  color: var(--accent-contrast);
  padding: 32px 0 24px;
}

.site-header h1 {
  margin: 0 0 4px;
  font-size: 1.75rem;
}

.subtitle {
  margin: 0;
  opacity: 0.9;
}

.meta-line {
  margin: 12px 0 0;
  font-size: 0.85rem;
  opacity: 0.85;
}

.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin: 24px 0 16px;
}

#searchInput {
  flex: 1 1 240px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 1rem;
  background: var(--surface);
}

.source-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.source-filter-chip {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 0.85rem;
  cursor: pointer;
  color: var(--text-muted);
}

.source-filter-chip[aria-pressed="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-contrast);
}

#statusArea {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

#statusArea.error {
  color: #b3261e;
}

.updates-list {
  list-style: none;
  margin: 0 0 32px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.update-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
}

.update-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.update-title {
  font-weight: 600;
  font-size: 1.02rem;
  color: var(--text);
  text-decoration: none;
}

.update-title:hover { text-decoration: underline; }

.new-badge {
  flex: 0 0 auto;
  background: var(--new-badge-bg);
  color: var(--new-badge);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 3px 8px;
  border-radius: 999px;
  text-transform: uppercase;
}

.update-summary {
  margin: 8px 0 0;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.update-meta {
  margin-top: 10px;
  font-size: 0.82rem;
  color: var(--text-muted);
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.update-meta .dot::before {
  content: "•";
  margin-right: 8px;
}

.empty-state {
  color: var(--text-muted);
  text-align: center;
  padding: 40px 0;
}

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

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14161a;
    --surface: #1d2025;
    --text: #eef0f2;
    --text-muted: #9aa2ad;
    --border: #2c3038;
    --new-badge-bg: #123420;
    --new-badge: #4fd671;
  }
}
