.thread-settings {
  margin: 24px 0;
  padding: 22px;
  border: 1px solid #ded6c9;
  border-radius: 17px;
  background: #fffefa;
}

.thread-settings > header,
.insight-filter-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.thread-settings > header small,
.insight-filter-heading small {
  display: block;
  color: #9a742d;
  font-size: .68rem;
  font-weight: 850;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.thread-settings h3,
.insight-filter-heading h3 {
  margin: 3px 0 4px;
  color: #24494f;
  font: 600 1.25rem Georgia, serif;
}

.thread-settings > header p {
  max-width: 680px;
  margin: 0;
  color: #687976;
  font-size: .86rem;
}

#thread-count,
#insight-filter-summary {
  flex: 0 0 auto;
  padding: 6px 10px;
  border-radius: 999px;
  background: #e7f0ee;
  color: #285d55;
  font-size: .7rem;
  font-weight: 800;
}

.thread-add-form {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 10px;
  align-items: end;
  margin-top: 18px;
  padding: 15px;
  border-radius: 13px;
  background: #f7f3e9;
}

.thread-add-form label,
.thread-manager-row label {
  display: grid;
  gap: 5px;
  color: #687976;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.thread-add-form input,
.thread-manager-row input {
  width: 100%;
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid #d6cebf;
  border-radius: 10px;
  outline: 0;
  background: #fffefa;
  color: #294b4f;
  letter-spacing: normal;
  text-transform: none;
}

.thread-add-form input:focus,
.thread-manager-row input:focus {
  border-color: #a9853e;
  box-shadow: 0 0 0 3px #d8bf822b;
}

.thread-manager-message {
  min-height: 20px;
  margin: 8px 2px 0;
  color: #7e6b43;
  font-size: .72rem;
}

.thread-manager-list {
  display: grid;
  gap: 8px;
}

.thread-manager-row {
  display: grid;
  grid-template-columns: 30px minmax(180px, 1fr) 100px auto auto;
  gap: 9px;
  align-items: end;
  padding: 11px;
  border: 1px solid #e0d9cd;
  border-radius: 12px;
  background: #fffdf8;
}

.thread-order {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin-bottom: 7px;
  border: 1px solid #d4c59f;
  border-radius: 50%;
  color: #8b6a2c;
  font-size: .7rem;
  font-weight: 800;
}

.thread-usage {
  align-self: center;
  color: #7d8986;
  font-size: .69rem;
}

.thread-save,
.thread-delete {
  min-height: 40px;
  padding: 8px 11px;
  border-radius: 9px;
  font-size: .72rem;
  font-weight: 800;
}

.thread-save {
  border: 1px solid #9bb6b2;
  background: #e7f0ee;
  color: #285d55;
}

.thread-delete {
  border: 1px solid #d7b7af;
  background: #fff8f5;
  color: #914b3d;
}

.thread-manager-empty,
.no-threads-note {
  color: #7b8581;
  font-size: .78rem;
}

.thread-manager-empty {
  display: grid;
  gap: 2px;
  padding: 18px;
  border: 1px dashed #d7cfc1;
  border-radius: 12px;
  text-align: center;
}

.insight-navigator {
  margin-top: 22px;
  padding: 20px;
  border: 1px solid #d9d1c4;
  border-radius: 18px;
  background: linear-gradient(135deg, #fbf6e8, #edf3f2);
}

.insight-filter-heading.compact {
  margin-top: 14px;
}

.insight-filter-heading.compact h3 {
  font-size: 1rem;
}

.insight-filter-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 13px;
}

.insight-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid #d0c7b7;
  border-radius: 999px;
  background: #fffefa;
  color: #536966;
  font-size: .78rem;
  font-weight: 750;
}

.insight-filter-chip small {
  display: grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  background: #eee7d8;
  color: #7d6b47;
  font-size: .63rem;
}

.insight-filter-chip.active {
  border-color: #1f5964;
  background: #1f5964;
  color: #fff;
  box-shadow: 0 5px 13px #173f4929;
}

.insight-filter-chip.active small {
  background: #ffffff24;
  color: #fff;
}

.insight-filter-divider {
  height: 1px;
  margin-top: 17px;
  background: #dcd3c3;
}

.insight-note-threads {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 8px;
}

.insight-note-threads span {
  padding: 3px 7px;
  border-radius: 999px;
  background: #ffffffa3;
  color: #6c5a34;
  font-size: .6rem;
  font-weight: 750;
}

@media (max-width: 760px) {
  .thread-settings {
    padding: 17px 15px;
  }

  .thread-settings > header,
  .insight-filter-heading {
    display: grid;
    gap: 9px;
  }

  #thread-count,
  #insight-filter-summary {
    justify-self: start;
  }

  .thread-add-form,
  .thread-manager-row {
    grid-template-columns: 1fr 1fr;
  }

  .thread-add-form label,
  .thread-manager-row label,
  .thread-usage {
    grid-column: 1 / -1;
  }

  .thread-order {
    display: none;
  }

  .thread-save,
  .thread-delete {
    width: 100%;
  }

  .insight-navigator {
    padding: 17px 14px;
  }

  .insight-filter-list {
    flex-wrap: nowrap;
    margin-left: -14px;
    margin-right: -14px;
    padding: 0 14px 5px;
    overflow-x: auto;
    scrollbar-width: thin;
  }

  .insight-filter-chip {
    flex: 0 0 auto;
  }
}
