/* Signals discovery controls. Only this page's filter panel is affected. */
body.signals-page .sg-filter-panel {
  --filter-ink: #123451;
  --filter-muted: #536b80;
  box-sizing: border-box;
  min-width: 0;
  margin: 20px 0;
  padding: 22px;
  border: 1px solid #d7e3ec;
  border-radius: 14px;
  background: linear-gradient(135deg, #f5faff, #fffdf7);
  color: var(--filter-ink);
}
body.signals-page .sg-filter-panel *,
body.signals-page .sg-filter-panel *::before,
body.signals-page .sg-filter-panel *::after { box-sizing: border-box; }
body.signals-page .sg-filter-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(190px, 250px);
  gap: 16px;
  align-items: end;
}
body.signals-page .sg-filter-primary,
body.signals-page .sg-filter-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}
body.signals-page .sg-filter-primary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
body.signals-page .sg-filter-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
  margin: 0;
  color: var(--filter-ink);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
}
body.signals-page .sg-filter-field > span { display: block; }
body.signals-page .sg-filter-panel input,
body.signals-page .sg-filter-panel select {
  display: block;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 46px;
  margin: 0;
  padding: 11px 12px;
  border: 1px solid #a8becf;
  border-radius: 8px;
  background: #fff;
  color: #102f49;
  font: 400 16px/1.35 Georgia, 'Times New Roman', serif;
  letter-spacing: normal;
  text-overflow: ellipsis;
  box-shadow: 0 1px 2px #12345105;
}
body.signals-page .sg-filter-panel select { padding-right: 30px; }
body.signals-page .sg-filter-panel .sg-filter-saved { min-height: 44px; cursor: pointer; }
body.signals-page .sg-filter-panel .sg-filter-saved > span:last-child {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  font-size: 16px;
  font-weight: 400;
}
body.signals-page .sg-filter-panel input[type="checkbox"] {
  display: inline-block;
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  min-height: 0;
  padding: 0;
  margin: 0;
  accent-color: #176b99;
  cursor: pointer;
}
body.signals-page .sg-filter-panel input::placeholder { color: #64788a; opacity: 1; }
body.signals-page .sg-filter-panel :is(input, select, button, summary, a):focus-visible {
  outline: 3px solid #1479ad;
  outline-offset: 3px;
}
body.signals-page .sg-filter-panel input:disabled,
body.signals-page .sg-filter-panel select:disabled { background: #eef2f5; color: #637589; cursor: not-allowed; }
body.signals-page .sg-filter-details {
  margin-top: 18px;
  padding-top: 6px;
  border-top: 1px solid #d7e3ec;
}
body.signals-page .sg-filter-details > summary {
  min-height: 44px;
  padding: 12px 2px;
  color: #17496f;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
  cursor: pointer;
}
body.signals-page .sg-filter-details > summary::marker { color: #247ca8; }
body.signals-page .sg-filter-details[open] > .sg-filter-grid { margin-top: 4px; }
body.signals-page .sg-filter-active-count {
  display: inline-block;
  min-width: 24px;
  margin-left: 8px;
  padding: 2px 7px;
  border-radius: 20px;
  background: #dceefa;
  color: #164d70;
  text-align: center;
  font-size: 13px;
}
body.signals-page .sg-filter-note {
  margin: 10px 0 0;
  color: var(--filter-muted);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
}
body.signals-page .sg-filter-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid #d7e3ec;
}
body.signals-page .sg-filter-footer #sg-result-count { color: var(--filter-ink); font-size: 16px; line-height: 1.4; }
body.signals-page .sg-filter-panel #sg-reset,
body.signals-page .sg-filter-message [data-sg-clear],
body.signals-page .sg-filter-chips button {
  min-height: 44px;
  max-width: 100%;
  padding: 9px 14px;
  border: 1px solid #aac1d3;
  border-radius: 8px;
  background: #fff;
  color: #17496f;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
  text-decoration: none;
  white-space: normal;
  overflow-wrap: anywhere;
  cursor: pointer;
}
body.signals-page .sg-filter-panel #sg-reset:hover,
body.signals-page .sg-filter-message [data-sg-clear]:hover,
body.signals-page .sg-filter-chips button:hover { background: #e8f3fb; border-color: #5c8eaf; }
body.signals-page .sg-filter-message [data-sg-clear]:focus-visible { outline: 3px solid #1479ad; outline-offset: 3px; }
body.signals-page .sg-filter-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
body.signals-page .sg-filter-chips:empty { display: none; }
body.signals-page .sg-filter-chips button { border-radius: 22px; background: #e8f3fb; font-size: 14px; }
body.signals-page .sg-filter-message { margin: 16px 0; padding: 20px; border: 1px solid #d1e0ec; border-radius: 10px; background: #f4f9fd; color: #234c69; font-size: 16px; line-height: 1.6; }
body.signals-page .sg-filter-panel [hidden] { display: none !important; }
@media (max-width: 1000px) {
  body.signals-page .sg-filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  body.signals-page .sg-filter-panel { padding: 16px; margin: 16px 0; border-radius: 10px; }
  body.signals-page .sg-filter-toolbar,
  body.signals-page .sg-filter-primary,
  body.signals-page .sg-filter-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  body.signals-page .sg-filter-footer { align-items: flex-start; }
  body.signals-page .sg-filter-panel input,
  body.signals-page .sg-filter-panel select { min-height: 48px; font-size: 16px; }
  body.signals-page .sg-filter-chips { gap: 7px; }
}
@media (forced-colors: active) {
  body.signals-page .sg-filter-panel,
  body.signals-page .sg-filter-panel :is(input, select, button) { border-color: CanvasText; }
}
