/* Cassandra — news panel: rows, tag chips, filter pills. */

/* --- News ------------------------------------------------------------- */

.news-row {
  padding: 4px 12px;
  display: grid;
  /* age | source | title | tags-on-right | utc-time */
  grid-template-columns: 50px 130px minmax(0, 1fr) minmax(0, auto) 110px;
  gap: 12px;
  font-size: 12px;
  border-bottom: 1px solid var(--surface-2);
  align-items: center;
}
@media (max-width: 720px) {
  .news-row { grid-template-columns: 50px 100px 1fr; }
  .news-row .local,
  .news-row__tags { display: none; }
}
.news-row:hover { background: color-mix(in srgb, var(--accent) 5%, transparent); }
.news-row .age { color: var(--dim); text-align: right; }
.news-row .source { color: var(--muted); font-size: 11px; }
.news-row .title  { color: var(--text); }
.news-row .title:hover { color: var(--accent); }
.news-row .local {
  color: var(--muted);
  font-size: 11px;
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* News tag chips on each row + the top-bar pill toggles */
.news-row__tags {
  display: inline-flex;
  flex-wrap: nowrap;
  gap: 3px;
  justify-content: flex-end;
  overflow: hidden;
  max-width: 100%;
}
.tag-chip {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.04em;
  color: var(--muted);
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 0 4px;
  white-space: nowrap;
  text-transform: uppercase;
  line-height: 1.5;
}

.news-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}
.news-tag {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--border);
  padding: 3px 8px;
  cursor: pointer;
}
.news-tag:hover { color: var(--accent); border-color: var(--accent); }
.news-tag[data-state="include"] {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
}
.news-tag[data-state="exclude"] {
  color: var(--negative);
  border-color: var(--negative);
  text-decoration: line-through;
}
.news-tag--clear { color: var(--dim); border-style: dashed; }
.news-tag--clear:hover { color: var(--negative); border-color: var(--negative); }


/* --- Mobile (≤480px) -------------------------------------------------- */

@media (max-width: 480px) {
  /* The 720px rule already collapsed to age | source | title and
     hid the right-side tag chips. At ≤480 we drop the source column
     too and let the title flow under the age, with source as a small
     line below the title — saves another ~100px of horizontal room. */
  .news-row {
    grid-template-columns: 50px minmax(0, 1fr);
    gap: 8px;
    padding: 6px 10px;
  }
  .news-row .source {
    grid-column: 2;
    grid-row: 2;
    font-size: 10.5px;
  }
  .news-row .title {
    grid-column: 2;
    grid-row: 1;
    font-size: 12.5px;
    line-height: 1.35;
  }

  /* Tag filter strip wraps onto multiple rows on a phone. */
  .news-tags {
    flex-wrap: wrap;
    gap: 6px;
    padding: 6px 8px;
  }
  .news-tag {
    padding: 4px 8px;
    font-size: 11px;
  }
}
