/* ===== NewsRiver base styles ===== */
:root{
  --bg: #0f1115;
  --panel: #161a22;
  --panel-2: #1b2130;
  --text: #e7ecf3;
  --muted: #a9b4c4;
  --brand: #5aa9ff;
  --ok: #32d296;
  --chip: #222836;
  --chip-active: #2d364a;
  --border: #232a39;
  --shadow: 0 10px 30px rgba(0,0,0,.35);
  --radius: 16px;
}

*{ box-sizing: border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font: 16px/1.5 system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji";
  color: var(--text);
  background: radial-gradient(1200px 1200px at 10% -20%, #1b2130 0%, #0f1115 60%);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ===== Page layout ===== */
.container{
  max-width: 1100px;
  margin: 24px auto;
  padding: 0 16px;
}

.header{
  display:flex; align-items:center; gap:14px; margin-bottom:14px;
}
.header h1{
  margin:0;
  font-size: clamp(22px, 3vw, 28px);
  letter-spacing:.2px;
}
.header .sub{
  color: var(--muted);
  font-size: 14px;
}

/* ===== Toolbar / filters ===== */
.toolbar{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap:16px;
  background: var(--panel);
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

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

.chip{
  display:inline-flex; align-items:center; gap:8px;
  padding: 8px 12px;
  background: var(--chip);
  color: var(--text);
  border:1px solid var(--border);
  border-radius: 999px;
  font-size: 13px;
  cursor: pointer;
  user-select: none;
  transition: transform .08s ease, background .2s ease, border-color .2s ease;
}
.chip:hover{ transform: translateY(-1px); }
.chip:active{ transform: translateY(0); }
.chip svg{ width:16px; height:16px; }

.chip-active{
  background: var(--chip-active);
  border-color: #3a4761;
  box-shadow: inset 0 0 0 1px rgba(90,169,255,.20), 0 1px 0 rgba(255,255,255,.04);
}

#last-updated{
  background: #1d2432;
  border-color: #2a3346;
  font-weight: 500;
}
.pulse{
  animation: pulse 1.2s ease;
}
@keyframes pulse{
  0%{ box-shadow: 0 0 0 0 rgba(90,169,255,.5); }
  100%{ box-shadow: 0 0 0 16px rgba(90,169,255,0); }
}

/* ===== Grid ===== */
#grid{
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 14px;
}

/* ===== Cards ===== */
.card{
  background: linear-gradient(180deg, var(--panel) 0%, var(--panel-2) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform .12s ease, box-shadow .12s ease, border-color .2s ease;
}
.card:hover{
  transform: translateY(-2px);
  border-color: #2b3550;
  box-shadow: 0 14px 36px rgba(0,0,0,.45);
}

.card-link{
  display:block; padding: 16px 16px 14px 16px; color: inherit; text-decoration: none;
}
.card-title{
  margin:0 0 10px 0;
  font-size: 16.5px;
  line-height: 1.35;
}

.card-meta{
  display:flex; align-items:center; gap:8px;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 8px;
}
.badge.source{
  background: rgba(90,169,255,.12);
  color: #cfe5ff;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(90,169,255,.25);
  font-size: 12px;
}
.dot{ opacity:.5; }

.card-tags{
  display:flex; gap:6px; flex-wrap:wrap;
}
.tag{
  background: #202739;
  border: 1px solid #2a334a;
  color: #cfd8ea;
  font-size: 12px;
  padding: 3px 8px;
  border-radius: 999px;
}
.tag.subtle{
  opacity:.8;
}

/* ===== Empty state ===== */
.empty{
  margin: 18px;
  color: var(--muted);
  text-align: center;
}

/* ===== Small screens ===== */
@media (max-width: 560px){
  .toolbar{
    flex-direction: column;
    align-items: stretch;
    gap:10px;
  }
}

