.notification-card {
  align-items: flex-start;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  padding: .75rem;
}
.notification-card.unread {
  border-left: 4px solid var(--brand);
}

.notification-rule-list {
  display: grid;
  gap: 8px;
  min-width: 0;
}
.notification-settings-shell,
.notification-editor-form,
.notification-rule-editor {
  box-sizing: border-box;
  max-width: 100%;
  min-width: 0;
}
.notification-settings-heading {
  align-items: start;
  flex-wrap: wrap;
  margin-bottom: var(--space-3);
}
.notification-editor-form {
  display: grid;
  gap: var(--space-3);
}
.notification-rule-editor {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: clip;
}
.notification-rule-editor[open] {
  border-color: color-mix(in srgb, var(--brand) 55%, var(--line));
  box-shadow: 0 0 0 2px rgba(31, 102, 209, .08);
}
.notification-rule-editor-summary {
  align-items: center;
  cursor: pointer;
  display: grid;
  gap: 12px;
  grid-template-columns: auto minmax(13rem, 1fr) minmax(0, 1.7fr);
  padding: 10px 12px;
}
.notification-rule-editor-summary::before {
  color: var(--muted);
  content: "›";
  font-size: 1.25rem;
  line-height: 1;
  transition: transform .12s ease;
}
.notification-rule-editor[open] > .notification-rule-editor-summary::before {
  transform: rotate(90deg);
}
.notification-rule-editor-summary::marker {
  color: var(--muted);
}
.notification-rule-identity {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.notification-rule-identity .muted {
  overflow-wrap: anywhere;
}
.notification-rule-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
  min-width: 0;
}
.notification-rule-facts .badge {
  background: var(--panel-soft);
  border: 1px solid var(--line);
  color: var(--ink);
  white-space: normal;
}
.notification-rule-facts .badge.success {
  background: #dcfce7;
  border-color: #bbf7d0;
  color: #166534;
}
.notification-rule-editor-body {
  border-top: 1px solid var(--line);
  display: grid;
  gap: var(--space-3);
  min-width: 0;
  padding: 12px;
}
.notification-rule-defaults {
  min-width: 0;
}
.notification-preference-controls {
  align-items: end;
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, max-content) minmax(12rem, 1fr);
}
.notification-rule-errors {
  margin: 0;
}
.notification-audience-details {
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px;
}
.notification-editor-footer {
  background: rgba(255, 255, 255, .96);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  bottom: var(--space-3);
  box-shadow: 0 10px 28px rgba(18, 32, 51, .12);
  justify-content: flex-end;
  padding: 10px;
  position: sticky;
  z-index: 4;
}
.notification-audience-details > summary {
  cursor: pointer;
  font-weight: 800;
}
.notification-audience-details > p {
  margin: 6px 0 10px;
}
@media (max-width: 760px) {
  .notification-rule-editor-summary,
  .notification-preference-controls {
    align-items: stretch;
    grid-template-columns: 1fr;
  }
  .notification-rule-editor-summary {
    grid-template-columns: auto minmax(0, 1fr);
  }
  .notification-rule-facts {
    grid-column: 2;
  }
  .notification-rule-facts {
    justify-content: flex-start;
  }
}
