/* Vistas de señales (Noticias y Contenido). Comparte los tokens del shell. */

.signals-page { max-width: 1180px; margin: 0 auto; padding: 46px clamp(20px, 5vw, 64px) 84px; }

.signals-head { display: grid; gap: 10px; }
.signals-eyebrow { margin: 0; color: var(--shell-accent); font: 9px/1.4 var(--shell-mono); letter-spacing: .16em; text-transform: uppercase; }
.signals-head h1 { margin: 0; font-size: clamp(38px, 6vw, 64px); letter-spacing: -.05em; line-height: .98; }
.signals-intro { max-width: 62ch; margin: 0; color: var(--shell-muted); line-height: 1.6; }

.signals-meta, .signals-state, .timeline__label, .timeline__total, .results-summary { color: var(--shell-muted); }
.signals-state { margin: 26px 0 0; padding: 16px 20px; border: 1px solid var(--shell-border); background: var(--shell-surface); line-height: 1.6; }
.signals-meta { margin: 18px 0 0; font: 9px/1.6 var(--shell-mono); letter-spacing: .08em; text-transform: uppercase; }

/* ---------- Aviso de frescura ---------- */

.signals-freshness { margin: 4px 0 0; padding: 12px 16px; border: 1px solid var(--shell-border); background: var(--shell-surface); color: var(--shell-muted); font-size: 13px; line-height: 1.6; }
.signals-freshness--stale { border-color: rgba(255, 138, 138, .45); background: rgba(255, 138, 138, .1); color: var(--shell-danger); }

/* ---------- Bandas de filtro (Noticias) ---------- */

.filter-band { margin-top: 26px; padding: 16px 18px; border: 1px solid var(--shell-border); background: var(--shell-surface); }
.filter-band + .filter-band { margin-top: 10px; }

.timeline__head { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.timeline__label { font: 9px/1.4 var(--shell-mono); letter-spacing: .12em; text-transform: uppercase; }
.timeline__total { font: 9px/1.4 var(--shell-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--shell-accent); }
.timeline__bars { display: flex; align-items: stretch; gap: 4px; height: 76px; margin-top: 14px; overflow-x: auto; padding-bottom: 2px; }
.timeline__empty { margin: 0; color: var(--shell-muted); font-size: 12px; }

.timeline-bar {
  flex: 1 1 0;
  min-width: 26px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  gap: 3px;
  padding: 4px 2px 3px;
  border: 1px solid var(--shell-line-soft);
  border-radius: 3px;
  background: linear-gradient(to top, var(--shell-fill-muted) var(--timeline-height), transparent var(--timeline-height));
  color: var(--shell-muted);
  cursor: pointer;
}
.timeline-bar:hover { border-color: var(--shell-accent); color: var(--shell-text); }
.timeline-bar.is-selected { background: linear-gradient(to top, var(--shell-accent) var(--timeline-height), transparent var(--timeline-height)); border-color: var(--shell-accent); color: var(--shell-text); }
.timeline-bar__count { font: 9px/1 var(--shell-mono); letter-spacing: .04em; }
.timeline-bar__day { font: 10px/1 var(--shell-mono); letter-spacing: .04em; }
.timeline-bar.is-selected .timeline-bar__count, .timeline-bar.is-selected .timeline-bar__day { color: var(--shell-ink-on-accent); font-weight: 700; }

.filter-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

.search-wrap { position: relative; flex: 1 1 260px; display: flex; align-items: center; }
.search-wrap svg { position: absolute; left: 10px; width: 14px; height: 14px; fill: none; stroke: var(--shell-muted); stroke-width: 2; stroke-linecap: round; pointer-events: none; }
.search-wrap input { width: 100%; height: 36px; padding: 0 36px 0 30px; border: 1px solid var(--shell-border); border-radius: 4px; background: var(--shell-surface-2); color: var(--shell-text); font-size: 12.5px; }
.search-wrap input::placeholder { color: var(--shell-muted); }
.search-wrap input:focus-visible { border-color: var(--shell-accent); outline: 2px solid var(--shell-accent); outline-offset: 1px; }
.kbd { position: absolute; right: 8px; padding: 1px 6px; border: 1px solid var(--shell-border); border-radius: 4px; background: var(--shell-surface); color: var(--shell-muted); font: 10px/1.5 var(--shell-mono); }

.sort-wrap { display: inline-flex; align-items: center; gap: 8px; }
.sort-wrap__label { font: 9px/1 var(--shell-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--shell-muted); }
.select { height: 36px; padding: 0 8px; border: 1px solid var(--shell-border); border-radius: 4px; background: var(--shell-surface-2); color: var(--shell-text); font-size: 12px; }
.select:focus-visible { border-color: var(--shell-accent); outline: 2px solid var(--shell-accent); outline-offset: 1px; }

.filter-groups { display: flex; flex-wrap: wrap; gap: 18px 26px; margin-top: 14px; }
.chip-group { min-width: 0; }
.chip-group__label { display: block; margin-bottom: 8px; color: var(--shell-muted); font: 9px/1 var(--shell-mono); letter-spacing: .12em; text-transform: uppercase; }
.chip-group__empty { color: var(--shell-muted); font-size: 12px; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px; border: 1px solid var(--shell-border); border-radius: 999px; background: var(--shell-surface-2); color: var(--shell-muted); font-size: 12px; cursor: pointer; }
.chip:hover { border-color: var(--shell-accent); color: var(--shell-text); }
.chip.is-selected { border-color: var(--shell-accent); background: var(--shell-accent-soft); color: var(--shell-text); font-weight: 600; }
.chip__count { font: 9px/1 var(--shell-mono); letter-spacing: .04em; opacity: .82; }

/* ---------- Filtros activos y resumen ---------- */

.results-head { display: grid; gap: 8px; margin-top: 22px; }
.results-summary { margin: 0; font: 9px/1.4 var(--shell-mono); letter-spacing: .1em; text-transform: uppercase; }

.active-filters { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.active-filters__label { color: var(--shell-muted); font: 9px/1.4 var(--shell-mono); letter-spacing: .1em; text-transform: uppercase; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 2px 6px 2px 9px; border: 1px solid var(--shell-accent-line); border-radius: 999px; background: var(--shell-accent-soft); color: var(--shell-text); font-size: 11.5px; }
.pill b { font-weight: 650; }
.pill button { width: 18px; height: 18px; display: grid; place-items: center; border: 0; border-radius: 999px; background: transparent; color: var(--shell-muted); font-size: 12px; cursor: pointer; }
.pill button:hover { color: var(--shell-danger); }

/* ---------- Controles comunes ---------- */

.btn { height: 34px; padding: 0 14px; border: 1px solid var(--shell-border); border-radius: 4px; background: var(--shell-surface); color: var(--shell-text); font-size: 13px; cursor: pointer; }
.btn:hover { border-color: var(--shell-accent); }
.btn--primary { border-color: transparent; background: var(--shell-accent); color: var(--shell-ink-on-accent); font-weight: 650; }
.link-btn { padding: 0; border: 0; background: none; color: var(--shell-muted); font: 9px/1.4 var(--shell-mono); letter-spacing: .08em; text-transform: uppercase; cursor: pointer; }
.link-btn:hover { color: var(--shell-accent); text-decoration: underline; }
.icon-btn { display: inline-grid; place-items: center; height: 32px; min-width: 32px; border: 1px solid var(--shell-border); border-radius: 4px; background: var(--shell-surface-2); color: var(--shell-muted); font-size: 14px; cursor: pointer; }
.icon-btn:hover { border-color: var(--shell-accent); color: var(--shell-text); }

/* ---------- Noticias: fichas ---------- */

.signals-list { display: grid; gap: 12px; margin-top: 16px; }
.signal-record { padding: 18px 20px; border: 1px solid var(--shell-border); background: var(--shell-surface); }
.signal-record:hover { border-color: var(--shell-accent-line); }
.signal-record__meta { margin: 0; color: var(--shell-accent); font: 9px/1.4 var(--shell-mono); letter-spacing: .08em; text-transform: uppercase; }
.signal-record h2 { margin: 10px 0 8px; font-size: 20px; line-height: 1.25; letter-spacing: -.015em; }
.signal-record__subtitle { margin: 0 0 12px; color: var(--shell-muted); font-size: 13px; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.signal-record__link { color: var(--shell-accent); font-size: 12px; }

/* ---------- Estados vacios ---------- */

.signals-empty { display: grid; justify-items: start; gap: 8px; margin-top: 22px; padding: 26px 24px; border: 1px dashed var(--shell-border); background: var(--shell-surface); }
.signals-empty h3 { margin: 0; font-size: 15px; }
.signals-empty p { margin: 0; max-width: 46ch; color: var(--shell-muted); font-size: 12.5px; }

/* ---------- Accesibilidad y adaptacion ---------- */

.chip:focus-visible, .pill button:focus-visible, .timeline-bar:focus-visible, .btn:focus-visible, .link-btn:focus-visible, .icon-btn:focus-visible, .signal-record__link:focus-visible { outline: 2px solid var(--shell-accent); outline-offset: 2px; }

@media (max-width: 620px) {
  .signals-page { padding-top: 32px; }
  .timeline__bars { height: 64px; }
}

/* ---------- Contenido (creadores) ---------- */

.creators-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); margin-top: 14px; }
.creator-card { display: grid; gap: 6px; align-content: start; padding: 16px 18px; border: 1px solid var(--shell-border); background: var(--shell-surface); }
.creator-card__meta { margin: 0; color: var(--shell-muted); font: 9px/1.6 var(--shell-mono); letter-spacing: .08em; text-transform: uppercase; }
.creator-card__name { margin: 0; font-size: 14px; color: var(--shell-text); }
.creator-card__description { margin: 0; color: var(--shell-muted); font-size: 12.5px; line-height: 1.6; }
.creator-card__count { margin: 0; color: var(--shell-accent); font: 9px/1.6 var(--shell-mono); letter-spacing: .08em; text-transform: uppercase; }
.creator-card__link { color: var(--shell-accent); font-size: 12px; }
.creator-card__link:focus-visible, .creator-card:focus-within { outline: 2px solid var(--shell-accent); outline-offset: 2px; }
